Skip to Content
0

Invalid currency code [ORDR.DocCur] , 'USD'

Nov 07, 2016 at 01:31 PM

87

avatar image

Hello everyone!

I´m trying to insert a sales order using DI Server. I create the object Order and pass to the method Insert

public long InsertOrder(string session, Document order)
{
     var orderSvc = new WebserviceBuilder().BuildOrdersService(); 

     var docentry = orderSvc.Add(new MsgHeader()
     {
        ServiceName = MsgHeaderServiceName.OrdersService,
        ServiceNameSpecified = true,
        SessionID = session
     }, new Add(){
           Document = order
     });
     return docentry.DocEntry;
}

Here I receive de error message, invalid currency code. The curency code was right, 'USD'. What can be this? How can I fix this?

The document curency and the line curency are the same. In that case 'USD'.

We are using SAP B1 9.2 PL3

Thank you very much!

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

3 Answers

Best Answer
DIEGO LOTHER Nov 07, 2016 at 06:12 PM
0

Hi João,

Check if you are able to create this order by the client. If you are not able, check if the BP currency accepts USD currency. BP Currency should be equals 'USD' or 'All Currencies'.

Hope it helps.

Kind Regards,

Diego Lother


img2.png (46.2 kB)
Share
10 |10000 characters needed characters left characters exceeded
João Carvalho Nov 07, 2016 at 06:39 PM
0

Hi Diego, thanks for your answer.

I checked the BP currency, and it was selected 'All Currencies'. After that, I used the client to create a sales order and worked fine.

I don´t know why it is happening through DI server.

Another idea or sugestion?

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

Hi João,

When you create your order, are you providing some value for the field G/L Account at the line level?

If yes, check if the account accepts 'USD' or 'All currencies' like BP.

After this I don't know any other suggestion. But I saw that there are some topics with this problem in another marketing documents. Maybe help you.

https://archive.sap.com/discussions/thread/1737628

https://archive.sap.com/discussions/thread/3800335

https://archive.sap.com/discussions/thread/1947481

https://archive.sap.com/discussions/thread/1830803

Good Luck.

Kind Regards,

Diego Lother

img2.png (6.6 kB)
img3.png (22.1 kB)
0
João Carvalho Nov 07, 2016 at 07:32 PM
0

UPDATE

Hello Diego.

Here we use more than one data base. And in another data base, the BP currency was set in just one currency. I changed and it worked fine!

Thank for your help and tips.

I´m very happy, I´m learning more for every day about SAP B1 development!

Best Regards,

João

Share
10 |10000 characters needed characters left characters exceeded