Transporting smartforms.
Hi All,
I have a problem in transporting smartform objects.
I am using 200 client for dev and 100 for testing. Since smart forms are not working in client 100,I wanter to transport smartform to client 100 on the same system.
So I have created requests containing smartform objects but not released and attempted to do transport. But below error comes while transporting.
table STXFADM is not client specific
table STXFADMT is not client specific
table STXFCONT is not client specific
table STXFOBJ is not client specific
table STXFTXT is not client specific
table STXFTXTA is not client specific
table STXFVAR is not client specific
table STXFVART is not client specific
Error in object R3TR SSFO
No objects requiring post-import methods exist
Program ended with error or warning,return code:w
I also tried to copy XML using upload download methods.
Anyone can put comment???
Thanks Regards
Jose
hi,
smartforms r not client specific if u create in 1 client u can check in both clients.
if u want to transport to other server then release the request in se09 and transport from STMS transaction.
only scripts which r client dependent r transported using scc1 transaction.
Similar Messages
-
Hello
Does anyone knows what is the procedure to transport smartforms. I am totaly new in thisHi jan Bo,
Please check with the below links :
[SMARTFORMS translate and transport|Re: SMARTFORMS translate and transport;
and
[Assign Smart form translations to a transport request |https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/assign%2bsmart%2bform%2btranslations%2bto%2ba%2btransport%2brequest]
Regards,
S.Manu -
Error While Transporting Smartforms from 832 client to 834 client
Hi
I released my Smartform and Program...
and i told our basis ppl to Transport the Code from 832 to 834
but while transporting they are Getting this error
Transport Control Program tp ended with error code 0212
Errors:could not access file as supposed.
My question is
Y they r getting this error?
is it link to Abap Program..
bcz they are telling that there is a wrong in my Program...
Bt my Program is working fine in 832 client...
Can any one help me on this?Smitha,
If you haven't done any changes in the program then there is no need but you are saying you have created error messages.Haven't you tagged the changes related to the smartform as well as the Error messages (ie message class) in the same request?
If you have different requests one for error message and one for Smartform,then see to that both are transported.If smartform is using any of those error messages then you need to move the request which has got error messages first and then only the smartform related requests should be moved otherwise it will give a dump becuase by the time Smartform is moved to 834 the error messages request is not yet moved.Hence sequnece while moving the transport requests is very important.It is always advisable to have all the changes related to a program in one request.
And added to that do check the link given by Gautam too.
K.Kiran. -
ERROR WHILE TRANSPORTING SMARTFORM
hi friend,
when i try to transport my smartform it shows the error message like this
1. Object CUAD ZINVOICE_11 is inactiv
2. Object REPT ZINVOICE_11 is inactiv
what are CUAD and REPT .
My Code is.
REPORT ZINVOICE_11.
*& Report Z_INVOICE_PRINT *
*& changes done by : Bhupinder Singh
*REPORT Z_INVOICE_PRINT_FINAL .
constants : sf_name(30) type c value 'ZINVOICE_11'.
parameters : vbeln like vbrk-vbeln .
data : perf type c.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
PARAMETERS: pre RADIOBUTTON GROUP RAD1 DEFAULT 'X',
post RADIOBUTTON GROUP RAD1.
SELECTION-SCREEN END OF BLOCK B1.
data : form_name type RS38L_FNAM.
data : ivbrk like vbrk occurs 0 with header line.
data : ivbrp1 like vbrp occurs 0 with header line.
data : ivbrpf like vbrp occurs 0 with header line.
data : ivbrp like vbrp occurs 0 with header line.
data : ivbap like vbap occurs 0 with header line.
data : ivbkd like vbkd occurs 0 with header line.
data : ikna1 like kna1 occurs 0 with header line.
data : ikonv like konv occurs 0 with header line.
data : ilips like lips occurs 0 with header line.
data : ivepo like vepo occurs 0 with header line.
data : ivekp like vekp occurs 0 with header line.
data : ikonv1 like konv occurs 0 with header line.
data : ikonv2 like konv occurs 0 with header line.
data : netwt like vekp-ntgew.
data : grwt like vekp-brgew.
select * from vbrp into table ivbrp where vbeln = vbeln.
select * from vbrk into table ivbrk where vbeln = vbeln.
data : vknumv like konv-knumv.
loop at ivbrk.
move ivbrk-knumv to vknumv.
endloop.
loop at ivbrp.
select * from konv into table ikonv1 where knumv = vknumv and kposn = ivbrp-posnr and kschl = 'ZFOB'.
select * from konv into table ikonv2 where knumv = vknumv and kposn = ivbrp-posnr and kschl = 'ZDS3'.
endloop.
data : ins like konv-kbetr.
data : dis like konv-kbetr.
data : fght like KONV-KBETR.
loop at ikonv1.
ins = ins + ikonv1-kbetr.
endloop.
loop at ikonv2.
dis = dis + ikonv2-kbetr.
endloop.
if pre = 'X'.
select * from vbrp into table ivbrp where vbeln = vbeln order by matkl.
loop at ivbrp.
on change of ivbrp-matkl.
clear ivbrp1.
refresh ivbrp1.
move ivbrp-matkl to ivbrp1-arktx.
insert ivbrp1 into ivbrp.
modify ivbrp.
endon.
endloop.
endif.
ivbrpf[] = ivbrp[].
select * from vbrp into table ivbrp where vbeln = vbeln.
select * from vbrk into table ivbrk where vbeln = vbeln.
select * from lips into table ilips for all entries in ivbrp where vbeln = ivbrp-vgbel and posnr = ivbrp-vgpos.
select * from vepo into table ivepo for all entries in ilips where vbeln = ilips-vbeln and posnr = ilips-posnr.
select * from vekp into table ivekp for all entries in ivepo where venum = ivepo-venum.
loop at ivekp.
if ivekp-gewei = 'G'.
ivekp-ntgew = ivekp-ntgew / 1000.
ivekp-brgew = ivekp-brgew / 1000.
endif.
netwt = netwt + ivekp-ntgew.
grwt = grwt + ivekp-brgew.
endloop.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = sf_name
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = form_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 form_name
EXPORTING
vbeln = vbeln
perf = perf
pre = pre
post = post
dis = dis
ins = ins
vknumv = vknumv
netwt = netwt
grwt = grwt
fght = fght
VECS = VECS
TABLES
IVBRK = IVBRK
IVBRP = IVBRP
IVBRPf = IVBRPf
IVBaP = IVBaP
IKna1 = IKna1
Ivbkd = Ivbkd
ivbrp1 = ivbrp1
ikonv = ikonv
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
INCLUDE ZINVOICE_STATUS_0001O01.
INCLUDE ZINVOICE_USER_COMMAND_0001I01.
whaT SHOULD i do to active it and transport it.dear bhupi,
When u transporting u r any object , please magke sure u r whole object is in active mode ,otherwise its shows erroe like object in in active mode.
Regards ,
Nikhil Narkhede -
How to TRANSPORT SMARTFORMS LANGUAGE TRANSLATIONS
Hi,
Would anyone know how I will be able to transport to a different system the Language translations I defined for my SMARTFORM?
I observed that I am not asked for a Transport when I define the Translations in SE63
THanks!Hi,
Is there a separate transport for the Translation?
Or this is already included in the SAP SMART FORM Transport?
(I could not find/see the transport for the translation.)
Thanks! -
Hi Everyone,
I have a query that I hope someone can help with. Basically I've have a smartform and am using a smartstyle to format the text to Times New Roman Size 9. This is fine
When I transport the changes (all objects for smarform and smartstyle are in transport) to our Quality Assurance System - the changes come across fine - The text format is correct and all the alignments on the form are correct.
However once this transport goes to teh Pre-Production system for more testing the font is coming out as Arial which then causes the alignments to be incorrect.
I have searched everyway but cannot see any differences between QAS + Pre-Production and dont understand why it's not transporting in the same way.
Has this ever happend anyone else ? Any suggested solutions would be most welcome and very much appreciated.
Thanks alot.hi,
I have come acrossed the same problem in aliignment of windows. Just activate the smartform once again in production. Ur problem will be solved.
Otherwise change in production, if u can do it. -
Can i transport SMARTFORM from SAP4.7EE to SAP-ECC6.0 ?
Hii,
I am working in Upgradation project want to know wheather the SMARTFORM that is developed in SAP4.7EE can to transported to SAP-ECC6.0. If yes please do share procedure with me its very very urgent task given to me.
Please help me to achieve this.
Thksmay be this can help
http://www.saptechies.com/smartforms-faq-part-two/
Just u need is a transport request, Try out this method.
Best of luck -
How to transport smartform. not able to find request no in dev server.
Hello ,
I have made changes in a smartform on development server and now i want ot trnsport it production. But problem is that i am not able to find its request to realeses and also at time of change sys dint promt me for new request.
Anyone have idea what could be done in this case.
Regards,
RanuHi,
Go to SE03,
Click on Objects in Requests
Double clic on Search for Objects in Requests/Tasks
Enter Obect Id as SSFO - Enter your Smartform name.
Check in which request its stored.
Release it and move it to Transport it.
If you want to change the package : go to Change Object directory entries and follow the same.
Rgd
Aeda
Edited by: Aeda N on Dec 1, 2009 12:21 PM -
Hello,
I would like to know if there is any special procedure to transport a samrt form?
I know that with other ABAP objects if they are listed under the transport number
it will get transported. I would like to know if there is any difference with smart forms other than this.
thank you,
AmarThere is no difference when transporting Smartforms.
Just be sure that you include any Smartstyles with your transport.
Also, the first time the Smartform is issued, the FM will be generated in the new system, so you may want to go to the new system, goto Smartforms and Generate the FM. -
How to transport Smartform to Script and Script to smartform?
hi Reddy,
<b>Goto Tcode, Smartforms->utilities->migrat sapscript.</b>
Check
SCRIPTS TO SMARTFORMS;�
Regards,
Santosh -
Pls Send me Step by Step procedure for a Smartforms
hi all ,
pls send me Step by step procedure for a Smartform creation or PPT to This Email id : [removed by moderator]
thanks in advance
rgds
rafi.vhi mahammad rafi,
u can read this,
smart forms
Introduction to SAP SmartForms
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.
Advantages of SAP Smart Forms
SAP Smart Forms have the following advantages:
1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is
necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with
data from an SAP system. Consultants are only required in special cases.
2. Displaying table structures (dynamic framing of texts)
3. Output of background graphics, for form design in particular the use of templates which were scanned.
4. Colored output of texts
5. User-friendly and integrated Form Painter for the graphical design of forms
6. Graphical Table Painter for drawing tables
7. Reusing Font and paragraph formats in forms (Smart Styles)
8. Data interface in XML format (XML for Smart Forms, in short XSF)
9. Form translation is supported by standard translation tools
10. Flexible reuse of text modules
11. HTML output of forms (Basis release 6.10)
12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)
A Simple Smartform Tutorial
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.
Additional Fonts for your SMARTFORMS
You can create additional fonts and style with transaction SMARTSTYLES
This can then be define in the paragraph and character formats, which you can then be assign to texts and fields in the Smart Form.
The character formats includes effects such as superscript, subscript, barcode and font attributes.
Difference with SMARTFORMS vs. SapScript(SE71)
The Following are the differences :-
a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
b) It is possible to have a smartform without a main window .
c) Labels cannot be created in smartforms.
d) Routines can be written in smartforms tool.
e) Smartforms generates a function module when activated.
Contributed by : SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips
f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format.
In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are
working in CRM 3.0 environment.
In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a
particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to
create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up
the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is
printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is
something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
FAQ on Migrating SAPscript to SmartForms
Is it possible to migrate a SAPscript form to a Smart Form?
Smart Forms provides a migration tool for this purpose which migrates layout and texts of a SAPscript form to a Smart Form. It does not
migrate SAPscript form logic of the print program. Using Smart Forms, this logic is described by the tree structure of the Form Builder. The
effort involved in migrating it depends on the complexity of the print program.
Which Basis Release do I need to use SAP Smart Forms?
SAP Smart Forms is available as of R/3 Basis Release 4.6C.
I have heard that Smart Forms replaces SAPscript. What does "replace" mean?
It does not mean that SAPscript is removed from the Basis shipment. Even as of Basis Release 4.6C, SAPscript remains part of the SAP
standard and there are no plans to remove it. Since Smart Forms is currently, and will continue to be, the tool for form maintenance for
mySAP.com solutions, our further development efforts will focus on Smart Forms, not on SAPscript.
Do we have to migrate all SAPscript forms to Smart Forms?
There is no point in migrating all SAPscript forms already in use. Since SAPscript can still be used and will be available in the future, there is
no need to. If you plan to migrate a SAPscript form, it is recommended that you check whether benefit is worth the effort involved.
Conversion of SAPSCRIPT to SMARTFORMS
SAP provides a conversion for SAPscript documents to SMARTforms.
This is basically a function module, called FB_MIGRATE_FORM. You can start this function module by hand (via SE37), or create a small ABAP
which migrates all SAPscript forms automatically.
You can also do this one-by-one in transaction SMARTFORMS, under
Utilities -> Migrate SAPscript form.
You could also write a small batch program calling transaction SMARTFORMS and running the migration tool.
SmartForms System Fields
Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the
corresponding values. The field values come from the SAP System or are results of the processing.
System fields of Smart Forms
&SFSY-DATE&
Displays the date. You determine the display format in the user master record.
&SFSY-TIME&
Displays the time of day in the form HH:MM:SS.
&SFSY-PAGE&
Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in
the page node.
&SFSY-FORMPAGES&
Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
&SFSY-JOBPAGES&
Contains the total page number of all forms in the currently processed print request.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the
user_exception macro (syntax: user_exception <exception name >).
Example Forms Available in Standard SAP R/3
SF_EXAMPLE_01
Simple example; invoice with table output of flight booking for one customer
SF_EXAMPLE_02
Similar to SF_EXAMPLE_01 but with subtotals
SF_EXAMPLE_03
Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all
form outputs are included in an output request
Smart forms Frequently Asked Questions
Forcing a page break within table loop
Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want.
Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node.
Font style and Font size
Goto Transaction SMARTSTYLES.
There you can create Paragraph formats etc just like in sapscript.
Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use the Paragraph and character formats.
Line in Smartform
Either you can use a window that takes up the width of your page and only has a height of 1 mm.
Then you put a frame around it (in window output options).
Thus you have drawn a box but it looks like a line.
Or you can just draw "__" accross the page and play with the fonts so that it joins each UNDER_SCORE.
Difference between 'forminterface' and 'global definitions' in global settings of smart forms
The Difference is as follows.
To put it very simply:
Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out
from the smartform to the print program).
Global defs. is where you declare data to be used within the smartform on a global scope.
ie: anything you declare here can be used in any other node in the form.
Smartforms function module name
Once you have activated the smartform, go to the environment -> function module name. There you can get the name of funtion module
name.
The key thing is the program that calls it. for instance, the invoice SMARTFORM LB_BIL_INVOICE is ran by the program RLB_INVOICE.
This program uses another FM to determine the name of the FM to use itself. The key thing is that when it calls this FM (using a variable to
store the actual name), that the parameters match the paramters in your smartform.
Another thing to note is that the FM name will change wherever the SF is transported to.
So you need to use the FM to determine the name of the SF.
Here is the code that can be use to determine the internal name of the function module:
Code:
if sf_label(1) <> '/'. " need to resolve by name
move sf_label to externalname.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = externalname
importing
fm_name = internalname
exceptions
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
message 'e427'.
endif.
move internalname to sf_label.
endif.
It checks to see if the sf_label starts with a '/', which is how the internal names start. if it does, the name has already been converted. If
not, it calls the FM and converts the name.
You would then CALL FUNCTION sf_label.
Smartforms FAQ Part Two
Smartforms output difference
Problem with Smartforms: in a certain form for two differently configured printers, there seem to be a difference in the output of characters
per inch (the distance between characters which gives a layout problem - text in two lines instead of one.
It happens when the two printers having different Printer Controls' if you go to SPAD Menu (Spool Administrator Menu) you can see the
difference in the Printer Control and if you make the Printer control setting for both the printers as same. then it will be ok. and also u have
to check what is the device type used for both the output devices.
SmartForms Output to PDF
There is a way to download smartform in PDF format.
Please do the following:
1. Print the smartform to the spool.
2. Note the spool number.
3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the
noted spool number.
SmartForm Doublesided printing question
Your customer wants your PO SmartForm to be able to print "Terms and Conditinos" on the back side of each page. They don't want to
purchase pre-printed forms with the company's logo on the front and terms & conditions on the back. Now this presents an interesting
problem.
Has anyone else ever had a request like this? If for example there was a 3 page PO to be printed, they want 3 pieces of paper, the front
side of each to containe the PO information (page 1, 2, and 3) and the back side of each piece of paper to containg the static "Terms &
Conditions" information.
Anyone have a clue how to force this out?
Easy - page FRONT lists page CONTACTS as next page and CONTACTS lists FRONT as next page. Since CONTACTS does not contain a MAIN
window, it will print the contacts info and then continue on to FRONT for the rest of the main items. Additionally, set print mode on FRONT to
D (duplex) and set CONTACTS to 'blank' (for both resource name and print mode - this is the only way to get to the back of the page).
Transport Smart Forms
How does one transport SMARTFORM? SE01?
How do you make sure that both, the SMARTFORM & it's function module gets transported? Or does the FM with same name gets generated
automatically in the transported client?
A smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer,
it will be transported.
The definition is transported, and when called, the function module is regenerated.
This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the
source system. Make sure, before you call the function module, you resolve the external name to the internal name using the
'SSF_FUNCTION_MODULE_NAME' function module.
Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from
the above function module.
Smartforms: protect lines in main window.
How to protect lines in the main window from splitting between pages?
It was easy with SAPscript, but how to do it with SF's. For 4.7 version if you are using tables, there are two options for protection against
line break:
- You can protect a line type against page break.
- You can protect several table lines against page break for output in the main area.
Protection against page break for line types
- Double-click on your table node and choose the Table tab page.
- Switch to the detail view by choosing the Details pushbutton.
- Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on
one page.
Protection against page break for several table lines
- Expand the main area of your table node in the navigation tree.
- Insert a file node for the table lines to be protected in the main area.
- If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file
using Drag&Drop. Otherwise, create the table lines as subnodes of the file.
- Choose the Output Options tab page of the file node and set the Page Protection option. All table lines that are in the file with the Page
Protection option set are output on one page.
In 4.6, Alternatively in a paragraph format use the Page protection attribute to determine whether or not to display a paragraph completely
on one page. Mark it if you want to avoid that a paragraph is split up by a page break. If on the current page (only in the main window)
there is not enough space left for the paragraph, the entire paragraph appears on the next page.
Details information about SAP Barcodes
A barcode solution consists of the following:
- a barcode printer
- a barcode reader
- a mobile data collection application/program
A barcode label is a special symbology to represent human readable information such as a material number or batch number
in machine readable format.
There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the
logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP
support natively in it's printing protocols.
You can print barcodes from SAP by modifying an existing output form.
Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as
the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format
language) or SmartForms that is more of a graphical form design tool.
Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most
important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on
the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not
normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses
specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.
Not to fear though, there are two ways to get around this:
- You can have your IT department do some research -
most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to
support the printing of barcodes.
- Secondly, you can buy software that you can upload in your SAP pri
regards..
seshu. -
WHAT R THE POSSIBLE INTERVIEW QUESTIONS IN SMARTFORMS?
Smart forms Frequently Asked Questions
Forcing a page break within table loop
Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node.
Font style and Font size
Goto Transaction SMARTSTYLES.
There you can create Paragraph formats etc just like in sapscript.
Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use the Paragraph and character formats.
Line in Smartform
Either you can use a window that takes up the width of your page and only has a height of 1 mm.
Then you put a frame around it (in window output options).
Thus you have drawn a box but it looks like a line.
Or you can just draw "__" accross the page and play with the fonts so that it joins each UNDER_SCORE.
Difference between 'forminterface' and 'global definitions' in global settings of smart forms
The Difference is as follows.
To put it very simply:
Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program).
Global defs. is where you declare data to be used within the smartform on a global scope.
ie: anything you declare here can be used in any other node in the form.
Smartforms function module name
Once you have activated the smartform, go to the environment -> function module name. There you can get the name of funtion module name.
The key thing is the program that calls it. for instance, the invoice SMARTFORM LB_BIL_INVOICE is ran by the program RLB_INVOICE.
This program uses another FM to determine the name of the FM to use itself. The key thing is that when it calls this FM (using a variable to store the actual name), that the parameters match the paramters in your smartform.
Another thing to note is that the FM name will change wherever the SF is transported to.
So you need to use the FM to determine the name of the SF.
Here is the code that can be use to determine the internal name of the function module:
Code:
if sf_label(1) <> '/'. " need to resolve by name
move sf_label to externalname.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = externalname
importing
fm_name = internalname
exceptions
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
message 'e427'.
endif.
move internalname to sf_label.
endif.
It checks to see if the sf_label starts with a '/', which is how the internal names start. if it does, the name has already been converted. If not, it calls the FM and converts the name.
You would then CALL FUNCTION sf_label.
Smartforms FAQ Part Two
Smartforms output difference
Problem with Smartforms: in a certain form for two differently configured printers, there seem to be a difference in the output of characters per inch (the distance between characters which gives a layout problem - text in two lines instead of one.
It happens when the two printers having different Printer Controls' if you go to SPAD Menu (Spool Administrator Menu) you can see the difference in the Printer Control and if you make the Printer control setting for both the printers as same. then it will be ok. and also u have to check what is the device type used for both the output devices.
SmartForms Output to PDF
There is a way to download smartform in PDF format.
Please do the following:
1. Print the smartform to the spool.
2. Note the spool number.
3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the
noted spool number.
SmartForm Doublesided printing question
Your customer wants your PO SmartForm to be able to print "Terms and Conditinos" on the back side of each page. They don't want to purchase pre-printed forms with the company's logo on the front and terms & conditions on the back. Now this presents an interesting problem.
Has anyone else ever had a request like this? If for example there was a 3 page PO to be printed, they want 3 pieces of paper, the front side of each to containe the PO information (page 1, 2, and 3) and the back side of each piece of paper to containg the static "Terms & Conditions" information.
Anyone have a clue how to force this out?
Easy - page FRONT lists page CONTACTS as next page and CONTACTS lists FRONT as next page. Since CONTACTS does not contain a MAIN window, it will print the contacts info and then continue on to FRONT for the rest of the main items. Additionally, set print mode on FRONT to D (duplex) and set CONTACTS to 'blank' (for both resource name and print mode - this is the only way to get to the back of the page).
Transport Smart Forms
How does one transport SMARTFORM? SE01?
How do you make sure that both, the SMARTFORM & it's function module gets transported? Or does the FM with same name gets generated automatically in the transported client?
A smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer, it will be transported.
The definition is transported, and when called, the function module is regenerated.
This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the 'SSF_FUNCTION_MODULE_NAME' function module.
Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module.
Smartforms: protect lines in main window.
How to protect lines in the main window from splitting between pages?
It was easy with SAPscript, but how to do it with SF's. For 4.7 version if you are using tables, there are two options for protection against line break:
- You can protect a line type against page break.
- You can protect several table lines against page break for output in the main area.
Protection against page break for line types
- Double-click on your table node and choose the Table tab page.
- Switch to the detail view by choosing the Details pushbutton.
- Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on one page.
Protection against page break for several table lines
- Expand the main area of your table node in the navigation tree.
- Insert a file node for the table lines to be protected in the main area.
- If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file using Drag&Drop. Otherwise, create the table lines as subnodes of the file.
- Choose the Output Options tab page of the file node and set the Page Protection option. All table lines that are in the file with the Page Protection option set are output on one page.
In 4.6, Alternatively in a paragraph format use the Page protection attribute to determine whether or not to display a paragraph completely on one page. Mark it if you want to avoid that a paragraph is split up by a page break. If on the current page (only in the main window) there is not enough space left for the paragraph, the entire paragraph appears on the next page.
also refer
http://searchsap.techtarget.com/general/0,295582,sid21_gci1110010,00.html
http://www.sapbrainsonline.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
<a href="http://myweb.dal.ca/hchinni/sap/smartforms/SmartForms.doc">very good one</a>
regards,
srinivas
<b>*reward for useful answers*</b> -
Regarding smart forms (really urgent)
hi,
i am new to smartforms and i got report to make changes in the smart forms,plzz help me out as i know nothing about the smart forms by providing me it in easiest & simplest form.
if find useful help will be deifnately rewarded.
Edited by: ric .s on Mar 6, 2008 5:16 AMHi,
This Smartform Information I read, really helped me out.
I think it would be of some good help to you too..
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.
Advantages of SAP Smart Forms
1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
2. Displaying table structures (dynamic framing of texts)
3. Output of background graphics, for form design in particular the use of templates which were scanned.
4. Colored output of texts
5. User-friendly and integrated Form Painter for the graphical design of forms
6. Graphical Table Painter for drawing tables
7. Reusing Font and paragraph formats in forms (Smart Styles)
8. Data interface in XML format (XML for Smart Forms, in short XSF)
9. Form translation is supported by standard translation tools
10. Flexible reuse of text modules
11. HTML output of forms (Basis release 6.10)
12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)
A Simple Smartform Tutorial
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.
Additional Fonts for your SMARTFORMS
You can create additional fonts and style with transaction SMARTSTYLES
This can then be define in the paragraph and character formats, which you can then be assign to texts and fields in the Smart Form.
The character formats includes effects such as superscript, subscript, barcode and font attributes.
Difference with SMARTFORMS vs. SapScript(SE71)
The Following are the differences :-
a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
b) It is possible to have a smartform without a main window .
c) Labels cannot be created in smartforms.
d) Routines can be written in smartforms tool.
e) Smartforms generates a function module when activated.
f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
FAQ on Migrating SAPscript to SmartForms
Is it possible to migrate a SAPscript form to a Smart Form?
Smart Forms provides a migration tool for this purpose which migrates layout and texts of a SAPscript form to a Smart Form. It does not migrate SAPscript form logic of the print program. Using Smart Forms, this logic is described by the tree structure of the Form Builder. The effort involved in migrating it depends on the complexity of the print program.
Which Basis Release do I need to use SAP Smart Forms?
SAP Smart Forms is available as of R/3 Basis Release 4.6C.
I have heard that Smart Forms replaces SAPscript. What does "replace" mean?
It does not mean that SAPscript is removed from the Basis shipment. Even as of Basis Release 4.6C, SAPscript remains part of the SAP standard and there are no plans to remove it. Since Smart Forms is currently, and will continue to be, the tool for form maintenance for mySAP.com solutions, our further development efforts will focus on Smart Forms, not on SAPscript.
Do we have to migrate all SAPscript forms to Smart Forms?
There is no point in migrating all SAPscript forms already in use. Since SAPscript can still be used and will be available in the future, there is no need to. If you plan to migrate a SAPscript form, it is recommended that you check whether benefit is worth the effort involved
Conversion of SAPSCRIPT to SMARTFORMS
SAP provides a conversion for SAPscript documents to SMARTforms.
This is basically a function module, called FB_MIGRATE_FORM. You can start this function module by hand (via SE37), or create a small ABAP which migrates all SAPscript forms automatically.
You can also do this one-by-one in transaction SMARTFORMS, under
Utilities -> Migrate SAPscript form.
You could also write a small batch program calling transaction SMARTFORMS and running the migration tool.
SmartForms System Fields
Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
System fields of Smart Forms
&SFSY-DATE&
Displays the date. You determine the display format in the user master record.
&SFSY-TIME&
Displays the time of day in the form HH:MM:SS.
&SFSY-PAGE&
Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
&SFSY-FORMPAGES&
Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
&SFSY-JOBPAGES&
Contains the total page number of all forms in the currently processed print request.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
Example Forms Available in Standard SAP R/3
SF_EXAMPLE_01
Simple example; invoice with table output of flight booking for one customer
SF_EXAMPLE_02
Similar to SF_EXAMPLE_01 but with subtotals
SF_EXAMPLE_03
Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
Smart forms Frequently Asked Questions
Forcing a page break within table loop
Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node.
Font style and Font size
Goto Transaction SMARTSTYLES.
There you can create Paragraph formats etc just like in sapscript.
Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use the Paragraph and character formats.
Line in Smartform
Either you can use a window that takes up the width of your page and only has a height of 1 mm.
Then you put a frame around it (in window output options).
Thus you have drawn a box but it looks like a line.
Or you can just draw "__" accross the page and play with the fonts so that it joins each UNDER_SCORE.
Difference between 'forminterface' and 'global definitions' in global settings of smart forms
The Difference is as follows.
To put it very simply:
Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program).
Global defs. is where you declare data to be used within the smartform on a global scope.
ie: anything you declare here can be used in any other node in the form.
Smartforms function module name
Once you have activated the smartform, go to the environment -> function module name. There you can get the name of funtion module name.
The key thing is the program that calls it. for instance, the invoice SMARTFORM LB_BIL_INVOICE is ran by the program RLB_INVOICE.
This program uses another FM to determine the name of the FM to use itself. The key thing is that when it calls this FM (using a variable to store the actual name), that the parameters match the paramters in your smartform.
Another thing to note is that the FM name will change wherever the SF is transported to.
So you need to use the FM to determine the name of the SF.
Here is the code that can be use to determine the internal name of the function module:
Code:
if sf_label(1) <> '/'. " need to resolve by name
move sf_label to externalname.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = externalname
importing
fm_name = internalname
exceptions
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
message 'e427'.
endif.
move internalname to sf_label.
endif.
It checks to see if the sf_label starts with a '/', which is how the internal names start. if it does, the name has already been converted. If not, it calls the FM and converts the name.
You would then CALL FUNCTION sf_label.
Smartforms FAQ Part Two
Smartforms output difference
Problem with Smartforms: in a certain form for two differently configured printers, there seem to be a difference in the output of characters per inch (the distance between characters which gives a layout problem - text in two lines instead of one. It happens when the two printers having different Printer Controls' if you go to SPAD Menu (Spool Administrator Menu) you can see the difference in the Printer Control and if you make the Printer control setting for both the printers as same. then it will be ok. and also u have to check what is the device type used for both the output devices.
SmartForms Output to PDF
There is a way to download smartform in PDF format.
Please do the following:
1. Print the smartform to the spool.
2. Note the spool number.
3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the noted spool number.
SmartForm Doublesided printing question Your customer wants your PO SmartForm to be able to print "Terms and Conditinos" on the back side of each page. They don't want to purchase pre-printed forms with the company's logo on the front and terms & conditions on the back. Now this presents an interesting problem.
Has anyone else ever had a request like this? If for example there was a 3 page PO to be printed, they want 3 pieces of paper, the front side of each to containe the PO information (page 1, 2, and 3) and the back side of each piece of paper to containg the static "Terms & Conditions" information.
Anyone have a clue how to force this out?
Easy - page FRONT lists page CONTACTS as next page and CONTACTS lists FRONT as next page. Since CONTACTS does not contain a MAIN window, it will print the contacts info and then continue on to FRONT for the rest of the main items. Additionally, set print mode on FRONT to D (duplex) and set CONTACTS to 'blank' (for both resource name and print mode - this is the only way to get to the back of the page).
Transport Smart Forms
How does one transport SMARTFORM? SE01?
How do you make sure that both, the SMARTFORM & it's function module gets transported? Or does the FM with same name gets generated automatically in the transported client?
A smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer, it will be transported.
The definition is transported, and when called, the function module is regenerated.
This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the 'SSF_FUNCTION_MODULE_NAME' function module.
Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module.
Smartforms: protect lines in main window.
How to protect lines in the main window from splitting between pages?
It was easy with SAPscript, but how to do it with SF's. For 4.7 version if you are using tables, there are two options for protection against line break:
- You can protect a line type against page break.
- You can protect several table lines against page break for output in the main area.
Protection against page break for line types
- Double-click on your table node and choose the Table tab page.
- Switch to the detail view by choosing the Details pushbutton.
- Set the Protection against page break checkbox in the table for the relevant line type. Table lines that use this line type are output on one page.
Protection against page break for several table lines
- Expand the main area of your table node in the navigation tree.
- Insert a file node for the table lines to be protected in the main area.
- If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file using Drag&Drop. Otherwise, create the table lines as subnodes of the file.
- Choose the Output Options tab page of the file node and set the Page Protection option. All table lines that are in the file with the Page Protection option set are output on one page.
Regards,
Rohini. -
How can we download smartforms under a transport request.
hi
my requirement is that i have to download all smartforms under a transport request using a report program, is thr any standard program in sap or anyone who have done it before.
thanks n regards.
pardeep kumarWrite a custom BDC program.
-
How can we download a smartform and sapscripts under a transport request.
hi abaper's
my requirement is that i have to download the transport request objects smartforms and sapscripts to do this i have to make a report, so that a person can run this report and enter the request number , then the objects smartform and sapscripts download automatically for him.
or is thr any standard report progrma available in sap system.
thanks & regards
pardeep kumarhi gopi
what is this i can read only 1 here.
Maybe you are looking for
-
Right way to build / use quad tree?
Hi, the quadtree data stucture seems so simple, and fits alot of problems, but coding it properly is a problem. The purpose of the tree is to find which objects are with in a visible area. So each node has dimensions x,y,width, height. And child a,b,
-
IPhoto, how is the best way to back up all my many photos?
I have on my iMac it is finder 10.5 iPhoto does not allow me to back up to USB only burn?
-
Since upgrading to iOS 6 on iPad my BT Internet mail has stopped working
I get the message " the POP server mail.btinternet.com is not responding" These settings i.e. mail.btinternet.com for both incoming & outgoing mail worked on my IPad until 2 days - and the same settings work fine on my iPhone and mac Am I missing som
-
OCA Next Level Certification.
Hi, This is Udhayakumar, i have completed 1Z0-007-ENU: Introduction to Oracle9i: SQL alone. Now i would like to continue further level in this certification, so i need know the following clarifications: 1. What are the next levels after this to compl
-
Keyboard shipped with Pavilion non-standard number keypad
Hello, I advised a friend to buy an HP Pavilion 550 desktop for use at her office. She is a bookkeeper and relies heavily on the number pad on the right side of the keyboard. The keyboard that shipped has a non-standard numeric keypad where the "0" k