2010 May 25 12:51 PM
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
2010 May 25 2:05 PM
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
2010 May 25 12:57 PM
Check EDIDC table, its master table for control information for IDOCs.
2010 May 25 1:02 PM
Hi,
Use function module FTR_IDOC_READ to get the control information of IDOC number.
Regards
Vinod
2010 May 25 2:05 PM
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.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |