cancel
Showing results for 
Search instead for 
Did you mean: 

How to reject a shopping cart in the custom program?

0 Kudos

Hi,

I'm working on the stand-alone custom program where I need to reject a shopping cart.

Looking for the sample code or a function module name

Thank you in advance

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I solved the problem myself.

here is the solution:

&----


*& Form f_reject_sc

&----


FORM f_reject_sc USING iv_sc_number TYPE t_sc_status-sc_number.

DATA:

lv_object_id TYPE bbp_ref_object_id,

lv_guid_32 TYPE bbp_guid_32,

lv_guid TYPE bbp_guid.

CONSTANTS: c_bbppd_appr_rej_compl TYPE bbp_wfl_action VALUE 'H',

c_object_type TYPE bbp_bus_object_type VALUE 'BUS2121'.

lv_object_id = iv_sc_number.

CALL FUNCTION 'BBP_PD_ALL_GET_OBJECT_GUID'

EXPORTING

iv_object_id = lv_object_id

iv_object_type = c_object_type

IMPORTING

ev_object_guid = lv_guid.

    • execute a workitem

MOVE lv_guid TO lv_guid_32.

CALL FUNCTION 'BBP_PDH_WFL_DB_UPDATE'

EXPORTING

iv_object_id = lv_object_id

iv_object_type = c_object_type

iv_action = c_bbppd_appr_rej_compl

iv_obj_changed = ''

iv_empl_review = ''

  • IV_WORKITEM_ID =

iv_user = sy-uname

iv_guid = lv_guid_32

  • IV_IN_DIALOG =

.

COMMIT WORK.

ENDFORM. " f_reject_sc

Thanks to everyone who tried to help.

vishal_sharda2
Participant
0 Kudos

Hello Alex,

I executed your code, however, its not working for me. I am using SRM 7.0.

can you please provide any pointers?

Thanks!

-Vishal

Answers (2)

Answers (2)

0 Kudos

One more thing...

once SC is rejected, it should be removed from the approver inbox.

I know function BBP_REQREQ_REJECT. it doesn't do the trick.

Former Member
0 Kudos

Hi Alex,

Try to reject the SC using the FM BBP_PDH_WFL_WI_REJECT. Need to pass the workitem id for the same inorder inorder to get the SC rejected and also get the workitem removed from the approvers inbox.

Regards

Anirban

Former Member
0 Kudos

HI,

BBP_REQREQ_REJECT This funcation module could help you..

Thanks

prasad.s