Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the status in Badi EQUI_UPDATE?

kerzd
Discoverer
0 Kudos

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

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

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

7 REPLIES 7

raymond_giuseppi
Active Contributor
0 Kudos

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

0 Kudos

Yes I agree Raymond !!

0 Kudos

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?

0 Kudos

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

jogeswararao_kavala
Active Contributor
0 Kudos

hello Jutta

I would use user-exit IEQM0003 for this situation. (STATUS_READ would work properly here)

kerzd
Discoverer
0 Kudos

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

0 Kudos

This message was moderated.