Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAP ECC Inbound delivery number to be deleted in DELVRY03.

Former Member
0 Kudos

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 .

1 REPLY 1

PeterJonker
Active Contributor
0 Kudos

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.