Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Enter a different payment currency, BAPI_ACC_DOCUMENT_POST

Former Member
0 Kudos

I want to create an AR invoice. I got the error message ID F5 Number 873: Enter a payment currency different to SGD. Why do I have to change the payment currency ?

data:

docHeader TYPE BAPIACHE09,

currAmt_itab TYPE STANDARD TABLE OF BAPIACCR09,

wa_currAmt_itab TYPE BAPIACCR09,

AR_itab TYPE STANDARD TABLE OF BAPIACAR09,

wa_AR_itab TYPE BAPIACAR09,

GL_itab TYPE STANDARD TABLE OF BAPIACGL09,

wa_GL_itab TYPE BAPIACGL09,

returnPara_itab TYPE STANDARD TABLE OF BAPIRET2.

refresh:

currAmt_itab,

AR_itab,

GL_itab.

clear :

wa_currAmt_itab,

wa_AR_itab,

wa_currAmt_itab.

move:

'S001' to docHeader-comp_code,

'20081129' to docHeader-DOC_DATE,

'20081129' to docHeader-pstng_date,

'DR' to docHeader-doc_type,

'ac_dev29' to docHeader-USERNAME,

'1' to wa_GL_itab-itemno_acc, "to currAmt

'0000477000' to wa_GL_itab-gl_account,

'P3' to wa_GL_itab-tax_code,

'2' to wa_AR_itab-itemno_acc,

'0000000065' to wa_AR_itab-customer,

'SGD' to wa_AR_itab-pymt_cur, "to currAmt

'100' to wa_AR_itab-pymt_amt.

APPEND:

wa_GL_itab to GL_itab,

wa_AR_itab to AR_itab.

MOVE:

'1' to wa_currAmt_itab-itemno_acc,

'SGD' to wa_currAmt_itab-currency,

'100' to wa_currAmt_itab-amt_doccur.

append wa_currAmt_itab to currAmt_itab.

clear wa_currAmt_itab.

move: '2' to wa_currAmt_itab-itemno_acc,

'SGD' to wa_currAmt_itab-currency,

'100' to wa_currAmt_itab-amt_doccur.

append wa_currAmt_itab to currAmt_itab.

CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'

EXPORTING

DOCUMENTHEADER = docHeader

  • CUSTOMERCPD =

  • CONTRACTHEADER =

  • IMPORTING

  • OBJ_TYPE =

  • OBJ_KEY =

  • OBJ_SYS =

TABLES

ACCOUNTGL = GL_itab

ACCOUNTRECEIVABLE = AR_itab

  • ACCOUNTPAYABLE =

  • ACCOUNTTAX =

CURRENCYAMOUNT = currAmt_itab

  • CRITERIA =

  • VALUEFIELD =

  • EXTENSION1 =

RETURN = returnPara_itab

  • PAYMENTCARD =

  • CONTRACTITEM =

  • EXTENSION2 =

  • REALESTATE =

  • ACCOUNTWT =

.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

  • EXPORTING

  • WAIT =

  • IMPORTING

  • RETURN =

.

5 REPLIES 5

Former Member
0 Kudos

Hi,

Can you check the currency for the customer 65 in the master data transaction. It might be having a different currency from SGD.

Hope this clarifies your question.

Regards,

Hari

former_member873340
Active Participant
0 Kudos

Hi heloOO,

Even i am getting the same error, can you help me in case your error was solved.

thanks in advance.

Regards

gowri

Former Member
0 Kudos

Same here. Let us know if you solved

0 Kudos

If you want to use only one currency, don't pass the amount or currency in structure/itab of type BAPIACAR09 (leave those fields blank), only pass them in structure/itab of type BAPIACCR09.

0 Kudos

Correct answer given by Declan Barrett...