‎2008 Apr 24 12:36 PM
Dear all,
I need to clarify scneario below:
INBOUND process
Receive an Idoc, and inbound FM Z_TEST_IN will be executed. In inbound FM Z_TEST_IN, i have to update both Table ZHEADER and ZITEM. Since they are Header and item table, so if one of the table updating failed I've to perform rollback.
This is what i plan to do. Create 2 update task FM, one for ZHEADER update and one for ZITEM update. It will look like this:
Function Z_TEST_IN
CALL FUNCTION 'Z_UPDATE_HEADER'
IN UPDATE TASK
CALL FUNCTION 'Z_UPDATE_ITEM'
IN UPDATE TASK
ENDFUNCTIONMy question would be:
1. Is there a system COMMIT WORK predefined in ALE layer? Or should i code an explicit COMMIT WORK in Inbound FM Z_TEST_IN?
2. Let's say update fail on one of the table, then ROLLBACK WORK will be triggered. So i'm aspecting data will not update to both tables, but how about the Inbound Idoc creation? Will the idoc still be created and shown in WE05?
Your comment is highly appreciated. Thanks in advance.
‎2008 Apr 24 12:47 PM
Hi,
1.You are using the Zfunction module,So you need to commit explicitly.
2.For standard ,implicitly done.
3.There is no need to create inbound IDoc.While processing only the Inbound idoc created.
4.Suppose if u want to create just go for We30.
5.We05 for just gives the list of idocs created.
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30 )
Create Message Type ( WE81 )
Assign Idoc Type to Message Type ( WE82 )
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
Regards,
Shiva.
‎2008 Apr 24 3:06 PM
Hi Shiva,
Thanks for your reply. Perhaps maybe i left out below info:
Inbound FM Z_TEST_IN is being assigned to a customize Message type - ZMSGTYP.
I'm just curious abt your comment regarding i need to code explicit COMMIT WORK in the Inbound FM Z_TEST_IN. Because I'm concerning if the update fail and trigger ROLLBACK WORK, it will affecting the IDOC creation. Don't you think the same? Do you know if there useful reading materail mentioning about this?
Thanks again.
‎2010 Aug 05 9:00 PM
any answers for this please ???
I have similar issue. I want to commit a BAPI BAPI_GOODSMVT_CREATE , which I will use in an implicit enhancement in FM IDOC_INPUT_INVOIC_MRM.
This FM is called during Inbound IDOC incoming.
I want to commit this BAPI BAPI_GOODSMVT_CREATE before IDOC is posted. So if I create a wrapper FM for this BAPI and call that in update task ...will the BAPI get commited before IDOC is posted if I set in se37->Attributes Tab -> Update Module ->Start Immed.
Any answers will be highly appreciated.
Thanks
‎2010 Aug 05 9:32 PM
Please, ask a new question (and just refer to this thread using {thread:id=...} markup if you feel it's needed, it shows at least that you searched the forum)