Skip to Content
0

How can I set the desired delivery date for a sales order via web service?

Nov 22, 2017 at 03:19 PM

65

avatar image

Dear all,

I am creating sales order via a custom web service.

When I set the desired delivery date (SalesOrder.RequestedFulfillmentPeriod.TimePointPeriod.StartTimePoint.Date), I receive an error, that the field is not write enabled. The sales order cannot be created due to this.

The same Problem appears when I try to set the desired delivery date for an item (SalesOrder.Item.RequestedFulfilmentItemPeriod.TimePointPeriod.StartTimePoint.DateTime).

Is there another way to set the desired delivery dates correctly?

Thank you in advance.

Best regards,

Daniel

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Knut Heusermann
Nov 30, 2017 at 02:33 PM
0

Hi Daniel,

you can enter the Requested Date on header level in element SalesOrder/RequestedFulfillmentPeriodPeriodTerms/StartDateTime. This date is used as requested date for items in which no requested date is provided.

On item level you can enter the Requested date in element SalesOrder/Item/ItemScheduleLine/DateTimePeriod/StartDateTime.

Example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
   <soapenv:Header/>
   <soapenv:Body>
      <glob:SalesOrderBundleMaintainRequest_sync>
         <BasicMessageHeader>
         </BasicMessageHeader>
         <SalesOrder actionCode="01">
         	  <!-- DataOriginTypeCode: 4 = Internet order -->
            <DataOriginTypeCode>4</DataOriginTypeCode>
            <ReleaseCustomerRequest>true</ReleaseCustomerRequest>
            <ReleaseAllItemsToExecution>false</ReleaseAllItemsToExecution>
            <SalesUnitParty actionCode="04">
               <PartyID>S1121</PartyID>
            </SalesUnitParty>
            <AccountParty actionCode="04">
               <PartyID>CS200125</PartyID>
            </AccountParty>
            <RequestedFulfillmentPeriodPeriodTerms actionCode="04">
               <StartDateTime timeZoneCode="UTC">2017-12-01T12:00:00Z</StartDateTime>
            </RequestedFulfillmentPeriodPeriodTerms>            
            <PricingTerms actionCode="04">
               <CurrencyCode>USD</CurrencyCode>
               <PriceDateTime timeZoneCode="UTC">2017-11-07T13:58:00Z</PriceDateTime>
               <GrossAmountIndicator>false</GrossAmountIndicator>
            </PricingTerms>        
            <Item actionCode="04">
               <ID>10</ID>
               <ProcessingTypeCode>TPTM</ProcessingTypeCode>
               <ReleaseToExecute>false</ReleaseToExecute>
               <ItemProduct actionCode="04">
                  <ProductInternalID>S200102</ProductInternalID>
               </ItemProduct>
               <ItemScheduleLine actionCode="04">
                  <ID>1</ID>
                  <TypeCode>1</TypeCode>
                  <Quantity unitCode="HUR">5.0</Quantity>
                  <DateTimePeriod>
                     <StartDateTime timeZoneCode="UTC">2017-12-03T12:00:00Z</StartDateTime>
               </ItemScheduleLine>
            </Item>
         </SalesOrder>
      </glob:SalesOrderBundleMaintainRequest_sync>
   </soapenv:Body>
</soapenv:Envelope>

Best regards,
Knut

Share
10 |10000 characters needed characters left characters exceeded