2007 May 01 7:04 AM
Hi all !
how can we pass a parameter through the ABAP program to smartform,the parameter is in the form interface.
thanks,
sachin soni
2007 May 01 7:22 AM
Hi,
In the SAP SMARTFORMS, in the global settings we can add fields to the form interface, from the print program, we can call the generated function module from the SE38 programs, there we can pass the parameters. if you have put the field in the import of the form interface, then in the se38 function module that will become export parameters
Regards
Sudheer
Hi all !
how can we pass a parameter through the ABAP program to smartform,the parameter is in the form interface.
thanks,
sachin soni
2007 May 01 7:07 AM
Hi Sachin,
In your smartform
GOTO <b>Global settings -
> Form interface</b> double-click in this...
You can add your own parameter interfaces...
<b>
Reward all helpful answers</b>
Regards,
V.Raghavender.
2007 May 01 7:11 AM
Hi..,
Declare that variable in the <b>FORM INTERFACE</b> of the Smartform, with a <b>dictionary reference or with predefined data type</b>.
Now when u call the FM of this smartform in ur program u will get this parameter as export parameter of the Function module.. here u can give the value or the variable which contains the required value ....
Hope this solves your problem !!
regards,
sai ramesh
2007 May 01 7:15 AM
Gentlemen i think u did not undertood wat i said:
I know how to do it on the form side but i need the wayout in print program
plz let me know the soln.
thanks,
sachin
2007 May 01 7:29 AM
Hi..,
First activate the smartform. and then Goto ENVIRONMENT --> Funtion module.
you will get a function module name in a window as information message...
copy that function module name and .. go to SE38.. create a program ..
Create a variable which is of same type as u declared in FORM INTERFACE.. !!
Give some value to it..
and use the PATTERN button to call the function module ..
call the function module that u have copied there..
Now in EXPORT parameters of the function module.. u can see that parameter defined in Form interface..
Now assign the variable that u have defined in the program to this parameter.. this value will be passed to the smartform .. thats it..
and when u want to print the value of this variable in SMARTFORM u should not write(hardcode) the name of this variable.. but u need to use the Drag an Drop property here !!
hope u know abt this !!
reward all helpful answers !!
regards,
sai ramesh
2007 May 01 7:14 AM
hi,
as the required parameter is already specified in the form interface, u just need to call the function module generated by the form.
u can pass the parameter to that function module in the ABAP program.
2007 May 01 7:21 AM
hi,
just copy the function module name by executing the form.
Call that function module using pattern in the ABAP editor, u will get the interface parameters to be passed to the function module.
Just pass the required parameters to the function module.
2007 May 01 7:22 AM
Hi,
In the SAP SMARTFORMS, in the global settings we can add fields to the form interface, from the print program, we can call the generated function module from the SE38 programs, there we can pass the parameters. if you have put the field in the import of the form interface, then in the se38 function module that will become export parameters
Regards
Sudheer
2007 May 01 7:35 AM
THANKS EVERYONE !,sudheer understood my problem and that particular requirement is done now.
2007 May 01 7:33 AM
Hi Sachin,
As far as I have understood ur query, I believe you want a ready made interface written out saying Importing -
Exporting -
.
You can call the function mentioned below first:
<b>CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'</b>
EXPORTING
FORMNAME = '<form name>'
IMPORTING
FM_NAME = fm_name.
This would find out which function module your smartform runs..
There after we call the function module like this without mentioning the name of the function module :
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
<b>But who is to write all the lengthy interface.. So we act smart and go to 'PATTERN'
in the editor and this would give u somethign like this:</b>CALL FUNCTION 'function name abc'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
just delete tht name of function module written there say abc and write fname in place .
How to find out the name of the function module i guess by now you would have to come to know from 'environment'.
<b>or go to smartform of yours and execute by F8..se37 opens with the name of the function module</b>
Also refer to this for the full picture:
http://help.sap.com/saphelp_nw2004s/helpdata/en/1c/f40c5bddf311d3b574006094192fe3/content.htm
Reward if useful buddy !!
Regards,
Shweta.
Message was edited by:
shweta soni
2007 May 01 7:48 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |