Académique Documents
Professionnel Documents
Culture Documents
Answer: Roll area is nothing but memory allocated by work process. It holds the
information needed by R/3 about programs execution such as value of the variables.
Dispatcher :All the requests that come from presentation server will be directed first to
dispatcher. Further dispatcher sends this requests to work process on FIFO(First In and
First Out) basis.
1.A Search help is a ABAP Dictionary object used to define possible values (F4) help.
2.There are
elementary search helps, and thus provides more than one possible search path.
MATCH CODE OBJECT is used to call a particular search help and given along wirth the declaration of any
parameters or select-options
1 LOOP AT t_itab1.
2 WRITE: / t_itab1-name.
3 ENDLOOP.
4 LOOP AT t_itab2 INTO d_personnel.
WRITE: / d_personnel-name.
5
ENDLOOP.
6
Both codes will return the same result. Notice that using header line, we could directly use the table
variable name to access the table contents, whilst without header line, contents are accessed via a working
area.
Using header line can cause ambiguity in code, for example CLEAR t_itab2 means that you cleared entire
contents of table t_itab2, whilst the statement CLEAR t_itab1 will only clear the contents
oft_itab1 header. To clear the entire contents of internal table with header line, use brackets after
variable statement, ex: CLEAR t_itab1[].
Though it may seem more simple and easy to use header line, for some cases it might be best not to use it
to avoid ambiguity and to improve the readability of the program.
What is the difference between internal table and a work area and how do they
work?
Internal table is a temporary two dimensional memory structure similar to database
table. We can store multiple records in the internal table and also using record
pointers we can do the activities such as reading, appending, deleting, modifying etc.
Whereas work area is a variable declared with the TYPE of an internal table or a
database table. It can store only one record at a time. It is like a structure declaration
in C. You can refer individual columns in the work area with the names.
If you declare an internal table with "WITH HEADER LINE" clause the internal table
itself acts as a work area. For example, your ITAB is a work area and ITAB[] is the
internal table.
If you are familiar with ORACLE PLSQL, work area is similar to %ROW_TYPE and
internal is similar to TABLE TYPE.
A work area is nothing more than a structure which serves as a header line for an
internal table. When you read an internal table (without header line) the line which
you read must be moved somewhere, it is moved into a work area.
1. What are the differences between sap memory and abap memory
Within a main session, when ever you start an application program, it opens up an
internal sessions with in the main session. The internal session has a memory area
that contains the ABAP program and its associated data. So when ever you want
to pass data between two internal sessions, then you can use ABAP Memory (i.e
import, export).
When comes to SAP memory (also known as global memory), if the data has to be
passed b/w two main sessions, we can use SAP Memory(SPA/GPA Parameters).
SAP Memory can also be used to pass data b/w internal sessions.
AT SELECTION SCREEN:
when user enters the values in the fields of the selection screen and clicks on execution button,this event gets
triggered.this event is basically for checking the value entered by the user for the field of the selection screen i.e data
validity checking.this event is for entire selection screen.
This event is executed at PBO of the selection screen every time the user presses
ENTER - in contrast to INITIALIZATION . Therefore, this event is not suitable for setting selection screen default
values.
Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used)
and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters
or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of
selection screen fields.
Example
....
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 = 'XYZ'.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
ENDLOOP.
assigns all fields of the selection option NAME to a group you can read in the field SCREEN-GROUP1 .
At PBO of the selection screen, all these fields are then set to highlighted
****************DATA DECLARATIONS*********************
SELECT carrid " Airline Code
connid " Flight Connection Number
airpfrom " Departure airport
airpto " Destination airport
deptime " Departure time
arrtime " Arrival time
FROM spfli
INTO TABLE t_flight.
*"--------------------------------------------------------------------*
* PF-Status *
*"--------------------------------------------------------------------*
WHEN 'SELECT_ALL'.
w_check = 'X'.
*ADD 4 TO W_LINE.
w_line = 4 .
DO w_lines TIMES.
READ LINE w_line .
*"--------------------------------------------------------------------*
* AT LINE SELECTION EVENT *
*"--------------------------------------------------------------------*
AT LINE-SELECTION
WRITE :
/
w_check AS CHECKBOX,
w_mark,
fs_flight-carrid UNDER text-001,
fs_flight-connid UNDER text-002.
ENDLOOP.
This is just a sample code.You can use your own functionality and put them together.
1. AT LINE-SELECTION:
With this event, we can get the Index of Current/Previous list can be obtained for controlling the List.
For eg:
2. AT USER-COMMAND
3. AT PF-Status.
PF Status can also be used, by setting the keyword 'PICK' in the Status Menu.
5. What is Hide ?
HIDE statement in ABAP programming is used with lists. It used for storing the content
of field and list level information of the current list line in a hide area for our later use.
Syntax
HIDE <f>.
This statement will store the content of field <f> along with the current list line number
Syntax
HIDE dobj.
Effect
This statement stores the content of a variable dobj together with the current list line whose line number
is contained in sy-linno in the hide area of the current list level. The data type of the
variable dobj must be flat and no field symbols or components of Boxed Components can be specified
that point to rows of internal tables, and no class attributes can be specified. The saved values can be
read as followed:
Any user action on a displayed screen list that causes a list event assigns all values saved
using HIDE to the relevant variables.
If a list row of a list level is read or modified using the statements READ LINE or MODIFY LINE,
all the values of this row saved using HIDE are assigned to the relevant variables.
Notes
The HIDE statement works independently of whether the list cursor was set. In particular,
variables for empty list rows can be stored (that is, rows in which the list cursor was positioned
using statements like SKIP).
The HIDE statement should be executed directly in the statement that has set the list cursor in
the row.
Example
Saving square numbers and cubic numbers for a list of numbers. The example shows that any variable
can be stored independently of the row content. In the real world, one would more likely save only the
number and execute the calculation, when required, in the the event block for AT LINE-SELECTION.
REPORT ...
START-OF-SELECTION.
FORMAT HOTSPOT.
DO 10 TIMES.
square = sy-index ** 2.
cube = sy-index ** 3.
WRITE / sy-index.
HIDE: square, cube.
ENDDO.
AT LINE-SELECTION.
WRITE: square, cube.
Exceptions
Non-Catchable Exceptions
When occurs 1 internal table body size is one record is created ,For every New record it wil get that much memory,
When occurs 2 internal table body size is Two record is created ,For every New record it wil get that much memory,
so here memory is waisted so for every one record here two records space is created so
With OCCURS 0, the memory allocation will be dynamic (made by the system) and was usefull when you didn't know
what would be the size of the itab. Now, if you knew previously that itab would be 500 records at a time (for example,
read 3 files with 500 lines), was better to use OCCURS 500 (initial memory allocation made by you).
REPORT ZDYNAMIC_PROGRAM.
AT SELECTION-SCREEN.
if rb1 = 'X'.
else.
1) HELP_OBJECT_SHOW_FOR_FIELD
2) HELP_OBJECT_SHOW
A Remote Function Call (RFC) is the call or remote execution of a Remote Function
Module in an external system. In the SAP system, these functions are provided by
the RFC interface system. The RFCinterface system enables function calls between
two SAP systems, or between a SAP system and an external system.
Attachments:8
Added by Arpit Goyal, last edited by Arpit Goyal on Aug 20, 2009 (view change)
show comment
Go to start of metadata
RFC Destination is one of the way to connect from an ABAP system to an external system. This weblog talks about the basic
HTTP connection to external server (type G).
Business usecase from my area of expertise is connecting any R/3 system to a CE ESR (mainly for Proxy generation of
Services Modeled in ESR).
Step 1:
Go to transaction SM59.
As shown in the picture above, select the HTPP connection to external server and click on the Create icon (marked in red).
RFC Connection UI will come up. Fill in the necessary details as shown below:
Note that RFC Name should be unique, connection type should be Type-G.
Other information you need to enter is the host (or IP), Port and the Context root. The following URL should match the
service deployed on AS.
A good example to use the RFC destination will be to write a small ABAP code to establish connection to a servlet deployed
on AS. User can use HTTP protocol to invoke it from ABAP.
Step 3:
Click on the save icon and you will recieve an info message stating "HTTP connection may not be secure" which is true.
Press to continue.
Step 4:
Now most of the application which the RFC destination points to will require some basic authentication. And if it is not
provided part of the RFC destination, quite possible when the program uses the RFC Destination, it prompts for username-
password! So lets enter the logon & security details as shown
below:
Step 5:
Click on the save icon and now press on the connection test button to see whether the server is available or not. Incase
the entries point to the correct system, output should be somewhat similar as shown below:
More info:
- Incase wrong entries are provided error message comes at the status bar:
- Connection test DO NOT check the credentials. Even if wrong credentials are passed this information is not validated.
Three types:
Normal
Remote-enabled (RFC)
Update
15. What are tables?
Contain a single table. They are used to hold They are used to hold data from a few number of large
Used to store master data a large number of very tables.(stores system data)
small tables(stores
customizing data or
system data)
It has a one-to-one It has a many-to-one It has a many-to-one relationship with table in the
relationship with a table in relationship with a database
the database table in the database
For each transparent It is stored with other Many cluster tables are stored in a single table in the
table there is one pooled tables in a database called a table cluster
associated table in the single table called
database table pool in the
database
The database table has The database table The database table has different name, different number
the same name, same has different name, of fields and fields have different names
number of fields and the different number of
fields have the same fields and fields have
names different names
There is only a single Table pools contain Contains less tables than table pools
table more tables than table
clusters
Single table can have one Primary key of each Primary key of each table begins with same fields or
or more primary key table does not begin fields
with same fields or
fields
They can be accessed They can be accessed They can be accessed using open SQL only
using open and native using open SQL only
SQL
USE: They are used to USE: They reduce the USE: They would be used when the tables have primary
hold master data e.g. Table vendors or table of amount of database key in common and data in these tables are all accesses
customers. Example of transaction data is resources needed simultaneously
orders placed by customers when many small
tables have to be
opened at the same
time
A client-dependent table has the field MANDT of data type CLNT, which indicates Client id.
Table Maintenance is used to maintain the values of a custom table. Based on the requirements,
one can change or add/delete the contents of the custom table.
Table Maintenance generator is required to do Manual entries in the Table. If the requirement is
to update the table only programmatically and not manually then table maintenance generator is
not required. Manual entries in table can be maintained (New record can be inserted / existing
can be modified) using transaction SM 30, if the table maintenance for the table is generated.
19. What are the domains?
a domain is at the lowest level among the sub-elements of a table. it defines the data type and its length for example
char /4 (character 4). it has other characteristics such as fixed values etc.
a data element is at the next level and it can reference either a domain of SAP standard data types. it has
characteristics which are inherited by the fields of a table.
several data elements can refer to the same domain in their definitions.
it is not necessary to use a data elements for creating fields in a table. you can create fields by directly referencing
SAP standard data types.
There is no content to view in a structure. You can, however, view the definition of a structure in SE11.
at DDIC level both are same but a table in SAP has mapping
22. How to declare one internal table with out header line without using structures ?
No, we cannot declare internal table without header line and without structure because it gives
error ITAB cannot be a table, a reference, a string or contain any of these object.
TABLES : ZREKHA_EMP.
APPEND ITAB.
ENDSELECT.
LOOP AT ITAB.
ENDLOOP.
TABLES : ZREKHA_EMP.
END OF ITAB.
APPEND ITAB.
ENDSELECT.
LOOP AT ITAB.
ENDLOOP.
Syntax
This statement reads data from the file <dsn> into the variable <f>. In order to determine
into which variable you should read data from a file, you need to know the structure of the
file.
You can specify the transfer mode in the OPEN DATASET statement. If you have not already
opened the file for reading, the system tries to open it either in binary mode, or using the
additions from the last OPEN DATASET statement. However, it is good practice only to open
files using the OPEN DATASET statement. For further information about the OPEN DATASET
statement and the naming conventions for files, refer to
Opening a File.
If the system was able to read data successfully, SY-SUBRC is set to 0. When the end of the
file is reached, SY-SUBRC is set to 4. If the file could not be opened, SY-SUBRC is set to 8.
If you are working in binary mode, you can use the LENGTH addition to find out the length of
the data transferred to <f>. The system sets the value of the variable <len> to this length.
DATA FNAME(60) VALUE 'myfile'.
0 abcde 5
0 fghij 5
4 kl### 2
This example fills the file "myfile" with 12 bytes from the field TEXT1. It is then read into the
field TEXT2 in 5-byte portions. Note here that the system fills up the last three bytes of
TEXT2 with zeros after the end of the file has been reached. The number of bytes transferred
is contained in the field LENG.
If you are working in text mode, you can use the LENGTH addition to find out the length of
the current line in the file. The system sets the value of the variable <len> to the length of
the line. The system calculates this by counting the number of bytes between the current
position and the next end of line marker in the file.
12 4
12 8
This example writes the strings TEXT1 and TEXT2 to the file "myfile" in text mode. They are
then read into the string TEXT3 (length 2). The amount of memory occupied by the lines is
read into the field LENG.
Upload is function used to write data from a file in the presentation server to internal table.here you get a dialog- box
to enter the path of the file name.
Ws_upload also perfoms the same function , but without screen. here you do not get a dialog-box, rather you need to
type the path of the file name.
OPEN_FORM: This form opens the script. The module OPEN_FORM opens layout set printing.
WRITE_FORM: This form is used to write the content mentioned in the windows of the SAP Script.
START_FORM: This form is dynamically call a page in the script. The layout set can be changed in the current print
procedure with START_FORM. This may also be used to trigger a new-spool id.
You can have any number for WRITE_FORM, START_FORM and END_FORM, but for a script you can have only
one OPEN_FORM and CLOSE_FORM.
27. What are the page windows? How many main windows will be there in a page window?
In smartforms you can create 99 main windows. but in scripts only 1 main window is possble.
Double click on this window --> go to attributes select window type as main window.
As such first thing is to upload your logo to the R/3. Transaction is SE78. Have the logo file in .bmp format as that is
acceptable to R/3.
If you are using in Smartforms. Just make a window and right-click and attach image.
If you are using SAPScript then you have to use command INCLUDE.
29. How to debugg a script?
30. Tell me different standard layouts which we use?
31. sapscripts and abap programs are client dependent or not? why?
32 . What is LUW.
A Logical Unit of Work (LUW or database transaction) is an inseparable sequence of database operations which
must be executed either in its entirety or not at all. For the database system, it thus constitutes a unit.
Why Scripts are client dependent and Smart Forms are not
By Sirisha Vennelakanti, YASH Technologies
This blog is to understand why Sap scripts are client dependent and smart forms client independent.
To output documents using the programming interface, R/3 application programs makes use of scripts or
smart forms.
By design 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 doesnt 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.
Creation of Script
Print program will determine the output document, the areas values, and the frequency of the output. The
database access will be made in the print program which will insert them in the corresponding fields of the
form. Script needs direction from the print program to print output.
Scripts uses layout set that describes the layout of the individual print pages and uses text elements to
supply definable output blocks, which a print program can call.
Creation of smart form
Application program calls the function module, the Smart Form uses the modules interface (which
corresponds to the form interface) to transfer any table data previously selected and to print the form
according to the form description. In addition form can have additional data selections.
Further when you downloaded a script with the sap utility program RSTXSCRP,
You can see a script has repeated transfer of control SAP script texts are usually allocated to an
object from an SAP application. For example, there are texts on customers, vendors, and materials,
whose data is client dependent and whereas smart forms uses call to the function module only once
and all form processing is handled using the Function module
32. what are the different internal tables ? explain them?
33. what is runtime analysis ?
34. what si the difference between select singe * and select * upto one row
the query which is used to fetch single row from data base table alternative to SELECT SINGLE is SELECT UPTO 1
ROW....
The SELECT UPTO 1 ROW query also returns single data from database table...
the difference between both query is that SELECT SINGLE should be used when u have only KEY FIELDS in the
where clause...
in case of SELECT UPTO 1 ROW....there is no need of having KEY FIELDS in the where clause...
35. what is the differnce between sum and collect?
Sum will add the whole internal values and store in the first line of the internal
table..
Collect will add the common key values in the internal table and store in the corresponding key field.
36. what are session mothod and call transaction method and explain about them?
In this method, the ABAP/4 program In this method, ABAP/4 program read the
uses the call transaction <T-code > external data that is to be entered to the SAP
using <bdc_tab> mode <mode> system and stores the data in the batch input
update <update > method. session.
No batch input processing log Detailed Log will be generated for all the
sessions
While execution it starts from the While executing it wont start from the first. It will
first. start from the place where it ends with error.
37. If you have 10000 records i your file, which method you use in BDC?
38. what are diffrent modes and explain them?
If you use 'A' : While processing it will take you to all the screens for that transaction.
If you use 'N' : While processing it will not take you to all the screens for that transaction(NO screens will be
available).
If you use 'E' : While processing if any error occurs only that screens will be visible.
39. what are control events in a loop?
1. AT NEW f.
2. AT END OF f.
3. AT FIRST.
4. AT LAST.
5. AT fg.
40. what are the events we use in dialog programming? and explain them?
41. what are the differnces between se01 , se09 and se10?
SE01 especially for administrative purpose means administrator can achive all the tasks from here
In the SAP landscape, a client is an entity with independent information and data. The SAP client
concept is based on the fact that an application service provider (ASP) must provide and administer
all resources at a minimal cost, which is quite challenging in a multiple customer-client environment.
SAP provides the option of allocating each customer to a client, thereby removing the need to
provide separate physical systems for each customer. This helps reduce physical hardware and
sharing of hardware and related software, thereby reducing administration and support requirements
and facilitating clients and a large number of customers.
44. what is get cursor field?
AT LINE SELECTION is basically used when you are displaying in the Interactive reports. This is used once the
BASIC list is generated.
GET CURSOR FIELD is used to capture the cursor field in the output list and it is stored in the Field value " FVAL ".
REPORT ZTESTING.
end of it_vbak.
end of it_vbap.
START-OF-SELECTION.
select vbeln auart erdat from vbak into corresponding fields of table it_vbak where vbeln in s_vbeln.
endif.
END-OF-SELECTION.
loop at it_vbak.
write : / it_vbak-vbeln,
it_vbak-auart,
it_vbak-erdat.
endloop.
write : /.
at line-selection.
if sy-lsind = 1.
CONDENSE FNAM.
CONDENSE FVAL.
lv_vbeln = fval.
EXPORTING
INPUT = lv_vbeln
IMPORTING
OUTPUT = lv_vbeln.
if fnam = 'IT_VBAK-VBELN'.
it_vbap-posnr,
it_vbap-matnr.
endloop.
endif.
endif.
Effect
This statement assigns the content of a row stored in the list buffer to the system field sy-lisel, and
allows other target fields to be specified in result. In addition, all values for this row stored
with HIDE are assigned to the respective variables.
The row to be read is specified with the addition LINE or with CURRENT LINE.
46. what are the diff. between call screen and leave screen?
47. what is the transaction code for Table maintenance?
48. what are the differences between CALL SCREEN , LEAVE SCREEN ?
49. Interactive Reporting.
what is the event that in used in classic reporting and cannot be
used in interactive reporting?
A message is not displayed, but instead is written as follows to the background processing log (Joblog)
depending on the message type:
Messages of type "S" are written to the log and the program is continued.
Messages of type "I" and "W" are written to the log and the program is continued. The user
input Enter, which is required to continue the program, is generated automatically.
Messages of type "E" and "A" are written to the log. A check is then performed and if applicable,
the message is handled with error_message. If this is not the case, the message is also written
to the log with message number 564 of the message class 00 and current background processing
is interrupted, whereby a message of type "A" executes a database rollback. When the message
is processed, background processing is continued.
The COLLECT statement checks weather the work area record already exists with
same key field value (the key field must be of type C, N, D, T).
3) DIFFERENCE BETWEEN
V1 TYPE D and V1 like sy-datum.
v1 : when date is assigned then not formated .format is ddmmyyyy.
v2 : when date is assigned then formated .format is dd.mm.yyyy.
10)What is Node?
a node can be a root node or child node in LDB( logical data base ) and it has to be either database table or
a dictonary type. otehr 2 are there but only for your information pourpose..
data types and dynamic type nodes.
13) Can data be transferred from SAP to non-SAP system through LSMW?
ya it can be ..but for that idocs are to be used.
16) Which stmnt bypasses Buffering (correct option can be more than one)
a)Select.
b)Selectinto..
c) Select..distinct.. passes buffering .
Selectfor update..
SAP SCRIPT
Operations on the whole SAPscript form and concepts
To stop debugging, you must print the SAPscript form, and click Exit button in the debugger window when it is displayed.
I have created a SAPscript in language DE. Now I need to translate it
to EN. How could I do this?
If any text modules or texts have to be translated within the SAPscript, then it can be done using SE63 transaction.
In the transaction SE71, enter the Form name and choose the menu, Utilities->Copy from client to copy SAPscripts from one
client to another.
3. On the Table Content Selection Screen, Type the SAPscript Name for which we have find the Driver Program in
the field FONAM and execute(F8)
4. PGNAM field of the result display contains the Driver Program Name for our SAPscript
In the form go to basic settings--> you can find a landscape option --> click on it and at the bottom. You can find the page
option enter the page name for which you want to assign ladscape format.
(this can be used for static forms which always print the same number of pages)
Yes, but you must call WRITE_FORM function module at least once (even with a non-existing element or window!)
If there is more than one page, you may need to force the next page to be printed by calling CONTROL_FORM function
module with command NEW-PAGE (PAGE2 for example)
Table STXH, with field values tdobject = 'FORM' and tdid = 'TXT' and tdname = form name
Most of applications use NACE transaction, but there are also Print Workbench, Post-Processing Framework.
Start SMARTFORMS transaction, Goto Menu path Utilities -> Migration -> Import SAPscript Form.
2. Select the names and the language of the SAPscript forms and choose Execute.
The system creates the Smart Forms under the names of the SAPscript forms plus the extension _SF.
It displays a list of the migrated forms.
3. To change and adapt a form, go to transaction SMARTFORMS. Then activate the changed Smart Form.
Windows are defined in the Layout sets which define the position and the text to displayed.
Elements
You can create Boxes in the SAPscript using the BOX command specifying the x,y co-ordinates and the width and the height
/: BOX XPOS '0' CM YPOS '0.5' CM WIDTH '9.2' CM HEIGHT '3.5' CM FRAME 8 TW
Use the addition INTENSITY in the BOX command to apply gray shading to the boxes.
This will create a box with the given height and width and shading it with 15% intensity (you also need to provide X,Y
positions).
To enter a tab, use ,, (2 commas). Then, in the Paragraph Format tab, create a new paragraph format. In the "Tabs" Tab,
enter the tab position and the alignment for the fields.
You can create standard texts using the transaction SO10. Then to insert these standard texts in the SAPscript choose the
menu, Insert->Text->Standard and choose the standard text that you want to choose.
Alternatively, you can display standard texts in your SAPscripts using the command:
/: INCLUDE ZSTEXT OBJECT TEXT ID ST LANGUAGE EN
Use the Function Module RKD_WORD_WRAP to wrap the text and use this for output.
<C1>&vbeln&</>
where C1 is the character format created and vbeln is the variable for which the barcode is to be created.
Use the program RSTXLDMC to convert the TIFF file to standard text.
Go to transaction SE78
In SE71 choose Insert->Graphics and then choose the image for display
How can I prevent page-break in the message that is to be displayed?
Enclose the text that you want to prevent page-break in PROTECT... ENDPROTECT
SAPscript will ensure that each line of this text is printed together on the same page.
Ie.If SAPscript finds that the text cannot be printed on that page completely a implicit page break occurs and the text is
printed on the next page
/: PROTECT
* Text
* Within
/: ENDPROTECT
&symbol(<)& Display leading sign to forum: Ignored if the domain has "sign" option disabled (sign is never printed in
the Left (you may also use that case)
/: SET SIGN LEFT)
Formatting Meaning Comment
option
&symbol(>)& Display leading sign to forum: Ignored if the domain has "sign" option disabled (sign is never printed in
the right (you may also that case)
use /: SET SIGN RIGHT)
&symbol(.N)& Display upto N decimal Do not use a field related to a currency code or unit of measure (as these last
places define the number of decimals), otherwise you'll get error SSFCOMPOSER602
(Field &2: Incorrect formatting option "&1") while outputting the form
&symbol(K)& Ignore conversion routine forum: "K option works only for Character-like variables (char, date, time,
numc), string and Integer. It doesn't work for packed, float and other types (see
routine CONVERT_SYMBOLVALUE in include LSTXVFCD)"
You may combine options, for example: &symbol(8R)& which means right-aligned inside 8 characters
&DATE& Currentdate
&DAY& Day
&MONTH& Month
&YEAR& Year
&HOURS& Hours
&MINUTES& Minutes
&SECONDS& Seconds
&PAGE& Page
&SPACE& Blank
&ULINE& Underline
The date fields in SAPscripts can be formatted using the SET DATE MASK control command.
The following are the codes that can be used in the date mask:
YY Year (2 digits)
MM Month (2 Digits)
Using the SET DATE MASK causes the subsequent date fields to be displayed using the same formatting. To return to the
default formatting use the following command:
For more information, see SAP Library - SAPscript - Formatting Date Fields: SET DATE MASK
Similar to SET DATE MASK for date fields we can use SET TIME MASK for formatting time fields.
The following are the codes that can be used in the time mask:
HH Hours
MM Minutes
SS Seconds
The time formatting can be reset to the default setting using:
For more information, see SAP Library - SAPscript - Formatting Date Fields: SET TIME MASK
In the first case of 'Customer : &KNA1-KUNNR&', the text 'Customer : ' is displayed regardless of the variable
KNA1-KUNNR even if it has initial value
In the second case of '&Customer : KNA1-KUNNR&', the text 'Customer :' and KNA1-KUNNR is displayed only
when the variable KNA1-KUNNR has non-initial value
For more information, see SAP Library - SAPscript - Formatting options - Preceding and Subsequent Texts (Pre-Text / Post-
Text)
The POSITION command is used to x, y coordinate position which is used by the BOX command. The offset from the
current window positions are specified which could be either positive or negative.
Similarly the SIZE command sets the width and height parameters.
Control commands
You can use the NEW-WINDOW command to call the other main window explicitly in the form, even if the current main
window is not full. We can create upto 99 Main Windows. This Main windows are generally used to create labels or to write
Addresses.Need to write this in the Main window.
/: NEW-WINDOW
How can I trigger new page in SAPscripts?
/: NEW-PAGE
You can explicitly trigger a page not in sequence by specifying the name pf page with the command NEW-PAGE
/: NEW-PAGE <pagename>
How can I set the header and footer in the main window?
The TOP...ENDTOP and BOTTOM...ENDBOTTOM commands are used to set the header and footer texts in the main
window respectively.
These texts will be displayed on the start and end of every new page in the output.
/: TOP
/: ENDTOP
/: IF...ELSE/ELSEIF...ENDIF
/: CASE...ENDCASE
Based on filter values, you can have different implementations of the same BADI. For example, if you have company
code as filter, these can be handled by different development teams belonging to the respective company code to suit
their individul requirements.
Text Tables
Use
You create text tables when you want to store explanatory text in several languages. It is not
advisable to store such texts in your primary table. You can make a text table that must
comprise the key of the primary table (for more information, see the example below). Every
text table must also have an additional language key field (field of data type LANG).
Delivery Class
Use
You use the delivery class to control the transport of table data for an installation, upgrade,
or client copy and transports between customer systems. The delivery class is also used in
the extended table maintenance.
Features
There are the following development classes:
G- Customer table, SAP can insert new data records but cannot overwrite or delete
existing ones. The customer namespace must be defined in table TRESC. To define the
customer namespace use reportRDDKOR54. You can start it directly from the table
maintenance by choosing Maintain Customer Namespace on the Delivery and
Maintenance tab.
E- System table with its own namespace for customer entries. The customer namespace
must be defined in table TRESC. To define the customer namespace use
report RDDKOR54. You can start it directly from the table maintenance by
choosing Maintain Customer Namespace on the Delivery and Maintenance tab.
Class C, G, E, S- The data records of the table are copied to the target client.
Class W, L- The data records of the table are not copied to the target client.
Class A- Data records are only copied to the target client if explicitly requested
(parameter option). It is not sensible to transport such data, but this is supported
nevertheless to allow the entire client environment to be copied.
Data Class
Use
If you choose the data class correctly, your table is automatically assigned to the
correct area (table space or DB space) of the database when it is created. Each data
class corresponds to a physical area in which all the tables assigned to this data
class are stored.
Data that is seldom changed. An example of master data is the data contained in an
address file, such as the name, address and telephone number.
Customizing data that is defined when the system is installed and seldom changed. An
example is the table with country codes.
Two further data classes, USR and USR1, are provided for the customer. These are
for user developments. The tables assigned to these data classes are stored in a
table space for user developments. In the following figure you can see tables
assigned to different data classes. The figure presents the tables in the ABAP
Dictionary and in the database.
Text Modules
Use
You use text modules to centrally store texts in the system that you frequently use in forms.
This detaches the text maintenance from the form maintenance so that you need not call
the
Features
SAP Smart Forms provide a text module maintenance function that allows you to create and
edit text modules. Similar to text nodes, text modules have the following characteristics:
They can be used cross-client
They are connected to the transport system
They are connected to the translation tools in the system
Sy-TABIX : SY-TABIX is a syatem variable which stores the
index current processing record of an internal table.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
How can we create a button is selection screen.
SELECTION-SCREEN :
FUNCTION KEY 1.
SELECTION-SCREEN :
FUNCTION KEY 2.
INITIALIZATION.
1. ABAP DEBUGGER.
2. ABAP RUNTIME ANALYSIS.
3. PERFORMANCE ANALYSIS.
https://www.sapnuts.com/faq/what-is-the-use-of-folder-in-smartforms.html
What are the differences between simple and interactive ABAP reports?
How the values will be passed to RFC Function module PassbyValue or Passbyreference?
What is the difference between the function module and a normal ABAP/4 subroutine?
In contrast to normal subroutines function modules have
uniquely defined interface.
Sub routines do not return values.
Sub routines do not return exceptions.
Sub routines cannot be tested independently.
Declaring data as common parts is not possible for
function modules. Function modules are stored in a central
library.
What are logical databases? What are the advantages/disadvantages of logical databases?
In interactive report if user 19 times double clicked, again he want to main screen.. how can
do this?
If Sy-ucomm ='BACK'. Leave to screen 0. Endif.
Can you move a Smartform from one SAP system to another without using transports?
How do you find the name of the Function Module for a Smartform?
In selection screen I have three fields, plant mat no and material group. If I input plant how
do I get the mat no and material group based on plant dynamically
AT SELECTION-SCREEN ON VALUE-REQUEST FOR
MATERIAL.
CALL FUNCTION ->
F4IF_INT_TABLE_VALUE_REQUEST to get material and
material group for the plant
How do you find the name of the Function Module for a Smartform? When is this function
module created?
I have 1 basic list and 15 secondary list in interactive report. If i am in 9th list, how can i come
directly to the basic list?
I have a Ztable, I wants to add one more field to the table without disturbing previous data,
what should I do ?
The only need of declaring ranges is when you are not taking
input from the user but you want make limit based selection at
that time it will be use full e.g. SELECT ** from ** where MATNR
in val_range .