‎2010 Jun 12 7:03 PM
Hi friends,
I am using 'INPUT_IDOC_MATMAS01' as my inbound function module. I want to add one condition at the starting of this function module, if this condition turns true then IDOC_STATUS-STATUS shoud be set to '68' and then IDOC should be generated and then control should exit the function module. I am not able to do so. Even when I use 'exit' keyword, the code is getting run somewhere and hence IDOC is generated with '68' and '53'(Success) as well. I dont want to do further processing once that condition gets true.
Please guide.
Thanks,
Gaurav
‎2010 Jun 13 12:02 PM
if you add one EXIT statement at the beginning of INPUT_IDOC_MATMAS01, it means the IDoc won't be processed.
If you placed your EXIT in a loop, it exits the loop, but doesn't exit the FM.
Make sure this FM is really called. You may use an SQL trace (ST05) to identify the ABAP code which updates the EDIDC table (containing the status).
Note that 68 status is reserved to IDocs created by WE19 test tool for inbound file test.
Paste your code if you need further assistance (no more than 2500 characters, as usually, please)
‎2010 Jun 14 8:48 AM
Hi sandra,
below is the code used in the enhancement portion of the function module.
IF ERROR_FLAG = 'C'.
IDOC_STATUS-STATUS = '68'. "ERROR!
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IDOC_STATUS-MSGTY = 'E'.
IDOC_STATUS-MSGV1 = 'NO PROCESSING'.
APPEND IDOC_STATUS.
EXIT
ENDIF.Thanks,
Gaurav
‎2010 Jun 14 10:44 AM
Hi Sandra,
I am adding 'exit' at the begining of the code which i have done in an enhancement option available at the begining of the function module.
idoc_status-docnum = idoc_contrl-docnum.
idoc_status-status = '68'.
idoc_status-msgv1 = 'No need to process'.
append idoc_status.
exit.Thanks,
Gaurav