on 07-16-2008 10:47 AM
Hi,
I have developed a new report program.The selection screen of the report program is like this.
plant: ________
warehouse: ___________
sheet #: _________ to _________
bay/bin: ___________ to __________
building: ___________ to __________
counter sheet printer: __________
Auditor sheet printer: _________
When the data for sheet#,bay,building, counter sheet printer is given,then the counter sheet smartform has to be output on the screen.
or
When the data for sheet#,bay,building, auditor sheet printer is given,then the auditor sheet smartform has to be output on the screen.
Is it pessible to trigger the smartform from the selection screen of the report.If so can anyone send me a sample code for that.
Create two different smart forms for this and accordingly when you are selecting the fields mange which form to populate .
And here pass parameter 'x' and try to populate your forms.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check this link it might be useful to you.
http://help.sap.com/saphelp_nw04/helpdata/en/1c/f40c58ddf311d3b574006094192fe3/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = <smartform name>
IMPORTING
fm_name = v_form_fm
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
Call Smartfrom to print the document
CALL FUNCTION v_form_fm
EXPORTING
p_compensation = p_comp <--parameter list
p_skill = p_skill
p_deci_auhtority = p_da
TABLES
s_job = s_job <--select option list
s_level = s_level
s_date = s_date
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
declare the paramters of your selection screen in the form interface section of the smartform.
If you have a parameter in teh selection screen then declare it in the smartform as:
P_matnr TYPE matnr (in form interface -
>import)
If you have a select option then
S_LEVEL LIKE <dictionary structure like a range>
this u declare it in the tables section of the form interface. For the select option , the dictionary sructures should be like a range (see RNGE_OBJID as an example). If you dont have a dictionary structure
then u need to declare it in the dictionary.
REWARD IF HELPFUL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
declare the paramters of your selection screen in the form interface section of the smartform.
If you have a parameter in teh selection screen then declare it in the smartform as:
P_matnr TYPE matnr (in form interface ->import)
If you have a select option then
S_LEVEL LIKE <dictionary structure like a range>
this u declare it in the tables section of the form interface. For the select option , the dictionary sructures should be like a range (see RNGE_OBJID as an example). If you dont have a dictionary structure
then u need to declare it in the dictionary.
REWARD POINTS IF HELPFUL
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
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.