Skip to Content

How to create an order with prices in C4C Standard services

Dear experts,

It's my first time working with the C4C standard web services using SOAP Manager.
I'm trying to create an order with external price calculation but the only thing I've reached is first creating the order with all the items in one request and then, update it. But I just updated the items with its prices without the totals.
There's a possibility to update the order including all the items with its conditions and also, getting the calculated total amount??

Here's my code:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:a20="http://sap.com/xi/AP/CustomerExtension/BYD/A20X2">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:CustomerOrderBundleMaintainRequest_sync_V1>
         <CustomerOrder actionCode="01">
            <BuyerID>10014256</BuyerID>
            <RequestExternalData>
               <!--Optional:-->
               <PriceRecalculationTypeCode>C</PriceRecalculationTypeCode>
            </RequestExternalData>
            <ProductRecipientParty>
               <BusinessPartnerInternalID>10014256</BusinessPartnerInternalID>
               <AddressUUID>00163e0d-8418-1ee8-93f3-c5742894d29f</AddressUUID>
            </ProductRecipientParty>
            <SalesAndServiceBusinessArea>
               <SalesOrganisationID>SO_5100</SalesOrganisationID>
               <DistributionChannelCode>Z1</DistributionChannelCode>
               <DivisionCode>10</DivisionCode>
            </SalesAndServiceBusinessArea>
            <SalesUnitParty>
               <OrganisationalCentreID>SO_5100</OrganisationalCentreID>
            </SalesUnitParty>
            <RequestedFulfillmentPeriod>
               <!--Optional:-->
               <StartDateTime timeZoneCode="CHILE">2018-05-11T17:10:00Z</StartDateTime>
               <!--Optional:-->
               <EndDateTime timeZoneCode="CHILE">2018-05-11T23:59:59Z</EndDateTime>
            </RequestedFulfillmentPeriod>
            <CashDiscountTerms>
               <Code>1001</Code>
            </CashDiscountTerms>
            <Item actionCode="01">
               <ItemProduct>
                  <!--Optional:-->
                  <ProductID>10000251</ProductID>
               </ItemProduct>
               <!--Optional:-->
               <ItemRequestedScheduleLine>
                  <!--Optional:-->
                  <ID>10</ID>
                  <!--Optional:-->
                  <Quantity>1</Quantity>
                  <QuantityTypeCode>NL</QuantityTypeCode>
               </ItemRequestedScheduleLine>
               <ItemText actionCode="01">
                  <TextTypeCode>10024</TextTypeCode>
                  <ContentText>INT</ContentText>
               </ItemText>
               <ItemText actionCode="01">
                  <TextTypeCode>10011</TextTypeCode>
                  <ContentText>EXT</ContentText>
               </ItemText>
      
               <ExternalPriceCalculationItem>
                  <!--1-->
                  <PriceComponent>
                     <TypeCode>PR01</TypeCode>
                     <!--Optional:-->
                     <CategoryCode>1</CategoryCode>
                     <Rate>
                        <DecimalValue>15000.0</DecimalValue>
                        <CurrencyCode>CLP</CurrencyCode>
                        <BaseDecimalValue>1.0</BaseDecimalValue>
                        <BaseMeasureUnitCode>ZPC</BaseMeasureUnitCode>
                     </Rate>
                     <CalculationBasis>
                        <BaseCode>3</BaseCode>
                        <Quantity unitCode="PCE">0.667</Quantity>
                     </CalculationBasis>
                     <CalculatedAmount currencyCode="CLP">10005.0</CalculatedAmount>
                     <OriginCode>3</OriginCode>
                  </PriceComponent>
                  <!--2-->
                  <PriceComponent>
                     <TypeCode>ZRA3</TypeCode>
                     <!--Optional:-->
                     <CategoryCode>2</CategoryCode>
                     <Rate>
                        <DecimalValue>0.0</DecimalValue>
                        <CurrencyCode>CLP</CurrencyCode>
                     </Rate>
                     <CalculationBasis>
                        <BaseCode>2</BaseCode>
                     </CalculationBasis>
                     <CalculatedAmount currencyCode="CLP">0.0</CalculatedAmount>
                     <OriginCode>3</OriginCode>
                  </PriceComponent>
                  <!--3-->
                  <PriceComponent>
                     <TypeCode>ZRA4</TypeCode>
                     <CategoryCode>2</CategoryCode>
                     <Rate>
                        <DecimalValue>8000.0</DecimalValue>
                        <CurrencyCode>CLP</CurrencyCode>
                     </Rate>
                     <CalculationBasis>
                        <BaseCode>2</BaseCode>
                     </CalculationBasis>
                     <CalculatedAmount currencyCode="CLP">8000.0</CalculatedAmount>
                     <OriginCode>3</OriginCode>
                  </PriceComponent>
                  <!--4-->
                  <PriceComponent>
                     <TypeCode>ZRA5</TypeCode>
                     <CategoryCode>2</CategoryCode>
                     <Rate>
                        <DecimalValue>0.0</DecimalValue>
                        <CurrencyCode>CLP</CurrencyCode>
                     </Rate>
                     <CalculationBasis>
                        <BaseCode>2</BaseCode>
                     </CalculationBasis>
                     <CalculatedAmount currencyCode="CLP">0.0</CalculatedAmount>
                     <OriginCode>3</OriginCode>
                  </PriceComponent>
                  <!--5-->
                  <PriceComponent>
                     <Rate>
                        <DecimalValue>11994.0</DecimalValue>
                        <CurrencyCode>CLP</CurrencyCode>
                        <BaseDecimalValue>1.0</BaseDecimalValue>
                        <BaseMeasureUnitCode>ZPC</BaseMeasureUnitCode>
                     </Rate>
                     <CalculationBasis>
                        <BaseCode>3</BaseCode>
                        <Quantity unitCode="PCE">0.667</Quantity>
                     </CalculationBasis>
                     <CalculatedAmount currencyCode="CLP">8000.0</CalculatedAmount>
                     <OriginCode>3</OriginCode>
                  </PriceComponent>
                  <!--6-->
                  <PriceComponent>
                     <TypeCode>MWST</TypeCode>
                     <CategoryCode>4</CategoryCode>
                     <Rate>
                        <DecimalValue>19.0</DecimalValue>
                        <MeasureUnitCode>P1</MeasureUnitCode>
                     </Rate>
                     <CalculationBasis>
                        <BaseCode>1</BaseCode>
                        <Amount currencyCode="CLP">18005.0</Amount>
                     </CalculationBasis>
                     <CalculatedAmount currencyCode="CLP">3420.95</CalculatedAmount>
                     <GroupedIndicator>true</GroupedIndicator>
                     <OriginCode>3</OriginCode>
                  </PriceComponent>
                  <!--7-->
                  <PriceComponent>
                     <Rate>
                        <DecimalValue>44116.87</DecimalValue>
                        <CurrencyCode>CLP</CurrencyCode>
                        <BaseDecimalValue>1.0</BaseDecimalValue>
                        <BaseMeasureUnitCode>ZPC</BaseMeasureUnitCode>
                     </Rate>
                     <CalculationBasis>
                        <BaseCode>3</BaseCode>
                        <Quantity unitCode="PCE">0.667</Quantity>
                     </CalculationBasis>
                     <CalculatedAmount currencyCode="CLP">29425.95</CalculatedAmount>
                     <OriginCode>3</OriginCode>
                  </PriceComponent>
             
               </ExternalPriceCalculationItem>
            </Item>
         </CustomerOrder>
      </glob:CustomerOrderBundleMaintainRequest_sync_V1>
   </soapenv:Body>
