Multiple shipping groups

Hi I am trying to create multiple shipping groups.
I followed the example which is mentioned in the documents (Commerce Guide to Setting Up a Store for ATG 9.1) using splitShippingGroup. Here is the code that I used. I get the shippingGroupFormHandler.currentList as ‘empty’. We are using customized shippingGroupFormHandler. I just want to know if we have to do anything in the customized shippingGroupFormHandler in order to get the currentList value as I thought that currenList would be available through OOB ATG shippingGroupFormHandler. Any help would be appreciated.
<dsp:droplet name="ForEach">
<dsp:param name="array" param="order.commerceItems"/>
<dsp:oparam name="output">
<dsp:setvalue paramvalue="element" param="commerceItem"/>
<dsp:setvalue bean="ShippingGroupFormHandler.listId" paramvalue="commerceItem.id"/>
<dsp:droplet name="ForEach">
<dsp:param bean="ShippingGroupFormHandler.currentList" name="array"/>
Current List:
<dsp:valueof bean="ShippingGroupFormHandler.currentList"/>
List ID:
<dsp:valueof bean="ShippingGroupFormHandler.listId"/>
<dsp:oparam name="output">
Regards
Vandana
Edited by: 875528 on Jul 27, 2011 1:15 PM

Hi Shaik,
The split shipping group does not work. Below is the error message. This could be because the ShippingGroupFormHandler.currentList is 'null'. As mentioned earlier i am not able to figure out as to why it is null. Do I have to set something in the shippingGroupDroplet or in shippingGroupFormhandler ?? (FYI : We are using customized shippingGroupFormhandler).
09:11:16,934 ERROR [ContainerBase] Servlet.service() for servlet jsp threw exception
arrayOutOfBounds: array index out of bounds exception processing path= /atg/commerce/order/purchase/ShippingGroupFormHandler.currentList[param:index].splitShippingGroupName property=/atg/commerce/order/purchase/ShippingGroupFormHandler.currentList[param:index].splitShippingGroupName exception=null
at atg.droplet.DropletDescriptor.resolveDimensions(DropletDescriptor.java:1010)
at atg.droplet.DropletDescriptor.getPropertyValue(DropletDescriptor.java:453)
at atg.taglib.dspjsp.SelectTagBase.doStartTag(SelectTagBase.java:431)
at org.apache.jsp.checkout.fs.ship_005fenter_005flocation_jsp._jspService(ship_005fenter_005flocation_jsp.java:1408)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at atg.servlet.pipeline.TailPipelineServlet.service(TailPipelineServlet.java:148)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.pipeline.DispatcherPipelineServletImpl.service(DispatcherPipelineServletImpl.java:253)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.http.CookieBufferServlet.service(CookieBufferServlet.java:97)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.userprofiling.ExpiredPasswordServlet.service(ExpiredPasswordServlet.java:356)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.pipeline.MimeTyperPipelineServlet.service(MimeTyperPipelineServlet.java:206)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:565)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.sessionsaver.SessionSaverServlet.service(SessionSaverServlet.java:2425)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.commerce.order.CommerceCommandServlet.service(CommerceCommandServlet.java:128)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.commerce.promotion.PromotionServlet.service(PromotionServlet.java:249)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.userprofiling.AccessControlServlet.service(AccessControlServlet.java:602)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at cvs.userprofiling.SessionAuthenticationServlet.service(SessionAuthenticationServlet.java:160)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.userprofiling.PageEventTriggerPipelineServlet.service(PageEventTriggerPipelineServlet.java:169)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.userprofiling.SessionEventTrigger.service(SessionEventTrigger.java:477)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.userprofiling.ProfileRequestServlet.service(ProfileRequestServlet.java:436)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.pipeline.DynamoPipelineServlet.service(DynamoPipelineServlet.java:469)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.pipeline.URLArgumentPipelineServlet.service(URLArgumentPipelineServlet.java:280)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.pipeline.PathAuthenticationPipelineServlet.service(PathAuthenticationPipelineServlet.java:370)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.userprofiling.sso.PassportServlet.service(PassportServlet.java:561)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.security.ThreadUserBinderServlet.service(ThreadUserBinderServlet.java:91)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.dtm.TransactionPipelineServlet.service(TransactionPipelineServlet.java:212)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
at atg.servlet.pipeline.HeadPipelineServlet.passRequest(HeadPipelineServlet.java:1097)
at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:779)
at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:250)
at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:227)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
Regards
Vandana

