‎2007 Aug 17 7:40 AM
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
‎2007 Aug 17 7:43 AM
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
‎2007 Aug 17 7:43 AM
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
‎2007 Aug 17 7:43 AM
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.
‎2007 Aug 17 7:44 AM
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>