on 06-29-2010 4:59 PM
i am in a fix , pls help me out.
while doing smartform with select-options, which is the best way to do ?
1st way :
[se38 driver program]
-
data declaration
*doing the select query => fetching data into internal table
*calling ssf_function_module_name => trapping the smartform name
*calling the smartform
passing the final internal table and other parameters to the smartform
ie: all the data declarations, internal table data manipulations....etc in the driver prog and the smartform will only have the least necessary parameters in the form interface and global data [ie: no types decl, no data decl, no select query will be done in the smartform body]
*----
2nd way
----
[se 38 [driver prog]
data: fnam type rs38l_fnam.
select-options: s_vbeln for vbap-vbeln.
*calling ssf_function_module_name => trapping the smartform name
call function fnam
exporting
t_vbeln = s_vbeln. => passing the select-options as parameters to the smartform.
*----
now in smartform body
tcode: smartforms
-
form interface => tables
t_vbeln like selopt. "selopt predefined str similar to select-options
-
global definitions => types
declare the internal table type
global definitions => global data
declare the internal table, the work area ...etc
-
global definitions => initializations
write the select query.
-
then develop the remaining smartform (most of the coding is done in tcode:smartforms).
Moderator message - Please do not use code tags to format text
Edited by: Rob Burbank on Jun 29, 2010 12:03 PM
Hi,
I recommend the first option. It is always the best option to do data fetch in the driver program and try to write less code in the layout.
Reason, it is good to segregate the data retrieval from the layout so that you can manage both effectively. Also you can feel a lot of performance.
Regards,
Selva K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a continuation of your earlier thread . You may have only one post open at a time on a single subject. Please close one or the other, or I will have to pick one and lock it.
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.