Similar Messages

  • Shipping Group for hardgood and softgood

    I want to create a shipping group for hard good and soft good when i add to the cart.So, anyone have any idea about this. Please reply.
    With Regards
    Dol
    Edited by: Dolen Meitei on Feb 25, 2013 3:56 AM

    Why do you want to add the hardgood/softgood shippingGroup when adding items to cart?
    When user adds item to cart and goes to Shipping page then based upon the items(sku fulfillter type) display the user to enter softgood details or hardgood details.
    Use the formhandlers mentioned to take user input details based upon the shippingGroup type.
    If you have both then handle thru multiple shipping groups in shipping page.
    Peace
    Shaik

  • Multiple ship to party issue.

    Hi Experts,
    I have multiple ship-to, bill-to, payer for one sold to party. I maintain the same in customer master for sold to party. I create a contract for sold to party with default ship to party.
    In creating sales order with reference to contract, the system is letting me assign any ship-to party and other partner functions to the document even though they are not assigned to sold to party in customer master.
    If there any option by which I can restrict the partner functions option only to the partners assigned in customer master of sold to party.
    If some one has the solution please provide me it ASAP.
    Thanks
    Chakrapani

    Hi Chakrapani
    Please check your Partner determination procedure configuration.Also check how the ship to party partner function is assigned
    to the account groups.
    Regards
    Srinath

  • Trying to add multiple ship to parties using BAPI_BUPR_PFCT_CREATEFROMDATA

    Hi all,
    I am trying to add relation ship to a business partner. I have two business partners BP1 and BP2. I need to assign BP2 as u201CShip to Partyu201D for BP1. I was able to do this using BAPI_BUPR_PFCT_CREATEFROMDATA.
    But my actual requirement is to add more than one business partner as u201CShip to partyu201D to BP1 in my ZFunction Module in one instance itself.
    BAPI_BUPR_PFCT_CREATEFROMDATA. Will take input as Business partners and assigns BP2 as Ship to party to BP1.
    But my requirement is I have to assign more than one business partners as Ship to parties for this BP1.
    But BAPI_BUPR_PFCT_CREATEFROMDATA accepts only a single business partner at a time. So I created a Z function Module and declared a tables paramters which accepts any number  of Businesss partner. I also declared an import paramter to accept the business parter number for which all the business partners in table should be assigned as Ship to parties.
    I tried passing the values from this table to the BAPI but it shows me a waring message saying
    u201CAfter Enhancement you may not be able to convert the structure WA_SOLDu201D into a number and it would no longer be a valid operandu201D
    If I execute the Zfunction Module it is not assigning the business partners from the input table as ship to parties to the business partner(import paramters).
    Please help me...how can i assign multiple ship to parties for a business partner at one instance iteslf using BAPI_BUPR_PFCT_CREATEFROMDATA...
    here is how i desgined my Zfunction Module...........
    Impot paramters = CUST_NO) TYPE  BU_NAMEP_F
    Tables paramters = I_SOLD like  ZSOLD_TO OPTIONAL
    My structure Zsold_to has follwing componenet
    BP type BU_NAMEP_F
    Here is my codeu2026u2026..
    FUNCTION Z_FUNCTION.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(CUST_NO) TYPE  BU_NAMEP_F
    *"  TABLES
    *"      I_SOLD STRUCTURE  ZSOLD_TO OPTIONAL
    *"      IT_RETURN1 STRUCTURE  BAPIRET2 OPTIONAL
    *"      IT_RETURN2 STRUCTURE  BAPIRET2 OPTIONAL
    DATA: WA_SOLD TYPE ZSOLD_TO.
    LOOP AT I_SOLD TO WA_SOLD.
    *Call the BAPI BAPI_BUPR_PFCT_CREATEFROMDATA.
    CALL FUNCTION 'BAPI_BUPR_PFCT_CREATEFROMDATA'
      EXPORTING
        BUSINESSPARTNER1           =  CUST_NO
        BUSINESSPARTNER2           =  WA_SOLD-BP
        RELATIONSHIPCATEGORY       =  'CRMH02'
    TABLES
        RETURN                     =  it_RETURN1.
    *Call Commit Work
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        WAIT          =   'X'
    IMPORTING
        RETURN        =  it_RETURN2.
    ENDLOOP.
    ENDFUNCTION.
    Please help me...how can i assign multiple ship to parties for a business partner at one instance iteslf using BAPI_BUPR_PFCT_CREATEFROMDATA...
    Regards,
    Jessica Sam
    Edited by: jessica sam on Jan 19, 2009 1:57 AM
    Edited by: jessica sam on Jan 19, 2009 2:09 PM

    Hi,
    I am facing the same issue I have created the Target Group and then assigned the BP to target group using BAPI 
      BAPI_TARGETGROUP_ADD_BP . Called BAPI 
      BAPI_TRANSACTION_COMMIT after this. Table  CRMD_MKTTG_TG_I is getting updated with BP guid but its not showing in WEB UI screen.
    Please help me.
    Thanks and Regards,
    Ranadev

  • VCenter Single Sign-On Permissions Assignment for Members of Multiple AD Groups

    Hi all,
    I ran across an interesting issue whilst assigning permissions using Active Directory groups within vCenter.
    Environment
    1 vCenter Appliance managing 2 Datacenters (1 Datacenter with 2 Clusters, 1 Cluster with 2 Hosts, 1 Cluster with 4 Hosts, 1 Datacenter with 1 Cluster containing 1 host.) 
    vCenter has an SSO Identity Source configured using Active Directory (Integrated Windows Authentication).
    vCenter and all hosts are domain members of child1.parent.com.au
    The Active Directory Forest contains a parent domain, let's call it parent.com.au, and two child domains child1.parent.com.au and child2.parent.com.au.
    Although the Identity Source was configured for my child domain, using child domain credentials it added the parent domain and subsequently both child domains. Okay, so there are trusts, I'm okay with this. The interesting issue is yet to come.
    Two Active Directory Groups were added. Deployment Admins A and Deployment Admins B.
    Two vCenter Roles were created with similar names. VM Deployers A and VM Deployers B
    Deployment Admins A was assigned the Deployers A role to Cluster A (Cluster, VM Folders, Datastore Folders)
    Deployment Admins B was assigned the Deployers B role to Cluster B (Cluster, VM Folders, Datastore Folders)
    Note: No objects overlap. All hosts, vms and datastores are isolated to each cluster.
    So the next step is assign an child1 AD User to the Deployment Admins A group. As expected the user using credentials child1\user can connect to vCenter via the VI Client and see all the relevant objects. Great!
    So now I assign the same child1 AD user to the second AD group Deployment Admins B. Now we wait and nothing happens. The permissions don't change. The user logs out and logs back in using the same credentials and still the permissions don't change.
    So I remove the user from both AD groups and get them to log out and in and sure enough they can't.
    This time I assign the child1\user account the roles as set out previously. So child1\user account is assigned to both roles in place of each AD Group. The expected behaviour is observed. As I add the second permission set, the objects become visible within the VI client.
    Okay so now I remove the explicitly assigned permissions and reassign via the groups and this time I ask the user to log in via the UPN ([email protected]). Whoa! It works.
    So it seems that assigning permissions for the same user in multiple AD groups across multiple roles can only be achieved when the user uses a UPN login to the VI Client.
    Has anybody else found this to be the case?
    If so, were you able to fix it?

    Hello,
    I have found this to be the case and think it is more due to SSO than AD. If you look at how you login as the 'administrator' when you first configure SSO it is in effect using UPN. I would raise this as a case to VMware and make sure they are aware of the issue. There are some issues with SSO being worked each day.
    Best regards,
    Edward L. Haletky
    VMware Communities User Moderator, VMware vExpert 2009, 2010, 2011,2012,2013,2014
    Author of the books 'VMWare ESX and ESXi in the Enterprise: Planning Deployment Virtualization Servers', Copyright 2011 Pearson Education. 'VMware vSphere and Virtual Infrastructure Security: Securing the Virtual Environment', Copyright 2009 Pearson Education.
    Virtualization and Cloud Security Analyst: The Virtualization Practice, LLC -- vSphere Upgrade Saga -- Virtualization Security Round Table Podcast

  • One shared mailbox with multiple distribution groups connected and the sent items folder - how to configure?

    Hi!
    I have been struggling for a while now with the following issue.
    For starters:
    We are using exchange 2010 in combination with outlook 2013 on client computers.
    Cause of the limitations concerning the number of mailboxes in outlook im looking for a solution to receive and reply 
    to multiple aliasses. So i did the following:
    1. Configured one shared mailbox.
    2. Configured multiple distribution groups
    3.  made the shared mailbox a member of the distribution groups
    4. Configured full access and send as permissions for myself on the shared mailbox ( testing )
    5. Gave send as permissions to the shared mailbox in Active directory. 
    6.  Logged in to OWA to setup rules for the shared mailbox.
    I now receive emails from all connected distribution groups in the shared mailbox and also in the right folder.
    I do however have to select the proper from address when i reply to an email. 
    the email sent by the main SMTP of the shared mailbox is placed into the sent folder of the shared mailbox. 
    I setup the senddelagate blabla in register.....
    When i sent an email as one of the connected distribution groups it fails to put the sent item in the sent items folder of the shared mailbox. The email is sent using the proper address but placed in the sent folder of my main account. 
    I want this emails to end up in the sent items folder of the shared mailbox. Or even better, in a sent items folder for each of the addresses. 
    Any suggestions ? 
    Thanks in advance!

    Hi,
    As what
    Rajkumar says, sending as a shared mailbox(full access permission) will put the email in the sent item of shared mailbox. But it cannot be located in the “sent item” of a distribution group. Because
    it is a distribution group instead of a enabled user mailbox.
    According to your further description, I understand that the reason why you configure that is some users reached the
    limitation about the number of Exchange accounts you can include in the same Outlook profile. Is it rights? If I misunderstand, please point it out.
    By default, user can only add 10 Exchange accounts to the same profile. You can customize the limit to the number Exchange accounts in the same profile using the following registry data:
    Key: HKEY_CURRENT_USER\software\policies\Microsoft\exchange
    DWORD: MaxNumExchange
    Value: integer value starting at 1 (default = 10 if DWORD is missing)
    http://blogs.technet.com/b/outlooking/archive/2012/12/24/clarification-on-outlook-2010-and-additional-exchange-account-supportability.aspx
    Hope it helps.
    Thanks,
    Winnie Liang
    TechNet Community Support

  • Provisioning multiple AD Groups from a Single Privilege

    Experts,
    We're encountering a situation here when we provision to multiple Active Directory groups from a single IDM Role.
    The scenario is this:
    We have a workflow that has multiple conditional and switch tasks that result in the provisioning of users to Active Directory 2008 (mixed mode) Our workflow uses the provisioning framework and all users have been granted the ONLY privilege for the system.
    The workflow will result in adding the users to multiple AD groups sometimes two AD groups that are associated with a single IDM role. The first assignment always works, the second does simply does not occur, no entry in the system or job log although IDM does show that the role has been assigned with an 'OK' status.
    We've accomplished a workaround by redesigning the workflow so that only single roles are assigned at a time and using chain result OK links to move from one provisioning activity to another, but frankly, we are unsatisfied with this.  IDM should be handling this much better through
    I'm wondering if we have a pending value floating out there and we should just be applying the pending value at the end of every AD group add.
    Any thoughts on this would be appreciated.
    Thanks,
    Matt

    Matt,
    In your post you mention "I'm wondering if we have a pending value floating out there and we should just be applying the pending value at the end of every AD group add"... I'm faced with a similar issue were I'm left pending values for privileges after the group is assigned.
    I've imported the AD groups as privileges. I assign them without issue. But when I review the assignments I can see that each corresponding privilege assignment now has a pending value. I can not remove the privilege from the user at this point.
    Have you seen this before? Any suggestions on how I can clean this up. BTW, I'm using the SAP PF basically unchanged...
    Thanks!

  • How can I place calendars in multiple calendar groups?

    I would like to use a group for each of my family members but reference some of the same calendars from multiple calendar groups. Here is an example:
    Lets say I have a calendar for school, sport1, sport2, activity, family, and work
    I would like the groups to look like this:
    Me: family and work
    Wife: activity and family
    Son_1: school, sport1 and family
    Son_2: school, sport2 and family
    When a group is visible, that person can see the activities in which they participate. When several groups are visible, though, only single copies of shared events would appear and shared events would only have to be entered once.
    Is there a way to do this or do I need to place this on the feedback page?

    Bernd Alheit wrote:
    How can I place Windows Media Player in my PDF?
    Why want you the media player in a pdf file?
    e.g. pushing Mozart - button to listen to Mozart's music. But it must be a script not embedded player. Is it possible?

  • Error while placing an order using custom shipping group

    I created a custom shipping group named 'shipToStoreShippingGroup' with a custom shipping method named 'ship to my home store'
    Im getting this error while placing an order
    11:47:54,626 ERROR [OrderRepository] SQL Statement Failed: [++SQLInsert++]
    INSERT INTO dcspp_ship_group(shipping_group_id,type,version,shipgrp_class_type,shipping_method,description,state,price_info,order_ref)
    VALUES(?,?,?,?,?,?,?,?,?)
    -- Parameters --
    p[1] = {pd} sg1480003 (java.lang.String)
    p[2] = {pd: type} 300 (java.lang.Integer)
    p[3] = {pd: version} 1 (java.lang.Integer)
    p[4] = {pd: shippingGroupClassType} shipToStoreShippingGroup (java.lang.String)
    p[5] = {pd: shippingMethod} Ship to my home store (java.lang.String)
    p[6] = {pd: description} sg1480003 (java.lang.String)
    p[7] = {pd: state} INITIAL (java.lang.String)
    p[8] = {pd: priceInfo} ai730013 (atg.adapter.gsa.SingleValueGSAId)
    p[9] = {pd: order} o1100001 (atg.adapter.gsa.SingleValueGSAId)
    [--SQLInsert--]
    11:47:54,641 ERROR [CommitOrderFormHandler]
    CAUGHT AT:
    CONTAINER:atg.commerce.CommerceException; SOURCE:CONTAINER:atg.service.pipeline.RunProcessException: An exception was thrown from the context of the link named [addOrderToRepository].; SOURCE:CONTAINER:atg.commerce.CommerceException; SOURCE:CONTAINER:atg.repository.RepositoryException; SOURCE:java.sql.SQLException: ORA-02291: integrity constraint (SYN_PRD.SYS_C0039101) violated - parent key not found
    at atg.commerce.order.OrderManager.processOrder(OrderManager.java:3007)
    at atg.commerce.order.OrderManager.processOrder(OrderManager.java:2923)
    at atg.commerce.order.purchase.CommitOrderFormHandler.commitOrder(CommitOrderFormHandler.java:402)
    at atg.commerce.order.purchase.CommitOrderFormHandler.handleCommitOrder(CommitOrderFormHandler.java:361)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at atg.droplet.EventSender.sendEvent(EventSender.java:582)
    at atg.droplet.FormTag.doSendEvents(FormTag.java:800)
    at atg.droplet.FormTag.sendEvents(FormTag.java:649)
    at atg.droplet.DropletEventServlet.sendEvents(DropletEventServlet.java:523)
    at atg.droplet.DropletEventServlet.service(DropletEventServlet.java:550)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.commerce.order.CommerceCommandServlet.service(CommerceCommandServlet.java:128)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.commerce.promotion.PromotionServlet.service(PromotionServlet.java:191)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.userprofiling.AccessControlServlet.service(AccessControlServlet.java:655)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.servlet.sessionsaver.SessionSaverServlet.service(SessionSaverServlet.java:2425)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.userprofiling.PageEventTriggerPipelineServlet.service(PageEventTriggerPipelineServlet.java:169)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.multisite.SiteSessionEventTriggerPipelineServlet.service(SiteSessionEventTriggerPipelineServlet.java:139)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.userprofiling.SessionEventTrigger.service(SessionEventTrigger.java:477)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.userprofiling.ProfilePropertyServlet.service(ProfilePropertyServlet.java:208)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.userprofiling.ProfileRequestServlet.service(ProfileRequestServlet.java:437)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.projects.store.servlet.pipeline.ProtocolSwitchServlet.service(ProtocolSwitchServlet.java:287)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.servlet.pipeline.DynamoPipelineServlet.service(DynamoPipelineServlet.java:469)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.servlet.pipeline.URLArgumentPipelineServlet.service(URLArgumentPipelineServlet.java:280)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.servlet.pipeline.PathAuthenticationPipelineServlet.service(PathAuthenticationPipelineServlet.java:370)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.userprofiling.sso.PassportServlet.service(PassportServlet.java:554)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.servlet.security.ThreadUserBinderServlet.service(ThreadUserBinderServlet.java:91)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.dtm.TransactionPipelineServlet.service(TransactionPipelineServlet.java:212)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.multisite.SiteContextPipelineServlet.service(SiteContextPipelineServlet.java:383)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.servlet.pipeline.HeadPipelineServlet.passRequest(HeadPipelineServlet.java:1174)
    at atg.servlet.pipeline.HeadPipelineServlet.service(HeadPipelineServlet.java:857)
    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:250)
    at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:263)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.sql.SQLException: ORA-02291: integrity constraint (SYN_PRD.SYS_C0039101) violated - parent key not found
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:966)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3423)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)
    at atg.adapter.gsa.SQLStatement.executeUpdate(SQLStatement.java:725)
    at atg.adapter.gsa.Table.insert(Table.java:1380)
    at atg.adapter.gsa.GSAItemDescriptor.addItem(GSAItemDescriptor.java:6739)
    ... 80 more
    Please help me in resolving this error
    Thanks in advance.
    Edited by: 993208 on Mar 12, 2013 10:07 PM

    All,
    Issue is fixed with the following steps.
    - Make sure the Shipping Method has enabled the the option "Web Enabled"
    - Login to EBS-Oracle and click on iStore Administrator responsibility
    - Navigate to Shipping
    - Add the shipping method which is activated 'Web ENabled' option to the current site.
    In order to check the Shipping Methods fot the current site, check the outputs of the following SQLs.
    Atleast 1 row should be identical from the following SQL output
    Query 1
    select ship_method_code
    from WSH_CARRIER_SHIP_METHODS
    where organization_id = 83
    and enabled_flag = 'Y'
    and web_enabled = 'Y'
    Query 2
    select '2', x.msite_information1
    from IBE_MSITE_INFORMATION x
    where msite_information_context = 'SHPMT_MTHD'
    and msite_id = 10020
    Vamsi

  • Multiple Ship To Address in a Purchase Order

    Can we have multiple ship to adresses in a Purchase Order in SAP Business one.

    SAP does not give you an option to select different ship to addresses in purchase orders unless you are using a drop ship warehouse.
    Thanks
    Murtuza

  • How to go for multiple business group

    Dear All.
    This is a very common and perhaps very old question now. But I just want to check what is the common process to go through to achieve multiple business groups. We are in oracle 12.1.XX and have single business group but now looking to implement more business group for other countries in same instance. I understand most of the objects would be same and they can be reused like DFF, Locations, Lookups, Value set etc but need to focus more on RICEW components.  May I request you to please share your experience on this and let me what are the mandatory steps we need to follow, like running some seeded programs, restructuring other objects, creating seprate DFF, Valueset etc.
    Thank you in advance (But that dosent mean I will not thank you later on )
    Avinash

    Hi Vignesh,
    Thanks again for your quick response..
    We are not migrating employee records.. we have one business group already and we want to create new business group for newly aquired company which is in other legislation. So just want to know what would be impact on existing BG and what are the objects we can reuse. For example we need to create New responsibilities, Menu, functions, job, position, person type etc.. Similarly we can use existing location, valuesets from existing BG in our new BG. Like this we want to create a list first so that we can plan our implimanation and come up with timeline..
    I hope it is clear now.
    Thanks,
    Avinash

  • Report painter:Deletion of multiple report groups

    Hi Gurus,
    I have a requirement of deleting multiple report groups and reports created through report painter since these are no more used
    I checked in options/functions available in SAP, but couldn't find any option for mass deletion of reports groups available
    I understand we can use an LSMW to do this for multiple report groups however apart from this is there any function provided by SAP for deleting multiple report groups
    Thanks,
    Gaurav

    Hi Ajay,
    Thanks for the suggestion
    I also couldn't find anything handy. In my case the time in manually deleting would have taken less than creating an LSMW for such one-off situation so just delete the obsolete report groups manually
    Thank you,
    Gaurav

  • StoreFront : Payment and Shipping group relationships are missing for some orders

    Hi Team,
    In our application, we are able to see relationship between payment and shipping group for some orders. But we are not able to find these relationships for some orders.
    We are verifying in "dcspp_payship_rel" table. We are wondering why this behavior is happening for some orders.
    Could you please suggest to move further ?
    Regards,
    Babji...

    Hello.
    First of all you must ensure that you are properly using transactions when you create/update the orders.
    There are best practices to update the orders in ATG that must be followed to avoid loss of information.
    Like this steps below:
    Acquire a write lock using the ATG lock manager.
    Start the transaction.
    Synchronized on the Order object.
    Update the Order.
    End the synchronization.
    End the transaction.
    Release the lock.
    Here are some links that should help you understand the steps to be followed to make a correct update of an order:
    https://atgoasis.wordpress.com/2014/08/28/best-practices-for-updating-an-order-in-atg-commerce-applications/
    http://www.digitalsanctuary.com/tech-blog/java/atg/design-pattern-for-updating-an-atg-order.html
    http://sumangalavijay.blogspot.com.br/2011/10/atg-update-order.html
    Oracle ATG Web Commerce - Managing Transactions in Oracle ATG Web Commerce
    Hope it helps you! =)

  • Sliding Window Table Partitioning Problems with RANGE RIGHT, SPLIT, MERGE using Multiple File Groups

    There is misleading information in two system views (sys.data_spaces & sys.destination_data_spaces) about the physical location of data after a partitioning MERGE and before an INDEX REBUILD operation on a partitioned table. In SQL Server 2012 SP1 CU6,
    the script below (SQLCMD mode, set DataDrive  & LogDrive variables  for the runtime environment) will create a test database with file groups and files to support a partitioned table. The partition function and scheme spread the test data across
    4 files groups, an empty partition, file group and file are maintained at the start and end of the range. A problem occurs after the SWITCH and MERGE RANGE operations, the views sys.data_spaces & sys.destination_data_spaces show the logical, not the physical,
    location of data.
    --=================================================================================
    -- PartitionLabSetup_RangeRight.sql
    -- 001. Create test database
    -- 002. Add file groups and files
    -- 003. Create partition function and schema
    -- 004. Create and populate a test table
    --=================================================================================
    USE [master]
    GO
    -- 001 - Create Test Database
    :SETVAR DataDrive "D:\SQL\Data\"
    :SETVAR LogDrive "D:\SQL\Logs\"
    :SETVAR DatabaseName "workspace"
    :SETVAR TableName "TestTable"
    -- Drop if exists and create Database
    IF DATABASEPROPERTYEX(N'$(databasename)','Status') IS NOT NULL
    BEGIN
    ALTER DATABASE $(DatabaseName) SET SINGLE_USER WITH ROLLBACK IMMEDIATE
    DROP DATABASE $(DatabaseName)
    END
    CREATE DATABASE $(DatabaseName)
    ON
    ( NAME = $(DatabaseName)_data,
    FILENAME = N'$(DataDrive)$(DatabaseName)_data.mdf',
    SIZE = 10,
    MAXSIZE = 500,
    FILEGROWTH = 5 )
    LOG ON
    ( NAME = $(DatabaseName)_log,
    FILENAME = N'$(LogDrive)$(DatabaseName).ldf',
    SIZE = 5MB,
    MAXSIZE = 5000MB,
    FILEGROWTH = 5MB ) ;
    GO
    -- 002. Add file groups and files
    --:SETVAR DatabaseName "workspace"
    --:SETVAR TableName "TestTable"
    --:SETVAR DataDrive "D:\SQL\Data\"
    --:SETVAR LogDrive "D:\SQL\Logs\"
    DECLARE @nSQL NVARCHAR(2000) ;
    DECLARE @x INT = 1;
    WHILE @x <= 6
    BEGIN
    SELECT @nSQL =
    'ALTER DATABASE $(DatabaseName)
    ADD FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';
    ALTER DATABASE $(DatabaseName)
    ADD FILE
    NAME= ''$(TableName)_f' + CAST(@x AS CHAR(5)) + ''',
    FILENAME = ''$(DataDrive)\$(TableName)_f' + RTRIM(CAST(@x AS CHAR(5))) + '.ndf''
    TO FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';'
    EXEC sp_executeSQL @nSQL;
    SET @x = @x + 1;
    END
    -- 003. Create partition function and schema
    --:SETVAR TableName "TestTable"
    --:SETVAR DatabaseName "workspace"
    USE $(DatabaseName);
    CREATE PARTITION FUNCTION $(TableName)_func (int)
    AS RANGE RIGHT FOR VALUES
    0,
    15,
    30,
    45,
    60
    CREATE PARTITION SCHEME $(TableName)_scheme
    AS
    PARTITION $(TableName)_func
    TO
    $(TableName)_fg1,
    $(TableName)_fg2,
    $(TableName)_fg3,
    $(TableName)_fg4,
    $(TableName)_fg5,
    $(TableName)_fg6
    -- Create TestTable
    --:SETVAR TableName "TestTable"
    --:SETVAR BackupDrive "D:\SQL\Backups\"
    --:SETVAR DatabaseName "workspace"
    CREATE TABLE [dbo].$(TableName)(
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_scheme(Partition_PK)
    ) ON $(TableName)_scheme(Partition_PK)
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_GUID_PK] DEFAULT (newid()) FOR [GUID_PK]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateDate] DEFAULT (getdate()) FOR [CreateDate]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateServer] DEFAULT (@@servername) FOR [CreateServer]
    -- 004. Create and populate a test table
    -- Load TestTable Data - Seconds 0-59 are used as the Partitoning Key
    --:SETVAR TableName "TestTable"
    SET NOCOUNT ON;
    DECLARE @Now DATETIME = GETDATE()
    WHILE @Now > DATEADD(minute,-1,GETDATE())
    BEGIN
    INSERT INTO [dbo].$(TableName)
    ([Partition_PK]
    ,[RandomNbr])
    VALUES
    DATEPART(second,GETDATE())
    ,ROUND((RAND() * 100),0)
    END
    -- Confirm table partitioning - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber
    --=================================================================================
    -- SECTION 2 - SWITCH OUT
    -- 001 - Create TestTableOut
    -- 002 - Switch out partition in range 0-14
    -- 003 - Merge range 0 -29
    -- 001. TestTableOut
    :SETVAR TableName "TestTable"
    IF OBJECT_ID('dbo.$(TableName)Out') IS NOT NULL
    DROP TABLE [dbo].[$(TableName)Out]
    CREATE TABLE [dbo].[$(TableName)Out](
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)Out] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_fg2;
    GO
    -- 002 - Switch out partition in range 0-14
    --:SETVAR TableName "TestTable"
    ALTER TABLE dbo.$(TableName)
    SWITCH PARTITION 2 TO dbo.$(TableName)Out;
    -- 003 - Merge range 0 - 29
    --:SETVAR TableName "TestTable"
    ALTER PARTITION FUNCTION $(TableName)_func()
    MERGE RANGE (15);
    -- Confirm table partitioning
    -- Original source of this query - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber  
    The table below shows the results of the ‘Confirm Table Partitioning’ query, before and after the MERGE.
    The T-SQL code below illustrates the problem.
    -- PartitionLab_RangeRight
    USE workspace;
    DROP TABLE dbo.TestTableOut;
    USE master;
    ALTER DATABASE workspace
    REMOVE FILE TestTable_f3 ;
    -- ERROR
    --Msg 5042, Level 16, State 1, Line 1
    --The file 'TestTable_f3 ' cannot be removed because it is not empty.
    ALTER DATABASE workspace
    REMOVE FILE TestTable_f2 ;
    -- Works surprisingly!!
    use workspace;
    ALTER INDEX [PK_TestTable] ON [dbo].[TestTable] REBUILD PARTITION = 2;
    --Msg 622, Level 16, State 3, Line 2
    --The filegroup "TestTable_fg2" has no files assigned to it. Tables, indexes, text columns, ntext columns, and image columns cannot be populated on this filegroup until a file is added.
    --The statement has been terminated.
    If you run ALTER INDEX REBUILD before trying to remove files from File Group 3, it works. Rerun the database setup script then the code below.
    -- RANGE RIGHT
    -- Rerun PartitionLabSetup_RangeRight.sql before the code below
    USE workspace;
    DROP TABLE dbo.TestTableOut;
    ALTER INDEX [PK_TestTable] ON [dbo].[TestTable] REBUILD PARTITION = 2;
    USE master;
    ALTER DATABASE workspace
    REMOVE FILE TestTable_f3;
    -- Works as expected!!
    The file in File Group 2 appears to contain data but it can be dropped. Although the system views are reporting the data in File Group 2, it still physically resides in File Group 3 and isn’t moved until the index is rebuilt. The RANGE RIGHT function means
    the left file group (File Group 2) is retained when splitting ranges.
    RANGE LEFT would have retained the data in File Group 3 where it already resided, no INDEX REBUILD is necessary to effectively complete the MERGE operation. The script below implements the same partitioning strategy (data distribution between partitions)
    on the test table but uses different boundary definitions and RANGE LEFT.
    --=================================================================================
    -- PartitionLabSetup_RangeLeft.sql
    -- 001. Create test database
    -- 002. Add file groups and files
    -- 003. Create partition function and schema
    -- 004. Create and populate a test table
    --=================================================================================
    USE [master]
    GO
    -- 001 - Create Test Database
    :SETVAR DataDrive "D:\SQL\Data\"
    :SETVAR LogDrive "D:\SQL\Logs\"
    :SETVAR DatabaseName "workspace"
    :SETVAR TableName "TestTable"
    -- Drop if exists and create Database
    IF DATABASEPROPERTYEX(N'$(databasename)','Status') IS NOT NULL
    BEGIN
    ALTER DATABASE $(DatabaseName) SET SINGLE_USER WITH ROLLBACK IMMEDIATE
    DROP DATABASE $(DatabaseName)
    END
    CREATE DATABASE $(DatabaseName)
    ON
    ( NAME = $(DatabaseName)_data,
    FILENAME = N'$(DataDrive)$(DatabaseName)_data.mdf',
    SIZE = 10,
    MAXSIZE = 500,
    FILEGROWTH = 5 )
    LOG ON
    ( NAME = $(DatabaseName)_log,
    FILENAME = N'$(LogDrive)$(DatabaseName).ldf',
    SIZE = 5MB,
    MAXSIZE = 5000MB,
    FILEGROWTH = 5MB ) ;
    GO
    -- 002. Add file groups and files
    --:SETVAR DatabaseName "workspace"
    --:SETVAR TableName "TestTable"
    --:SETVAR DataDrive "D:\SQL\Data\"
    --:SETVAR LogDrive "D:\SQL\Logs\"
    DECLARE @nSQL NVARCHAR(2000) ;
    DECLARE @x INT = 1;
    WHILE @x <= 6
    BEGIN
    SELECT @nSQL =
    'ALTER DATABASE $(DatabaseName)
    ADD FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';
    ALTER DATABASE $(DatabaseName)
    ADD FILE
    NAME= ''$(TableName)_f' + CAST(@x AS CHAR(5)) + ''',
    FILENAME = ''$(DataDrive)\$(TableName)_f' + RTRIM(CAST(@x AS CHAR(5))) + '.ndf''
    TO FILEGROUP $(TableName)_fg' + RTRIM(CAST(@x AS CHAR(5))) + ';'
    EXEC sp_executeSQL @nSQL;
    SET @x = @x + 1;
    END
    -- 003. Create partition function and schema
    --:SETVAR TableName "TestTable"
    --:SETVAR DatabaseName "workspace"
    USE $(DatabaseName);
    CREATE PARTITION FUNCTION $(TableName)_func (int)
    AS RANGE LEFT FOR VALUES
    -1,
    14,
    29,
    44,
    59
    CREATE PARTITION SCHEME $(TableName)_scheme
    AS
    PARTITION $(TableName)_func
    TO
    $(TableName)_fg1,
    $(TableName)_fg2,
    $(TableName)_fg3,
    $(TableName)_fg4,
    $(TableName)_fg5,
    $(TableName)_fg6
    -- Create TestTable
    --:SETVAR TableName "TestTable"
    --:SETVAR BackupDrive "D:\SQL\Backups\"
    --:SETVAR DatabaseName "workspace"
    CREATE TABLE [dbo].$(TableName)(
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_scheme(Partition_PK)
    ) ON $(TableName)_scheme(Partition_PK)
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_GUID_PK] DEFAULT (newid()) FOR [GUID_PK]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateDate] DEFAULT (getdate()) FOR [CreateDate]
    ALTER TABLE [dbo].$(TableName) ADD CONSTRAINT [DF_$(TableName)_CreateServer] DEFAULT (@@servername) FOR [CreateServer]
    -- 004. Create and populate a test table
    -- Load TestTable Data - Seconds 0-59 are used as the Partitoning Key
    --:SETVAR TableName "TestTable"
    SET NOCOUNT ON;
    DECLARE @Now DATETIME = GETDATE()
    WHILE @Now > DATEADD(minute,-1,GETDATE())
    BEGIN
    INSERT INTO [dbo].$(TableName)
    ([Partition_PK]
    ,[RandomNbr])
    VALUES
    DATEPART(second,GETDATE())
    ,ROUND((RAND() * 100),0)
    END
    -- Confirm table partitioning - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber
    --=================================================================================
    -- SECTION 2 - SWITCH OUT
    -- 001 - Create TestTableOut
    -- 002 - Switch out partition in range 0-14
    -- 003 - Merge range 0 -29
    -- 001. TestTableOut
    :SETVAR TableName "TestTable"
    IF OBJECT_ID('dbo.$(TableName)Out') IS NOT NULL
    DROP TABLE [dbo].[$(TableName)Out]
    CREATE TABLE [dbo].[$(TableName)Out](
    [Partition_PK] [int] NOT NULL,
    [GUID_PK] [uniqueidentifier] NOT NULL,
    [CreateDate] [datetime] NULL,
    [CreateServer] [nvarchar](50) NULL,
    [RandomNbr] [int] NULL,
    CONSTRAINT [PK_$(TableName)Out] PRIMARY KEY CLUSTERED
    [Partition_PK] ASC,
    [GUID_PK] ASC
    ) ON $(TableName)_fg2;
    GO
    -- 002 - Switch out partition in range 0-14
    --:SETVAR TableName "TestTable"
    ALTER TABLE dbo.$(TableName)
    SWITCH PARTITION 2 TO dbo.$(TableName)Out;
    -- 003 - Merge range 0 - 29
    :SETVAR TableName "TestTable"
    ALTER PARTITION FUNCTION $(TableName)_func()
    MERGE RANGE (14);
    -- Confirm table partitioning
    -- Original source of this query - http://lextonr.wordpress.com/tag/sys-destination_data_spaces/
    SELECT
    N'DatabaseName' = DB_NAME()
    , N'SchemaName' = s.name
    , N'TableName' = o.name
    , N'IndexName' = i.name
    , N'IndexType' = i.type_desc
    , N'PartitionScheme' = ps.name
    , N'DataSpaceName' = ds.name
    , N'DataSpaceType' = ds.type_desc
    , N'PartitionFunction' = pf.name
    , N'PartitionNumber' = dds.destination_id
    , N'BoundaryValue' = prv.value
    , N'RightBoundary' = pf.boundary_value_on_right
    , N'PartitionFileGroup' = ds2.name
    , N'RowsOfData' = p.[rows]
    FROM
    sys.objects AS o
    INNER JOIN sys.schemas AS s
    ON o.[schema_id] = s.[schema_id]
    INNER JOIN sys.partitions AS p
    ON o.[object_id] = p.[object_id]
    INNER JOIN sys.indexes AS i
    ON p.[object_id] = i.[object_id]
    AND p.index_id = i.index_id
    INNER JOIN sys.data_spaces AS ds
    ON i.data_space_id = ds.data_space_id
    INNER JOIN sys.partition_schemes AS ps
    ON ds.data_space_id = ps.data_space_id
    INNER JOIN sys.partition_functions AS pf
    ON ps.function_id = pf.function_id
    LEFT OUTER JOIN sys.partition_range_values AS prv
    ON pf.function_id = prv.function_id
    AND p.partition_number = prv.boundary_id
    LEFT OUTER JOIN sys.destination_data_spaces AS dds
    ON ps.data_space_id = dds.partition_scheme_id
    AND p.partition_number = dds.destination_id
    LEFT OUTER JOIN sys.data_spaces AS ds2
    ON dds.data_space_id = ds2.data_space_id
    ORDER BY
    DatabaseName
    ,SchemaName
    ,TableName
    ,IndexName
    ,PartitionNumber
    The table below shows the results of the ‘Confirm Table Partitioning’ query, before and after the MERGE.
    The data in the File and File Group to be dropped (File Group 2) has already been switched out; File Group 3 contains the data so no index rebuild is needed to move data and complete the MERGE.
    RANGE RIGHT would not be a problem in a ‘Sliding Window’ if the same file group is used for all partitions, when they are created and dropped it introduces a dependency on full index rebuilds. Larger tables are typically partitioned and a full index rebuild
    might be an expensive operation. I’m not sure how a RANGE RIGHT partitioning strategy could be implemented, with an ascending partitioning key, using multiple file groups without having to move data. Using a single file group (multiple files) for all partitions
    within a table would avoid physically moving data between file groups; no index rebuild would be necessary to complete a MERGE and system views would accurately reflect the physical location of data. 
    If a RANGE RIGHT partition function is used, the data is physically in the wrong file group after the MERGE assuming a typical ascending partitioning key, and the 'Data Spaces' system views might be misleading. Thanks to Manuj and Chris for a lot of help
    investigating this.
    NOTE 10/03/2014 - The solution
    The solution is so easy it's embarrassing, I was using the wrong boundary points for the MERGE (both RANGE LEFT & RANGE RIGHT) to get rid of historic data.
    -- Wrong Boundary Point Range Right
    --ALTER PARTITION FUNCTION $(TableName)_func()
    --MERGE RANGE (15);
    -- Wrong Boundary Point Range Left
    --ALTER PARTITION FUNCTION $(TableName)_func()
    --MERGE RANGE (14);
    -- Correct Boundary Pounts for MERGE
    ALTER PARTITION FUNCTION $(TableName)_func()
    MERGE RANGE (0); -- or -1 for RANGE LEFT
    The empty, switched out partition (on File Group 2) is then MERGED with the empty partition maintained at the start of the range and no data movement is necessary. I retract the suggestion that a problem exists with RANGE RIGHT Sliding Windows using multiple
    file groups and apologize :-)

    Hi Paul Brewer,
    Thanks for your post and glad to hear that the issue is resolved. It is kind of you post a reply to share your solution. That way, other community members could benefit from your sharing.
    Regards.
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Multiple shipping addresses for the same supplier (depending on the symbol)

    Hello ,can we set up multiple shipping addresses for the same supplier (depending on the symbol)?
    .& How..
    Thanks

    a delivery adedress has nothing to do with a certain supplier, except you are talking about subcontracting (do you?)
    a delivery address specifies an address where you want the supplier to send the goods to.
    if it is a third party PO, then the delivery address is derived from ship-to partner of the sales order.
    in case of a standard order to stock, the delivery address is coming from the storage location address (if maintained). if no storage location address is maintained, then SAP takes the address from your plant.
    You can manually add a delivery address in MEAN transaction and then manually assign in POs delivery address tab.
    here you can as well take the address from any address already in your system (e.g. any customer or vendor).

