Application Development and Automation 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: 
Read only

Making Down Payment Request using BAPI_ACC_DOCUMENT_POST

Former Member
0 Likes
3,699

Hi, all...

I faced a problem while I'm testing BAPI_ACC_DOCUMENT_POST to make down payment request(F-47), so I need some help.

I've found a about this topic and followed its parameter settings except for currency settings.

In that posting, the accountpayable-pymt_cur and currencyamount-currency are set different currency.

While I set the two fields with same currency(USD). Belows are my source codes.

DOCUMENTHEADER-OBJ_TYPE = 'IDOC'.

DOCUMENTHEADER-OBJ_KEY = '$'.

DOCUMENTHEADER-OBJ_SYS = 'D10CLNT200'.

DOCUMENTHEADER-BUS_ACT = 'RFBU'.

DOCUMENTHEADER-USERNAME = SY-UNAME.

DOCUMENTHEADER-HEADER_TXT = 'DOWN PAYMENT REQUEST'.

DOCUMENTHEADER-COMP_CODE = '1000'.

DOCUMENTHEADER-DOC_DATE = '2006.09.01'.

DOCUMENTHEADER-PSTNG_DATE = '2006.09.01'.

DOCUMENTHEADER-DOC_TYPE = 'KG'.

ACCOUNTPAYABLE-ITEMNO_ACC = '0000000001'.

ACCOUNTPAYABLE-VENDOR_NO = '0002314908'.

ACCOUNTPAYABLE-GL_ACCOUNT = '0091120100'.

ACCOUNTPAYABLE-COMP_CODE = '1000'.

ACCOUNTPAYABLE-PYMT_METH = 'L'.

ACCOUNTPAYABLE-PMNT_BLOCK = 'A'.

ACCOUNTPAYABLE-BUSINESSPLACE = '1001'.

ACCOUNTPAYABLE-PYMT_CUR = 'USD'.

ACCOUNTPAYABLE-PYMT_AMT = '123,438.0000'.

ACCOUNTPAYABLE-SP_GL_IND = '2'.

ACCOUNTPAYABLE-TAX_CODE = 'RR'.

CURRENCYAMOUNT-ITEMNO_ACC = '0000000001'.

CURRENCYAMOUNT-CURRENCY = 'USD'.

CURRENCYAMOUNT-AMT_DOCCUR = '123,438.0000'.

But the function returns an error:

'Enter a payment currency different to USD'

But if I would set with different currencies, it returns an error:

'Balance in transaction currency'

If the ACCOUNTPAYABLE-PYMT_CUR and ACCOUNTPAYABLE-PYMT_AMT were remained empty, it returns

'Balance in transaction currency'

What should I do about this currency setting.

Someone please let me know about doing this right way.

Thank you.

Message was edited by: Jong-woon Lee

7 REPLIES 7
Read only

Former Member
0 Likes
2,603

What happens if you leave one blank?

Rob

Read only

Former Member
0 Likes
2,603

Hi,

Comment out the below line in your code and check:

ACCOUNTPAYABLE-PYMT_CUR = 'USD'.

Regards

Read only

0 Likes
2,603

Hi,

Appreciate your reply...

But, it returns two errors:

Required field CURRENCY was not transferred in parameter ACCOUNTPAYABLE

ISO code is not assigned to a currency key in the valid time period

Message was edited by: Jong-woon Lee

Read only

0 Likes
2,603

I don't suppose you managed to find a solution to this issue?

I am struggeling with the same issue when trying to post via this BAPI.

I.e. SAP is returning the response "F5,873,Enter a payment currency different to NOK" when both the CURRENCYAMOUNT-CURRENCY and the ACCOUNTRECEIVABLE-PYMT_CUR fields are passed through as 'NOK'. When the fields are different (e.g. CURRENCYAMOUNT-CURRENCY = USD and ACCOUNTRECEIVABLE-PYMT_CUR = 'NOK') the document posts successfully, however there are occurences when I need them to be the same.

If I leave any of the values blank, SAP responds that the fields are missing.

Posting a document with what appears to be the same data manually via FB70 posts successfully.

Any Thoughts appreciated.

Many Thanks

Read only

0 Likes
2,603

Hi,

Just in case you found this thread with the same problem.

At least in my case what was happening is that I wanted to leave the currency fields blank (the same currency as payment value) but I was filling in ACCOUNTPAYABLE-PYMT_AMT, so was receiving error telling me that currency fields could not be empty. And if I set them to the same as payment, I would receive a message telling me that currency must be different.

If you want to use only one currency you don't need to fill in these 3 fields:

ACCOUNTPAYABLE-PYMT_AMT

ACCOUNTPAYABLE-PYMT_CUR

ACCOUNTPAYABLE-PYMT_CUR_ISO

The same probably applies for the ACCOUNTRECEIVABLE table.

Cheers,

Erick

Ps.

Some extra text so you can find this thread by searching for error messages:

Required field CURRENCY was not transferred in parameter ACCOUNTPAYABLE

For the ISO code there is no unique SAP currency code for ALE

For the ISO code there is no unique SAP currency code for ALE

Message no. B1888

Diagnosis

There are several entries in TCURC for this ISO code, but none with the

primary flag set.

Procedure

In table TCURC set the primary flag for ISO codes used multiple times.

Required field CURRENCY was not transferred in parameter ACCOUNTPAYABLE

Message no. RW602

Diagnosis

Field CURRENCY is required in parameter ACCOUNTPAYABLE for processing

the document. The document is incomplete without this field.

System Response

The document cannot be processed.

Procedure

Enter a valid value in field CURRENCY in parameter ACCOUNTPAYABLE.

Read only

Former Member
0 Likes
2,603

Did you find the solution?

I'm still stuck with it, and i'mm a functional FI, i just can't figure why it doesn't allow to post in the same currency, it just doesn't make any sense

Read only

mohand_1
Newcomer
0 Likes
2,006

Voici la solution :

mohand_1_0-1733908859999.png

mohand_1_1-1733908917210.png

mohand_1_2-1733908947731.pngmohand_1_3-1733908978856.pngmohand_1_4-1733909009377.pngmohand_1_5-1733909037271.png

mohand_1_6-1733909103139.png