Smartform function modules
hi,
For processing the smartforms SSF_OPEN which will have functionality like output options,control parameter which has various functionality, but i am unable to acheive this but I am able to do the same in my generated function module,
so my questions is why we want SSF_OPEN while we can do the same in generated? please tell how to achive in SSF_OPEN.
Points will be rewarded.
regards,
Prabhu
Hi,
Check my tutorial regarding the same.I am expalining in that.
https://wiki.sdn.sap.com/wiki/display/Snippets/Smartform-Howtoavoidthedialog+box
Similar Messages
-
SEND_ERROR in the SMARTFORM function module
Hi All,
I want to send the PO via e-mai as attached PDF file. It is working fine in DEV. But in PRD i am getting SEND_ERROR in the SMARTFORM function module.
can any one hep me to fix this????
CALL FUNCTION fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ssfctrlop
output_options = ls_composer_param
user_settings = 'X'
nast = nast
zxekko = zxekko
zxpekko = zxpekko
IMPORTING
job_output_info = job_output_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Rgds,
Rajesh.Hi,
Go to se37,enter ur generated function module name .
Put a brkpoint at first executable statement of that FM.
If u run ur program,then it will stop.
Then put brk point on SSRFT_READ_ERROR(From menu).
after press f8,u will know what is the reason of ur error.
and check thjis also
http://wiki.sdn.sap.com/wiki/display/Snippets/Unique+Driver+Program+for+any+smartform+of+a+transaction
Try like this.
Thanks
Gourav. -
Regarding Smartform Function module
Hi,
When i am executing the smartform function module via print program, Smart form output is displaying properly but it is not showing any OTF data in the importing parameter JOB_OUTPUT_INFO . (JOB_OUTPUT_INFO-OTFDATA). Why it is happening? Could you please help me in this regard?To get the OTF data you need to set the GETOTF parameter in the Control Parameters of the Smartforms.
DATA: LS_CONTROL TYPE SSFCTRLOP. " Controlling info
LS_CONTROL-GETOTF = 'X'.
CALL FUNCTION WF_FM
EXPORTING
CONTROL_PARAMETERS = LS_CONTROL
IMPORTING
JOB_OUTPUT_INFO = WF_OUTDATA
I guess, when we set the GETOTF flag, it will not generate the output and only puts the data JOB_OUTPUT_INFO-OTFDATA.
Regards,
Naimesh Patel -
HI,
is it same development client smartform function module (meane when we execute the smartform) and test client smartform function module?pls help me?
regrds,
dhananHI,
We have two function modules in smartforms,
One is when we activate the smartform it iwll give at runtime which will encapsulate all the attributes of that particular smartform we cant run the smartform in different client if we use that function module.
Second One is We have one more function module is there which is main SSF_FUNCTION_MODULE_NAME
output of this function module is another function module. we can run the program in any client if we use this function module -
SmartForm Function Module not generated in Production
Hi
I have a smartform in DEV(Box A). It works fine. I trasnsported it to PROD(Box B). It appears as Active state in PROD. But there is no Function module generated for this smartform. As a result my program dumps in PROD.
I am running it on 4.6C Release.
Any suggestions ?
Murali.Hi again,
1. I dont find any Function Module name under ENVIRONMENT -
> FUNCTION MODULE NAME
Click on
FUNCTION MODULE NAME
and it will give a pop-up window
displaying the FM name.
2. If its not there,
then u can do 3 things :
a) in prd server, activate the smart form again.
(this will generate the FM)
b) try to transport a new request,
for the same smartform.
c) ask basis team to check the LOG
of this transport request.
(whether any error / warning was there in the
transport log)
From this log, if any warning/error is there,
then we can come to know, that there is some problem.
regards,
amit m. -
Modify code in include program of smartform function module
Hi,
Someone hardcoded breakpoint inside the smartform function code.
I have to delete that breakpoint.But its asking access key.
Can't we remove that line in any other way?.
Thanks,
SriHi,
You can remove it from the smartform instead of trying in the smartform include program.
Thanks
Arul -
'Control parameters' when call the smartform function module
Hi all,
I want to know what we have to export as value to control papameter while calling the fm of smartform.
Plz also let me know the various parameters in CONVERT_OTF.
Thanks in advance.WA_CONTROL_PARAMETERS-GETOTF = 'X'.
the above is needed if you want OTF data, to convert it to PDF
WA_CONTROL_PARAMETERS-LANGU = 'E'.
Language of smartform
WA_CONTROL_PARAMETERS-DEVICE = 'PRINTER'.
*default o/p device
WA_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
if you dont want the pop up screen , that asks you for printing make the value as 'X' .
other wise make it as space or clear it.
WA_CONTROL_PARAMETERS-PREVIEW = SPACE.
if u want the print preview , make it as 'X' , otherwise SPACE
Below code shows how you can convert the OTF data to PDF data.
calling the smartform.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_SMARTFORM'
IMPORTING
FM_NAME = WF_FUNCMODULENAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
CALL FUNCTION WF_FUNCMODULENAME
EXPORTING
CONTROL_PARAMETERS = WA_CONTROL_PARAMETERS "Control Params
OUTPUT_OPTIONS = WA_OUTPUT_OPT "Output Options
WF_CARRID = WF_CARRID
WF_CONNID = WF_CONNID
WF_FLDATE = WF_FLDATE
IMPORTING
DOCUMENT_OUTPUT_INFO = WA_DOCUMENT_OUTPUT_INFO
JOB_OUTPUT_INFO = WA_JOB_OUTPUT_INFO
JOB_OUTPUT_OPTIONS = WA_JOB_OUTPUT_OPTIONS
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
ARCHIVE_INDEX = WA_ARC_IDX
IMPORTING
BIN_FILESIZE = WF_NUMBYTES
TABLES
OTF = WA_JOB_OUTPUT_INFO-OTFDATA[]
DOCTAB_ARCHIVE = TB_DOCTAB_ARCHIVE[]
LINES = TB_LINES[]
EXCEPTIONS
ERR_CONV_NOT_POSSIBLE = 1
ERR_OTF_MC_NOENDMARKER = 2
OTHERS = 3. -
Printing options in parameters of function module of smartforms
HI experts,
i hav a loop inside driver program where for every loop it calls smartform and the printing is continuous. But can any one help me how to control this by not displaying LPD. So that directly i can see the preview after all loop passes
Advanced
thanks
KrishHi,
In this I suggest you to capture the data in the OTF format adn append the details after every LOOP pass and finally after ENDLOOP. Now use this OTF data to display the details in PDF where you have option to save the details and Print the form details.
Pass the below variable as 'X' in the control parameters of the Smartform.
ssfctrlop-getotf = 'X'.
Now capture the OTF data return from the Smartform Function Module in the Importing Parameter "job_output_info" as shown below.
data : wa_otf TYPE ssfcrescl,
it_otf type standard table of ssfcrescl with header line.
*ssfctrlop-getotf* = 'X'.
Loop you Internal_table.
*--Call the Smartform Function Module for Displaying the Details
CALL FUNCTION lv_fname
EXPORTING
control_parameters = wa_ssfctrlop
output_options = wa_ssfcompop
user_settings = k_space1
wa_output = p_details
IMPORTING
job_output_info = wa_otf
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
append wa_otf to it_otf.
Endloop.
*--To display the Smartform the PDF format where thr Printing the Form
*--can be done
CALL FUNCTION 'HR_IT_DISPLAY_WITH_PDF'
TABLES
otf_table = it_otf-otfdata. -
Passing selection table as parameter to function modules
i tried to pass a selection table as a parameter to a function module but there is a problem stating the eror the table length is different.
*& Report ZSFSELECT_OPTIONS_PGM
REPORT zsfselect_options_pgm.
TABLES zselect_options.
SELECT-OPTIONS sop FOR zselect_options-id.
DATA : fname(15) TYPE c.
*CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = fname
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME =
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
DATA lth(2) TYPE c.
DATA ty TYPE i.
DATA o TYPE i.
DATA l TYPE i.
DATA k TYPE c.
DESCRIBE FIELD sop-sign TYPE lth LENGTH ty IN CHARACTER MODE.
CALL FUNCTION fname
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
sf_sop =sop
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
in the smart form i have tried to pass the sp as the table.
i have created a program line node
:SELECT * FROM zselect_options INTO TABLE it_tab WHERE id IN sf_sop.Hi,
If i understand ur problem correctly u r trying to pass a select-option to Tables for a smartform function module. It gives an error & it correct.
If u understand the structure of a select option, it will have 4 fields in it & the structure will be
SIGN CHAR1
OPTION CHAR2
LOW Type Zfield
HIGH Type Zfield
But ur receiving Table paramter of the smnartform FM will be having only 1 field - Type Zfield
So this mismatch gives u an error.
Solution:
Case1:
Write code outsied th FM in ur program to get all the values & build an internal table & pass that to the FM.
Case2:
Define the Structure of table in the smartforms as tols earlier & then try passsig the Select option.
Thanks & Regards,
Bhargava -
Function Module for syntax check on the repository objects
Hi Experts,
Can anyone help me in finding out the function module used to do syntax check on Repository objects(PRograms/Smartforms/FUnction Modules...etc.,)
Dr. Arif ShaikHi,
Can you please check following function modules? But I am not sure that you can get it all in one.
EDITOR_SYNTAX_CHECK (For any report)
SSF_PREPARE_SYNTAX_CHECK (For any smarrt form)
RS_SYNTAX_CHECK ( ABAP Syntax Check with Dialog and Navigation)
CHECK_FORM_ITF_SYNTAX
RS_DISPLAY_SYNTAX_DIAGRAM
RS_CUA_INTERNAL_SYNTAX_CHECK
SEO_CLASS_CHECK_INCLUDE_SYNTAX
SEO_CLIF_GET_SYNTAX_INFO
C195_TEST_SYNTAX_CHECK
C1F0_PHRID_SYNTAX_CHECK
Pls let me know if anything is unclear.
Regards,
Lokesh.
Edited by: Lokesh Tarey on Apr 8, 2010 10:59 AM -
How can I debug a Function Module used by smartforms
Hello everyone,
i have a problem with the function module /1BCDWB/SF00000040.
It's a module executed from a smartforms form. I need to debug this
function module while printing an invoice. While printing it should jump
to the place of the function module.
Would be grateful if someone could help me.
Best regards
F. HoppeThis is exactly what i have done last time.
The problem is that the breakpoint does not stay at the same place
when i activate it in the module itself.
Isn't there a transaction you can put breakpoints specific to a FM? -
How to use parameters in smartform genrated function module
i executed smartform one functional module is genrated '/1BCDWB/SF00000002'
now the problem is that i want to send output of this smartform through email
now how to use ' MAIL_RECIPIENT ' and ' MAIL_SENDER ' to send smartform output through email .
please check following module which generated by smartform.
plz suggest me .
CALL FUNCTION '/1BCDWB/SF00000002'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
ITAB_PA0001 = ITAB_PA0001
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hi
You can do it while passing these parameters in the CONTROL_PARAMETERS.
data: ls_CONTROL_PARAMETERS type SSFCTRLOP.
ls_CONTROL_PARAMETERS-DEVICE = 'LOCL'.
ls_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
ls_CONTROL_PARAMETERS-PREVIEW = ' '.
Pass this ls_CONTROL_PARAMETERS to the importing parameter of the FM .
CALL FUNCTION LF_FM_NAME
EXPORTING
CONTROL_PARAMETERS = LS_CONTROL_PARAM
In addition to this, you might also want to set the print immediately field on the same structure to 'X'.
Generally you leave the device field empty, the user master record default printer will be used -
Can you call a function module from within a smartform?
I was told that yu can not call a function module from a smartform - that does not make sense to me because you can do tons of ABAP within a smartform.
Well - can you?
Thanks.
ScottYes, you can call function modules.
-
Function module for converting sap script to smartforms?
hi ,
wat is the name of function module for converting sap script to smartforms?
regard's
Deepak sharmaHi,
No function module is there..
But go to T-code..Smartforms and in the menubar..
Utilities-->Migration->Import SApScript Form.
U can thus migrate SAPScipt to smartforms...
How ever a lot of changes have to be done in the migrated one,,
Regards -
HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM
PLEASE ANYONE TELL ME, ABOUT HOW TO CALL FUNCTION MODULE INSIDE SMARTFORM. IT IS VERY URGENT!!!!!!!!!1
Hi,
Under Global Definitions, we have 'Form Routines' tab. Under this tab, u can have a dynamic subroutine call. With in FORM and ENDFORM, you can call the Function Module.With in the Program Lines editor, u can define the subroutine........PERFORM.
If helpful, reward points.
Rgds,
CK
Maybe you are looking for
-
Officejet Pro 8600 Plus will not send or receive fax
I have connected the fax machine to the phone outlet, the fax machine dials to another fax machine, the connection sounds like it is being made (the receiving fax machine sends out a noise signalling that it has received a phone call) and then the
-
Non Static Variable addressed to Static Variable
Hi, I am new to java, I am getting (Non Static Variable sb,serverAddress addressed to Static Variable) Here is the code. Thanks for reading, any help or explanation would be appreciated- * To change this template, choose Tools | Templates * and open
-
How to stop the counter after getting maximum amplitude from a waveform graph?
I am using accelerometer, optical encoder and daq card (PCI MIO 16XE10) for my tyre balancing project. Basically i am trying to stop my edges count from the optical encoder to get the position for putting the mass for correcting the balancing. Could
-
Hello, I need to calculate a list of people, who got some services more that 2 times with the same service koda (pas_kodas) to the same person (zmo_kodas). It should not depend on report number. http://www.gentoo.lt/sql.jpg What I get is in green (se
-
MAC OS 10.4.11 CS4 InDesign I am having a problem with saving files in InDesign CS4. Originally the computer had CS2 installed, then was upgraded to CS4 and ran fine. Recently I had to reinstall InDesign CS4 because of problems and ever since whe