cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify changed rows in BBP_DOC_CHECK_BADI ?

Former Member
0 Kudos

Hi Experts,

I have a requirement to give an error message if a row is changed in SRM PO for which some custom fields are marked. We need to identify the changed rows in the DOC check badi for this purpose, how to achieve?

Do we need to export the data from DOC_CHANGE to DOC_CHECK? or there is any better mechanism?

This may be a silly question, however, any leads would be helpful.

Thanks

Mohit

Accepted Solutions (1)

Accepted Solutions (1)

RicardoRomero_1
Active Contributor
0 Kudos

Hi,


I don't know if there is a proper method to know that...

As a workaround what you can do is create an attribute in the class and fill it with the items you get using FM BBP_PD_PO_GETDETAIL at the end of the method.

Next time the badi is triggered you can compare the items you obtain in BBP_PD_PO_GETDETAIL with the items you have in your attribute.

The problem is that the badi check is triggered several times in a row... so maybe you need to control when to update the attribute table...

Regards,
Ricardo.

Former Member
0 Kudos

Thanks Ricardo, I am also checking if there is any other custom way already in my client's system to control this, if not, will try this method.

Thanks again

Mohit

Answers (1)

Answers (1)

vinita_kasliwal
Active Contributor
0 Kudos

Hi Mohit

I faced this issue sometime back you can try a couple of methods ideally the doc_change reflects the changed value only .. check the parameter  value( IV_MODE ) and see it is U .

You must be calling FM BBP_PD_PO_GETDETAIL there will be a table with version  E_VERSION

check if it has multiple entries if yes then take the latest version of document GUID and call the FM again

and this time would give you the changed value .

Hope this helps .

Regards

Vinita

Former Member
0 Kudos

Hi Vinita,

Thanks for your reply.

Here the case is different, when we change any saved document, we don't have multiple entries in the e_version table, it contains different entries only if we are trying to change an ordered document.

I am still looking for the right solution. Will post once I get.

Thanks

Mohit

venkatakrishna
Active Participant
0 Kudos

Hi Mohit,

if your looking for custom fields read data from BBP_PDHSC and BBP_PDISC by passing

PO guid values and compare those values with signature values in BBP_DOC_CHANGE_BADI~BBP_PO_CHANGE.

OR Try Function module BBP_CHANGE_DOC_GET_NEW for getting the change documents.

Regards,

Venkata Krishna