Skip to main content

Dear Community, 

 

I would like to ask from you, do you know which Apps 10 API projection can create Purchase Order header and line? 

We checked some projections in API Explorer (included PurchaseOrdersHandling) but we didn’t find  which has “Invoke action Create” or something like that. 

 

Thank you very much in advance of your replies!

Kind regards, 

Balazs

Hi @bapehu , just checked PurchaseOrderHandling and found PurchaseOrderSet method which is used for Purchase Order creation. You can also use Debugger in Aurena to see which API and calls are used for the activity.

Hope it helps,

Alex


Hi @bapehu ,

 

I have given the answer to same question in the below thread  with some screen prints. Check whether you can see it. I have explained  how API explorer is opened, how to check the API documentation etc

 

Creating PO header and lines can be done using ‘PurchaseOrderHandling’

 

 

I suggest you check below highlighted items to insert header and lines

 


Hi @Dumeesha Wanigarathna , hi @Alexander ,

 

Thank you very much for the information! I found it!

 

Thank you again!

Best regards, 

Balazs


Dear @Dumeesha Wanigarathna 

 

We have a great progress in create PO via API. But currently we stuck at the line level. If we try to create PO lines (part lines or no part lines) we always got the following error:

{"error":

   {"code":"DATABASE_ERROR","message":"Database error occurred. Contact administrator.","details":        {"code":20111,"message":"ORA-20111: UserAllowedSite.RECNOTEXIST: Site  is not allowed for User IFSAPP"}]}}

 

We tried - I think - everything. IFSAPP has rights for everything. 
We just tried a very simple input for order line: 

{

  "BuyQtyDue" : 1,

  "PartNo" : "P00002",

  "PurchaseOrder_OrderNo" : "A0152939",

  "PurchaseSite" : "SBX"

}

 

Do you know idea about what could be the issue?

Do you have a working example request for PO header and Line, to see how a working one looks like? 

 

Thank you very much in advance for your help!

Kind regards, 

Balazs


Hi @bapehu , 

Check if IFSAPP user is connected to the Company and Site for which you create PO lines

 


Hi @Alexander

Thank you very much for the suggestion, but yes, we checked. 

We don’t exactly why but this error has gone. 

 

But I would have an other question: 

We tried to use: PurchaseOrderSet projection and LineNopartArray function. We sent this information: 

{
"BuyQtyDue": 1,
"BuyUnitMeas": "EA",
"Contract": "2",
"CurrencyCode": "EUR",
"FbuyUnitPrice": 21,
"LineNo": "1",
"OrderNo": "A0152939",
"PlannedReceiptDate": "2021-12-01T01:01:01Z",
"PurchaseOrder_OrderNo": "A0152939"
}

But we got back this error: 

{
"error": {
"code": "DATABASE_ERROR",
"message": "Database error occurred. Contact administrator.",
"details": "
{
"code": 20124,
"message": "ORA-20124: Error.NULLVALUE: Field LCurrencyRate] is mandatory for Purchase Order Line Nopart and requires a value."
}
]
}
}

 

Then We added CurrencyRate field to the message and it is worked. 

{
"BuyQtyDue": 1,
"BuyUnitMeas": "EA",
"Contract": "2",
"CurrencyCode": "EUR",
"CurrencyRate": 1,
"FbuyUnitPrice": 21,
"LineNo": "1",
"OrderNo": "A0152939",
"PlannedReceiptDate": "2021-12-01T01:01:01Z",
"PurchaseOrder_OrderNo": "A0152939"
}

But the API doc say nothing about CurrencyRate, and make no sense why it is mandatory to send currency rate at line level. 

 

Manually in Aurena I could add new line without currency rate, and I didn’t get error. 

 

We can’t send currency rate information currently, so why we got this error? Is it a bug? 

 

Thank you very much in advance for every suggestion!

Regards, 

Balazs