2023 Nov 09 5:59 AM
HI!
When I use MIGO~MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE,
CALL RFC:
CALL FUNCTION 'ZSD_MIGO' STARTING NEW TASK 'NONE' DESTINATION lv_system
TABLES
t_item = lt_item.
AND I Need to store log tables in RFC: ZSD_MIGO. When not using COMMIT WORK, there is no guarantee that data will be saved to the log table every time. Can I use COMMIT WORK in RFC when enhancing it?
2023 Nov 09 9:42 AM
2023 Nov 09 10:21 AM
Hi Sandra,
Yes, I have tried and there were no mistakes. But I'm not sure if doing so will affect the use of the tcode MIGO.
2023 Nov 09 12:46 PM
Thanks. So it works as you wish, but you're asking for general recommendations about asynchronous and MIGO.
This kind of solution may not be good because of the LUW concept. You should commit all data which are interdependent at the same time (save all or none). Data committed in RFC and data committed in MIGO are not linked, so you'll get save partially instead of save all or none.
But maybe you don't mind having data saved by RFC (in ZSD_MIGO) while data is not saved by MIGO (RBKP, etc.) and vice versa.
2023 Nov 10 3:45 AM
2023 Nov 10 8:12 AM
For logging, rather than use an RFC you could a service connection
INSERT demo_update CONNECTION R/3*service_conn
FROM @( VALUE #( id = 'X' col1 = 1 col2 = 2 col3 = 3 col4 = 4 ) ).
COMMIT CONNECTION R/3*service_conn.
2023 Nov 10 6:28 PM
NB: updating via a secondary database connection is exactly the same question, they are both completely independent: the primary commit won't commit the secondary database updates and vice versa.
2023 Nov 13 7:56 PM
What do you have in lv_system ? Is it really an other SAP system ?
2023 Nov 14 2:21 AM
HI!The lv_system is not an other SAP system,Is the current system.The use of lv_system is to avoid permission verification