How do you write a DATA object from ABAP/4 program to ABAP/4 memory and restore the same from memory to program.
EXPORT <f1> [FROM <g1>] <f2> [FROM <g2>] ... TO MEMORY ID <key>.
The ID <key>, which can be up to 32 characters long, identifies the data in memory.
Statement used to delete data objects in ABAP/4 memory.
FREE MEMORY [ID <key>].
How will you create a file on application server
Open dataset <dsn> for output.
ABAP/4 statement for opening a file on application server for reading ___________.
Open dataset <dsn> for input.
How will you transfer data into a file in application server ?
Data fname(60) value 'mYFILE'.
Data num type i.
Open dataset fname for output.
Do 10 times.
Num = Num + 1.
Transfer num to fname.
Enddo.
.....etc.
Name the function modules to write data from an Internal Table to the Presentation Server.
DOWNLOAD and WS_DOWNLOAD.
Name the function modules to read data from Presentation Server into an Internal Table.
UPLOAD and WS_UPLOAD.
Name the function module that can be used to give information about files on Presentation Server and about it's Operating System.
WS_QUERY.
Name the ABAP/4 key word for seaching a string in an Internal Table.
SEARCH <itab> FOR <str> <options>.
How would you find the attributes of a data type or data object ?
DESCRIBE FIELD <f> [LENGTH <l>] [TYPE <t> [COMPONENTS <n>]]
[OUTPUT-LENGTH <o>] [DECIMALS <d>]
[EDIT MASK <m>].
Which function module would you use to check the user's authorization to access files before opening a file?
AUTHORITY_CHECK_DATASET
Name the function module used to convert logical file names to physical file names in ABAP/4 programs.
FILE_GET_NAME.
What does CHAIN ....END CHAIN do?
Sometimes you want to check several fields as a group. To do this, include the fields in a FIELD statement, and enclose everything in a CHAIN-ENDCHAIN block.
Example
**** Screen flow logic: ****
CHAIN.
FIELD: SPFLI-CARRID, SPFLI-CONNID.
MODULE CHECK_FLIGHT.
ENDCHAIN.
When an error is found inside a chain, the screen is re-displayed, and all fields found anywhere in the chain are input-enabled. All non-chain fields remain disabled.
What does an extract statement do in the ABAP program?
Fills the fields groups with values.
What happens when a table is activated in DD?
-A table definition is generated
- Map to the database system
-For each table, a table of the same name with the same fields and
corresponding data type is created in database. – Primary index is generated automatically
What is a check table and what is a value table?
- When we define a foreign key in a table (A). If this key refers to primary key of another table (B). Table B is check table
Fields referring to a domain may assume values contained in the
corresponding fields of the value table. Field referring to the domain
should have a foreign key
What is CTS and What do you know about it? [ CTS is Correction and Transport Systems ]
- Correction system manages the internal system components like objects like only original version of the object exists. It stores all changes made to the object.
- Transport system allows to transports the object from on SAP system to another (Development system to Production system). It allows to over write or delete existing object in target system and import new objects to target systems.
During development work we start by opening a task (correction) to
which we can assign new and changed objects. Once changes have
been made, transport new or changed objects to other SAP system by
means of transport (Change) request.
Have you used SAP supplied programs to load master data?
- SAP supplied BDC programs – RM06BBI0 (Purchase requisitions)
- RMDATIND (Material master) RFBIKR00 (Vendor Masters)
- RFBIDE00 (Customer Master) RVINVB00 (Sales Order)
What are the Techniques involved in using SAP supplied programs? Do you prefer to write your own programs to load master data? Why?
- Identify relevant fields
- Maintain transfer structure ( Predefined – first one is always session record)
- Session record structure , Header Data, Item ( STYPE – record type )
- Fields in session structure – STYPE, GROUP , MANDT, USERNAME , NO DATA
- Fields in header structure – consists of transaction code also – STYPE, BMM00, TCODE,MATNR and Fields in Item - ITEMS …
- Maintain transfer file – sample data set creation
How do you set up background jobs in SAP? What are the steps? What are events driven batch jobs?
- Create a job using function module JOB-OPEN
- Collect the job specifications.
- Add a job step to the job with the function module JOB-SUBMIT.
- Close the job and pass it to Background processing system for execution with the function module JOB-CLOSE
- EVENT DRIVEN BATCH JOBS :-
- Types = System events – triggered when activation of new operation mode takes place
- User events - Triggered from ABAP/4 or external program.
- Triggering an event notifies the background processing that named condition has been reached. The Background system reacts by starting any jobs that were waiting for the event.
Transaction codes related to background jobs creation and processing are :-
SM36(Job creation)
SM37(Job selection and execution).
What are presentation and application servers in SAP?
-A presentation server is actually a program named Sapgui.exe. It is usually installed on a user’s workstation.
- Application server is a set of executables that collectively interpret the ABAP/4 programs and manage the input & output for them.
In an ABAP/4 program how do you access data that exists on a presentation server v/s on an application server?
- For presentation server use UPLOAD or WS_UPLOAD function modules.
For application server use OPEN DATASET, READ DATASET and CLOSE DATASET commands.
What is the difference between Synchronous and Asynchronous updates ?
- A program asks the system to perform a certain task, and then either waits or doesn't wait for the task to finish. In synchronous processing, the program waits: control returns to the program only when the task has been completed. In asynchronous processing, the program does not wait: the system returns control after merely logging the request for execution.
Transferring SPA/GPA Parameters to Transactions
To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-related SAP memory. You use the SAP memory to transfer values between programs beyond the borders of transactions. A user can access the values stored in the SAP memory during one terminal session for all modes used in parallel.
To fill an SPA/GPA parameter, use:
Syntax
SET PARAMETER ID <pid> FIELD <f>.
To read an SPA/GPA parameter into an ABAP program, use:
Syntax
GET PARAMETER ID <pid> FIELD <f>.
What is the difference between Commit-Work and Rollback-Work tasks ?
- Commit-Work statement “performs” many functions relevant to synchronized execution of tasks. Rollback-Work statement “cancels” all requests relevant to synchronized execution of tasks.
What are the different database integrities ?
- Semantic integrity
- Relational integrity
- Primary key integrity
- Value set integrity
- Foreign key integrity and
- Operational integrity.
What is SAP locking ?
- It is a mechanism for defining and applying logical locks to database objects.
What does a lock object involve ?
- The tables
- The lock argument.
What are the different kinds of lock modes ?
- Shared lock
- Exclusive lock
- Extended exclusive list.
How can a lock object be called in the transaction ?
- By calling Enqueue <lock object> and Dequeue <lock object> in the transaction.
What are the events by which we can program “help texts” and display “possible values lists” ?
- PROCESS ON HELP-REQUEST (POH)
- PROCESS ON VALUE-REQUEST (POV).
What are function modules ? Types of parameters ?
- Function modules are general-purpose library routines that are available system-wide.
- In general, function module can have four types of parameters:
- EXPORTING: for passing data to the called function
- IMPORTING: for receiving data returned from the function module
- TABLES: for passing internal tables only, by reference (that is, by address)
- CHANGING: for passing parameters to and from the function
How to send a report to the printer instead of displaying it on the screen ?
- We can send a report to the printer instead of displaying it on the screen. To do this, use the keywords TO SAP-SPOOL:
SUBMIT RSFLFIND ... TO SAP-SPOOL DESTINATION 'LT50'.
How can we send data to external programs ?
- Using SPA/GPA parameters (SAP memory)
- Using EXPORT/IMPORT data (ABAP/4 memory)
What are the differences between SELECT-OPTIONS,VARIANTS AND PARAMETERS?
To enter values for variables on the selection screen, you must define the variables using the PARAMETERS statement.
To enter a range of values for the variables on the selection screen we use SELECT-OPTIONS statement.
If you want to run the same report program with the same selections at regular intervals (for example, for monthly sales statistics), In, ABAP/4 offers you combine the desired values for all these selections in one selection set. Such a selection set is called a VARIANTS.
What is SPA / GPA ? When do you use it?
To fill the input fields of a called transaction with data from the report, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-related SAP memory. You use the SAP memory to transfer values between programs. A user can access the values stored in the SAP memory during one terminal session for all modes used in parallel.
Usually, the input fields on the initial screen of a transaction are connected to SPA/GPA parameters. If you fill these parameters from within your program before calling the transaction, the system fills the input fields with the corresponding values.
Why and how do you display a message? What are the message types?
An ABAP/4 module lets the system know that an error has occurred by issuing information,error or warning messages. you can also use success messages when a particular action is performed successfully. When the user presses ENTER, the current process is interrupted. The system returns the user to the SAP main menu using Abend message.
Message is displayed using MESSAGE Xnnn, where X is the type of the message and nnn is the number of the message.
You have to declare the Id of the message class in the program using
MESSAGE-ID cc,where cc is the message class.
How and where do You create Message class?
You can create a message class from two places in the system:
1) From an Object class object list (in the Object Browser)
2) From an ABAP/4 module (in the ABAP/4 editor)
What do you define in the Data element and Domain?
For Data Element
The information includes the field's representation on the screen in the form of FIELD TEXTS, COLUMN CAPTIONS in list outputs of the table contents and the format of the output via PARAMETER IDS and Online field documentation.
For Domain
Data Type,Field Length and the allowed data values are defined .
What is the difference between a pool table and a transparent table?
Transparent Table :
A tran table has a one to one relataionship in the database. The table in the dictionary has the same name, same no of fields, and the fields have the same name as in the R3 table defn. A transparent tabel has application data (Master and Transaction).
Pooled Table :
A pool table has many to one relation with the table in the database. For one table in the database there r many tables in the dictionary. Tha table in the database has a diff name than in the table in the data dict, it has diff no of fields and field names are different. A pooled table is stored in the pool at the database level. A table poo is a databse table with a special struct that enables the data of many R3 tables to be stored in it. It can hold only pooled tables.
What are field symbols and field groups? Have you used component idx of structure with field groups?
A field symbol does not physically reserve space for a field, but points to a field which is not known until runtime of the program. Field symbols are comparable to the concept of pointers as used in the programming language C.
An extract dataset consists of a sequence of records. These records may have different structures. All records with the same structure form a record type. You must define each record type of an extract dataset as a field group, using the FIELD-GROUPS statement.
What is the step by step process to create a table in data dictionary?
1. Selecting the table fields
2. Maintaining foreign keys
3. Creating secondary indexes (optional)
4. Maintaining technical settings
5. Activating a table
What is the advantage of structures and how do you use them in Abap/4 programs?
A structure is defined in the ABAP/4 Dictionary like a table and can be accessed from ABAP/4 programs. Any change to the definition of the structure in the ABAP/4 Dictionary is automatically implemented in all programs.
While data in tables is stored permanently in the database, structures contain data only during the runtime of a program.
Structures are used in abap/4 programs to transfer data between programs as it is globally defined.Structures are used in particular for defining data at the interface between module pools and screens and for standardizing parameters for function modules.
What does an extract statement do in the Abap/4 program?
With the first EXTRACT statement of a report, the system creates the extract dataset and adds the first extract record. With each subsequent EXTRACT statement, the system adds another extract record to the extract dataset.
What is a collect statement and how is it different from the append statement?
To fill an internal table with lines which have unique standard keys, we use the COLLECT statement.
If an entry with the same key already exists, the COLLECT statement does not append a new line as APPEND statement, but adds the contents of the numeric fields in the work area to the contents of the numeric fields in the existing entry.
What is an open SQL vs Native SQL.
Open SQL allows you to access all database tables known to the SAP system, regardless of the database manufacturer. Sometimes, however, we may want to use database-specific SQL statements called Native SQL in your ABAP/4 program.
To avoid incompatibilities between different database tables and also to make ABAP/4 programs independent of the database system in use, SAP has created a set of separate SQL statements called Open SQL. Open SQL contains a subset of standard SQL statements as well as some enhancements which are specific to SAP.
A database interface translates SAP's Open SQL statements into SQL commands specific to the database in use. Native SQL statements access the database directly.
What does an EXEC SQL statement do in ABAP? What is the disadvantage of using it?
To use a Native SQL statement, it must be preceded by an EXEC SQL statement and concluded by an ENDEXEC statement.
An ABAP/4 program with Native SQL statements does not generally run with different databases.
What are the events used in ABAP4?
The events are
• INITIALIZATION
• AT SELECTION-SCREEN
• AT SELECTION-SCREEN ON <field>
• START-OF-SELECTION
• TOP-OF-PAGE
• TOP-OF-PAGE DURING LINE SELECTION
• END-OF-PAGE
• END-OF-SELECTION
• AT USER-COMMAND
• AT LINE-SELECTION
• AT PF<NN>
• GET
• GET LATE.
• AT User Command
What is an interactive reports ? What is the obvious difference of such reports with HTML type reports?
Interactive reporting allows the user to participate actively in retrieving and presenting data during the session. Instead of one extensive and detailed list, with interactive reporting you create a condensed basic list from which the user can call detailed information by positioning the cursor and entering commands. Interactive reporting thus reduces information retrieval to the data actually required.
Detailed information is presented in secondary lists. A secondary list may either overlay the basic list completely or appear in an additional dialog window on the same screen. The secondary list can itself be interactive again.
Apart from creating secondary lists, interactive reporting also allows to call transactions or other reports from lists. These programs then use values displayed in the list as input values. The user can, for example, call a transaction from within a list to change the database table whose data is displayed in the list.
What happens when a table is activated in DD?
When the table is activated, a physical table definition in the database is added to the table definition stored in the ABAP/4 Dictionary. The database-independent table definition from the ABAP/4 Dictionary is translated into a definition of the relevant database.
What is a check table and What is a value table?
The relational data model contains not only tables, but also relationships between tables. These relationships are defined in the ABAP/4 Dictionary by foreign keys. An important function of foreign keys is to support data integrity in the relational data model. Foreign key fields may assume only those values allowed by the check table, in other words, values occurring in the primary key of the check table.
A foreign key provides a link between two tables, for eg.,T1 and T2 by including a reference in table T1 to the primary key of table T2. For this purpose, Foreign key fields assigned to the primary key fields of T2 are included in T1. Table T1, which is the one being checked, is called a foreign key table, and table T2 is called a check table. The terms dependent (foreign key) table and referenced (check) table are also used.
VALUE TABLE:If the domain of the check field has a value table, this is proposed by the system as check table in the foreign field maintenance. The key fields of the value table are in this case assigned fields of the foreign key table with the same domain. These fields may assume only those values allowed by the value table.
The value range of the domain can be defined by specifying value table.All table fields referring to this domain can then be checked against the corresponding field of this value table.In order the check can be executed, a foreign key must be defined for the value table.
What are matchcodes? Describe?
A matchcode is a tool to search for data records in the system. Matchcodes are an efficient and user-friendly search aid for cases where the key of a record is unknown.
It consists of two stages one is Match code object and the other is Matchcode ID.
A matchcode object describes the set of all possible search paths for a search term.
Matchcode ID describes a special search path for a search term.
What are ranges? What are number ranges?
It is often necessary to directly access individual records in a data structure. This is done using unique keys. Number ranges are used to assign numbers to individual database records for a commercial object, to complete the key. Such numbers are e.g. order numbers or material master numbers.
How do you validate the selection criteria of a report? And how do you display initial values in a selection screen?
The selection criteria is validated in the processing block of the AT SELECTION SCREEN event for the input values on the screen and respective messages can be sent.
To display initial values in the selection screen:
• Use INITIALIZATION EVENT
• Use DEFAULT VALUE option of PARAMETERS Statement
• Use SPA/GPA Parameters (PIDs).
What is the Client concept in SAP? What is the meaning of Client independent?
In commercial, organizational and technical terms, the client is a self contained unit in the R3 system, with separate set of Master data and its own set of Tables.
When a change is made in one client all other clients are affected in the system - this type of objects are called Client independent objects.
What is Internal table?
Internal tables are table objects that only exist for the runtime of the program. There are several ABAP statements for working with internal tables, for example, append, insert, delete, or find lines.
The number of lines of an internal table is extended dynamically at runtime as required.
You can use internal tables for table calculations on subsets of database tables. For example, you can read a part of one or more database tables into an internal table.
They also allow you to reorganize their contents to suit the needs of your program. You can, for example, read particular entries from one or more large customer tables into an internal table, and then use them to create a list. When you run your program, you can access this data directly, instead of having to search for each record in the database.
What is a variant and where do you use it?
If you want to run a report program with same selections at regular intervals (for example, for monthly sales statistics), you would not want to enter the same values each time. So, ABAP/4 offers you a possibility to combine the desired values for all these selections in one selection set. You can create as many different selection sets as you like for each report program and they remain assigned only to the report program in question. Such a selection set is called a variant.
Using Variants Online
Using Variants in Background Processing
Online, starting a report via variant saves the user work,minimizes input errors. In background processing, a variant is the only possibility you have to pass values for the selections.
To fill certain selections with values that change according to the application, you use a variant, which takes the variable values from Table TVARV.
What is set parameter and get parameter?
We can pass data to a called program using SPA/GPA parameters. SPA/GPA parameters are field values saved globally in memory. Each parameter is identified by a three-character code: you can define these parameters in the object browser by selecting Other objects on the first screen. The SPA/GPA storage is user-specific and valid throughout all the user's sessions.by using the SET PARAMETER or GET PARAMETER statements
These statements let you store and retrieve SPA/GPA values from an ABAP/4 program. If the selection screens for the two transactions do not share the same required fields, use these statements to store screen fields explicitly by name.
Before calling the new transaction from a PAI module, store the caller transaction's fields under one name:
SET PARAMETER ID 'RID' FIELD <FIELD NAME1>.
The system stores the value in <field name1> in the SPA parameter 'RID'. The three-character identifier 'RID' must be defined in the SAP table TPARA. If the SPA parameter 'RID' already contains a value, the SET PARAMETER statement overwrites it (with the contents of <FIELD NAME1>).
In the PBO module for the called transaction, retrieve the fields under the other name:
GET PARAMTER ID 'RID' FIELD <FIELD NAME2>.
What is field symbol?
A field symbol does not physically reserve space for a field, but points to a field which is not known until runtime of the program. Sometimes you only know which field you want to process, and how you want to process it, at runtime.
For this purpose, you can create field symbols in your program. At runtime, you can assign real fields to such field symbols. All operations which you have programmed with the field symbol are then carried out with the assigned field. After successful assignment, there is no difference in ABAP/4 whether you reference the field symbol or the field itself.
How to use a grid list?
Use Function Module Display_*LIST. In U’r program .Put all the data that U want to output in its final format and then pass this internal table to the function module
Two types of grid list .
DISPLAY_GRID_LIST(Version 4.0b)
DISPLAY_BASIC_LIST(Version 4.6b)
Calculate the subtotal etc and save it as a variant ,However while printing it will print all the enties of the fields
How to pass data from the form to the Subroutine program?
Use structure ITCSY
How can we pass selection and parameter data to a report ?
- There are three options for passing selection and parameter data to the report.
. using SUBMIT...WITH
. using a report variant
. using a RANGE table
Standard Programs that every ABAPer Shud Know
RSAVGL00 Table adjustment across clients
RSBDCSUB Release batch-input sessions automatically RSCLTCOP Copy
tables across clients
RSINCL00 Extended program list
RSORAREL Get the Oracle Release
RSPARAM Display all instance parameters
RSTXSCRP Transport SAPscript files across systems
RGUGBR00 Substitution/Validation utility
RSUSR003 Check the passwords of users SAP* and DDIC in all clients
RSUSR006 List users last login
RSTXLDMC To Load LOGO’s to application server
No comments:
Post a Comment