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: 

SMART FORMS --> Passing an internal table

Former Member
0 Kudos

Hi ,

I want to pass an internal table to smart form , the internal table does not have a standard structure i.e. it has a user defined structure , how can i use this internal table in the smart form without creating a similar structure in SAP.

Regards

Arun

5 REPLIES 5

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

In the form interface,there is a tab called 'TYPES'.

In that write like this:

types : begin of ty_mara,

matnr type mara-matnr,

end of ty_mara.

Then in the form interface , there is a tab called 'GLOBAL DATA'.

In that declare as below,

wa type ty_mara "for work area

itab type standard table of ty_mara "for internal table

In case of doubts, get back to me.

If problem solved , reward points and close this thread.

Regards,

J.Jayanthi

0 Kudos

Hi ,

I am able to declare the internal table , but i want to pass the value to this internal table from the program , so how can i include this internal table in the importing or tables paramtere in the form interface.

Regards

Arun

0 Kudos

Hi,

I think it is not possible to pass internal table (refering user defined types) from program to smartforms.

But I think you can write the coding logic in smartforms itself through program lines by creating userdefined types as I mentioned earlier.

Hope it is clear.

Regards,

J.Jayanthi

0 Kudos

hi ,

when i define the internal table as per the procedure given above , it shows no error , but when i try to populate data into it an error 'Intenal Table not deifned ' is displayed.

e.g

if the internal table defined is it_1 , the error displayed is 'The Field IT_1 is unknown'.

Regards

Arun

0 Kudos

Hi,

For that in the program lines,you need to declare the table (say if you are selecting from mara ) MARA in Input parameters and the internal table it_1 in output parameters.

Just try this.

Hope this will help.

If this is not working , get back to me.Otherwise close the thread.