‎2010 Feb 02 7:52 AM
Hi,
Already i have posted the issue, but it is not yet solved, i am facing the same problem.
Actually , my requirement is i have added one field in VA01 transaction, and when the inbound idoc triggers for sales order, the exit EXIT_SAPLVEDA_002 inside the function module IDOC_INPUT_ORDERS triggers our custom code written for the custom field updation.
I have one custom field for additional data in VA01, and i have written this code inside the exit :
data: l_vbak_added type c.
data: ls_vbap type vbap,
ls_vbak type vbak.
IF dlast_dynpro = '4001'." Here u have to use screen number for ship-to party
CHECK l_vbak_added IS INITIAL.
Ok code for addition B Screen.
ls_vbak = dxvbak.
ls_vbap = dxvbap.
dxbdcdata-fnam = 'BDC_OKCODE'.
dxbdcdata-fval = '=KZKU'.
APPEND dxbdcdata.
CLEAR: dxbdcdata.
dxbdcdata-program = 'SAPMV45A'.
dxbdcdata-dynpro = '4003'.
dxbdcdata-dynbegin = 'X'.
****
dxbdcdata-fnam = 'BDC_OKCODE'.
dxbdcdata-fval = '/00'.
*****
dxbdcdata-program = 'SAPMV45A'.
dxbdcdata-dynpro = '4003'.
dxbdcdata-dynbegin = 'X'.
*****
dxbdcdata-fnam = 'VBAP-YY_MHD_GEPREFT'.
dxbdcdata-fval = ls_vbap-YY_MHD_GEPREFT.
APPEND dxbdcdata.
CLEAR: dxbdcdata.
dxbdcdata-fnam = 'BDC_OKCODE'.
dxbdcdata-fval = '/EBACK'.
APPEND dxbdcdata.
CLEAR: dxbdcdata.
l_vbak_added = 'X'.
ENDIF.
This is the code written by me inside the exit. But it is not working properly. When i am testing my IDOC, having the data for my custom field, what happening is , from the first screen 4001 , when we press enter or click on the tick button the control will jump directly to the Additonal field Tab but it is not showing the custom screen.
Also without filling the line item data first , why the control jumps directly to the Additional Field Tab?
Also tell me why this check is used 'CHECK l_vbak_added IS INITIAL' ?
plz give me some coding
Thanks
‎2010 Feb 02 8:06 AM
Hi,
once you comment the following code and check your IDOC with break point...
'CHECK l_vbak_added IS INITIAL' .
if it works fine, then no problem otherwise check the field 'l_vbak_added ' where you would be used this field and assigned any value to this field.
according to above condition if above field dont have value then it will go to next statement otherwise it will skip from that
cursor position.