cancel
Showing results for 
Search instead for 
Did you mean: 

CE_JOIN Error

Former Member
0 Kudos

Hi

We get below errors while trying to call a stored procedure created with CE functions.

Code:

J1 = CE_JOIN(:EKPO, :EKKO, ["EBELN","MANDT"],["WERKS","EBELN","MATNR","EBELP","MANDT","MEINS","WEBAZ","BSART","LIFNR","RESWK"]);

J2 = CE_JOIN(:J1, :MARC, ["MANDT"],["WERKS","EBELN","MATNR","EBELP","MANDT","MEINS","WEBAZ","BSART","LIFNR","RESWK"]);

fn_output = CE_PROJECTION(:J2,["WERKS","EBELN","MATNR","EBELP","MANDT","MEINS","WEBAZ","BSART","LIFNR","RESWK"]);

Error:

Inconsistent calculation model (34011)

Details (Errors):

- CalculationNode (J2): Attribute WERKS was found more than once.

- CalculationNode (J2): Attribute MATNR was found more than once.

- CalculationNode (J2): Attribute WEBAZ was found more than once.


Could anyone help me understand what the issue is due to?


Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Avinash,

The issue is you have WERKS,MATNR and WEBAZ columns coming from J1 and same columns exist in MARC table as well.

You can use sql to make it simple or use projection after J1 to rename this 3 columns to different name and then you can rename them again in the final projection if you want.

Code:

J1 = CE_JOIN(:EKPO, :EKKO, ["EBELN","MANDT"],["WERKS","EBELN","MATNR","EBELP","MANDT","MEINS","WEBAZ","BSART","LIFNR","RESWK"]);

J1_Proj = CE_PROJECTION(:J1,["WERKS" AS "J1_WERKS","EBELN","MATNR" AS "J1_MATNR","EBELP","MANDT","MEINS","WEBAZ" AS "J1_WEBAZ","BSART","LIFNR","RESWK"]);

J2 = CE_JOIN(:J1_proj, :MARC, ["MANDT"],["J1_WERKS","EBELN","J1_MATNR","EBELP","MANDT","MEINS","J1_WEBAZ","BSART","LIFNR","RESWK"]);

fn_output = CE_PROJECTION(:J2,["J1_WERKS" AS "WERKS","EBELN","J1_MATNR" AS "MATNR","EBELP","MANDT","MEINS","J1_WEBAZ" AS "WEBAZ","BSART","LIFNR","RESWK"]);

Regards,

Venkat N.

Answers (3)

Answers (3)

Former Member
0 Kudos

The Join condition is not valid,, You have used MANDT as the join between MARC and J1 condition..

lbreddemann
Active Contributor
0 Kudos

In addition to Dubravko's comment, review your projection list.

The join of :J1 and :MARC would result in duplicate column names - you have to use aliases here, so that the column references are unambiguous.

- Lars

Former Member
0 Kudos

J1 Join with MARC and Join condition only MANDT ? Or am I seeing something wrong ?

I would just use SQL, forget about CE functions.