Skip to Content
0

How to create a SalesOrder using ManageSalesOrderIn with PriceAndTaxCalculationItem?

Jun 27, 2017 at 07:36 AM

254

avatar image

Dear experts,

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

Can you tell me how to create sale order also include priceComponent ?
There is not document at standard help, I am crazy.

This is My code

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>
<PriceAndTaxCalculationItem>
<ItemMainPrice>
<TypeCode>7PRB</TypeCode>
<Rate>
<DecimalValue>152.0</DecimalValue>
<CurrencyCode>CNY</CurrencyCode>
<BaseDecimalValue>1.0</BaseDecimalValue>
<BaseMeasureUnitCode>TNE</BaseMeasureUnitCode>
</Rate>
</ItemMainPrice>
<ItemPriceComponent>
<TypeCode>7PRB</TypeCode>
<Rate>
<DecimalValue>152.0</DecimalValue>
<CurrencyCode>CNY</CurrencyCode>
<BaseDecimalValue>1.0</BaseDecimalValue>
<BaseMeasureUnitCode>TNE</BaseMeasureUnitCode>
</Rate>
</ItemPriceComponent>
</PriceAndTaxCalculationItem>
</Item>
<PriceAndTaxCalculation>
<MainPrice>
<TypeCode>7PRB</TypeCode>
<Rate>
<DecimalValue>152.0</DecimalValue>
<CurrencyCode>CNY</CurrencyCode>
<BaseDecimalValue>1.0</BaseDecimalValue>
<BaseMeasureUnitCode>TNE</BaseMeasureUnitCode>
</Rate>
</MainPrice>
<PriceComponent>
<TypeCode>7PRB</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>

Thanks a lot.

Best Regards,

Benny

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

3 Answers

Best Answer
Benny Huang Jul 01, 2017 at 08:20 AM
0

Hi experts,

From this link: https://blogs.sap.com/2015/05/15/mass-changes-of-byd-data-using-excel-and-byd-web-services/

I create a Excel template, two step to success.

1.create the SalesOrder with the WebService

2.update the price of SalesOrder with the same WebService

updateprice.png

The template can not upload, please send email to me ask for the template, huangb.mmsh@sinopec.com

Best Regards,

Benny


updateprice.png (54.3 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Jun 27, 2017 at 12:45 PM
0

Hi Benny, hope all is well.

Please see below the usage of a PriceAndTaxCalculation with Freight.

<n0:SalesOrderBundleMaintainRequest_sync xmlns:n0="http://sap.com/xi/SAPGlobal20/Global">
<BasicMessageHeader/>
<SalesOrder>
<ID>123</ID>
<PriceAndTaxCalculation priceComponentListCompleteTransmissionIndicator="false">
<PriceComponent actionCode="01">
<TypeCode>7PR8</TypeCode>
<Rate>
<DecimalValue>7</DecimalValue>
</Rate>
</PriceComponent>
</PriceAndTaxCalculation>
</SalesOrder>
</n0:SalesOrderBundleMaintainRequest_sync>

Hope this does help you.

Best regards,
Henrique dos Santos

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Also, for further assistance, I would recommend taking a look at the following Knowledge Based Article:

2494573 - Frieght not showing under Sales Order

0

As your code, the result is

http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header/>
<soap-env:Body>
http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn: sap.com:proxy:L1V:/1SAI/TAE88DF3AA925C3E49C60CC:804">
<Log>
<MaximumLogItemSeverityCode>3</MaximumLogItemSeverityCode>
<Item>
<TypeID>129(/PRCTAX_ESI_T100/)</TypeID>
ENV.COM
<SeverityCode>3</SeverityCode>
<Note>Price Component Freight is not valid</Note>
</Item>
</Log>
</n0:SalesOrderBundleMaintainConfirmation_sync>
</soap-env:Body>
</soap-env:Envelope>

0

Dear Henrique,

Change SalesOrder's price is ok, it is from https://archive.sap.com/discussions/message/14509662#14509662

Now I want to update the price when the SalesOrder is creating, I try many times, but it is not OK.

Could you have any idea?

Thanks a lot.

Best Regards,

Benny

0

Dear Henrique,

I find the result: Note: PriceAndTaxCalculation cannot be created but can only be modified. If you want to change the ‘Discount’ or ‘Freight’ charge, you must create the order first, and then make a second web-service request to update the sales order with the pricing information that is to be changed.

If you want to change the price components for a sales order with external payment, you must update the payment information with the pricing changes in second web-service request.

Thanks a lot.

Benny

0
Horst Schaude
Jun 27, 2017 at 11:40 AM
0

Hello Benny,

Do you get any messages?

Reg. the code values: Did you verify that the resp. code values exist in the C4C system?

Bye,
. Horst

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hello Horst,

I change the "7PRB" to "7PR8", the result as the below, the salesorder create successful, but the price is none.

Could you tell me further, thanks a lot.

http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Header/>
<soap-env:Body>
http://sap.com/xi/SAPGlobal20/Global" xmlns:prx="urn: sap.com:proxy:L1V:/1SAI/TAE88DF3AA925C3E49C60CC:804">
<SalesOrder>
<ChangeStateID>20170628012917.4220010</ChangeStateID>
<UUID>00163e0f-423c-1ee7-96f4-265431b3dcdf</UUID>
<ID>284</ID>
</SalesOrder>
<Log>
<MaximumLogItemSeverityCode>2</MaximumLogItemSeverityCode>
<Item>
<TypeID>017(/CL_CDA_ORGPT/)</TypeID>
<CategoryCode>INC.BOI</CategoryCode>
<SeverityCode>2</SeverityCode>
<Note>1 additional sales areas exist for organizational unit 72997000 (物料管理部)</Note>
</Item>
<Item>
<TypeID>153(/CL_CDA_DOCIT/)</TypeID>
<CategoryCode>ENV.CBM</CategoryCode>
<SeverityCode>2</SeverityCode>
<Note>Gross weight for product missing</Note>
</Item>
<Item>
<TypeID>152(/CL_CDA_DOCIT/)</TypeID>
<CategoryCode>ENV.CBM</CategoryCode>
<SeverityCode>2</SeverityCode>
<Note>Net weight for product missing</Note>
</Item>
<Item>
<TypeID>151(/CL_CDA_DOCIT/)</TypeID>
<CategoryCode>ENV.CBM</CategoryCode>
<SeverityCode>2</SeverityCode>
<Note>Net volume for product missing</Note>
</Item>
</Log>
</n0:SalesOrderBundleMaintainConfirmation_sync>
</soap-env:Body>
</soap-env:Envelope>

0

Hello Benny,

Do you extent an existing sales order or do you create a new one?

AFAI remember a product is required for a price calculation.
Is this ensured?

Bye,
. Horst

0