2010 Jun 02 9:53 PM
Hello Everybody,
I´ve applied the sap note 743744 and there is an instructions that i can´t use ROLLBACK or COMIIT WORK statemet, because they may lead data inconsistencies.
But i need use the command comit work after MRM_INVOICE_POST function module n my program
.
In the Note has a ROLLBACK command , and i believe the Dump is trigered cause i can´t use a commit work over a rollback .
Is possible to clean the buffer ? what command can i use ?
thank a lot
2010 Jun 02 9:59 PM
Are you trying to post the invoice in middle of any other transaction?
If so, the note restricts you to perform COMMIT WORK or ROLLBACK because if you do so, if will end the current SAP LUW and will start a new one. This might trigger an abnormal termination (short-dump).
You can just post the invoice the usual way but do not commit or rollback. When the LUW of other transaction ends, the invoice will also be posted i.e. you invoice data will be saved or rollback depending on the situation.
Let me know if you have any queries.
Thanks,
Saurabh
Edited by: SaurabhBuksh on Jun 2, 2010 10:59 PM
Edited by: SaurabhBuksh on Jun 2, 2010 10:59 PM
2010 Jun 02 9:59 PM
Are you trying to post the invoice in middle of any other transaction?
If so, the note restricts you to perform COMMIT WORK or ROLLBACK because if you do so, if will end the current SAP LUW and will start a new one. This might trigger an abnormal termination (short-dump).
You can just post the invoice the usual way but do not commit or rollback. When the LUW of other transaction ends, the invoice will also be posted i.e. you invoice data will be saved or rollback depending on the situation.
Let me know if you have any queries.
Thanks,
Saurabh
Edited by: SaurabhBuksh on Jun 2, 2010 10:59 PM
Edited by: SaurabhBuksh on Jun 2, 2010 10:59 PM
2010 Jun 02 10:15 PM
Hi SaurabhBuksh,
First thak you for your atention.. yes my commit work statement is in the mddle of another transaction.
But my program was structured in this way, for another person. So i need find a solution for that ...
The problem is, if i take off the commit work, the program rollbacking , and do nothing.....!!!
thank
2010 Jun 02 10:25 PM
Okay, I think, your requirement is that even if your super-transaction performs a ROLLBACK (or may be COMMIT-WORK), you still want to post your invoice.
If that is the case, you should try using CALL FUNCTION 'MRM_INVOICE_POST' IN UPDATE TASK.
The update task addition would would start the function module processing in a separate session. The processing starts when the super (wrapper) transaction performs the COMMIT WORK or ROLLBACK.
Note that, you would not be able to debug the function-module directly. If you want so, you would need to perform the following steps:
1. Start your super-transaction.
2. Enter /H to start the debugger and then press the save button.
3. Press the 'Settings' button on top-right.
4. Mark the check box 'Update Debugging'.
5. Upon commit work, you function module call would appear in a separate session.
Hope that will help you.
Let me know if that works for you.
Regards,
Saurabh
2010 Jun 02 11:13 PM
unhappily doesn´t work....
DUMP :
text
Non-update function module called for update
thank a lot
2010 Jun 02 11:29 PM
Oops!! My Bad!!
I am so sorry. Forgot to check the type of Function module.
You can try the following, but I don't guarantee it because somebody told me that since the super-transaction is rolling back, therefore, this will also be rollback.
You can include your function-module MRM_INVOICE_POST in a separate executable program (Type-1 program).
After calling your function module, do a COMMIT WORK AND WAIT.
Instead of doing CALL FUNCTION directly, use SUBMIT statement to call this program. The SUBMIT statement runs the program in a separate session.
Hope that works. I am leaving now.
Regards,
Saurabh
2010 Jul 22 10:28 AM
Call MRM_INVOICE_POST function module in a new wapper V2 update function module.