Application Development 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: 

Create new field in new screen of specific program

Former Member
0 Kudos

Hi,

i created a new program with a new screen. In my include Z_TEST_TOP i created a new variable :

DATA: v_vendor type my_struc_vendor.

After, i created a new screen, i add a new field with name v_vendor-uname. My problem is that i can not make reference to v_vendor, the system tell me "v_vendor do not exist in the active form in Data Dictionary". I don't understand, i can't do that ?

Cheers

8 REPLIES 8

Former Member
0 Kudos

Is the include TOP activated? Please try this or give us some other information of how are you completing the configuration in screen painter.

<removed_by_moderator>

Thanks.

Edited by: Julius Bussche on Sep 1, 2008 2:42 PM

0 Kudos

Yes absolutly, the include TOP is activated.

Former Member
0 Kudos

Hi,

Check the sequence in which your includes are declared e.g.

include z_top. "data declarations in top include

include z_f01. "code where you are using the variable

would work, but:

include z_f01. "code where you are using the variable

include z_top. "data declarations in top include

will give syntax error in "z_f01".

Regards,

Raj.

0 Kudos

Ok,

i check this and all is ok, but you confirm that i can to make reference from structure.

0 Kudos

Well,

i don't understand the communication between screen painter and abap code.

In my TOP include i have the following declaration :

DATA: v_vendor type my_struc_vendor.

In the screen painter if i want to activate the attribut 'From Dictionary' i can't create a field named v_vendor-name, the system tell me "Table V_VENDOR not active in ABAP Dictionary". If i put my_struc_vendor-name, it's ok, the system get field size and text field. But how can i get the values of the structure my_struc_vendor in ABAP code ?

Thanks

0 Kudos

my_struc_vendor is in the dictionary

v_vendor is a data object, only existing in your program.

The best choice is to declare it this way


DATA: my_struc_vendor type my_struc_vendor.

That way you could use the dictionary option in the fields.

0 Kudos

But if i do that in the PAI my_struc_vendor is empty, no value is taken.

0 Kudos

Solution : i must declare my_struc_vendor like this in ABAP code :

TABLES: my_struc_vendor.