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

Function Module to create Outbound IDoc

Former Member
0 Likes
11,474

I have created a segment (ZSEGPRO), basic type (ZIDOCPRO) and message type (ZMSGPRO) to create a custom IDoc. Now I have to write a Function Module to create Outbound IDoc.

I want to know what will be in Import, Export, Changing, Tables, Exceptions and Source code of that function module. The fields used in the segment ZSEGPRO is given below:

Fld NameSource Data Elmn Description

PRODUCT MARA MATNR Material number

TEXT MAKT MAKTX Material description

PRN MARA YYBCEZNDR Print Field

Additional information: Export parameter will be BAPIRETURN for holding error message(if any).

These Function Module need not require to be RFC enabled.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,069

Hi ,

Refer these:

There are two main reasons

1) Make sure you call COMMIT WORK after the MASTER_IDOC_DISTRIBUTE

http://help.sap.com/saphelp_nw04/helpdata/en/78/21783151ce11d189570000e829fbbd/content.htm

2) The rest of the setting of the ALE IDoc might not have been done

http://help.sap.com/saphelp_46c/helpdata/en/78/2177c951ce11d189570000e829fbbd/frameset.htm

You can use the Area Menu WEDI and do the rest of the settings.

ALE Quick Start guide and ALE Programming Guides for your reference

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf

Recent discussion which could be helpful,

Regards

Shiva Kumar

4 REPLIES 4
Read only

Former Member
0 Likes
4,069

MASTER_IDOC_DISTRIBUTE

Read only

Former Member
0 Likes
4,070

Hi ,

Refer these:

There are two main reasons

1) Make sure you call COMMIT WORK after the MASTER_IDOC_DISTRIBUTE

http://help.sap.com/saphelp_nw04/helpdata/en/78/21783151ce11d189570000e829fbbd/content.htm

2) The rest of the setting of the ALE IDoc might not have been done

http://help.sap.com/saphelp_46c/helpdata/en/78/2177c951ce11d189570000e829fbbd/frameset.htm

You can use the Area Menu WEDI and do the rest of the settings.

ALE Quick Start guide and ALE Programming Guides for your reference

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf

Recent discussion which could be helpful,

Regards

Shiva Kumar

Read only

Former Member
0 Likes
4,069

use this....

fill the data record with the it_data and control with the control cocument no..

CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'

EXPORTING

master_idoc_control = it_control

TABLES

communication_idoc_control = it_result

master_idoc_data = it_data .

Read only

Former Member
0 Likes
4,069

I have created function module.