Want to copy Delivery address of one line item in shopping cart to all item

Hi Experts,
                We are upgrading from SRM 5.0 to SRM 7.0,In SC Creation We want to copy Delivery address of one line item in shopping cart to all line items in Shopping cart by clicking Change All Items button.This is custom button we added this button and we had written code to achieve the functionality but it is not working.This is same like Change All Items button in Account Assigment for copy accont details of one line item to all other line items in SC.
Web Dynpro Component:/SAPSRM/WDC_UI_DO_SHIPTO
Web Dynpro View:V_DODC_SHIPTO
Thanks,
Aarthi.

Hi Prasad,
               Our customer needs that button,they want whenever they are clicking the button delivery address should copy to all line items.
In my action ONCHANGE_ALL_ITEMS i called this method
wd_this->mo_dodm_shipto->zchange_all_items( ).
zchange_all_items( ) is  implemented in class /SAPSRM/CL_CH_WD_DODM_SHIPTO.
the code i wrote inside zchange_all_items( )
*Error
  DATA: LX_PDO_ABORT               TYPE REF TO /SAPSRM/CX_PDO_ABORT,  " Class for Fatal error caught by PDO Layer
        LX_PDO_ERROR               TYPE REF TO /SAPSRM/CX_PDO_ERROR.  " Class for PDO General Exception
Object Instances
  DATA: LO_MSG_CONSUMER            TYPE REF TO /SAPSRM/IF_PDO_MSG_CONSUMER,
        LO_PDO_SHIPTO              TYPE REF TO /SAPSRM/IF_PDO_DO_PARTNER.
Context-Data
  DATA: lte_cll_shipto              TYPE /sapsrm/if_ch_wd_set_facade=>gt_guid_element,
        loe_cll_shipto              TYPE REF TO /sapsrm/if_ch_wd_set_element.
Field Symbols
  FIELD-SYMBOLS <lse_cll_shipto>    LIKE LINE OF lte_cll_shipto.
DATA : lo_pdo_acc TYPE REF TO /sapsrm/if_pdo_do_acct_assgmnt.
  DATA : ls_shipto_cll type /SAPSRM/S_CLL_SHIPTO,
         lt_pdo_partnerdetails      TYPE bbp_pdt_partner,
         ls_pdo_partnerdetails      TYPE bbp_pds_partner,
          LV_GUID          TYPE BBP_GUID,
          lv_item_guid type bbp_guid,
         lv_filled TYPE wdy_boolean.
*exceptions
  DATA : LX_ABORT                  TYPE REF TO /SAPSRM/CX_PDO_ABORT.
*Constants
  CONSTANTS : LC_OBJECT_ID         TYPE CRMT_SUBOBJECT_CATEGORY_DB VALUE 'BUS2121001',
              LC_ADDR_ORIGIN       TYPE /SAPSRM/S_CLL_SHIPTO-ADDR_ORIGIN VALUE 'B'.
  IF LV_FILLED = ABAP_TRUE.
Downcasting to shipto
    LO_PDO_SHIPTO ?= MO_PDO.
insert the clipboard into facade and update and submit update
    me->/sapsrm/if_cll_do_mapper~insert_from_clipboard( io_set_facade = mon_cll_set_facade ).
Add new Accounting entries.
    lte_cll_shipto = mon_cll_set_facade->get_data_elements( ). "get all elements from the context
    LOOP AT  lte_cll_shipto ASSIGNING <lse_cll_shipto>.
      loe_cll_shipto = <lse_cll_shipto>-set_element.
      loe_cll_shipto->get_static_attributes( IMPORTING rv_attributes = ls_shipto_cll ).
Map ui-structure to pdo-structure
      MOVE-CORRESPONDING ls_shipto_cll TO ls_pdo_partnerdetails.
      IF LS_SHIPTO_CLL-PARTNER_FCT =  mv_part_func.
        LS_PDO_PARTNERDETAILS-PARTNER_FCT = ''.
      ELSE.
        LS_PDO_PARTNERDETAILS-PARTNER_FCT = LS_SHIPTO_CLL-PARTNER_FCT.
      ENDIF.
      IF ls_pdo_partnerdetails-del_ind NE 'X'.
        CALL FUNCTION 'GUID_CREATE'
          IMPORTING
            ev_guid_16 = ls_pdo_partnerdetails-p_guid.
       mv_acc_guid_split = ls_pdo_shipto-guid .
        IF mo_scope = 1.
          ls_pdo_partnerdetails-p_guid = mon_cll_set_facade->get_bo_guid( ).
        ELSE.
          ls_pdo_partnerdetails-p_guid = mo_parent_bo_mapper->items_get_lead_selection( ).
        ENDIF.
        APPEND ls_pdo_partnerdetails TO lt_pdo_partnerdetails.
      ENDIF.
      CLEAR : ls_pdo_partnerdetails, ls_shipto_cll.
    ENDLOOP.
