Question

List of Api Calls to Cancle PO order line or POCO line


Userlevel 5
Badge +7

Please can someone provide a working example – List of Api calls to cancel a single line in the Part Order Lines on the Purchase Order and on the Purchase Order Change Order. These cannot be located in the documentation. This is required as soon as possible as it is holding up a time sensitive project.


10 replies

Userlevel 7
Badge +20

I think these are the API calls

  • Cancel part order line

Purchase_Order_Line_Part_API.Cancel_Line(order_no_, line_no_, release_no_, info_,  2, 'DO');

  • Cancel Purchase Order Change Order line

Purch_Chg_Ord_Line_API.Cancel_Line ( info_ , order_no_ ,  chg_order_no_ ,line_no_  , release_no_ );

 

Cheers!

Damith

Userlevel 1
Badge +3

you need projection api calls in App10 Aurena?

Badge +4

Hi, Yes i need the projection API calls. 

Userlevel 1
Badge +3

cancelation is done through an assistant. So you may need to use following POST calls, first one to pass parameters and get the objkey of the assistant and the second one is call to cancelation method by passing the objkey.

 

similar behaviour in POCO too.

 

 

 

Badge +4

Would you be able to give the first call (that returns the objkey) with sample parametes so I can try it in postman?

Userlevel 1
Badge +3

YOU can get it from API explorer by querying CancelPurchaseOrder projection

 

https://XXXXXX.corpnet.ifsworld.com:48080/main/ifsapplications/projection/v1/CancelPurchaseOrder.svc/CancelPurchaseOrderSet

{
"ParentObjkey": "It is a Text",
"ObjCreatedBy": "It is a Text",
"Exist": true,
"OrderSelection": "It is a Text",
"CancelReason": "It is a Text",
"CancelReasonDescription": "It is a Text",
"OrderCode": "It is a Text",
"UsedByEntity": "It is a Text",
"State": "It is a Text",
"Source": "It is a Text",
"AssistantTitle": "It is a Text"
}

AssistantTitle: "Cancel Purchase Order Lines"
OrderSelection: "[\"ORDER_NO=P1073849^LINE_NO=1^RELEASE_NO=1^ORDER_CODE=1^\"]"
Source: "POL"
UsedByEntity: "%^PO^%"

Badge +4

Thanks, the first call returns the odata.etag, objkey but when i use it for the second call

https://xxxx/int/ifsapplications/projection/v1/CancelPurchaseOrder.svc/CancelPurchaseOrderSet(Objkey='194D0211BC3042A789EC4C2B9D16B30D')/IfsApp.CancelPurchaseOrder.CancelPurchaseOrderVirtual_CancelOrders

if-match header = Etag

with the json body as below, it returns “No Content” which is a valid response but the PO line is not cancelled.

{

"CancelReason": "Test",

"Source": "postman"

}

Badge +4

Could you check and let me know the number of api calls needed to cancel the PO Line. The two step doesn’t work.

Userlevel 1
Badge +3

You have to use json body parameters as I previously mentioned

"ParentObjkey": ObjKey - value get from previous call

AssistantTitle: "Cancel Purchase Order Lines"
OrderSelection: "[\"ORDER_NO=P1073849^LINE_NO=1^RELEASE_NO=1^ORDER_CODE=1^\"]" - your order values
Source: "POL"
UsedByEntity: "%^PO^%"

Badge +4

I found the issue with the second call, the json body is correct, source has to be POCOL for change order line.

Reply