To Create a Bar code prefix:
1)
Go to T-code - SPAD -> Full Administration -> Click on Device
Type -> Double click the device for which you wish to create the
print control -> Click on Print Control tab ->Click on change mode
-> Click the plus sign to add a row or prefix say SBP99 (Prefix must
start with SBP) -> save you changes , it will ask for request ->
create request and save
2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
The place where you are using the field value use like this
<C1> &itab-field& </C1>.
You will get the field value in the form of barcode.
Question 3:What is the difference between SAPSCRIPT and SMARTFORM?
The way SMARTFORM is developed and the way in which SCRIPT is developed is entirely different. Not listing down those here. That would be too much.
**************************
Question 3:What is the difference between SAPSCRIPT and SMARTFORM?
SAPSCRIPT
|
SMARTFORM
|
SAPSCRIPT is client dependent.
|
SMARTFORM is client independent.
|
SAPSCRIPT does not generate any Function module.
|
SMARTFORM generates a Function Module when activated.
|
Main Window is must.
|
You can create a SMARTFORM without a Main Window.
|
SAPSCRIPT can be converted to SMARTFORMS. Use Program SF_MIGRATE.
|
SMARTFORMS cannot be converted to SCRIPT.
|
Only one Page format is possible
|
Multiple page formats are possible.
|
Such thing is not possible in SCRIPT.
|
You can create multiple copies of a SMARTFORM using the Copies Window.
|
PROTECT … ENDPROTECT command is used for Page protection.
|
The Protect Checkbox can be ticked for Page Protection.
|
The way SMARTFORM is developed and the way in which SCRIPT is developed is entirely different. Not listing down those here. That would be too much.
Question 19:
A system has two clients 100 and 500 on the same application server. If
you make changes to a SAPSCRIPT on client 100, will the changes be
available in client 500?
No. SAPSCRIPT is client dependent. You will have to transport changes from client 100 to client 500. However, for SMARTFORMS, Changes will be made both for client 100 and client 500.
No. SAPSCRIPT is client dependent. You will have to transport changes from client 100 to client 500. However, for SMARTFORMS, Changes will be made both for client 100 and client 500.
Smartforms interview 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.
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.
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.
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.
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 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.
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.
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?
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?
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.
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?
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.
- 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.
- 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.
- 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.
Sap scripts components –
The various component of the SAP script tools are:
1. Editor - Edits the text in a SAPscript form. The transaction of
an application automatically calls this editor if you need to maintain
texts related to the application.
2.Styles and Forms - Define and print the style and layout of SAPscript form.
3. Composer or From processor - Acts as central output module to prepare
final layout and text for an output device by including styles , various
formating options and the respective text.
4. Programming interface - Allows you to include SAPscript component into
ABAP program and control the output of forms from the program.
5. Database tables - Store texts, styles and forms.
how many times a main window can be placed on placed on the
same page in a layout
99 main windows we can place in same page Main00, Main01..... Main98
what is the differ b/w script and smartform
1) Script is Client Dependent.
Smartforms are Client InDependent.
2) Multiple Page formats are possible in Smartforms.
Multiple Page formats are notpossible in Scripts.
3) We can maintain Background Graphics in Smartforms.
4) Scripts doesnot generate any Functionmodules.
Smartforms generate Functionmodules.
5) We can add colours in Smartforms
We cannot add colours in Scripts
6) Scripts maintains 99 mainwindows .
Smartforms maintains only one Main window.
7) Smartforms are 100% portable by exporting to .xml format.
Scripts layouts are not portable. Even if we import a
Script into a smartform, its not 100% imported.
8) Templates are available in Smartforms but not in Scripts.
why scripts are client dependent and smart forms are client
independent.?
when u create a smart form it will store in the form of
function module program.where several clients can call that
fn module where they want to..so it is client independent.
sap script is a word processing tool which displays data on
the form with the help of text elements where the logic of
those is written in the print program and Forms were
designed to be driven from print program, hence are often
termed as client dependent.
Smart forms are client independent. Bcoz it doesn’t use any
text elements. it will be executed through a function
module. When a print program calls a Smart Form, the form
itself takes over to produce output, without any further
direction from print program.
can we migrate custom defined smart form into adobe form, if
yes what are connecting settings we have to make in adboe form?
Yes we can migrate smartforms into adobe forms.
Additional settings are not required
In SFP transaction there is option in menu for migrate.Give
smartform name and it will be converted in adobe form.
Two components will be created when u migrate smartform
into adobe.
Interface and form.
i have created script logo.is that logo goes to develpment
to quality?
thru tranport request,using RSTXSCRP std program
can we transport text elements and text symblos in reports
from devlopment to quality?is it necessary?
once we created text element or text symbols..we must
assign text element to transport request through program
RSTXTRAN.
Types of window in smartforms –
There are four types of windows:
MAIN WINDOW.
SECONDARY WINDOW.
COPIES WINDOW.
FINAL WINDOW.
U ca have only one main window in smartforms.
how to convert sapscript to email.....
There are several ways to do this.
Best and most practiced way is convert script to PDF and
send this PDF as attachment in mail.We use
"CONVERT_OTF_2_PDF" function module to convert script to PDF.
We can also use "CONVERT_OTFSPOOLJOB_2_PDF" function module
to do this. In 4.7 version of SAP, we can use standard
program RSTXPDF2T to serve this purpose.
After converting script to PDF, we use
"SO_DOCUMENT_SEND_API" to send this PDF as attachment to mail.
In Sapscript ,
For example : I want to define font in Arial?
And that font is not available in my system ? how can i get
this font into my sapscript?
Go to SE73, select True type font installation button,then
in the font name give the font name and if required bold
and italic options select the attibute then in the font
name file parameter give the font file (.ttf format) then
execute the same.
How to write long-text in SAP scripts?
EX: I want to write text like below:
* Terms and Conditions:
1>....
2>....
3>....
use the function module read_text .
this is used to display the data from long text .
you can read the data from this function module and store it in
tdline that is in the export of the function module
using this statement in SAPSCRIPT INCLUDE ®UD-TXTUN&
OBJECT TEXT ID ADRS
by which function module we are going to put data into
sapscript ?
write_form for all the windows
read_text for standard text
How to put page-breaks in smartforms?
in smartfoms under loop statement in data tab select event
on sort end checkbox .then one event on sort end node will
be displayes just right click on this node & select
command option . then in command select go to new page
checkbox & give new page name .
Can we execute the script individually? If yes How? Else
what
we need to do so?
U can execute ur script individually. for that goto
utilities --> printing test. By doing so u can view the
texts placed in ur variable windows . but the text in Main
windows can be seen only when u run a driver program. For
tht goto se38 and from thr use function modules OPEN_FORM,
WRITE_FORM, CLOSE_FORM. Pass the Text elements in the
function module WRITE_FORM. and execute it. u can see the
output.
Are Layout sets Client independent?
no Clinet dependent
How do you assign a print program to a script?
we can assign print program andscript in NACE T-code in
the output type
Template & Table in Smartforms
Tables are the dynamic in nature.
Tables are used in main window.
Templates are static in nature.
They are used in secondary windows.
how to copy client to client in scripts?
If it is to copy script between clients then,
se71,
utilities-copy frm client.
Check Out the SAP Standard program: RSTXCPY
What is the use of PROTECT and ENDPROTECT?
in sap-scripts what u write the text in between ptotect and
endprotect it tryies to print the entire text in with in a
window if not possible checks another window if possible
print the entire text in that window there also not
possible how text to print in that window is possible print
that much of text remaining will print in another window.
eg:
mostly protect endprotect we are used in main window.
first it tries to print in main00 is not possible checks
the main01 is possible print it ohterwise how space is
sufficient print that much of text print and remaining will
print in main02.
why
u can call(r using) ssf_function_module_name in smartforms?
A function module is generated whenever a Smart Form is
activated. This Smart Form could be called from the driver
program by calling the function module generated in the
system directly.
But this is not an efficient way of calling Smart Form for
the following reason:
Whenever a Smart Form is generated, a function module is
generated and the naming convention for that Smart Form is
done internally by using Number range object or something
similar. Let us consider the function module name
as /1BCDWB/SF00000359. The function module for the next new
and activated Smart Form would be /1BCDWB/SF00000360, one
more than the previous one.
So when this Smart Form is transported from the development
to Quality or Production system, a new function module name
is generated according to the number series available in
that system. If the above program is transported to either
quality or production system, the program might go for a
dump as the function module is not available in that
system, because the number series generated in the for
example in development system will be different from that
of the quality system . To handle this situation, we use
the function module SSF_FUNCTION_MODULE_NAME to get the
name of the function module for a Smart Form dynamically.
If the form is not active, the function module
SSF_FUNCTION_MODULE_NAME raises the exception NO_FORM.
No comments:
Post a Comment