Add New items to PDO
    IF NOT lt_pdo_partnerdetails[] IS INITIAL.
      TRY.
          LO_PDO_SHIPTO->update_item_partners( EXPORTING it_partner = lt_pdo_partnerdetails
                                                           iv_item_guid       = lv_item_guid
                                               CHANGING co_message_handler = mo_pdo_message_consumer ).
        CATCH /sapsrm/cx_pdo_abort INTO lx_pdo_abort.
          mo_cll_message_handler->set_abort( io_pdo_abort_exception = lx_pdo_abort ).
        CATCH /sapsrm/cx_pdo_error INTO lx_pdo_error.
          mo_cll_message_handler->add_exception( io_pdo_error_exception = lx_pdo_error ).
      ENDTRY.
Update PDO with the changed data.
      TRY.
          mo_pdo->submit_update( ).
        CATCH /sapsrm/cx_pdo_abort INTO lx_pdo_abort.
          mo_cll_message_handler->set_abort( io_pdo_abort_exception = lx_pdo_abort ).
        CATCH /sapsrm/cx_pdo_error INTO lx_pdo_error.
          mo_cll_message_handler->add_exception( io_pdo_error_exception = lx_pdo_error ).
      ENDTRY.
Fire refresh of DO Mappers registered for refresh since the item table has acc related data.
      mo_parent_bo_mapper->fire_event_refresh( iv_perform_updates = abap_false ).
    ENDIF.
  ENDIF.
Thanks,
Aarthi.

