How to create a shopping cart which will be in saved state

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,
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

Similar Messages

  • How to create a user  y which will have the same content of existing user x

    how to create a user y which will have the same content of existing user x ,
    like all the tables,procedures,functions and packages

    You can do the following.
    1. Use CREATE USER to create the new account/schema
    2. Use exp to export old schema
    3 Use imp with fromuser=<old user> and touser=<newuser>

  • How to create a shopping cart in JSP?

    I am creating an online product ordering system, How can i create a shopping cart in jsp? is there a way i can save a table containg itemcode, price, quantity in jsp? Can i save it using bean or session? please help me. thanks in advance.

    Hello,
    i want to create online shopping cart using html and JSP.
    At first i want to create 1html page where login ad logup optios are provided. After his login, a JSP page containing 3 links namly T-shirts,Jeanspat and Formals is displayed.
    After user select any of the link it must go to particular page.
    There, option of color, size is provided.
    And some 5 to 6 items are displayed with its pfxd prices.
    And in the same page a cart is provided. Whe the user selects(clicks) any item the same must display in cart.
    In the same page link to T-shirts,Jeanspat and Formals is displayed agaiT-shirts,Jeanspat and Formals is displayed agaiT-shirts,Jeanspat and Formals is privided again.
    next page must show the items selected. And finally it must show the "thank you" page stating that your delivary will be delivered to you within 24 hrs.
    Thanks in advance ,
    sameer

  • How to create sharepoint timer job, which will run at farm level

    Hi ,
    I want to create SharePoint timer job which will access all site collections list from farm and give count of list items of each list and trigger email if count exceeded 4000 items.
    Thanks,
    Ganesh Pawar

    try these links:
    https://social.msdn.microsoft.com/Forums/en-US/75ccf7c0-13b2-4330-aaf2-355f107026a1/rest-services-error-are-a-specific-list?forum=sharepointcustomizationprevious
    https://social.msdn.microsoft.com/Forums/en-US/75ccf7c0-13b2-4330-aaf2-355f107026a1/rest-services-error-are-a-specific-list?forum=sharepointcustomizationprevious
    https://social.msdn.microsoft.com/Forums/en-US/75ccf7c0-13b2-4330-aaf2-355f107026a1/rest-services-error-are-a-specific-list?forum=sharepointcustomizationprevious
    https://social.msdn.microsoft.com/Forums/en-US/75ccf7c0-13b2-4330-aaf2-355f107026a1/rest-services-error-are-a-specific-list?forum=sharepointcustomizationprevious
    Please mark as answer if you find it useful else vote for it if it is close to answer..happy sharepointing

  • How to create a excel file which will open in every version of MS Office?

    For excel file handling we are using Measurement Studio 8.0 for VS .NET 2003. Now we are save the excel file into.xls file using this format "CNiExcelWorkbook::FileFormatExcel9795" . it will save the file. Now the problem is If that PC has MS Office 2003 or lesser version, then its working fine. But if the PC has MS Office 2007, it will giving problem. So my question is how to save  excel file which will support any version of MS Office?
    Tapasen 
    reply me @:  [email protected] or [email protected]

    In your code, write this:
    DATA my_path type string.
    GET PARAMETER ID 'ZPATH' FIELD my_path. "or any other name you choose
    double click on ZPATH, choose create. You will have created a new parameter. You can use any names starting with Z or Y.
    Go to SU01, and set this parameter there (ZPATH)..I hope this doesn't need further clarification.
    In parameter value, put the path to the file..
    After executing the GET statement, the value will be available in the variable my_path. Pass this to GUI_UPLOAD/DOWNLOAD functions, and it should work fine.
    Regards,
    SD

  • How to create a shopping cart URL to send it by email

    Hi,
    I need to set a shopping cart URL to be sent by email. Once it is recived by the customer, he should be able to open the shopping cart by clicking on it.
    Any suggestion?
    Cheers,
    Beatriz

    Hi,
    What you could do is send the login link (link for the login page) in the email.Then the user can login into SRM and see the SC's.
    For more clues for sending the login link,look up for the standard code of the program "RBBP_NOTIFICATION_OFFAPP"(SRM 5.0) or "RSWUWFMLEC"(SRM 4.0).
    HTH,
    BR,
    Disha.

  • How to change the default delivery day when i create a shopping cart?

    hi,dear
    i got some trouble when i was creating a shopping cart.
    i want to change the default delivery day when i reference an old template.
    pls see the pictures and take the details.
    it seems that this forum dont support the [img][/img],so pls clike the link to open the picture.
    if you cant see the picture ,pls tell me,thank you
    step1:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111119338649_0.jpg
    step2:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111119432170_0.jpg
    step3:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111119557507_0.jpg
    step4:http://p13.freep.cn/p.aspx?u=v20_p13_p_0909111120079773_0.jpg
    Edited by: ming yu on Sep 11, 2009 5:22 AM

    Hello Ming,
    Have a look at following thread concerning BAdI BBP_CHANGE_DEFAULT:
    [Change the delivery date (Required on) of SC|Change the delivery date (Required on) of SC;
    You will have to check in which SC transaction you are in order to distinguish creation from reference to old template.
    Regards.
    Laurent.

  • How does a workflow get triggered when we create a Shopping cart

    Hi all,
    In SRm how does a workflow gets triggered when we create a Shopping cart...what i mean is that in r/3 we use changedocument object or function modules etc..likewise in srm how the wf gets triggere...can anyone help me.
    Thanks&Regards,
    Hari

    Hi martin,
    yes i accept that in SRM also workflows are all started by event...what i mean is in R/3 we go for Change document object(swec) or some other method for event creation...like that in SRM what is there?Just whenwe create a Shopping cart How the workflow is trigerred...suppose if it is trigerred using fm swe_event_create where they might have called the function module.
    Thanks&Regards,
    Hari

  • BAPI_SCEC_CREATE - how to get the shopping cart to go to our workflow

    Dear experts,
    When a shopping cart is created using BAPI_SCEC_CREATE, it will get approved automatically. We want the shopping cart to go through our approval workflow. Is there any way to achieve this? I saw threads on similar question but there's no solution. It seems to be related to Sourcing relevant indicator (SOURCE_REL_IND) in table BBP_PDIGP. I've tried executing BAPI_SCEC_CREATE followed by BAPI_TRANSACTION_COMMIT and then BBP_PDIGP_DB_DIRECT_UPDATE to reset the SOURCE_REL_IND. However, it didn't work.
    Does anyone know how to get the shopping cart created by BAPI_SCEC_CREATE to go to a workflow?
    Thanks,
    Lara

    Hello Lara,
    When a shopping cart is created using BAPI_SCEC_CREATE, it will get approved automatically. We want the shopping cart to go through our approval workflow. Is there any way to achieve this?
    Have a look at SRM article below:
    [Enable SRM Workflow for External Purchase Requisitions|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/5082a622-7310-2c10-1a9b-ef31dd69a770]
    It seems to be related to Sourcing relevant indicator (SOURCE_REL_IND) in table BBP_PDIGP.
    Check your customizing:
    (in SRM 7.0) SAP Supplier Relationship Management > SRM Server > Sourcing > Define Sourcing for Product Categories
    Depending on product category you used when creating your SC, its items are relevant or not for Sourcing.
    Regards.
    Laurent.

  • Advice please on how to add a shopping cart in iweb

    Hi
    I am going to re-vamp my iweb created website and was wondering if anyone could advise me on how to add a shopping cart please, and which one would you suggest...? Paypal...?
    I use GoDaddy to host my site and publish through MobileMe.
    Also, bit of a two part question.... Can I use simpleviewer on my iweb created site... is it compatible...?
    I would like to go with iweb but may consider other options if this is not possible..
    Thanks for any help
    Gerry....

    Sorted...

  • Creating limit shopping cart using catalogs in SRM

    Hi,
    Can we create "limit shopping carts" in srm using catalogs or we can only use it for free text items? how do we integrate catalogs for use in "create limit item"? is it standard or required any customization? please explain.
    Thanks
    Deepu

    Hi. What you could try is using BBP_DOC_CHANGE_BADI.
    When SY-UCOMM = 'ADDI' that is when items are being added to the cart from a catalogue, presuming you have configured ADDI in your catalogue call structure.
    Then, you can try and change the item category to LIMI and see what happens.
    If that does not work (and I don't think it will be that easy) then you can create a limit item manually and debug the DOC_CHANGE BADI to look at all the item values to see what else might need assing in there.
    It might work, I have done some serious manipulation of items using this BADI.
    Regards,
    Dave.

  • Fatal Error encountered while creating a Shopping Cart.

    Hello people,
    Im an amateur ABAP/WDJ Developer, and i am facing a serious issue,i would be so glad if anyone can help me out with this.
    When i create a shopping cart on the portal, it goes all smooth until the checkout, when i click on checkout, it flashes an error...
    "Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Incorrect encoded sequence detected at character (hex) 0xa0, (bin) 10100000. Check whether the input parsed contains correctly encoded characters. Encoding used is: 'utf-8'(:main:, row:2, col:59)Exception"
    I have tried taking traces and have have gone through the FMs that are called from the SRM, but with no luck.
    Can anyone please help me out with this?
    -Regards

    Raghav
    Did you get this issue resolved.  We're having a similar problem.  When the data is entered into the Shopping Cart Name field, it sometime has Hex "C2A0" which looks like the Unicode representation of the UTF-8 Non-Repeating Space character.   This is user entered data and my initial thought was that they were copying and pasting from a web site, but the user claims not.

  • With WBS element unable to create the Shopping cart

    Hi,
    With WBS element unable to create the Shopping cart
    Problem description:
    Shiopping cart >Item detail > Account assignment
    A/c assignment category " WBS element", Assignment no (some no,eg 1000-2 ).System picks the G/L account and business area,unable to create the shopping cart.Getting error message that
    "The account assignment objects are defined for different business areas  "
    Did i missed anything ,please
    Thanks
    Hareesha

    Hi Hareesha,
    As Sreedhar has rightly said the issue is definitely with the correctness of the data.
    Check the assignment of WBS to the proper business area which you are using to create the shopping cart.Check your org. structure and attributes and their assignments once again.
    Neverthless some OSS notes for your reference if in case you can not able to make P.Os or the SC's / P.Os are not getting transfered to back end R/3.
    <b>Note 727897 - WBS element conversion in extended classic scenario</b>
    <b>Note 1000184 - Account assignment error when document transfer to back end</b>
    Even after validating the data if the problem still persists please explain it clearly with the errors for further help.
    Rgds,
    Teja

  • Creating a shopping cart in iweb?

    Does Apple have software that allows me to create a shopping cart in Iweb?

    No.  You will have to integrate PayPal into iWeb by creating a PayPal business account.
    You can also do a Google search for shopping carts.

  • Price Field Changeable while creating the Shopping cart

    Hi We are in SRM 4.0 and follow a classic scenarios.
    For some materials we run program EBP_GET_BACKEND_PRICES
    and get the prices from the backend, how ever while creating a shopping cart if the price differs we need to change the price but the field is grey.
    how do we change the price ????
    EX - My MAP in R/3 for Material A is  100 Rs. how ever while I create a shopping cart the price i need to enter is 102 how do I change the  price.
    can anyone throw light on this.
    regards,
    Nimish Sheth

    Nimish,
    for this you have to change the standard code.
    In screen communication structures, there is a flag "price_changeable" that controls the edit mode of price field.
    You have to change the standard logic to implement your behaviour in FORM price_changable_set from include LBBP_SC_APPF92:
      IF es_item-mode EQ gc_display OR
        ( es_item-rfq_ind EQ gc_yes AND es_item-price IS INITIAL ).
        CLEAR: es_item-price_changeable.
      ELSE.
        IF NOT es_item-catalogid IS INITIAL OR
           es_item-price_origin EQ c_price_origin_f OR
           iv_scenario EQ c_sc_generic_soco OR
           iv_scenario EQ c_sc_generic_history OR
           iv_scenario EQ c_sc_generic_workload OR
           ( es_item-price NE es_item-gross_price AND
             NOT es_item-price IS INITIAL ).
          CLEAR: es_item-price_changeable.
        ELSE.
          es_item-price_changeable = gc_yes.
        ENDIF.
      ENDIF.
    Rgds
    Christophe

Maybe you are looking for