</soapenv:Envelope>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 04 at 04:12 PM

    Dear Kenji Nicolás Nakano Toro,

    Please attach the xml request which you are consuming from source.

    Regards,
    Manideep Satya

    Add comment
    10|10000 characters needed characters exceeded

  • May 07 at 02:48 PM

    Hello Manideep Satya

    I don't know why my post didn't attach the XML...But here you have.

    I'll wait for your answer

    Thank you very much

    Kind regards

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global" xmlns:a20="http://sap.com/xi/AP/CustomerExtension/BYD/A20X2">
       <soapenv:Header/>
       <soapenv:Body>
          <glob:CustomerOrderBundleMaintainRequest_sync_V1>
             <CustomerOrder actionCode="01">
                <ProcessingTypeCode>ZC4C</ProcessingTypeCode>
                <OrderReasonCode>ZZ2</OrderReasonCode>
                <BuyerParty>
                   <BusinessPartnerInternalID>10014256</BusinessPartnerInternalID>
                </BuyerParty>
                <ProductRecipientParty>
                   <BusinessPartnerInternalID>10014256</BusinessPartnerInternalID>
                   <!--Se envía la Dirección donde va a recibir el pedido-->
                   <AddressUUID>00163e0d-841a-1ee7-b09a-a1f31d4216a6</AddressUUID>
                   <!--"CurrentAddressSnapshotUUID"-->
                </ProductRecipientParty>
                <SalesAndServiceBusinessArea>
                   <SalesOrganisationID>SO_5100</SalesOrganisationID>
                   <DistributionChannelCode>Z1</DistributionChannelCode>
                   <DivisionCode>10</DivisionCode>
                </SalesAndServiceBusinessArea>
                <SalesUnitParty>
                   <OrganisationalCentreID>SO_5100</OrganisationalCentreID>
                </SalesUnitParty>
                <RequestedFulfillmentPeriodPeriod>
                   <StartDateTime>2018-04-27T04:00:00Z</StartDateTime>
                </RequestedFulfillmentPeriodPeriod>
                <a20:Z_tiempo_entrega>60 min / 08:00 Apertura / 22:00 Cierre</a20:Z_tiempo_entrega>
                <Text actionCode="01">
                   <TextTypeCode>10024</TextTypeCode>
                   <ContentText>EXT</ContentText>
                   <!--<CreationDateTime>2015-09-01T12:00:00.1234567Z</CreationDateTime>-->
                </Text>
                <Text actionCode="01">
                   <TextTypeCode>10011</TextTypeCode>
                   <ContentText>INT</ContentText>
                   <!--<CreationDateTime>2015-09-01T12:00:00.1234567Z</CreationDateTime>-->
                </Text>
                <CashDiscountTerms>
                   <Code>1001</Code>
                </CashDiscountTerms>
                <a20:ZCodigoPromocionalcabecera>XXXX111</a20:ZCodigoPromocionalcabecera>
                <Item actioncode="01">
                   <ID>10</ID>
                   <ItemProduct>
                      <ProductID>10000251</ProductID>
                   </ItemProduct>
                   <ItemRequestedScheduleLine>
                      <Quantity>1</Quantity>
                      <QuantityTypeCode>NL</QuantityTypeCode>
                   </ItemRequestedScheduleLine>
                   <ItemPriceCalculation actionCode="01">
                      <ItemMainPrice>
                         <Rate>
                            <DecimalValue>5000</DecimalValue>
                         </Rate>
                      </ItemMainPrice>
                      <!--<ItemPriceComponent actionCode="?">               
                         <Rate>
                            <DecimalValue>?</DecimalValue>                 
                            <MeasureUnitCode>?</MeasureUnitCode>                     
                            <CurrencyCode>?</CurrencyCode>            
                            <BaseDecimalValue>1</BaseDecimalValue>                   
                            <BaseMeasureUnitCode>?</BaseMeasureUnitCode>     
                            <BaseCurrencyCode>?</BaseCurrencyCode>
                         </Rate>
                      </ItemPriceComponent>-->
                   </ItemPriceCalculation>
                </Item>
             </CustomerOrder>
          </glob:CustomerOrderBundleMaintainRequest_sync_V1>
       </soapenv:Body>
    </soapenv:Envelope>
    

    Add comment
    10|10000 characters needed characters exceeded