BusinessObjects Board

ABAP data flow contains errors

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…

Any ideas ?

Thanks.


Leigh Kennedy :australia: (BOB member since 2012-01-17)

Leigh

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!


ganeshxp :us: (BOB member since 2008-07-17)

Its not my code - its generated by DS !

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’…


Leigh Kennedy :australia: (BOB member since 2012-01-17)

I meant, open the ABAP Dataflow and when you have it opened on the working screen, do generate the ABAP I meant.


ganeshxp :us: (BOB member since 2008-07-17)

ok. Does it make a difference if I do it from the validation menu, or by right clicking on the data flow ?

Arrggh ! It just crashed the designer again… Not finding abap data flows very stable.


Leigh Kennedy :australia: (BOB member since 2012-01-17)

Yes do it by right-clicking on the ABAP DF. But when you do so, as I said, just have one of those ABAP DF’s open


ganeshxp :us: (BOB member since 2008-07-17)

What version of DS is this?


ErikR :new_zealand: (BOB member since 2007-01-10)

4.1 SP3

No where to go patch wise…

Designer keeps crashing so I can’t re-generate the abap. Very frustrating…


Leigh Kennedy :australia: (BOB member since 2012-01-17)

Leigh, were you able to at least validate the job/Dataflow? Can you give it a try from the job server box?


ganeshxp :us: (BOB member since 2008-07-17)

No…

but I just changed the outer joins to inner joins. It now has generated and is running. I think I am scared off ABAP outer joins for life !


Leigh Kennedy :australia: (BOB member since 2012-01-17)

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.


Johannes Vink :netherlands: (BOB member since 2012-03-20)