cancel
Showing results for 
Search instead for 
Did you mean: 

Odata Payload for creating multiple entities (pricing conditions)

former_member306668
Participant
0 Kudos

Hi;

We like to use SAP_COM_0294 to create pricing conditions (condition type PCP0). Reading through the help 

https://help.sap.com/viewer/aa2110e027684a8ca38be4f570f6e70f/1905.500/en-US/7916962329ee49b293156fff...

it mentions following Note:

When creating condition records, you must create their validity at the same time by including the A_SlsPrcgCndnRecdValidity entity in your request. Validity can only be created through the A_SlsPrcgCndnRecdValidity entity. Please note that the ConditionValidityEndDate andConditionValidityStartDate properties in the A_SlsPrcgConditionRecord entity are not used for create operations.

We are not sure how the payload needs to look if we want to include multiple entities. Would someone be able to post a json example?

Thanks

Thomas

Accepted Solutions (1)

Accepted Solutions (1)

former_member306668
Participant
0 Kudos

Figured it out. Clicking on the TryOut option in the API Hub (https://api.sap.com) provided the answer.

Here is an example payload

{

"ConditionTable": "4PB",

"ConditionType": "PCP0",

"ConditionCalculationType": "C",

"ConditionRateValue": "200",

"ConditionRateValueUnit": "AUD",

"ConditionQuantity": "1",

"ConditionQuantityUnit": "HR",

"to_SlsPrcgCndnRecdValidity": {

"results": [

{

"ConditionValidityEndDate": "/Date(1893416400000)/",

"ConditionValidityStartDate": "/Date(1546261200000)/",

"ConditionType": "PCP0",

"EngagementProject": "xxxxxxxxx",

"Material": "T001"

}

]

}

}

vimadaan
Explorer
0 Kudos

Hello Born,

This is not working for me. When i remove any mandatory parameter then system is throwing business error like Sold to party is mandatory but when i provide all the parameters then system is throwing internal server error.

I checked all fields many times but not sure about error.

Here is sample payload:

{

"ConditionTable": "902",

"ConditionType": "ZCOU",

"ConditionCalculationType": "B",

"ConditionRateValue": "10",

"ConditionRateValueUnit": "USD",

"PricingScaleType": "A",

"to_SlsPrcgCndnRecdValidity": {

"results": [

{

"ConditionValidityEndDate": "/Date(1893416400000)/",

"ConditionValidityStartDate": "/Date(1546261200000)/",

"ConditionType": "ZCOU",

"SoldToParty": "10000015",

"SalesOrganization": "PC01",

"DistributionChannel": "10",

"YY1_EducationCouponCod_PCH": "18661080003ABC002"

}

]

}

}

Please help as this is urgent.

Error is : 500 Internal Server Error

Regards,

Vikas Madaan

former_member306668
Participant
0 Kudos

Hi Vikas;

Are you able to maintain the condition in S4 using the values that you have provided in the payload? If yes I would suggest to creating an incident with support.

Regards

Thomas

Answers (2)

Answers (2)

former_member132363
Active Contributor
0 Kudos

Here are some SAP resources you may review based on your topic "picking,picking,condition record,condition record,create,creating"

License Key Help

In the license key application you either pick an existing system if you want to ... Another possibility is that your hardware record has expired. ... under the terms and conditions of the software license agreement applicable to ... An Installation number is a unique 10-digit number, created by your local SAP contract department.

https://support.sap.com/en/my-support/help-support-applications/license-key-help.html

SAP ERP Human Capital Management Support Package Schedules

In addition, a recording is available. A prerequisite of the ... For a legal change, a CLC Package is created for a country containing all country-specific transports.

https://support.sap.com/en/release-upgrade-maintenance/maintenance-information/schedules-for-mainten...

SAP ONE Support Launchpad: Log On

SAP ONE Support Launchpad. Log On. E-Mail, ID, or Login Name. Password. Remember me. Log On. Forgot password? Tenant logo.

https://launchpad.support.sap.com/

former_member306668
Participant
0 Kudos

Hi Edmin;

Did you accidentally reply to the wrong question? I was after an example for a payload, nothing to do with license keys.

Regards

Thomas

former_member132363
Active Contributor
0 Kudos

Here are some SAP resources you may review based on your topic "picking,picking,condition record,condition record,create,creating"

License Key Help

In the license key application you either pick an existing system if you want to ... Another possibility is that your hardware record has expired. ... under the terms and conditions of the software license agreement applicable to ... An Installation number is a unique 10-digit number, created by your local SAP contract department.

https://support.sap.com/en/my-support/help-support-applications/license-key-help.html

SAP ERP Human Capital Management Support Package Schedules

In addition, a recording is available. A prerequisite of the ... For a legal change, a CLC Package is created for a country containing all country-specific transports.

https://support.sap.com/en/release-upgrade-maintenance/maintenance-information/schedules-for-mainten...

SAP ONE Support Launchpad: Log On

SAP ONE Support Launchpad. Log On. E-Mail, ID, or Login Name. Password. Remember me. Log On. Forgot password? Tenant logo.

https://launchpad.support.sap.com/