Maybe you are looking for

  • IPod won't update, Says Playlists Don't Exist Anymore So Can't Be Updated

    I think this might be because I used to have too much music for my 20 GB iPod, so there was a playlist my Mac created called "My iPod" and had music selections on it. but then I deleted a couple of albums from my computer so I could have all of the m

  • Displaying Asian Characters/Other Fonts

    I'm having trouble trying to display other fonts/asian fonts in my SWING application. I know this has probably be asked to death, but here's my scenario. I don't want to modify the font.properties file if possible because this is a SWING applet. I'm

  • How to display notification message in EBS R12

    Hi all, I am new to apps dba, any explanation in detail is appreciated. I want to display a site level message on EBS R12. So that whenever a user logs in he can see my message like 'Happy Independence Day'. Let me know how to do that. Regards, Chara

  • Delivery item for HU Packaging Material

    Hi all, I have a problem in Packing (LM46) using HU management. When I pack the HU to a delivery it creates another line item (900001) for the packaging material used in the HU. I have not set this functionality for the delivery type (LF). Can't figu

  • Startrfc user authorization profile

    Hi, I have this command: startrfc -3 -d DEV -u USER -p PASSWORD -c 101 -s 01 -h somehost -x sapgw00 -F EDI_DATA_INCOMING -E PATHNAME=/some/location/idoc.idc -E PORT=IDOCS which is giving me a headache. With SAP_ALL on USER the script works, but I do