cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_COPAACTUALS_POSTCOSTDATA and group currency

MariusStoica
Active Participant
0 Kudos

Hi guys,

I'm using the " BAPI_COPAACTUALS_POSTCOSTDATA" to create some CO-PA documents, but I have an issue with the "Group currency" values.

Even after checking if the 2 SAP notes (1066394 - Group currency is not transferred in FI postings (FBB1)  and 604936 - No transfer of group currency for FI/MM postings) are implemented, I still get the same issue.

If the CO-PA documents are created standard, the group currency values are calculated correctly with the correct rate.

When passing the values to the '10' - Company code currency, line item, the BAPI should calculate the correct values for the 'B0' - Profit area currency line item. more precisely the rate is not the standard one, but one from a few months ago.

I could post all the code here but there are more than 36 fields passed to the function . But if needed I will post them. I could start with the most obvious ones:


ls_inputdata-fieldname  = 'PALEDGER'.

ls_inputdata-value      = '10'.

APPEND ls_inputdata TO lt_inputdata.

ls_inputdata-fieldname  = 'VV900'.

ls_inputdata-value      = '100'.

ls_inputdata-currency   = 'RON'.

APPEND ls_inputdata TO lt_inputdata.


ls_fieldlist-fieldname = 'PALEDGER'.

APPEND ls_fieldlist TO lt_fieldlist.

ls_fieldlist-fieldname  = 'VV900'.

APPEND ls_fieldlist TO lt_fieldlist.

CALL FUNCTION 'BAPI_COPAACTUALS_POSTCOSTDATA'

         EXPORTING

           operatingconcern = '10RO'

           testrun          = ''

         TABLES

           inputdata        = lt_inputdata

           fieldlist        = lt_fieldlist

           return           = lt_return.

I get no error and the documents are created, but the 'B0" values are not correct.

Any ideas ?

Thank you in advance,

Marius

Accepted Solutions (1)

Accepted Solutions (1)

former_member184941
Active Contributor
0 Kudos

Hi Marius,

Please check note 618114 as well.

You can use the field valutyp to control which PA-ledgers will be posted with the BAPI.


There are not only the values 0 and 2 possible but also:

1.) add a field VALUTYP to table "fieldlist"
2.) add an entry VALUTYP = 5  to "inputdata"

'5':Legal valuation view only operating concern currency ('B0')
'6':Legal valuation view only company code currency ('10)
'7':Profit Center valuation view only operating concern currency
('B2')
'8':Profit Center valuation view only company code currency ('12).

Regards,

Abhisek

MariusStoica
Active Participant
0 Kudos

Thank you for the answer.

I've read the SAP Note and also tried adding he VALUTYP to the structure. I still doesn't work. I get the exact same result

Thank you,

Marius

MariusStoica
Active Participant
0 Kudos

Hi Abhisek,

I've noodled with the code a bit and made it work ... 90%

So i've created the CO-PA document with the data passed by me for each line:

1. VALUTYP = 6 with it's corresponding value

2. VALUTYP = 5 with it's corresponding value

In both cases I also pass the "KURSF" value:

1. KURSF = '1'.

2. KURSF = '4.4325' It doesn't show on the corresponding line. I see "1" also.

Here is the look on the CO-PA table.

Even if I pass the KURSF value, it doesn't show up. On the same note, I tried to pass FRWAE (for the second line of the document) as "RON" and it still doesn't show up.

The first line in the lower table, is made by standard transaction, the other 3 are the tries done by me with the function.

The only differences between the Standard line and the 3 created by me, are the 2 fields FRWAE and KURSF.

Any idea why ?

Answers (0)