Skip to Content
avatar image
Former Member

How to create a SalesOrder with PriceAndTaxCalculation ?

Dear all,

I'm trying to create a SalesOrder via web services ManageSalesOrderIn(MaintainBundle). It also include the priceComponent.
It does not work PriceAndTaxCalculation.

Can you tell me how to create sale order also include

priceComponent ?


This is My code

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:a29="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD" xmlns:yjb="http://0023822950-one-off.sap.com/YJBKAIYRY_" xmlns:ymb="http://0023822950-one-off.sap.com/YMBEKTANY_" xmlns:yqr="http://0023822950-one-off.sap.com/YQR7WZCEY_">
   <soapenv:Body>
      <glob:SalesOrderBundleMaintainRequest_sync>
         <SalesOrder>
            <BuyerID>0056711111</BuyerID>
            <DataOriginTypeCode>2</DataOriginTypeCode>
            <AccountParty>
               <PartyID>1000506</PartyID>
            </AccountParty>
            <ProductRecipientParty>
               <PartyID>1000506</PartyID>
               <Address>
                  <DisplayName>
                     <FormattedName>WAL-MART DC 6030A-ASM DIS</FormattedName>
                  </DisplayName>
                  <PostalAddress>
                     <CountryCode>US</CountryCode>
                     <RegionCode>NH</RegionCode>
                     <CityName>RAYMOND</CityName>
                     <StreetPostalCode>03077</StreetPostalCode>
                     <StreetName>42-D FREETOWN ROAD</StreetName>
                     <TaxJurisdictionCode>NH</TaxJurisdictionCode>
                  </PostalAddress>
               </Address>
            </ProductRecipientParty>
            <DeliveryTerms>
               <CompleteDeliveryRequestedIndicator>1</CompleteDeliveryRequestedIndicator>
            </DeliveryTerms>
            <PricingTerms>
               <CurrencyCode>USD</CurrencyCode>
               <GrossAmountIndicator>1</GrossAmountIndicator>
            </PricingTerms>
            <TextCollection>
               <Text>
                  <TypeCode>10024</TypeCode>
                  <ContentText>NO PRETICKET ============================================================ TRUCK # 01 VNDRPL # 2048   ============================== ============================================================ ============================================================ IF MULTIPLE DESTINATIONS HAVE THE SAME SHIP DATE, PLEASE SHIP TO FURTHEST DESTINATION  FIRST AND CLOSEST DESTINATIONS LAST.                         ==============================</ContentText>
               </Text>
            </TextCollection>
            <a29:EDI_AC_INDICATOR_1>A</a29:EDI_AC_INDICATOR_1>
            <a29:EDI_AC_METHODOFHANDLING_1>02</a29:EDI_AC_METHODOFHANDLING_1>
            <a29:EDI_AC_PERCENT_1>2.00</a29:EDI_AC_PERCENT_1>
            <a29:EDI_AC_AMOUNT_2>10.11</a29:EDI_AC_AMOUNT_2>
            <a29:EDI_AC_CODE_2>F910</a29:EDI_AC_CODE_2>
            <a29:EDI_AC_INDICATOR_2>A</a29:EDI_AC_INDICATOR_2>
            <a29:EDI_AC_METHODOFHANDLING_2>02</a29:EDI_AC_METHODOFHANDLING_2>
            <a29:EDI_AC_PERCENT_2>1.00</a29:EDI_AC_PERCENT_2>
            <a29:EDI_AC_INDICATOR_3>A</a29:EDI_AC_INDICATOR_3>
            <a29:EDI_BUYERCODE>0078742030449</a29:EDI_BUYERCODE>
            <a29:EDI_BUYERNAME>WAL-MART DC 6030A-ASM DIS</a29:EDI_BUYERNAME>
            <a29:EDI_DEPARTMENTNO>00072</a29:EDI_DEPARTMENTNO>
            <a29:EDI_FREIGHTDESCRIPTION>VARIOUS ZZ                  ZZ</a29:EDI_FREIGHTDESCRIPTION>
            <a29:EDI_FREIGHTTERMSCODE>OR</a29:EDI_FREIGHTTERMSCODE>
            <a29:EDI_FREIGHTMETHODPAYMENT>CC</a29:EDI_FREIGHTMETHODPAYMENT>
            <a29:EDI_SENDERID>2090</a29:EDI_SENDERID>
            <a29:EDI_INSTRUCTION>.</a29:EDI_INSTRUCTION>
            <a29:EDI_INTERNALVENDORNUMBER>017517720</a29:EDI_INTERNALVENDORNUMBER>
            <a29:EDI_MR_BT>0033</a29:EDI_MR_BT>
            <a29:EDI_NUMBEROFLINEITEMS>5</a29:EDI_NUMBEROFLINEITEMS>
            <a29:EDI_PODATE>2017-02-07</a29:EDI_PODATE>
            <a29:EDI_TRANSACTIONPURPOSECODE>00</a29:EDI_TRANSACTIONPURPOSECODE>
            <a29:EDI_PROMOTIONCODE>POS REPLEN</a29:EDI_PROMOTIONCODE>
            <a29:EDI_ROUTING>CALL4792734300#</a29:EDI_ROUTING>
            <a29:EDI_SCHEDULESHIPDATE>2017-02-14</a29:EDI_SCHEDULESHIPDATE>
            <a29:EDI_SHIPTOCODE>0078742030449</a29:EDI_SHIPTOCODE>
            <a29:EDI_SHIPTOQUALIFIER>UL</a29:EDI_SHIPTOQUALIFIER>
            <yjb:EDI_850_ROUTING>CALL4792734300#</yjb:EDI_850_ROUTING>
            <a29:EDI_850_TRANSTYPE>SA</a29:EDI_850_TRANSTYPE>
            <a29:EDIReferenceKey>937321_201702</a29:EDIReferenceKey>
            <a29:EDIPONumber>0056711111-0078742030449</a29:EDIPONumber>
            <a29:EDI_AC_AMOUNT_1>20.23</a29:EDI_AC_AMOUNT_1>
            <a29:EDI_AC_CODE_1>I410</a29:EDI_AC_CODE_1>
            <a29:EDI_TERMSBASICDATETYPE>15</a29:EDI_TERMSBASICDATETYPE>
            <a29:EDI_TERMSNETDAYS>60</a29:EDI_TERMSNETDAYS>
            <a29:EDI_TERMSTYPECODE>05</a29:EDI_TERMSTYPECODE>
            <a29:EDI_POTOTAL>444.36</a29:EDI_POTOTAL>
            <a29:EDI_TRANSACTIONCONTROLNO>0001</a29:EDI_TRANSACTIONCONTROLNO>
            <a29:EDI_VENDORNAME>MERKURY INNOVATIONS LLC</a29:EDI_VENDORNAME>
            <a29:EDI_RECEIVERID>22665</a29:EDI_RECEIVERID>
            <a29:EDI_CURRENCYCODE>USD</a29:EDI_CURRENCYCODE>
            <a29:EDI_MESSAGE>NO PRETICKET ============================================================ TRUCK # 01 VNDRPL # 2048   ============================== ============================================================ ============================================================ IF MULTIPLE DESTINATIONS HAVE THE SAME SHIP DATE, PLEASE SHIP TO FURTHEST DESTINATION  FIRST AND CLOSEST DESTINATIONS LAST.                         ==============================</a29:EDI_MESSAGE>
            <a29:EDI_PONO>0056711111</a29:EDI_PONO>
            <a29:EDI_850_SHIPNOTBEFORE>2017-02-14</a29:EDI_850_SHIPNOTBEFORE>
            <a29:EDI_850_DONOTDELIVERAFTER>2017-02-27</a29:EDI_850_DONOTDELIVERAFTER>
            <a29:EDI_850_ROUTINGSEQCODE>O</a29:EDI_850_ROUTINGSEQCODE>
            <a29:EDI_850_RefIDLetterDesc>SPECIAL INSTRUCTIONS</a29:EDI_850_RefIDLetterDesc>
            <a29:EDI_850_BUYERADDRESS1>42-D FREETOWN ROAD</a29:EDI_850_BUYERADDRESS1>
            <a29:EDI_850_BUYERCITY>RAYMOND</a29:EDI_850_BUYERCITY>
            <a29:EDI_850_BUYERSTATE>NH</a29:EDI_850_BUYERSTATE>
            <a29:EDI_850_BUYERZIPCODE>03077</a29:EDI_850_BUYERZIPCODE>
            <a29:EDI_850_BUYERCOUNTRY>US</a29:EDI_850_BUYERCOUNTRY>
            <a29:EDI_850_USERDEFINED649>01-204</a29:EDI_850_USERDEFINED649>
            <Item>
               <ItemProduct>
                  <ProductInternalID>MI-SPL01-199</ProductInternalID>
                  <UnitOfMeasure>EA</UnitOfMeasure>
               </ItemProduct>
               <ItemScheduleLine>
                  <Quantity>16.00</Quantity>
               </ItemScheduleLine>
               <p5:EDI_MARKFORSTORECODE xmlns:p5="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">0078742030449</p5:EDI_MARKFORSTORECODE>
               <p7:EDI_850DTL_UNITPRICE xmlns:p7="http://0023822950-one-off.sap.com/YJBKAIYRY_">11.3700</p7:EDI_850DTL_UNITPRICE>
               <p1B:EDI_BASICUNITPRICE xmlns:p1B="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">LE</p1B:EDI_BASICUNITPRICE>
               <p21:EDI_ITEM_AC_INDICATOR_1 xmlns:p21="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">A</p21:EDI_ITEM_AC_INDICATOR_1>
               <p28:EDI_PRODUCTCODE1 xmlns:p28="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">554138233</p28:EDI_PRODUCTCODE1>
               <p29:EDI_PRODUCTCODEQUALIFIER1 xmlns:p29="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">IN</p29:EDI_PRODUCTCODEQUALIFIER1>
               <p2A:EDI_PRODUCTCODE2 xmlns:p2A="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">844702044234</p2A:EDI_PRODUCTCODE2>
               <p2B:EDI_PRODUCTCODEQUALIFIER2 xmlns:p2B="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">UP</p2B:EDI_PRODUCTCODEQUALIFIER2>
               <p2C:EDI_PRODUCTCODE3 xmlns:p2C="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">MI-SPL01-199</p2C:EDI_PRODUCTCODE3>
               <p2D:EDI_PRODUCTCODEQUALIFIER3 xmlns:p2D="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">VN</p2D:EDI_PRODUCTCODEQUALIFIER3>
               <p31:EDI_PRODUCTCODEQUALIFIER5 xmlns:p31="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">IZ</p31:EDI_PRODUCTCODEQUALIFIER5>
               <p38:EDI_Quantity xmlns:p38="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">16.00</p38:EDI_Quantity>
               <p39:EDI_UOM xmlns:p39="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">EA</p39:EDI_UOM>
               <p3B:EDI_INNERPACK xmlns:p3B="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">1.00</p3B:EDI_INNERPACK>
               <p51:EDI_850DTL_UOM xmlns:p51="http://0023822950-one-off.sap.com/YJBKAIYRY_">EA</p51:EDI_850DTL_UOM>
               <p52:EDI_850DTL_UNITPRICE xmlns:p52="http://0023822950-one-off.sap.com/YMBEKTANY_">11.3700</p52:EDI_850DTL_UNITPRICE>
               <p54:EDI_850DTL_UOM xmlns:p54="http://0023822950-one-off.sap.com/YMBEKTANY_">EA</p54:EDI_850DTL_UOM>
               <p5C:EDI_850DTL_UOMRATE xmlns:p5C="http://0023822950-one-off.sap.com/YQR7WZCEY_">1</p5C:EDI_850DTL_UOMRATE>
               <p5D:EDI_850DTL_UNITPRICE xmlns:p5D="http://0023822950-one-off.sap.com/YQR7WZCEY_">11.3700</p5D:EDI_850DTL_UNITPRICE>
               <p61:EDI_PRODUCTCODE9 xmlns:p61="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">00844702044234</p61:EDI_PRODUCTCODE9>
               <p62:EDI_PRODUCTCODEQUALIFIER9 xmlns:p62="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">UK</p62:EDI_PRODUCTCODEQUALIFIER9>
            </Item>
            <Item>
               <ItemProduct>
                  <ProductInternalID>MB-L1508-TIF</ProductInternalID>
                  <UnitOfMeasure>EA</UnitOfMeasure>
               </ItemProduct>
               <ItemScheduleLine>
                  <Quantity>36.00</Quantity>
               </ItemScheduleLine>
               <p5:EDI_MARKFORSTORECODE xmlns:p5="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">0078742030449</p5:EDI_MARKFORSTORECODE>
               <p7:EDI_850DTL_UNITPRICE xmlns:p7="http://0023822950-one-off.sap.com/YJBKAIYRY_">7.2900</p7:EDI_850DTL_UNITPRICE>
               <p1B:EDI_BASICUNITPRICE xmlns:p1B="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">LE</p1B:EDI_BASICUNITPRICE>
               <p21:EDI_ITEM_AC_INDICATOR_1 xmlns:p21="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">A</p21:EDI_ITEM_AC_INDICATOR_1>
               <p28:EDI_PRODUCTCODE1 xmlns:p28="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">555124676</p28:EDI_PRODUCTCODE1>
               <p29:EDI_PRODUCTCODEQUALIFIER1 xmlns:p29="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">IN</p29:EDI_PRODUCTCODEQUALIFIER1>
               <p2A:EDI_PRODUCTCODE2 xmlns:p2A="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">844702047723</p2A:EDI_PRODUCTCODE2>
               <p2B:EDI_PRODUCTCODEQUALIFIER2 xmlns:p2B="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">UP</p2B:EDI_PRODUCTCODEQUALIFIER2>
               <p2C:EDI_PRODUCTCODE3 xmlns:p2C="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">MB-L1508-TIF</p2C:EDI_PRODUCTCODE3>
               <p2D:EDI_PRODUCTCODEQUALIFIER3 xmlns:p2D="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">VN</p2D:EDI_PRODUCTCODEQUALIFIER3>
               <p30:EDI_PRODUCTCODE5 xmlns:p30="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">1.0EA</p30:EDI_PRODUCTCODE5>
               <p31:EDI_PRODUCTCODEQUALIFIER5 xmlns:p31="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">IZ</p31:EDI_PRODUCTCODEQUALIFIER5>
               <p38:EDI_Quantity xmlns:p38="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">36.00</p38:EDI_Quantity>
               <p39:EDI_UOM xmlns:p39="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">EA</p39:EDI_UOM>
               <p3B:EDI_INNERPACK xmlns:p3B="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">1.00</p3B:EDI_INNERPACK>
               <p51:EDI_850DTL_UOM xmlns:p51="http://0023822950-one-off.sap.com/YJBKAIYRY_">EA</p51:EDI_850DTL_UOM>
               <p52:EDI_850DTL_UNITPRICE xmlns:p52="http://0023822950-one-off.sap.com/YMBEKTANY_">7.2900</p52:EDI_850DTL_UNITPRICE>
               <p54:EDI_850DTL_UOM xmlns:p54="http://0023822950-one-off.sap.com/YMBEKTANY_">EA</p54:EDI_850DTL_UOM>
               <p5C:EDI_850DTL_UOMRATE xmlns:p5C="http://0023822950-one-off.sap.com/YQR7WZCEY_">1</p5C:EDI_850DTL_UOMRATE>
               <p5D:EDI_850DTL_UNITPRICE xmlns:p5D="http://0023822950-one-off.sap.com/YQR7WZCEY_">7.2900</p5D:EDI_850DTL_UNITPRICE>
               <p61:EDI_PRODUCTCODE9 xmlns:p61="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">00844702047723</p61:EDI_PRODUCTCODE9>
               <p62:EDI_PRODUCTCODEQUALIFIER9 xmlns:p62="http://sap.com/xi/AP/CustomerExtension/BYD/A29BD">UK</p62:EDI_PRODUCTCODEQUALIFIER9>
            </Item>
            <PriceAndTaxCalculation>
               <MainDiscount actionCode="01">
    <Rate>
     <DecimalValue>25.0</DecimalValue>
     <MeasureUnitCode>P1</MeasureUnitCode>
    </Rate>
   </MainDiscount>
   
           </PriceAndTaxCalculation>
         </SalesOrder>
      </glob:SalesOrderBundleMaintainRequest_sync>
   </soapenv:Body>
