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: 

creating inbound idoc!!

Former Member
0 Kudos

Hi,

i have the control and sdata in my internal table and i need to pass these to some fm which can create inbound IDoc for me...whats the way out?

does just passing sdata to my segment will create the IDOC?

Regards

Gunjan

3 REPLIES 3

ferry_lianto
Active Contributor
0 Kudos

Hi,

You can use FM IDOC_INBOUND_WRITE_TO_DB to create an inbound IDoc.


...

CALL FUNCTION 'IDOC_INBOUND_WRITE_TO_DB'
    EXPORTING
      PI_STATUS_MESSAGE       = I_EDIDS
    IMPORTING
      PE_IDOC_NUMBER          = DOCNUM
      PE_STATE_OF_PROCESSING  = STPROC
      PE_INBOUND_PROCESS_DATA = I_TEDE2
    TABLES
      T_DATA_RECORDS          = I_EDIDD
    CHANGING
      PC_CONTROL_RECORD       = I_EDIDC
    EXCEPTIONS
      IDOC_NOT_SAVED          = 1
      OTHERS                  = 2.

...

Regards,

Ferry Lianto

Former Member
0 Kudos

Hi,

Check the following link:

http://www.sapbrain.com/TUTORIALS/TECHNICAL/IDOC_tutorial.html

Regards,

Bhaskar

Former Member
0 Kudos

Hi Gunjan,

IDOC_INBOUND_WRITE_TO_DB creates an inbound IDoc.

Regards,

Younus

<b>Reward Helpful Answers!!!</b>