Application Development and Automation 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: 
Read only

Idoc Sample code for FM IDOC_INBOUND_SINGLE

Former Member
0 Likes
807

Hi Experts,

Can anyone help me on with a sample code on how to use the FM IDOC_INBOUND_SINGLE. I refered the Function module documentation but it didnt help. Can anyone please help me on this.

Thanks & Regards

Naveen

1 ACCEPTED SOLUTION
Read only

venkateswarareddy_medam
Active Participant
0 Likes
679

Hi,

here is the code use like this

p_t_edidc TYPE rsari_t_edi_dc40

p_t_edidd TYPE rsari_t_edi_dd40

CALL FUNCTION 'IDOC_INBOUND_SINGLE'

EXPORTING

pi_idoc_control_rec_40 = p_t_edidc

TABLES

pt_idoc_data_records_40 = p_t_edidd

EXCEPTIONS

idoc_not_saved = 1

OTHERS = 2.

regards,

Venkat

2 REPLIES 2
Read only

venkateswarareddy_medam
Active Participant
0 Likes
680

Hi,

here is the code use like this

p_t_edidc TYPE rsari_t_edi_dc40

p_t_edidd TYPE rsari_t_edi_dd40

CALL FUNCTION 'IDOC_INBOUND_SINGLE'

EXPORTING

pi_idoc_control_rec_40 = p_t_edidc

TABLES

pt_idoc_data_records_40 = p_t_edidd

EXCEPTIONS

idoc_not_saved = 1

OTHERS = 2.

regards,

Venkat

Read only

Former Member
0 Likes
679

Hi,

See the sample code.

P_T_CONTROL_RECORD_OUT LIKE EDI_DC40.
P_T_INT_EDIDD LIKE EDI_DD40 OCCURS 0 WITH HEADER LINE.

fill the fields of the structure edi_dc40 in the control record p_t_control_record.

CALL FUNCTION 'IDOC_INBOUND_SINGLE'
    EXPORTING
      PI_IDOC_CONTROL_REC_40  = P_T_CONTROL_RECORD_OUT
      PI_DO_COMMIT            = 'X'
    IMPORTING
      PE_IDOC_NUMBER          = IDOC_NO
    TABLES
      PT_IDOC_DATA_RECORDS_40 = P_T_INT_EDIDD.

importing idoc number is optional .

Lemme know if more help required.

Rhea.