0% found this document useful (0 votes)
183 views3 pages

Code Snippet To Update Actual GR Date' in Inbound Delivery Using VL32 - BDC

This ABAP code snippet updates the 'Actual GR Date' field in an inbound delivery document using BDC in synchronous update mode. It takes the inbound delivery number and actual GR date as input parameters. The code defines screens and fields to populate for the BDC update, sets options to run in background mode, populates the BDC data table, and calls the transaction to update the date field. Any messages from the update are returned.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
183 views3 pages

Code Snippet To Update Actual GR Date' in Inbound Delivery Using VL32 - BDC

This ABAP code snippet updates the 'Actual GR Date' field in an inbound delivery document using BDC in synchronous update mode. It takes the inbound delivery number and actual GR date as input parameters. The code defines screens and fields to populate for the BDC update, sets options to run in background mode, populates the BDC data table, and calls the transaction to update the date field. Any messages from the update are returned.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Code Snippet to Update ‘Actual GR Date’ in

Inbound delivery using VL32 – BDC


∙April 1, 2014 ∙ ABAP, SAP LE ∙ Leave a comment
Tagged: bdc, code library
This piece of code updates ‘Actual GR Date’ in inbound delivery using BDC in
synchronous update mode. ‘Actual GR Date’ is adopted as posting date by material
document created during goods receipt.

1 *&---------------------------------------------------------------------*
2 *& Form update_grdate
3 *&---------------------------------------------------------------------*
4 * Update GR Date on Inbound delivery
5 *----------------------------------------------------------------------*
6 * -->I_DELIVERY Inbound Delivery Number
7 * -->I_GRDATE Actual GR Date
8 *----------------------------------------------------------------------*
9 FORM update_grdate USING i_delivery TYPE likp-vbeln
1 i_grdate TYPE likp-wadat_ist
0 CHANGING messages TYPE tab_bdcmsgcoll .
1 DEFINE insert_screen.
1 clear ls_bdcdata .
1 ls_bdcdata-program = &1 .
2 ls_bdcdata-dynpro = &2 .
1 ls_bdcdata-dynbegin = 'X' .
3 append ls_bdcdata to li_bdcdata .
1 END-OF-DEFINITION.
4
1 DEFINE insert_field.
5 clear ls_bdcdata .
1 ls_bdcdata-fnam = &1 .
6 ls_bdcdata-fval = &2 .
1 append ls_bdcdata to li_bdcdata .
7 END-OF-DEFINITION.
1
8 DATA : ls_bdcdata TYPE bdcdata ,
1 li_message TYPE TABLE OF bdcmsgcoll ,
9 ls_message TYPE bdcmsgcoll ,
2 ls_opt TYPE ctu_params ,
0 li_bdcdata TYPE TABLE OF bdcdata ,
2 lv_date TYPE char10 .
1
2 * Fill bdc options , run in backgound mode and with default screen size
2 ls_opt-dismode = 'N' .
2 ls_opt-defsize = 'X' .
3
2 insert_screen 'SAPMV50A' '0108' .
4 insert_field 'LIKP-VBELN' i_delivery .
2 insert_field 'BDC_OKCODE' '=UELA' .
5
2 insert_screen 'SAPMV50A' '0270' .
6 WRITE i_grdate TO lv_date .
2 insert_field 'RV50A-WADAT_IST_LA' lv_date .
7 insert_field 'BDC_OKCODE' '=SICH' .
2
8 CALL TRANSACTION 'VL32' USING li_bdcdata
2 OPTIONS FROM ls_opt
9 MESSAGES INTO li_message .
3
0 messages = li_message .
3
1 ENDFORM . "update_grdate
3
2
3
3
3
4
3
5
3
6
3
7
3
8
3
9
4
0
4
1
4
2
4
3
4
4
4
5
4
6
4
7
4
8
4
9
5
0
5
1
5
2
5
3

You might also like