E-recruitment 6.0 - Smart Form - Text Module - Qualifying Event
Hi all,
Once more a question:
E-recruitment 6.0
Smartforms with invitation letters (for example for an interview)
In the recruiter's portal we use a 'qualifying event' to 'set' an appointment' , date, time, place etc.
We use the input from this reference activity in the text module of the smartform.
The text module holds the main text of the letter.
The text from the module appears in the recruiters portal when the recruiter performs activity 'send letter' (act. type: invitation) so that he can add some text manually if he likes.
This functionality is in E-R6.0 since SP7
It goes well when the recruiter does not add anything manually. The variables load in the smartform and it works as wel wanted.
BUT when the recruiter manually changes the letter (the text module) in the recruiters portal, all variable are lost from the letter.
I hope someone can help me out.
Edited by: N. Lodewijk on Dec 4, 2008 11:57 AM
You need to use the functionality "Changeable letter".
Similar Messages
-
Use of SAP Smart Forms - Text Modules
Hi!
One or two questions regarding the SAP Smart Forms text modules.
First: In which table the text name is saved? Is there something like the STXH table for SapScript Objects?
Second: Is it possible to use SmartForm text modules in the text determination for SD (Invoice e.g.)?
I´m looking forward for many answers
Greetings
MarkHi,
From STXL table u can get the text object, id n name pertaining to a text .These things put in FM 'READ_TEXT'. u get the long text...
Instead in smartforms, u can directly include texts using Create-Text, Type Include text...enter the id, name ,lang and object....
Also, for text names, objects and ID..u go to the place where long text has been entered, enter the sapscript editor from there, goto Header...u ll get all the detaails..
hope it helps,
Regards,
Bikash -
Smart form Text module translation and Standard text
Hi i have a requirement in smartforms in which i need to create text modules and transtale into diffrent languages.
I have created text modules they are in my transport,
when i am translating through SE63 into target language it is not asking for any transport request , Can any one help me regarding how i can assign Transaltion thing to my transport.
Another thing is i require to use standard text, i am not much aware of it also as per my understanding i need to create it through SO10 Transaction , and i can use it in include text please correct me if i am wrong, i need this standart text also in two language but while creating standard text it is not asking transport request, and how i would convert standard text in diff lang and how can i assign to my transport.
Surely i would provide points for the valid reply.
Thanks in advance.Hi Gudia San,
To transport Standard text, use the standard Report Program <b>RSTXTRAN</b>, execute it, on the selection screen, enter your standard text name as
<b>Text key - name</b>, press F8, it will display a ouput list. Now press F5 key and it will ask for transport request number.
Regards,
Abdul.
P.S: Rewards points, if useful! -
Smartform - text module - qualifying event
Hi all,
Once more a question:
E-recruitment 6.0
Smartforms with invitation letters (for example for an interview)
In the recruiter's portal we use a 'qualifying event' to 'set' an appointment' , date, time, place etc.
We use the input from this reference activity in the text module of the smartform.
The text module holds the main text of the letter.
The text from the module appears in the recruiters portal when the recruiter performs activity 'send letter' (act. type: type invitation) so that he can add some text manually if he likes.
It goes well when the recruiter does not add anything manually. The variables load in the smartform and it works as wel wanted.
BUT when the recruiter manually changes the letter (the text module) in the recruiters portal, all variable are lost from the letter.
I hope someone can help me out.
Edited by: N. Lodewijk on Dec 4, 2008 11:47 AMYou need to use the functionality "Changeable letter".
-
Can anybody provide me good step by step procedurehow create smart form and module pool programming.
My email Id is [email protected]hi,
SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
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
GS_MKPF = INT_MKPF
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.
What is SAP Smart Forms?
SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
configure forms with data from an SAP System for the relevant business processes.
To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
SAP Smart Forms also support postage optimizing.
Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
What Transaction to start SAP Smart Forms?
Execute transaction SMARTFORMS to start SAP Smart Forms.
Key Benefits of SAP Smart Forms:
SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
These actions do not include writing of coding lines or using a Script language.
Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
For Web publishing, the system provides a generated XML output of the processed form.
Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
PROGRAM YMPSKEL MESSAGE-ID YL.
DESCRIPTION
written by !
TABLES:
DATA: OK_CODE(4), " ok code - screen 1
OK_CODE2(4).
DATA C LIKE SY-INDEX. " Index for screen loop
*& Module USER_COMMAND_0100 INPUT
process after input for screen 0100 *
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'SAVE'.
WHEN 'DISP'.
WHEN 'LIST'.
C = 0. "reset loop control
WHEN OTHERS.
ENDCASE.
CLEAR OK_CODE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
process before output for screen 0100 *
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'AMEND'. " set gui status
SET TITLEBAR '100'. " set title
ENDMODULE. " STATUS_0100 OUTPUT
*& Form SAVE data
Save screen details
FORM SAVE.
CLEAR OK_CODE.
ENDFORM.
*& Form DISPLAY
FORM DISPLAY.
ENDFORM.
*& Module EXIT_COMMAND INPUT
exit commands are processed before validation *
defined by E against function in menu painter(function list)
MODULE EXIT_COMMAND INPUT.
CASE OK_CODE.
WHEN 'EXIT'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
WHEN 'CANC'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
WHEN 'BACK'. CLEAR OK_CODE. SET SCREEN 0. LEAVE SCREEN.
ENDCASE.
ENDMODULE. " EXIT_COMMAND INPUT
*& Form list
text *
FORM LIST.
CLEAR OK_CODE. SET SCREEN 200. LEAVE SCREEN.
ENDFORM. " LIST
*& Module EXIT_COMMAND_200 INPUT
exit command processing for screen 200 *
defined by E against function in menu painter(function list)
MODULE EXIT_COMMAND_200 INPUT.
CASE OK_CODE2.
WHEN 'EXIT'. CLEAR OK_CODE2. SET SCREEN 0. LEAVE SCREEN.
WHEN 'CANC'. CLEAR OK_CODE2. SET SCREEN 0. LEAVE SCREEN.
WHEN 'BACK'. CLEAR OK_CODE2. SET SCREEN 100. LEAVE SCREEN.
ENDCASE.
ENDMODULE. " EXIT_COMMAND_200 INPUT
*& Module STATUS_0200 OUTPUT
process before output for screen 200 *
MODULE STATUS_0200 OUTPUT.
SET PF-STATUS 'POPUP'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0200 OUTPUT
Module pool programs are created in abap development work bench (TCODE: SE80).
Here we can do all the works whatever you can do in abap.
Module pool programs are also called dialog programs.
The module Pool are reports prepared for different screens and to manage the sequence of events of these screens, in the transaction SE80 you can see all the dynpros that you have for this kind of report, add new ones, add all types of element to the report.
Process Before Output is the part of the dynpro code that is processed before the user can do anything with the data in the screen
Process After Input is the part of the dynpro code that is processed after the interaction with the user.
module pool programs are excuted using Tcodes
regards,
sreelakshmi -
Hello All,
We have a custom smartform...which is working fine...only issue arrives when we transport it to the quality system...the font of the text element changes when we print the forms...in dev system the fonts are big and it prints the big words...but in quality system...the text prints out in small size....the printer is same...i mean we print the form from same printer...any ideas where to look and what to look for??
Thanks...hi i think u need to transport ur text modules & styles what u have used in ur smartforms .
if the problem is resolved plss
inform me -
Caling smart form from module pool
Hi,
i want to call smartform from module pool screen when click on some pushbutton.
ex i want to call smart form of sales order by passing perticular S.O number from module pool screen.
plz help me o get this.
thanks.Hi,
Enable hotspot option in the field catalog for the .SO.NUMBER field. On clicking on SO.Number
get the cursor field value and call the smart form in the PAI (ie., in user_command module).
Probably pick ucomm triggers with hotspot.
Venkat. -
I have a smart form and executing it with standard tcode but I couldnt see the output. How could i view the generated function module and where to assign this. Help needed immediately.
JanelleIn your print program first call the following FM. Pass the name of your smartform. It will return the generated FM name.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = V_FORM_NAME
IMPORTING
FM_NAME = V_FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
Now call the returned FM name.
CALL FUNCTION V_FM_NAME -
hi all,
what is the function module to pass the print partamets in smartforms.Hi
the function module is SSF_FUNCTION_MODULE_NAME.
here is sample code....
in this vname is the function module which is generated when we execute the smartform.....it is declared as ...
vname type rs38l_fnam.
in the ssf_function_module_name...in exporting we need to pass the values which we want to pass ,from print program to form.
STRUCTURE DECLARATION
data : wa_lfa1 type z50875_lfa1,
wa_ekko type z50875_ekko,
wa_ekpo type z50875_ekpo,
it_ekpo type z50875it_ekpo,
vname type rs38l_fnam.
SELECTION-SCREEN
selection-screen begin of block b1 with frame title text-000.
parameter : p_no type ekko-ebeln obligatory.
selection-screen end of block b1.
at selection-screen on p_no.
perform validate.
START-OF-SELECTION
start-of-selection.
perform get_vendordata.
perform get_itemdata.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZMM_SMARTFORMS'
importing
fm_name = vname
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.
call function vname
exporting
wa_lfa1 = wa_lfa1
wa_ekko = wa_ekko
wa_ekpo = wa_ekpo
tables
it_ekpo = it_ekpo
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.
*& Form GET_DATA
form get_data .
select single ebeln lifnr
from ekko
into wa_ekko
where ebeln = p_no.
endform. " GET_DATA
*& Form GET_VENDORDATA
form get_vendordata .
select single lifnr name1 land1 ort01 regio
from lfa1
into wa_lfa1
where lifnr = wa_ekko-lifnr.
endform. " GET_VENDORDATA
*& Form GET_ITEMDATA
form get_itemdata .
select ebelp ematn aedat mtart netwr
from ekpo
into table it_ekpo
where ebeln = wa_ekko-ebeln.
endform. " GET_ITEMDATA
*& Form validate
form validate .
perform get_data.
if sy-subrc ne 0.
message 'PURCHASE DOCUMENT DOES NOT EXISTS' type 'E'.
exit.
endif.
endform. " validate -
hi ,
The code in program lines is stored in which part of the generated function module and belongs to which include.
Thank you.Hi ,
Try to locate the any variable u have written in the program line in se37 .
Regards -
Smart forms text to appear on last page
Hi,
I want signature text to appear on the last page.How we can acheive it.
Regards,keep the signature in a separate window.
put condition as
SFSY-PAGE = SFSY-FORMPAGES
that means the current page equals to total number of pages, that means the last page.. -
Hi Experts,
I have created a text module for a smartforms. and wrote some text in english. Now I have to transalate this text module data into chinese. Please tell me how to do this translation for TEXT MODULE.
Thnks
Krishanhi,
refer the below link:
Smart form Text module translation and Standard text
How text modules are translated in Smart Forms -
How to assign standard texts assign dynamically to smart forms
Dear Experts
I need your help in adjusting the smart form texts dynamically. I will explain you the situation please revert me your valuable answers.
1. I am integrating 12 smart forms using same program.
2. Out of 12 smart forms 4 forms are having similar kind of template. Client is requesting like create one smart form template.
3. By creating the standard texts you can assign the standard texts into smart form during runtime dynamically.
4. Maintain all standard texts for smart forms in another custom table, during run time of the program you can assign the standard texts to smart form.
5. Here my question is how to assign the standard texts to template texts dynamically ?
Please revert me your suggessions.
Thanks for your support.Hi Indra neel ,
You are maintaining all the standard texts in custom table right, u need to get standard text based on condition which works for your smartform
than create text module in smartforms and change that to include text and give the variable name or internal tbale with field name in that text name fields and press (>) button and give the remaining fields in that than that will work dynamically -
Hello All ,
I have created one smart form and provided option to download the same in PDF. My Problem is that is downloaded in PDF but at the same time my end user want to see the print preview and take the print from there itself also.
I am using the following code can some one suggest me the what need to do the change after both option will work at the same time.
Please Note I have also made the use of property
SSFCOMPOP-TDNOPREV
But after this also issue not resolve. Some one Please suggest me the how to resolve the issue.
DATA :
WA_FMNM TYPE TDSFNAME, " Smart Forms: Form Name
WA_CNTL TYPE SSFCTRLOP, " FOR PDF PRINT
WA_POP TYPE SSFCOMPOP, " printer name
T_OTF_FROM_FM TYPE SSFCRESCL,
T_PDF_TAB LIKE TLINE OCCURS 0 WITH HEADER LINE,
T_OTF TYPE SSFCRESCL-OTFDATA,
W_BIN_FILESIZE TYPE I, " BINARY FILE SIZE
W_FILE_NAME TYPE STRING,
WA_FNMD TYPE RS38L_FNAM. " Name of Function Module
DATA:
W_FORM_NAME TYPE TDSFNAME,
W_FMODULE TYPE RS38L_FNAM,
W_CPARAM TYPE SSFCTRLOP,
W_OUTOPTIONS TYPE SSFCOMPOP,
W_FILE_PATH TYPE STRING,
W_FULL_PATH TYPE STRING.
SMART FORM FUNCTION MODULE
WA_FMNM = TEXT-113.
W_FORM_NAME = TEXT-113.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = WA_FMNM
IMPORTING
FM_NAME = WA_FNMD
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.
END FORM
WA_CNTL-GETOTF = 'X'.
WA_CNTL-NO_DIALOG = 'X'.
WA_CNTL-PREVIEW = SPACE .
WA_POP-TDDEST = 'LP01'.
CALL FUNCTION WA_FNMD
EXPORTING
CONTROL_PARAMETERS = WA_CNTL
OUTPUT_OPTIONS = WA_POP
V_APPLN_OB = V_APPLN_OB
V_KUNNR_OB = V_KUNNR_OB
V_EBELN = V_EBELN
V_CAT_NAME = V_CAT_NAME
V_VAR_NAME = V_VAR_NAME
IMPORTING
JOB_OUTPUT_INFO = T_OTF_FROM_FM
TABLES
T_ZCNC18 = T_ZCNC18
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.
T_OTF[] = T_OTF_FROM_FM-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = W_BIN_FILESIZE
TABLES
OTF = T_OTF
LINES = T_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 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.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = W_FILE_NAME
PATH = W_FILE_PATH
FULLPATH = W_FULL_PATH
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
OTHERS = 4 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_BIN_FILESIZE
FILENAME = W_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ''
HEADER = '00'
TRUNC_TRAILING_BLANKS = ''
WRITE_LF = 'X'
COL_SELECT = ''
COL_SELECT_MASK = ''
DAT_MODE = ''
CONFIRM_OVERWRITE = ''
NO_AUTH_CHECK = ''
CODEPAGE = ''
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ''
TRUNC_TRAILING_BLANKS_EOL = 'X'
TABLES
DATA_TAB = T_PDF_TAB
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Swati NamdevHi Swati,
Pls refer the below code:
TABLES: ekko.
DATA: int_itab TYPE TABLE OF ekko WITH HEADER LINE.
DATA: wf_name TYPE rs38l_fnam.
DATA: wf_so1.
*For PDf Conversions
DATA: int_tab_otf_data TYPE ssfcrescl,
int_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
int_tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
file_size TYPE i,
bin_filesize TYPE i,
file_name TYPE string,
file_path TYPE string,
full_path TYPE string,
cparam TYPE ssfctrlop,
outop TYPE ssfcompop.
**Preview not allowed.
outop-tddest = 'LP01'.
cparam-no_dialog = 'X'.
cparam-preview = ' '.
cparam-getotf = 'X'.
GET PARAMETER ID 'EBLEN' FIELD wf_so1.
SELECT mandt ebeln bukrs bsart ernam ekorg bedat FROM ekko INTO TABLE
int_itab WHERE ebeln = wf_so1.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_SMARTFORM_FINAL2'
IMPORTING
fm_name = wf_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.
CALL FUNCTION wf_name
EXPORTING
control_parameters = cparam
output_options = outop
user_settings = space
IMPORTING
job_output_info = int_tab_otf_data
TABLES
int_itab = int_itab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
int_tab_otf_final[] = int_tab_otf_data-otfdata[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = bin_filesize
TABLES
otf = int_tab_otf_final
lines = int_pdf_tab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = file_name
path = file_path
fullpath = full_path.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = full_path
filetype = 'BIN'
IMPORTING
filelength = file_size
TABLES
data_tab = int_pdf_tab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Ramneet Ahuja -
Advantage of SAP Script over Smart forms
Hi Friends,
Can you please let me know some ten points on Advantages of SAP Scripts over Smart Forms.
Thanks,
GokulHi Gokul,
Major Differences between smart form and Scripts are
Multiple page formats are possible in smartforms which is not the case of SAP Scripts
It is possible to have a smartform without a main window
Labels cannot be created in smartforms.
Routines can be written in smartforms tool.
Smartforms generates a function module when activated
Background graphics are possible in case of SMARTFORMS
Assigning the font colours to the text are not possible in the case SMARTFORMS.
Creating and maintaining SMARTFORMS requires half the time compared to SAP Scripts
Smart Forms SAP Scripts
1)Form, Text Module, Styles are Form, So10 are
client independent client dependent
2)In a form diff pages can have In a form all pages should
different page formats follow one page format
3)Back ground picture is possible Not Possible
4)Maintenance cost is low Heavy
5)Web publishing is possible Not Possible
using XML
rewards if helpful........................
Regards,
Maha.
Maybe you are looking for
-
How do you add a hyperlink to an image in Captivate 6?
I have a slide that contains two images. I want the user to be able to click on each image and have the URL open in a new window. I can't figure out how to do this simple procedure. Thank you!
-
Large Bitmaps create out of memory exception
Hello, I try to generate a "BufferedImage" from a Windows Bitmap file ( xxxx.BMP ) . I can read and generate relatively images from relatively small files (e.g. 852x626 pixels works fine), but if it comes to larger images, I get an out of memory exce
-
How can I transfer a movie I bought to my wife on her account to my account?
How can I transfer a movie I bought for my wife on her account to my account?
-
Ethernet Connected external drive problem
I have a 500GB external drive that I connect to the home hub via ethernet. When I connect it to the home hub it does not appear in the connections list for the router and none of the computers can see it. The drive was working fine when it was connec
-
I am taking an online course and need to download the videos to my Imac. How do I do this....new to the mac world