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

idocs

Former Member
0 Likes
975

Hi all,

Please give the basic difference and functionalities of the function modules

'ALE_IDOCS_CREATE' AND 'MASTER_IDOC_DISTRIBUTE'.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
862

ALE_IDOCS_CREATE is the replacement for MASTER_IDOC_DISTRIBUTE for asynchronous BAPIs

Functionality of ALE_IDOCS_CREATE:

One or more IDocs are generated, depending on whether you have entered one or more recipients.

This module is used by all asynchronous BAPIs.

Each of the IDocs runs through the following ALE services:

Filtering

Conversion of global organizational units

Field conversions

Version changes.

If "Send Immediately" is entered in the partner profile, sending the IDoc is triggered.

In contrast to the function module MASTER_IDOC_DISTRIBUTE, no recipient is determined. Also, no linked objects are read from the IDoc.

Hi all,

Please give the basic difference and functionalities of the function modules

'ALE_IDOCS_CREATE' AND 'MASTER_IDOC_DISTRIBUTE'.

4 REPLIES 4
Read only

Former Member
0 Likes
863

ALE_IDOCS_CREATE is the replacement for MASTER_IDOC_DISTRIBUTE for asynchronous BAPIs

Functionality of ALE_IDOCS_CREATE:

One or more IDocs are generated, depending on whether you have entered one or more recipients.

This module is used by all asynchronous BAPIs.

Each of the IDocs runs through the following ALE services:

Filtering

Conversion of global organizational units

Field conversions

Version changes.

If "Send Immediately" is entered in the partner profile, sending the IDoc is triggered.

In contrast to the function module MASTER_IDOC_DISTRIBUTE, no recipient is determined. Also, no linked objects are read from the IDoc.

Read only

Former Member
0 Likes
862

<b>'MASTER_IDOC_DISTRIBUTE'</b></u>

the pupose of the fn module is to generate Communication idocs from master idocs.

communication idocs: means if there is one sender and 2 receivers, then 1 master idoc and 2 communication idocs will be generated.

so, the parameters to be passed are

1. master idoc control records(declare a structure of type EDIDC and fill control records)

2. master idoc data records(dclare an internal table of type EDIDD and fill data records)

it exports

communication idoc control records(declare an internal table of type EDIDC and pass, the fn module will return values to the table)

example:

CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'

EXPORTING

MASTER_IDOC_CONTROL = P_EDI_HEAD

TABLES

COMMUNICATION_IDOC_CONTROL = P_T_DOCNUM

MASTER_IDOC_DATA = P_PXT_IDOC_DATA

EXCEPTIONS

ERROR_IN_IDOC_CONTROL = 01

ERROR_WRITING_IDOC_STATUS = 02

ERROR_IN_IDOC_DATA = 03

SENDING_LOGICAL_SYSTEM_UNKNOWN = 04

OTHERS = 05.

IF SY-SUBRC = 0.

  • IF PI_PROTOCOLL = YES.

  • Erzeugung erfolgreich: --> t_docnum gefüllt

  • Erzeugung nicht ok : --> t_docnum nur Kopfzeile da

LOOP AT P_T_DOCNUM.

ADD 1 TO H_ZAEHLER.

ADD 1 TO P_KOMMUN_COUNT.

ADD 1 TO P_KOMMUN_COUNT_SNG. "40C

WRITE: /6 P_T_DOCNUM-DOCNUM COLOR COL_NORMAL,

25 'Segmentanzahl'(004),

P_PX_SEGMENT_COUNTER COLOR COL_NORMAL,

50 'für Zielsystem'(003),

P_T_DOCNUM-RCVPRN COLOR COL_NORMAL,

75 'for idoc ZCOND_A'.

ENDLOOP.

regards

navjot

Read only

0 Likes
862

Hi,

I need more clarification on function module 'ALE_IDOCS_CREATE'.

Thanks in advance.

subhani.