2013 Aug 28 4:57 PM
Hello all,
What we are trying to do is post an MM document and then after the MM document and FI have posted, we want to post a subsequent document in FI to offset additional accounts. We don't want the across the board effects of a T030 determination change would have. Right now it was developed to at the MM posting save the document number, then after a minute or two read the document and make another FI posting. We would want this at run time.. basically create 1 MM doc and 2 FI documents in the same company code. Any help would be appreciated.
Ronnie
2013 Aug 29 6:42 AM
Hi Ronnie,
I suppose you are talking of material document posting.
You can use
BAdI : MB_DOCUMENT_BADI
Method : MB_DOCUMENT_UPDATE
Note : The UPDATE method of MB_DOCUMENT_BADI has a COMMIT WORK in it. So if COMMIT WORK is called twice then the update process terminates.
Call the BAPI as an RFC call with DESTINATION NONE and the commit also in similar fashion.
OR
Call it using IN BACKGROUND TASK
Regards
2013 Aug 28 8:15 PM
I know that there is a better way than what I will propose. Maybe by proposing it however, it will get the others to respond.
In the MM transaction, I would find the form or function where it branches to creating the FI document. Then in at then end of it I would create an implicit enhancement. There I would call the FB01 BAPI.
So how does that strike you?
Neal
2013 Aug 29 6:42 AM
Hi Ronnie,
I suppose you are talking of material document posting.
You can use
BAdI : MB_DOCUMENT_BADI
Method : MB_DOCUMENT_UPDATE
Note : The UPDATE method of MB_DOCUMENT_BADI has a COMMIT WORK in it. So if COMMIT WORK is called twice then the update process terminates.
Call the BAPI as an RFC call with DESTINATION NONE and the commit also in similar fashion.
OR
Call it using IN BACKGROUND TASK
Regards
2013 Aug 29 3:30 PM
Yes, when the material document is posted to MSEG, AFTER that and the matching FI document is posted, we need to post one additional FI document. The problem with the other BAdI/exit solutions I have looked at is that the commit hasn't happened yet so you can't commit the new document. I will look into this one.. thanks for the suggestion