‎2009 Feb 12 8:01 AM
Hi all,
in Smartform driver program we have use,
data: fm_name TYPE rs38l_fnam. and below two function modules.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
CALL FUNCTION fm_name .
but in the actual Global settings under global definitions node, we have to use TYPES stmt for declaring TYPES and in Under global Data we declare Internal tables and work area and in under Initialization we write all the select statements etc.
My question is :
in the driver proram also we have to use all types stmts, Itab decalrations and Select stmts.and we comment in the same in the smartform ?
if it is yes, how do we pass the same to smartform?
Thanks in advance
KR
‎2009 Feb 12 8:53 AM
hi
If you are defining and populating your internal table in the form itself then,
you dont want to declare all type statments again in the
driver program.But it is always a good practice to populate the internal table in the driver program
and pass the data to the form.
i have written a WIKI on this .Have a look at that.
See the question
2 . How to get the function module name automatically in the driver program?WITH EXAMPLE. [https://wiki.sdn.sap.com/wiki/display/ABAP/SMARTFORMguide]
This will solve your problem.
Regards
Hareesh.
Edited by: Hareesh Menon on Feb 12, 2009 9:54 AM
‎2009 Feb 12 8:03 AM
Hi
You dont need to declare them again in the driver program once declared in smartforms
Thanks
Viquar Iqbal
‎2009 Feb 12 8:22 AM
Hi ,
Unlike scripts smart forms allows you to declare global data and global types.A separate driver program is not required.If u wish then declare in any one of itEilter in driver program or in msartforms.But not in both .
‎2009 Feb 12 8:24 AM
ok..
thansk for inputs.
now i wiant to declare types, itabs, and other validations in the driver program. how do i pass the final table to SF ?
thanks in advance
KR
‎2009 Feb 12 8:25 AM
Hi KR,
You dont have to declare the same again in the print program.You can do all that using smartforms it self.
Much Regards,
Amuktha.
‎2009 Feb 12 8:53 AM
hi
If you are defining and populating your internal table in the form itself then,
you dont want to declare all type statments again in the
driver program.But it is always a good practice to populate the internal table in the driver program
and pass the data to the form.
i have written a WIKI on this .Have a look at that.
See the question
2 . How to get the function module name automatically in the driver program?WITH EXAMPLE. [https://wiki.sdn.sap.com/wiki/display/ABAP/SMARTFORMguide]
This will solve your problem.
Regards
Hareesh.
Edited by: Hareesh Menon on Feb 12, 2009 9:54 AM
‎2009 Feb 12 9:06 AM
Hi KR,
There is a a function module that will be generated with your smartform.
You have to call it in your program.
Now in your program you also write some internal table logic.
Example say your internal table is t_flight with fs_flight-carrid and fs_flight-connid as its fields.
So in your form you can just call it using '&' like &fs_flight-carrid&.
Much Regards,
Amuktha.