</soapenv:Envelope>


Regards

Cuong

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 29, 2017 at 12:58 PM

    Hi there.

    1 - Did you try to use the CustomerOrderProcessingManageCustomerOrderIn webservice?

    2 - In your request, is there a ProcessingTypeCode field? The ProcessingTypeCode field indicates if it is an internal or external sales order. To use the price components possibly you have to indicate that it is an external order. Otherwise, I think the price components will be calculated internally.

    Best regards.

    Alexandre.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 27, 2017 at 07:20 AM

    Hi experts,

    About the pricecomponent, who can give me some advice? It can not work, no raise.

    Thanks a lot.

    Benny

    http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob=" http://sap.com/xi/SAPGlobal20/Global" xmlns:glob1=" http://sap.com/xi/AP/Globalization">
    <soapenv:Header/>
    <soapenv:Body>
    <glob:SalesOrderBundleMaintainRequest_sync>
    <SalesOrder>
    <BuyerID>wbtest02</BuyerID>
    <!--Optional:-->
    <Name>test02</Name>
    <!--Optional:-->
    <AccountParty>
    <!--Optional:-->
    <PartyID>C00006</PartyID>
    </AccountParty>
    <DeliveryTerms>
    <CompleteDeliveryRequestedIndicator>1</CompleteDeliveryRequestedIndicator>
    </DeliveryTerms>
    <SalesAndServiceBusinessArea>
    <!--Optional:-->
    <DistributionChannelCode>02</DistributionChannelCode>
    </SalesAndServiceBusinessArea>
    <SalesUnitParty>
    <PartyID>72997000</PartyID>
    </SalesUnitParty>
    <EmployeeResponsibleParty>
    <PartyID>8000000021</PartyID>
    </EmployeeResponsibleParty>
    <PricingTerms>
    <!--Optional:-->
    <CurrencyCode>CNY</CurrencyCode>
    <GrossAmountIndicator>false</GrossAmountIndicator>
    </PricingTerms>
    <Item>
    <!--Optional:-->
    <ItemProduct>
    <!--Optional:-->
    <ProductInternalID>1003</ProductInternalID>
    <UnitOfMeasure>TNE</UnitOfMeasure>
    </ItemProduct>
    <ItemScheduleLine>
    <Quantity unitCode="TNE">0.20</Quantity>
    <QuantityTypeCode>MASS</QuantityTypeCode>
    </ItemScheduleLine>
    <ItemMainPrice>
    <TypeCode>7PR1</TypeCode>
    <Rate>
    <DecimalValue>152.0</DecimalValue>
    <CurrencyCode>CNY</CurrencyCode>
    <BaseDecimalValue>1.0</BaseDecimalValue>
    <BaseMeasureUnitCode>TNE</BaseMeasureUnitCode>
    </Rate>
    </ItemMainPrice>
    <ItemPriceComponent>
    <TypeCode>7PR1</TypeCode>
    <Rate>
    <DecimalValue>152.0</DecimalValue>
    <CurrencyCode>CNY</CurrencyCode>
    <BaseDecimalValue>1.0</BaseDecimalValue>
    <BaseMeasureUnitCode>TNE</BaseMeasureUnitCode>
    </Rate>
    </ItemPriceComponent>
    </Item>
    <PriceAndTaxCalculation>
    <MainPrice>
    <TypeCode>7PR1</TypeCode>
    <Rate>
    <DecimalValue>152.0</DecimalValue>
    <CurrencyCode>CNY</CurrencyCode>
    <BaseDecimalValue>1.0</BaseDecimalValue>
    <BaseMeasureUnitCode>TNE</BaseMeasureUnitCode>
    </Rate>
    </MainPrice>
    <PriceComponent>
    <TypeCode>7PR1</TypeCode>
    <Rate>
    <DecimalValue>152.0</DecimalValue>
    <CurrencyCode>CNY</CurrencyCode>
    <BaseDecimalValue>1.0</BaseDecimalValue>
    <BaseMeasureUnitCode>TNE</BaseMeasureUnitCode>
    </Rate>
    </PriceComponent>
    </PriceAndTaxCalculation>
    </SalesOrder>
    </glob:SalesOrderBundleMaintainRequest_sync>
    </soapenv:Body>
    </soapenv:Envelope>

    Add comment
    10|10000 characters needed characters exceeded