Skip to Content
avatar image
Former Member

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

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!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 07, 2016 at 06:12 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 07, 2016 at 06:39 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 07, 2016 at 07:32 PM

    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

    Add comment
    10|10000 characters needed characters exceeded