05-31-2013 11:08 AM
Hi Gurus,
I have requirement to create User Exit which need to be implemented in the IDoc inbound processing of the SAP ECC system .
The user exit must determine the inbound delivery number in the SAP ECC system from the SAP SNC / XML delivery number and from the supplier.
and need to delete the inbound delivery number .
Please let me know me which is the best way to delete the delivery Number .
Thanks and Regards
Urmi .
05-31-2013 12:36 PM
Copy FM IDOC_INPUT_DELVRY to your own Z Module and delete all source code (you just need the signature to be the same). Adjust IDoc configuration so this FM is called.
Within the FM you need to code similar to below:
DATA: l_e1edl20 TYPE e1edl20.
field-symbols: <idoc_data> TYPE edidd,
LOOP AT idoc_data assigning <idoc_data>
WHERE docnum = idoc_contrl-docnum.
CASE <idoc_data>-segnam.
WHEN 'E1EDL20'.
l_e1edl20 = <idoc_data>-sdata.
CLEAR l_e1edl20 -vbeln.
<idoc_data> = l_e1edl20.
ENDCASE.
ENDLOOP.
CALL FUNCTION 'IDOC_INPUT_DELVRY'
EXPORTING
input_method = input_method
mass_processing = mass_processing
IMPORTING
workflow_result = workflow_result
application_variable = application_variable
in_update_task = in_update_task
call_transaction_done = call_transaction_done
TABLES
idoc_contrl = idoc_contrl
idoc_data = idoc_data
idoc_status = idoc_status
return_variables = return_variables
serialization_info = serialization_info
EXCEPTIONS
wrong_function_called = 1
error_message = 2
OTHERS = 2.