on 07-17-2011 2:37 PM
I have a business requirement to require an attachment on all Shopping Cart saves. Is there a BADI where I could enfoce this business requirement or is there an alternative method?
Hi Wardell,
You can enforce this check in the BBP_DOC_CHECK_BADI . Use the FM BBP_PD_SC_GETDETAIL and check the Export parameter ET_ATTACH if it is initial throw an error.
Thanks,
Anubhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Wardell,
Yes the FM gives pretty much ALL information about the SC. Test the FM in SE37.
Belwo is sample code:
data: ls_header type bbp_pds_sc_header_d,
lt_item type table of bbp_pds_sc_item_d,
lt_account type table of bbp_pds_acc,
lt_partner type table of bbp_pds_partner,
ls_partner type bbp_pds_partner,
ls_item type bbp_pds_sc_item_d,
ls_account type bbp_pds_acc,
it_attach type type BBPT_PDS_ATT_T,
ls_attach like line of it_attatch.
call function 'BBP_PD_SC_GETDETAIL'
exporting
i_guid = iv_doc_guid
i_with_itemdata = 'X'
importing
e_header = ls_header
tables
e_item = lt_item
e_account = lt_account
e_partner = lt_partner.
loop at it_item into ls_item.
read table et_attach transporting no field with key p_guid = ls_item-guid.
if sy-subrc NE 0.
////display error message
endif.
endloop.
Thanks,
Anubhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.