cancel
Showing results for 
Search instead for 
Did you mean: 

variable declared in global definition smart form

Former Member
0 Kudos

Hi,

We have defined an internal table 'it_table' in the global definition. We are unable to use 'it_table' in 'Page and Windows' loop statement.

Kindly suggest.

Regards,

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Sanjay,

Internal tables should be defined in Form Interface. Then under pages and windows ,under a specified window you need to create a loop as well a table by right clicking. In the loop as well as table you need to specify the statements with LOOP AT ITAB....

Then you create a text under tables and then click the icon Field list on/off in the application toolbar, where you will see the fields of database table as mentioned. Here you can drag and drop the fields in the text editor. Creation of LOOP , TABLE ,TEXT ..right click on the window and click create, where you will find all the options. Hope this will help you.

Regards,

Sailaja

Former Member
0 Kudos

Hello,

Have you defined it in TYPES in global definations?

& then into tables?

Dilip

Former Member
0 Kudos

Hi Sanjay,

There are 2 cases exist for your problem :

1. If you are filling the desired internal table and wants to pass that table to your smart form for loop processing than you have to declare it in the form interface ; As the name itself sounds the interface ,Which means it provide an interface to pass data from Print program (Driver program) to smart form.

But for this the table type can be only the DDIC structure not the one you are declaring in your print program as it will not recognize it.

2. But in second case if you are filling the internal table into your smart from than ,table should be declared in the Global definition.

The way is as :

Go to ->global definition->type tab declare the type as :

types : begin of t_vbap,

vbeln type vbeln_va,

posnr type POSNR_VA,

matnr type matnr,

netwr type NETWR_AP,

end of t_vbap.

Now declare a table type for the previously created type as follows :

types : it_vbap type t_vbap occurs 0.

(You can go to SE11 and create a table type there also for same)

Now go to the Global data tab and declare your table as follows :

I_VBAP TYPE IT_VBAP

Now I_VBAP will be a table. and you can carry on your processing.

Please award point by clicking star.

Former Member
0 Kudos

Hi!

Did you specify internal table assignment for your LOOP node on the "Data" tab of LOOP node overview?

Regards,

Maxim.

Former Member
0 Kudos

Are u passing the internal table from ur driver program.In that case u have to use in FORM INTERFACE.

Global definition is to use with in the smartform.

Define Internal table and use in tables option

Former Member
0 Kudos

Hi Sanjay,

You should define your internal tables in 'Tables' Tab of Form Interface NOT Global definitions.

Regards,

Raj