cancel
Showing results for 
Search instead for 
Did you mean: 

Shopping Cart Requirement

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

former_member184111
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

Thanks for the great reply. I will be testing this in our Dev system. Once testing is complete, I will reward points.

Cheers,

Wardell

Former Member
0 Kudos

Anubhav,

Can you provide some code that will give me the shopping cart info based on the GUID provided in the FM?

Can you also tell me what fields are available in the shopping cart from that call? Would GL account number, shopping cart $ amt be, etc?

former_member184111
Active Contributor
0 Kudos

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

Answers (0)