Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem using Structure..

Former Member
0 Likes
2,569

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,135

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

16 REPLIES 16
Read only

Azeemquadri
Contributor
0 Likes
2,135

What is the tyoe of ystr_wrkpanz.

Read only

Former Member
0 Likes
2,135

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

Read only

Former Member
0 Likes
2,135

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.

Read only

Former Member
0 Likes
2,135

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.

Read only

Former Member
0 Likes
2,135

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

Read only

0 Likes
2,135

Hi Rama ,

Tell me when double click on the structure name in the report does it lead u to the structure in data dictionary.

Read only

0 Likes
2,135

Use 'Type' instead of 'Like'. We had that error message when we moved from 4.7 to ECC6.

Read only

Former Member
0 Likes
2,135

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.

Read only

0 Likes
2,135

is it giving syntax error?or its a warning msg????if warning go ahead..or do what other had posted...

Read only

Former Member
0 Likes
2,135

Its a syntax error and hence m not able to move further

Read only

0 Likes
2,135

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.

Read only

0 Likes
2,135

I have used the component types:

belnr for belnr

bukrs for bukrs

Read only

0 Likes
2,135

hi

just check your all components types and also check entry/check tabs.

thanss

Read only

Former Member
0 Likes
2,136

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

Read only

0 Likes
2,135

Hi ram,

try giving "Belnr_d" as used in bseg table.

Read only

0 Likes
2,135

Hai..its solved now..Thanks a lot..could you please explain me about that in detail