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

SMARTFORMS

Former Member
0 Likes
633

Hi,

I smart form i want display data such that this field from mara and makt.

that is inner join b/w some field of mara and makt .

Ex. DATA:BEGIN OF T_MATERIAL OCCURS 0,

MATNR LIKE MARA-MATNR,

MEINS LIKE MARA-MEINS,

MTART LIKE MARA-MTART,

MAKTX LIKE MAKT-MAKTX,

END OF T_MATERIAL .

Now how can i declar table in <b>form interface</b> and how can i pass the table from program to form

Thank you

ASHOK KUMAR

4 REPLIES 4
Read only

Former Member
0 Likes
570

Hi Ashok,

Its always a best practice to create a new Ztable through SE11 and use the same in the smartform and driver program.If you declare any thing under FORM INTERFACE that is only available to smartform only but not to driver program.

Thanks,

Vinay

Read only

Former Member
0 Likes
570

Hi,

you can create a structure in se11

which is of the structure which you are going to print

( if you are mentioning the tables st in form interface it should be in

the data dictionary)

or else

you can send two tables of type mara and makt

with the related data

in the smartform you have to go for progam lines and then

populate those values in a final internal table which you have to declare it

as global declarations

and now loop it and display the data.....

thanks & regards,

Venkatesh

Read only

Former Member
0 Likes
570

Hi,

you can pass the data of an internal table in the smartform using data calculation tab in the form itself but before that u need to the name of the internal in the Global declaration. However, if u wish to pass the data from internal table to work area and then display the data on the form...then name of the work area must also be declared in the global declaration. Once u r able to pass the data then upon activating the form, FM will be generated which u can find after executing the form. Just copy the fm from there. Then in the print program, use the FM SSF_FUNCTION_MODULE_NAME where u can provide the FM got in the form. Also, the FM got from the form looks very odd. So to make it readable, hard code it using the variable of RS38_L(I'm not sure, check it out) and then click on pattern..first provide the FM got from the form and overwrite the FM with this variable and pass this variable in the abve FM.

This should help in resolving the issue.

Regards,

Priyanka.

Read only

varma_narayana
Active Contributor
0 Likes
570

Hi...

Steps:

1. Create a Structure with the fields that u mentioned in DDIC -( SE11 )

2. Create a TABLE TYPE using this Structure in DDIC -( SE11 )

3. In Smartform -> Form Interface -> Tables : Declare the Internal table parameter based on this Table type

Eg: IT_MAT TYPE <TABLE TYPE>

4. In the Print program also create the internal table with the Same Table type.

Eg:

DATA : IT_MAT TYPE <TABLE TYPE>.

5. Now fetch the Data into this itab and Pass it to Smartform FM.

<b>Reward if Helpful</b>