07-25-2008 5:53 AM
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.
07-25-2008 6: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,
Regards
Shiva Kumar
07-25-2008 5:54 AM
07-25-2008 6: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,
Regards
Shiva Kumar
07-26-2008 3: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 .
07-29-2008 2:19 PM