on 07-28-2011 7:38 AM
I am creating the shopping cart using the standard function module BAPI_SCEC_CREATE. After the shopping cart creation, I use the FM BAPI_TRANSACTION_COMMIT , so that the created shopping cart is committed.
Now , The problem is, if I create a shopping cart using the above process, it gets into awaiting approval state. What do i do to save a shopping cart rather than creating it. I mean to say, the state of the shopping cart should be saved.
And let me know the procedure to update an existing shopping cart which is in saved state.
Thanks,
Karthik Babu.
Edited by: karthik_pulluru on Jul 28, 2011 12:27 PM
Hi,
Thank you all. I could change my implementation and used BBP_PD_SC_CREATE fm and passed IV_PARK with 'X'.
Karthik Babu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do we have any base tables that stores item details, org data.., etc during the shopping cart creation. Please help me on this.
Thanks,
Karthik Babu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prasanna,
I called BBP_PD_SC_SAVE by passing header guid of shopping cart. but it is throwing me, buffer table not up to date. will you please help me in this. do i need to pass any other things to that FM apart from guid of shopping cart.
To my notice, i have found that , even if i dont pass item details, the shopping cart is being created. and even irrespective of , if i pass all the item details, partner details, org data , the shopping cart is being created in saved state.
and even the messages table is empty. i mean no errors are being generated. How is this possible.?
Thanks,
Karthik Babu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As per your suggestions, I am using BBP_PD_SC_CREATE FM to create my shopping cart. the shopping cart is being created in HELD state. But, the item details, partner details, account details and org data is not being inserted.
DATA iv_header type BBP_PDS_SC_HEADER_IC.
lv_header_ref = '1'.
lv_item_count = '2'.
iv_header-guid = 1.
iv_header-description = 'test for save cart'.
iv_header-currency = 'USD'.
iv_header-process_type = 'SHC'.
*ls header
ls_header-process_type = 'SHC'.
ls_header-currency = 'USD'.
ls_header-subtype = 'EP'.
ls_header-businessprocess = '1'.
*lt item
ls_item-guid = '2'.
ls_item-number_int = '0000000002'.
ls_item-parent = '1'.
ls_item-description = 'Deep Groove Lower Fuser'.
ls_item-product_type = '01'.
ls_item-category_id = '00106'.
ls_item-quantity = '1.000'.
ls_item-unit = 'EA'.
ls_item-gross_price = '39.0000'.
ls_item-price_unit = '1'.
ls_item-deliv_date = sy-datum + 1.
ls_item-be_stge_loc = '0001'.
ls_item-be_co_code = '1000'.
ls_item-currency = 'USD'.
ls_item-be_plant = '1000'.
ls_item-be_pur_group = '003'.
ls_item-be_pur_org = '1000'.
*****To be populated from Header Data
append ls_item to lt_item.
account data
data: ls_account type BBP_PDS_ACC ,
rt_account_data type BAPIT_ACC.
ls_account-p_guid = '2'.
ls_account-acc_no = '0001'.
ls_account-g_l_acct = '400000'.
ls_account-cost_ctr = '1000'.
ls_account-co_area = '1000'.
ls_account-profit_ctr = '1402'.
ls_account-acc_cat = 'CC'.
append ls_account to lt_account.
*bupa data
data:
ls_bup type BBP_PDS_PARTNER,
rt_bupa_det TYPE BAPIT_BUP_C.
ls_bup-parent_guid = 2.
ls_bup-partner_fct = '00000016'.
ls_bup-PARTNER_no = '0000000206'.
ls_bup-mainpartner = 'X'.
ls_bup-p_guid = '2'.
append ls_bup to lt_bup.
ls_bup-parent_guid = 2.
ls_bup-partner_fct = '00000075'.
ls_bup-partner_no = '0000000007'.
ls_bup-mainpartner = 'X'.
ls_bup-p_guid = '2'.
append ls_bup to lt_bup.
*org data
data: ls_org type BBP_PDS_ORG ,
rt_org_det type BAPIT_ORG_C.
**********Org
ls_org-proc_org_ot = 'O'.
ls_org-proc_org_id = '50000011'.
ls_org-proc_group_ot = 'O'.
ls_org-proc_group_id = '50000012'.
ls_org-p_guid = '2'.
append ls_org to lt_org.
data e_header type BBP_PDS_SC_HEADER_D.
CALL FUNCTION 'BBP_PD_SC_CREATE'
EXPORTING
I_REF_GUID =
I_BAPIMODE = 'X'
I_PARK = 'X'
I_SAVE = ' '
I_TESTRUN = ' '
I_HEADER = IV_HEADER
I_SRC_GUID =
I_SRC_OBJECT_TYPE =
IT_ATTACH =
IV_MSG_SCENARIO = ' '
IMPORTING
E_HEADER = e_header
ET_ATTACH =
TABLES
I_ITEM = lt_item
I_ACCOUNT = lt_account
I_PARTNER = lt_bup
I_CONFIRM =
I_LONGTEXT =
I_LIMIT =
I_ORGDATA = lt_org
I_TAX =
I_PRIDOC =
I_HCF =
I_ICF =
I_TOL =
E_ITEM = e_item
E_ACCOUNT = e_account
E_PARTNER = e_partner
E_CONFIRM =
E_LONGTEXT =
E_LIMIT =
E_ORGDATA = e_orgdata
E_TAX =
E_HCF =
E_ICF =
E_TOL =
E_STATUS =
E_MESSAGES = lt_message1
.
call function 'BAPI_TRANSACTION_COMMIT'.
I pasted my code here. pls tell m ewhere i went wrong.
Thanks,
Karthik Babu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you try using BBP_PD_SC_CREATE directly? This FM has a parameter I_PARK and if you pass 'X' for this parameter without passing I_SAVE = X then SC will get saved in "Held" status.
Regards,
Prasanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Within the Bapi, there is a call to function BBP_PD_SC_CREATE, I_SAVE is an importing parameter into this function but can also be manipulated by the bbp_doc_change_badi which is also called in this function with method bbp_sc_change
As mentioned already, if the value of I_SAVE is passed as X then the document will be parked and not set for approval.
Regards,
Jason
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.