Skip to Content
avatar image
Former Member

Function Module to create Outbound IDoc

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 25, 2008 at 05:01 AM

    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,

    About WE21, BD64, sm59

    Regards

    Shiva Kumar

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 25, 2008 at 04:54 AM

    MASTER_IDOC_DISTRIBUTE

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 26, 2008 at 02:53 PM

    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 .

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 29, 2008 at 01:19 PM

    I have created function module.

    Add comment
    10|10000 characters needed characters exceeded