cancel
Showing results for 
Search instead for 
Did you mean: 

How to check approve/reject in BBP_DOC_CHECK_BADI

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

We are SRM 5.0 SP9. BBPCF04

When user approve or reject a Confirmation, BBP_DOC_CHECK_BADI is called.

How can I check which flag (approved/reject) is selected ? We need to skip the check logic when confirmation is rejected.

I tested to get container value of approvalstate by

BBP_PDH_WFL_WI_FROM_OBJECT_GET

BBP_PDH_WFL_CONTAINER_ELEM_GET

but BBP_DOC_CHECK_BADI is called before updating the workflow container value.

Regards,

Masa

Edited by: Masa on Feb 29, 2008 6:17 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please use the FM BBP_PD_CONF_GETDETAIL and check whether the status table E_STATUS has the corresponding status.

Regards

Kathirvel

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

The issue is CHECK BADI is called before updating the document status. Any other idea ?

Regards,

Masa

Former Member
0 Kudos

Please use the sy-ucomm (User Command) values at the doc check BADI. It should have different values for Approve and Reject. This should work for sure.

Regards

Kathirvel

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

SY table does not help in our case.

Approve and Reject are check box and user should select "Save" button after selecting the check box. So SY-UCOMM is BUTTON_END (save) in both approve and reject case.

Program SAPLBBP_CF

Dynpro 2320

Any other idea ?

Regards,

Masa

Former Member
0 Kudos

Hi Masa,

I suppose the value of check box (approve/reject) is stored in the global variable used in the FUGR for confirmation. (GV_APPROVE_REJECT will hold the value of check box)

You can read this from function group memory to know whether Approve was checked or Reject was checked.

We have used ths kind of logic many times.

Best Regards,

Prasanna

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Prasanna,

Yes. The value is stored in GV_APPROVE_REJECT in function group BBP_CF.

How can I read this function group memory from BBP_DOC_CHECK_BADI ?

Regards,

Masa

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you. Just simple ABAP technic helped us.

DATA: LV_MEMORY TYPE STRING VALUE '(SAPLBBP_CF)gv_approve_reject'.

FIELD-SYMBOLS <LV_APPROVE_REJECT> TYPE C.

ASSIGN (LV_MEMORY) to <LV_APPROVE_REJECT> .

A = Approve, R = Reject

Regards,

Masa

Former Member
0 Kudos

Hi Masa,

I am also facing the similar issue..

Can you please provide complete code to get the approve/Reject values in BADI..

Regards,

Veera

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Masa,

can you please provide the complete code for this as i also have same req.