‎2007 Sep 13 10:29 AM
Haii All..
When i am using a structure in my program, m getting an error saying "ystr_wrkpanz, must be a flat structure. you cannot use internal tables, strings, references, or structures as components. "
Here is the code:
<b>types: begin of l_itab.
include structure ystr_wrkpanz.
types end of l_itab.
types g_itab type standard table of l_itab.
data itab type g_itab.
data wa_itab like g_itab.</b>
Could you please explain the reason behind that and solution ofcourse?
Thanks in Advance,
rama
‎2007 Sep 13 12:24 PM
what i see is that: i gave belnr's of component type as belnr, which inturn is a structure with two components zeile and ebelp with component types dzeile and ebelp respectively.
Does that create a problem for me?
If so Please give me the solution.
Thankss..
rama
‎2007 Sep 13 10:31 AM
‎2007 Sep 13 10:34 AM
Hi
instead of
types g_itab type standard table of l_itab.
data itab type g_itab.
write :
<b>data : g_itab type standard table of l_itab.
or
data : itab type standard table of l_itab.</b>
reward if helpful;
vivekanand
‎2007 Sep 13 10:37 AM
hi ,
try to like this
types: begin of l_itab.
include structure "ystr_wrkpanz.
types end of l_itab.
data g_itab type standard table of l_itab.
data itab type l_itab.
data wa_itab like l_itab.
Reward if helpful.
‎2007 Sep 13 10:48 AM
Hi Rama,
check this out ,Hope it will solve ur problem:
data : begin of wa_itab.
include structure ystr_wrkpanz.
data : end of wa_itab.
data: g_itab type standard table of ystr_wrkpanz.
Now you have a work area wa_itab of type ystr_wrkpanz and and
internal table g_itab.
If yes than I will explain.
‎2007 Sep 13 10:55 AM
Hai All..
I have tried all those given in this thread..but still i have the same error msg
anyway here is my structure:
I have created it in SE11 with some fields from the database table BSIS,VBAK and KNA1.
i wanted to send u the screenshot of the structure but m not able to paste it over here.
But here are the components of the structure:
belnr-bsis
bukrs-bsis
hkont-bsis
vbeln(zuonr)-bsis
waers-bsis
dmbtr-bsis
budat-bsis
bldat-bsis
name1-kna1
erdat-vbak
ernam-vbak
shkzg-bsis
‎2007 Sep 13 11:03 AM
Hi Rama ,
Tell me when double click on the structure name in the report does it lead u to the structure in data dictionary.
‎2007 Sep 13 11:08 AM
Use 'Type' instead of 'Like'. We had that error message when we moved from 4.7 to ECC6.
‎2007 Sep 13 11:18 AM
Hello..
Ya, when i double click on the structure name, it is taking me to its screen.
Even Type is not working instead of like.
The problem is still the same.
‎2007 Sep 13 11:22 AM
is it giving syntax error?or its a warning msg????if warning go ahead..or do what other had posted...
‎2007 Sep 13 11:26 AM
‎2007 Sep 13 12:02 PM
Hi dear,
Tell me which componenet types you have used for the following:
1.belnr
2.bukrs
I just want to see how have u defined ur components.
‎2007 Sep 13 12:04 PM
I have used the component types:
belnr for belnr
bukrs for bukrs
‎2007 Sep 13 12:18 PM
hi
just check your all components types and also check entry/check tabs.
thanss
‎2007 Sep 13 12:24 PM
what i see is that: i gave belnr's of component type as belnr, which inturn is a structure with two components zeile and ebelp with component types dzeile and ebelp respectively.
Does that create a problem for me?
If so Please give me the solution.
Thankss..
rama
‎2007 Sep 13 12:40 PM
‎2007 Sep 13 12:53 PM
Hai..its solved now..Thanks a lot..could you please explain me about that in detail