cancel
Showing results for 
Search instead for 
Did you mean: 

"Refresh" button in BBP_POC calls badi..... ?

diegohs
Active Participant
0 Kudos

Hi gurus,

Easy question for the wise guys, difficult question for the pupils.. .je.je. I would like to know how to "simulate" the "refresh" button located in BBP_POC transaction.

Do you know how to do it ?

Thank you !!! 😃

Best regards,

Diego

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

What i undestood from the requirement is that, you want to check the document created (whether it contains any errors or not) ?

Please refer to BBP_DOC_CHECK_BADI functionality.

or else refer to BBP_PD_SC_CHECK function module to get more details.

Likewise, you can handle your requirement.

Pls reward suitable points.

Regards

- Atul

diegohs
Active Participant
0 Kudos

Hello Atul,

Nop.. I want to simulate the "Refresh" button.. not the "Check" one.

Do you know how could I do that ?

BR,

Diego

Former Member
0 Kudos

Not a brilliant idea, but call the transaction BBP_POC in the click event of the refresh button. Not idle solution, but will work..

Rahul

diegohs
Active Participant
0 Kudos

Mmm... ok, the specific need is:

Sometimes the end-user (purchaser guy) works in BBP_POC and he/she makes a change in a field (price field for example). If he/she press the "submit" button instantly, the change is not applied to the document. So, he/she needs to press the "refresh" button in order to apply those changes. After that, the submit button will work with the most updated values.

So I would like to simulate the "refresh" button action, because my custom code needs to work with the most updated values.

Any idea guys ?

Thanks for your help !!!

Best regards.

Diego

Former Member
0 Kudos

Diego,

Have you tried to redefine your code usage/implementation to make it "event independent" trying to use BBP_DOC_CHECK_BADI like Atul said?

In the signature of the BBP_DOC_CHECK_BADI you will find the most recent values coming from UI as well, it is triggered in ORDER, SAVE or CHECK button actions... and it is always triggered before the document is posted to the DB.

If you need any further help about this, post your comments plz.

Regards,

Gerardo.

diegohs
Active Participant
0 Kudos

Hello Gerardo,

Ok, let me explain more details about this.

THE OBJECTIVE: modify a PO document, the modification should be made according the most updated values.

THE ACTUAL SOLUTION: I am executing bapi BBP_PO_MEMORY_GET in BBP_DOC_CHANGE_BADI in order to get the most updated values and make the changes.}

THE PROBLEM: if the buyer changes a field value (price field for example) and after that he/she pushes the "submit" button immediately, you will see that the price field is not updated correctly (it has the original value, not the updated one).

THE NEED: simulate the refresh button in order to fix this.. (when the user pushes the refresh button, or navigate through tabs..the field is updated correctly). Or, execute another bapi similar to BBP_PO_MEMORY_GET in order to get the most updated values always (even under those circunstances that I mentioned before).

Somebody has any idea to solve this ? 😃

Thank you!

Best regards.

Diego

Former Member
0 Kudos

Diego,

Have you found any solution for your requirement??

I have thought about it and it seems difficult to change the values after de BBP_DOC_CHANGE_BADI have been already executed, but what if you try to calculate the correct values for price in the BBP_DOC_CHECK_BADI and compare it with the document values (probably changed by user) if they are different, post an error message in the document check, and tell the user the correct price values, until the user doesn't change the price value, will be looking an error message and wont be able to SAVE the document...

Let me know what do ya think.

regards,

Gerardo.

Former Member
0 Kudos

Hi

I suspect that the BBP_DOC_CHANGE_BADI is not correctly implemented.

Pls chk whether the business object type (Filter type) of the implementation is correct.

Is it applicable for BUS2201 [Object Type EBP Local PO]. (Depends on ur scenario BUS2230 for Object Type SUSPO.

If possible paste the code of teh BADI - P_DOC_CHANGE_BADI here so that I can review the same.

Hope this will help.

Regards

- Atul

diegohs
Active Participant
0 Kudos

Ups.. I was writing a long answer, however.. I decided to evalue as objective as possible your recommendations.. and guess what I found ? for some reason, the badi implementation that I'm using is the wrong one ! The implementation is based in BBP_DOC_CHANGE_BADI also, but it displays some other methods, it receive less parameters, etc. If I activate that badi through SPRO, I get a totally different implementation !!!! =(

D*mn it... Im happy for that finding, but worried because of all the re-work needed.

Guys, I'll ask for a code "translation" to the correct badi implementation.

Thanks so much.. I'll let you know my results (and reward you points) 😃

BR,

Diego

diegohs
Active Participant
0 Kudos

Thanks guys, I had a wrong badi implementation.

Answers (0)