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

Determination Idoc Control data - Outbound

Former Member
0 Likes
1,107

Hi Guru's

I would like to know how to get the idoc control data, like receiver port and receiver partner. For example:

I have an ABAP program which collects the IDOC data at the end I want to send out the IDOC, but what is the best way to determine the receiver information? Or how does it work in relation with partner profiles?

Best regards,

Guido Koopmann

1 ACCEPTED SOLUTION
Read only

brad_bohn
Active Contributor
0 Likes
751

You don't need to specify all of the information - your distribution model will take care of it. Do something like this snippet of code for the control record for output-based processing:


* Populate the control record
  gs_ctrlout = gs_ctrlin.

  CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
    IMPORTING
      own_logical_system             = lv_logsys
    EXCEPTIONS
      own_logical_system_not_defined = 1
      OTHERS                         = 2.

  IF sy-subrc EQ 0.
    gs_ctrlout-sndprt = 'LS'.
    gs_ctrlout-sndprn = lv_logsys.
  ELSE.
...
  ENDIF.

  gs_ctrlout-serial(8)   = sy-datum.
  gs_ctrlout-serial+8(6) = sy-uzeit.

If you have a standalone program, before calling MASTER_IDOC_DISTRIBUTE, you just need to fill the message type and IDOC type in the control record.

Hi Guru's

I would like to know how to get the idoc control data, like receiver port and receiver partner. For example:

I have an ABAP program which collects the IDOC data at the end I want to send out the IDOC, but what is the best way to determine the receiver information? Or how does it work in relation with partner profiles?

Best regards,

Guido Koopmann

3 REPLIES 3
Read only

Former Member
0 Likes
751

Check EDIDC table, its master table for control information for IDOCs.

Read only

Former Member
0 Likes
751

Hi,

Use function module FTR_IDOC_READ to get the control information of IDOC number.

Regards

Vinod

Read only

brad_bohn
Active Contributor
0 Likes
752

You don't need to specify all of the information - your distribution model will take care of it. Do something like this snippet of code for the control record for output-based processing:


* Populate the control record
  gs_ctrlout = gs_ctrlin.

  CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
    IMPORTING
      own_logical_system             = lv_logsys
    EXCEPTIONS
      own_logical_system_not_defined = 1
      OTHERS                         = 2.

  IF sy-subrc EQ 0.
    gs_ctrlout-sndprt = 'LS'.
    gs_ctrlout-sndprn = lv_logsys.
  ELSE.
...
  ENDIF.

  gs_ctrlout-serial(8)   = sy-datum.
  gs_ctrlout-serial+8(6) = sy-uzeit.

If you have a standalone program, before calling MASTER_IDOC_DISTRIBUTE, you just need to fill the message type and IDOC type in the control record.