09-01-2008 3:27 PM
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
09-01-2008 3:39 PM
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
09-01-2008 3:44 PM
09-01-2008 4:12 PM
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.
09-01-2008 4:26 PM
Ok,
i check this and all is ok, but you confirm that i can to make reference from structure.
09-01-2008 10:11 PM
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
09-01-2008 10:43 PM
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.
09-01-2008 11:19 PM
But if i do that in the PAI my_struc_vendor is empty, no value is taken.
09-02-2008 12:16 PM
Solution : i must declare my_struc_vendor like this in ABAP code :
TABLES: my_struc_vendor.