cancel
Showing results for 
Search instead for 
Did you mean: 

DB lookup using DFKKOP table in BRFplus

Former Member

Hi Experts,

I'm trying to create a DB lookup with in a BRFplus application, the problem I'm getting is that when I use table DFKKOP I get a reference error. I do not see any place in the table definition where I can reference the amount field (BERTH, BETR2, BETR3, SBETH, SBET2, SBET3, SCTAX).

I have created within the application the form the structures for tables X001 and T001 (WAERS), which are references in DFKKOP but this does not fixed the problem.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Hi Sergio,

the problem is located in the handling of currencies in BRFplus:

YOu result data object is based on the table DFKKOP I guess. So the fields representing a currency are within BRFplus treated as a structure consisting of the amount and the currency itself.

If you want to  do the DB Lookup expression BRFplus tries to match the data from the source table to your target tabel based on the names of the fields and has to transfer the currency which is not available in the table you are selecting from. Thsi topic is also discussed in the BRFplus book of Carsten Ziegler and Thomas Albrecht (in case you have that book at hand)

I think you need to create a view that resolves the links to the currency fields i. e. contains the amount and the currency fields and select from that view so that BRFplus is capable to do the needed mapping.

Cheers

Christian

Answers (1)

Answers (1)

attila_laczko
Explorer
0 Kudos

Hallo Sergio,

Christian has right.

Here a link with some usefull info with a concrete example on how you might resolve the problem.

It involves CDS though and ADT on Eclipse:

http://scn.sap.com/community/abap/hana/blog/2014/08/08/using-cds-to-provide-aggregation-of-amounts-i...