cancel
Showing results for 
Search instead for 
Did you mean: 

Reference field referring to a different table for field xxxx

Former Member
0 Kudos

Dear Experts,

In a scenario, I have to join A071 (Article Per site) and KONP (Conditions Item) tables.

I created a DB Lookup exp for KONP with KNUMH referring to the result of another DBLookup for A071.

The result of this is to be stored in KBETR field in KONP.

Have a look at the error generated here-
https://weblogs.sdn.sap.com/weblogs/images/252055257/DBLOOKUP_err1.jpg

The error generated is

Reference field referring to a different table for field KBETR

Where am I going wrong? I tried to create a structure as result of the table. But the error persists.

Please help in finding a solution.

Accepted Solutions (1)

Accepted Solutions (1)

carsten_ziegler
Active Contributor
0 Kudos

Pls open a message for SAP. The error message is not clear and should be improved so that you understand the problem.

Maybe copy and paste my comment into the message. The suppot team knows me.

Answers (4)

Answers (4)

Former Member
0 Kudos

Solved it myself..

Solution:

Pass KNUMH from A071 (Article Per site) to Function module- MM_KONP_SINGLE using Procedure call expression. Create structure type KONP. The result of the procedure call should be passed to the structure.

Regards,

Ajay

Former Member
0 Kudos

Dear Gurus,

Please find below (possible solution from SAP Note) to this problem-

Here the view is having relation between table A071 and KONP. But
the error message was due to the fact that field KBETR of table KONP is
referring to the field KONWA of RV13A. Hence the reference field (KONA)
is refering to a different table (RV13A in this case).

If the relation between the referencing field (KBETR here) and
the referenced filed (KONWA) is a simple inner join, you may create a
DB view to relate these 2 tables (KONP and RV13A in this case) and use
this view in the DB lookup in BRF+.

Since RV13A is a Structure, how can we create a DB View to relate these 2 tables- KONP and RV13A?

Regards,

Ajay

Former Member
0 Kudos

Just an update to the issue...

The dump occurs in CHECK method of CL_FDT_DB_LOOKUP.

IF <ls_dfies>-reftable IS NOT INITIAL AND
             <ls_dfies>-reftable NE lv_table_name.
            MESSAGE e647(fdt_expressions) WITH lv_result_name INTO 

ls_message-text.
            append_message ls_message rt_message.
            CONTINUE.

When <ls_dfies>-reftable (here, RV13A) is not equal to lv_table_name (here, KONP), we hit the error.

LV_RESULT_NAME :                    KBETR
<LS_DFIES>-REFTABLE	: 	RV13A
LV_TABLE_NAME	:               	KONP

Former Member
0 Kudos

Raised OSS Note- 0000644528 2011

Thanks Carsten!

Regards,

Ajay