01-13-2016 12:08 PM
Hi Experts,
I'm using the Badi EQUI_UPDATE to perform an action after creating or changing an equipment. The problem is that there are no status information available. The function module STATUS_READ delivers wrong results because the buffer is no more available during posting. So the function module STATUS_READ gets the status information from the database an these are the status information before update.
Could anybody give me a clue how to get the right status information in Badi EQUI_UPDATE?
Thanks in advance
01-14-2016 9:03 AM
Somewhere, well at this step they are only parameter in the execution of update FM STATUS_UPDATE. This FM is called during a perform at commit so should be executed after the execution of EQUI_UPDATE (which is directly recorded in EQUIPMENT_SAVE execution before execution of statement COMMIT WORK)
So those data may be in table VBDATA or in memory of current RSM13000 execution, but won't be easy to read (and hard to maintain?) start with TH_GET_VBKEY, then VBMOD to get counter for FM and some import from database VBDATA to get parameter (try to debuf SM13, look for FM TH_DISPLAY_UPDATE_DATA_ALV on how to get access to parameters)
AFAIK there is also a BTE (P&S PM000020 equipment update) with more data?
Regards,
Raymond
01-14-2016 9:03 AM
Somewhere, well at this step they are only parameter in the execution of update FM STATUS_UPDATE. This FM is called during a perform at commit so should be executed after the execution of EQUI_UPDATE (which is directly recorded in EQUIPMENT_SAVE execution before execution of statement COMMIT WORK)
So those data may be in table VBDATA or in memory of current RSM13000 execution, but won't be easy to read (and hard to maintain?) start with TH_GET_VBKEY, then VBMOD to get counter for FM and some import from database VBDATA to get parameter (try to debuf SM13, look for FM TH_DISPLAY_UPDATE_DATA_ALV on how to get access to parameters)
AFAIK there is also a BTE (P&S PM000020 equipment update) with more data?
Regards,
Raymond
01-14-2016 9:19 AM
01-14-2016 2:58 PM
Hi Raymond,
Thanks für your solution. I changed my source in Badi EQUI_UPDATE as described:
But FM TH_GET_VBKEY gets the wrong VB-Key, don't know why . The VB-Key after TH_GET_VBKEY don't exist in table vbmod.
Do you have an idea?
01-15-2016 11:25 AM
You may be required to assign some pointer to data of report RSM13000 (if allowed?) to read current record of internal table vbmod_tabl for vbkey field, or even vbdata too?
Else change solutio to add some custom FM execution in update V2 or background task at implict enhancement end of EQUIPMENT_SAVE?
Regards,
Raymond
01-15-2016 12:27 PM
hello Jutta
I would use user-exit IEQM0003 for this situation. (STATUS_READ would work properly here)
01-18-2016 10:17 AM
Hi Experts,
That was really a challenge, but with all your help I mastered ist. Thank you all for your answers. Now I get the right VB-Key with an assign.
I send an interface to SAP-PO, so I prefer to use the Badi EQUI_UPDATE instead of user-exit IEQM0003.
Many thanks
08-16-2016 7:47 AM