I have created a new ABAP data flow, but Say won’t compile it due to the same variable being declared twice. The offencing code is below:
DATA ALOJF0 TYPE C.
DATA ALOJF1 TYPE C.
DATA ALOJF2 TYPE C.
DATA ALOJF4 TYPE C.
DATA ALOJF1 TYPE C.
As you can see the variable ALOJF1 is declared twice.
Given this is internal, I’m not sure what to do about it. I don’t know if there is any significance to the variable name, or if its randomly generated…
TYPE C is CHAR datatype. It should have a length. It is missing in your ABAP !!!
Also, be inside your ABAP Program, click SAVE one more time and then generate the ABAP Code. All the columns will be written into a TEMP Variable and it does something!
I don’t quite understand what you mean by " be inside your ABAP Program, click SAVE one more time and then generate the ABAP Code"
I can either (from what i’ve worked out) right click on the abap flow in the data flows tab of the repository and choose ‘generate abap code’, or choose ‘generate abap code’ from the validation menu.
PS: I just tried the latter and it crashed the designer. Its not the first time the designer has crashed during ‘generate abap code’…
Weird. ABAP DF’s are old fashioned mature stuff. Yes it does not always generate the correct result, but that is the same story with pure SQL selects generated by BODS on a database.
What I’ve seen in the past about not correctly generated ABAP is the join order applied (not to confuse with the join rank haha).
So if you have for example a join between VBAK, VBAP and KONV:
VBAK inner join on VBAP (VBAK keys on VBAP keys)
---- left outer join on KONV (VBAP keys on KONV keys)
Above statement will work.
But if you do this:
VBAK left outer join on KONV (VBAP keys on KONV keys)
----- inner join on VBAP (VBAK keys on VBAP keys)
BODS gets confused, throws strange errors during run time, can crash etc.