Similar Messages

  • How to add custom field in delivery address/performance location tab in SRM shopping cart and Ship to address Pop-up in SRM PO?

    Hi Experts
    i have a reuirement where i have to add custom field in delivery address/performance location tab in SRM shopping cart and Ship to address Pop-up in SRM PO
    i am doing below steps for this.
    1. Adding custom field ZZfield in structure INCL_EEW_PD_PARTNER_CSF by  using  append structure.
    2. Spro ->Supplier Relationship Management -> SRM Server -> Cross application basic settings -> Extensions and field controls (personalization) -> Configure field control ->Configure Control for Fields of Substructures
    then click on  "Metadata for Fields of Substructures and Table-Like Enhancements"  
    add the below entry
    Bus. Object Set Type  : I am trying 7 and 29
    Structure Field Name  : ZZfield
    Bus. Object Type       : BUS2121/BUS2201
    Set Level                    : Item
    Field Visible :  Check box should be checked
    Field Enable :  check box should be checked
    Can anyone has the idea of this?
    Thanks
    Rohit

    Hello Rohit,
    Please create a enchancement for component  /SAPSRM/WDC_UI_DO_SHIPTO.
    Add new input field and label in view V_DODC_SHIPTO.
    Bind the input field value with field ZZfield from structure  /SAPSRM/WDC_UI_DO_SHIPTO in the context node SHIP_TO .
    Regards,
    Neelima

  • IPad 2. I want to COPY an address in my contacts list to PASTE into email

    iPad 2. I want to COPY an address in my contacts list to PASTE into an email. How do I do that? When I try it just zooms me away to the MAPS location. Help!

    Good Afternoon Njc999,
    Here are two quick ways to copy a contact's email address so that you can paste it into an email or a field in another application.
    Open the Contacts application, select the contact, and then click Edit.  This will allow you to copy any information you need from your address book.
    Contacts: Edit or delete contacts and groups
    http://support.apple.com/kb/PH11598
    Select "Copy Address" from the drop down menu beside the sender's name in an email you have received or sent.  
    See the dropdown arrow beside the name John Appleseed in the image below.  Click on the drop down arrow in one of your email messages to see the "Copy Address" option.
    Mac Basics: Use Mail on your Mac - Apple Support
    http://support.apple.com/en-us/HT204093
    Cheers,
    - Judy

  • HT204053 My wife just got this iPad mini and I want to copy the address book on my iPad 2 over to the mini. Can I use iCloud to do this?

    My wife just got this iPad mini and I want to copy the address book on my iPad 2 over to the mini. Can I use iCloud to do this and what are the steps. The 2 devices have different Apple IDs.

    Download the "My Contacts Backup" app from App Store to your iPad 2. Make a backup and send it by email to your wife's address. Open this email from iPad mini and tap the attachment to import the contacts into iPad mini Contacts app.
    Message was edited by: cheonweb

  • Different delivery address in multiple line items of SC

    Hi All,
    Requirement: If we have different delivery address in multiple line items of SC, the first line item delivery address should be replaced by other line items.
    I would like to know the relation between first line item in the shopping cart and its correspnding delivery address?
    I have compared the guid of first line item (BBP_PD) and guid of shipping address (second guid not partner guid) which were not same.
    Any alternatives we have.
    Thanks and Regards,
    /N

    Hi Naveen,
    I guess you would like to change the delivery adress in the BBP_DOC_CHANGE_BADI.
    Here you can identify the delivery adress (partner function 00000027) line item by the field P_GUID. This P_GUID in the partner table (ET_PARTNER-P_GUID) consists the GUID of the SC line item (ET_ITEM-GUID).
    When you know the line item GUID, you can find the SC line item number in the item table (ET_ITEM-NUMBER_INT) and you can see which is the first, second... line item of the SC.
    Regards,
    Peter

  • Delivery address in PO line item

    Hi Friends,
    Need your inputs/ suggestions .
    THe delivery address in PO line item is taken from plant / Sloc details .
    If this text is changed , the changed details should be picked / outputted (and not the data / Master data  of plant / Sloc )
    is there any  FM / user exit ?
    Thanks in advance ,
    regards,
    CK

    Hi  I have a problem  the deivery address tab is not visible in my PO  I tried  SHd0  but still I could not able to find it .,
    My requirement is I need to maintain   different delivery addresses and different bill to addresses .
    I also tried and open the SLOC filed in the PO  but It is not allowing me to input it is grade out . If I am able to enter different sloc I can change the delivery address.
    give me your inputs   .
    SD

  • Delivery Address for each line item in PO

    Hi Experts,
    My client has an issue,
    In a perticular PO print out he is geeting delivery address on each line items?
    How to resolve it?
    Meh

    Meh,
    Did you ever find out what's causing this?  We have the same problem.  I only happens on certain POs, not all.  Any suggestions would help.
    Thanks,
    Steph

  • To copy an arrangement section - verse, chorus etc - I click the verse or chorus I want to copy/move in the arrangement line. But when I open edit the copy/cut options are gray and won't let me do it. Same w/command 'C'

    To copy an arrangement section - verse, chorus etc - I click the verse or chorus I want to copy/move in the arrangement line. But when I open the edit tab the copy/cut options are gray and won't let me do it. Same w/command 'C' and 'V'.
    Also, how do I send a song from my MacBook GB to my iPad GB so I can utilize the Smart Instruments in my song.

    Use the alt key to create a copy of an Arrange section by dragging it.

  • HT1766 We have 2 iPads. I want to copy purchased apps from one to the other. Proper? How?

    I want to copy purchase apps from one iPad to another. Possible?

    No sweat.  Sync both to the same computer's iTunes.  You'll have to configure the sync characteristics separately.  The iTunes keeps track of which is which by S/N.  You might wish to rename one or both so that you can keep track.

  • HT1051 Trying to change Shipping and Delivery address for one in the US, from Canada, and can't do it. State and zip code appears in red but no change in country name.  Using French (Canada) iPhoto app.

    Trying to change Shipping and Delivery address for one in the US, from Canada, and can't do it. State and zip code appears in red but no change in country name.  Using French (Canada) iPhoto app.

    Larry's right, You can still use your credit card, you just need to change the "billing address" to the recievers address. It gets billed to your CC and delivered to the US

  • SRM 7 - defaulting values for multiple line items on shopping cart

    Hi,
    We are using SRM 7 - Employee self service - Punch out catalogues and describe requirements.
    Our scenario is this:
    - User is responsible for creating shopping carts for numerous cost centres/other users
    - Shopping cart will have multiple line items (but the cost centre/other user will be same for all line items)
    - Is it possible to define in a shopping cart that all line items will have a specific value?  E.g. all line items will be assigned to a specific cost centre?
    I know about assigning dedault values in PPOMA_BBP - but our situation is where user does not want to use this default value this time, but another value
    Any suggestions?
    Thanks

    Thanks Alex for quick reply
    To confirm, did you use the BBP_DOC_CHECK_BADI (in conjunction with the BBP_ITEM_CHECK_BADI) to look at different cost centres on the multiple lines on the shopping cart?
    Also - did you use the same BADI to give user opportunity to enter a default cost centre that is then automatically applied to all line items on the cart?
    Thanks
    Azam

  • Default settings for items is not getting copied to items in Shopping Cart

    Hi SRM GURU's,
    I am facing a problme while creating shopping cart.
    I maintained default settings for items like Product catagory,Internal Notes etc.
    While adding items in shopping cart these default settings are not getting copied to any items.
    If anybody is having any clue Plz let me know I will award points for sure.
    Our integration testing is affected because of this issue.
    Thanks in Advance.
    Atulp
    +919822761641

    Dear Laurent,
    Yeah, this is a very strange issue and also a rare one. We have already tried this option. User deleted the cart and created a new cart. But still no luck. The new cart is also not getting released from SOCO. User created many carts previously for different product categories, vendors and all carts were through. But for this cart,it is not getting released. If you could have any other idea, you are most welcome.
    Anyway, thanks so much for your time and patience. Appreciate your help!!
    Regards,
    Aswini

  • HT201303 MGwFL7jgk9 Please check problem my account  I want refund all item because i gift again all item medthod vie print gift my self and all item

    I gift app for friend Order mgwl7jgk9 my friends can' t receive email gift app. Please check problem my account.
    I want refund all item because i gift again all item method vie print gift my self and all item

    You are NOT addressing Apple here at all.
    AGAIN:
    We are all itunes users just like you.
    We can check nothing.
    You need to contact itunes support.
    http://www.apple.com/support/contact/"

  • Offline approval for line item based Shopping carts

    Hi ,
    We are planning to  use offline approval and line item based approval (item based approval workflow) for shopping carts.
    For e.g. 10 line items in a cart can have 10 different  cost centres, and a line each need to go to respective cost centre managers for approval.
    have few clarifications:
    1. Can offline approval be used for item based shopping cart approval workflow?
    2. Can different line items be sent by mail to different mail boxes?
    3.  Will 1 manager see all the 10 line items OR only the 1  line item for which he is responsible?
    4. If he will get only line for which he is responsible , and once he clicks on approve , will this approval apply to his line item only , OR it will apply to all the 10 line items ?
    Rgds
    Sumendra

    Hi Sumedra,
    Which workflow are you using - application or process contrlled workflow?
    Assuming you are using process-controlled workflow - I will answer following questions -
    1. Can offline approval be used for item based shopping cart approval workflow?
    - Yes, it can be used !
    2. Can different line items be sent by mail to different mail boxes?
    Yes
    3. Will 1 manager see all the 10 line items OR only the 1 line item for which he is responsible?
    1 manager can 'see' all the items but he can only approve or reject the item that he is suppose to act on. All other item will be grayed out. However, this behaviour is configuarable !
    4. If he will get only line for which he is responsible , and once he clicks on approve , will this approval apply to his line item only , OR it will apply to all the 10 line items ?
    - see above
    Regards,
    Amit

  • Copy Delivery Address from SO to PR

    In our third party shipment process for legal reasons we have to "receive" the material in our plant althought the material should be ship directly to customer from supplier, so we set up an individual purchase process.
    But one thing its missing its that the purchase requisition genereted does not copy the sales order delivery address.
    I have tried in VOV6 to change item category to third party but it wont allow it to be relevant for delivery.
    I went to: spro -->mm -->purchasing >pur req>texts for purchase requisition , but I am kind of lost.
    If someone has an idea where this can be changed I will appreciate it.
    Thank You,
    Carlos
    Edited by: Carlos Salazar on Sep 10, 2010 7:14 PM

    Carlos, ensure that in your sales document that the schedule line category is properly set up.  Go to this SPRO path:
    IMG --> Sales and Distribution --> Sales --> Sales Documents --> Schedule Lines --> Define Schedule Line Categories
    Ensure the schedule line category has the order type NB - Purchase Requisition; and incompletion procedure of 31.
    Also make sure that the schedule line category is assigned to the item category you're using in your sales order.  Hope this helps you out!
    Also check out this link:  [http://wiki.sdn.sap.com/wiki/display/ERPLO/Fielddescriptionofscheduleline+category] for more information on the schedule line category.

Maybe you are looking for

  • Sequence settings and export help please

    It's been awhile since I've made a movie for dvd, and the last time was in PAL, so my settings are changed. Now I'm making an NTSC dvd (Best quality possible) for a local historical group, and can't remember the settings!! Using FCP 5 A Canon Elura 8

  • How to use business object Bus0002 to create a company code?

    Dear all, I wanna create a companycode with BO BUS0002 , And I want to transfer the necessary data such as description and currency without the maintain screen. But the parameters of the CREATE method does not contain these kind of parameters. my que

  • Searching for pictures by both date and keyword

    When I have the calendar tab up and a date with pictures is highlighted, when I go to select a keyword the calendar goes away and then I am back to my library. How do I search for pictures by both date and keyword? Thank You, Margaret

  • Installing the Apache HTTP Server Plug-In as a Dynamic Shared Object

    My environment is: Windows 2000 Server SP3 + Apache 2.0.45 + WebLogic 7.0 SP2 I followed the install guide. 1. Locate the shared object file for your platform. >>> No problem 2. Enable the shared object. >>> No problem 3. Install the Apache HTTP Serv

  • CC Serial Number Licensing Carryover to CC 2014 Versions

    I install CC apps in a college computer lab.  When I create a package with Creative Cloud Packager I specify the license type as "Serial Number License" & submit the required serial number. Installing the package presents no problems and the apps com