cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Adding Pricing Conditions to an Existing Purchasing Info Record

ssfdgfdgfd
Explorer
0 Likes
911

Hi,

i need to add Pricing Conditions to an Existing Purchasing Info Record.

i try with API POST /A_PurgInfoRecdOrgPlantData(PurchasingInfoRecord="{PurchasingInfoRecord}",PurchasingInfoRecordCategory="{PurchasingInfoRecordCategory}",PurchasingOrganization="{PurchasingOrganization}",Plant="{Plant}")/to_PurInfoRecdPrcgCndnValidity

but it doesn"t work. I receive message "Operation "POST" not supported for entity type "A_PurInfoRecdPrcgCndnValidity"" but at this link https://api.sap.com/api/API_INFORECORD_PROCESS_SRV/path/post_A_PurgInfoRecdOrgPlantData_PurchasingIn...

there is a documentation about this.

 

i tryed this POST https://my401950.s4hana.cloud.sap:443/sap/opu/odata/sap/API_INFORECORD_PROCESS_SRV/A_PurgInfoRecdOrgPlantData(PurchasingInfoRecord="5300000070",PurchasingInfoRecordCategory="0",PurchasingOrganization="2310",Plant="2310")/to_PurInfoRecdPrcgCndnValidity 

with this body

{    "ConditionRecord": "0000007208",    "ConditionValidityEndDate": "/Date(1492041600000)/",    "ConditionValidityStartDate": "/Date(1492041600000)/",    "ConditionApplication": "M",    "ConditionType": "PPR0",    "PurchasingOrganization": "2310",    "PurchasingInfoRecordCategory": "0",    "PurchasingInfoRecord": "5300000070",    "Supplier": "1000000",    "Material": "ZTEC_ACQ1",    "Plant": "2310"}

but i doesnt" work.

 

Can you help me?

Riccardo

Accepted Solutions (1)

Accepted Solutions (1)

Vinith
Explorer
0 Likes

Hi,

Using the API POST operation, you can only create a new document in SAP. If you want to update or modify existing data, use the PATCH operation instead.

Please test and share your feedback. If you need any additional support, feel free to mention it.

API SAP S/4HANA Cloud Public Edition

ssfdgfdgfd
Explorer
0 Likes

Hi, i tried the same API and the same body in PATCH mode

PATCH https://{{host}}:443/sap/opu/odata/sap/API_INFORECORD_PROCESS_SRV/A_PurgInfoRecdOrgPlantData(PurchasingInfoRecord='5300000070',PurchasingInfoRecordCategory='0',PurchasingOrganization='2310',Plant='2310')/to_PurInfoRecdPrcgCndnValidity

and body

{
    "ConditionRecord": "0000007208",
    "ConditionValidityEndDate": "/Date(1492041600000)/",
    "ConditionValidityStartDate": "/Date(1492041600000)/",
    "ConditionApplication": "M",
    "ConditionType": "PPR0",
    "PurchasingOrganization": "2310",
    "PurchasingInfoRecordCategory": "0",
    "PurchasingInfoRecord": "5300000070",
    "Supplier": "1000000",
    "Material": "ZTEC_ACQ1",
    "Plant": "2310"
}

but i receive error "The specified HTTP method is not allowed for the resource identified by the Data Service Request URI"

Can you help me?

Riccardo

Vinith
Explorer
0 Likes

Answers (0)