cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read data from DB within badi CHECK

RicardoRomero_1
Active Contributor
0 Likes
253

Hi all,

I have to add a validation within the badi BBP_DOC_CHECK_BADI if the user has changed any field, but a few, since the last time the document was saved.

So I need to read the data from the database to compare.


I've tried to use the FM BBP_PD_SC_GETDETAIL using the parameter I_OBJECT_ID, instead the I_GUID, but the FM retrieve the data always from the buffer. I can't use the FM  BBP_PROCDOC_RESET_BUFFER within the badi, if I do that I obtain the data from DB but the changes in the document are reset in NWBC. I've tried to use other parameters in this FM but I have always the data from the buffer.

I can use the FM BBP_PROCDOC_GETDETAIL_ARCHIVE to get the data from the DB but the data is splitted in a lot of DB tables, over 40, and is a bit puzzling to compare all the data in this way. May be I can use some FM like BBP_PD_ARCH_DOC_MAP to group the data, but I think there have to be a better way to deal with this.


Do you know if is there any FM to retrieve the data from DB in tables like the tables used in FM BBP_PD_SC_GETDETAIL ?

Thanks in advance.

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Likes

Hello Ricardo,

check below thread:

Re: Track shopping cart field changes

Regards.

Laurent.

RicardoRomero_1
Active Contributor
0 Likes

Hello Laurent,

Thanks for answer. My case is exactly the same than Arun in the thread you said, I have to control some changes made by the approver.

The FM BBP_PD_ALL_GET_DIFF works perfectly.

Thanks !

Answers (0)