Register Login

Explain the EXPORT and IMPORT commands

Explain the EXPORT and IMPORT commands? How can you pass more than one group of data by using IMPORT commands?

EXPORT :-
To read data objects from an ABAP program into ABAP memory, use the following statement:
Syntax
EXPORT <f1> [FROM <g 1>] <f 2> [FROM <g 2>] ... TO MEMORY ID <key>.
This statement stores the data objects specified in the list as a cluster in memory. If you do not use the option FROM <f i >, the data object <f i > is saved under its own name. If you use the FROM <g i > option, the data objet <g i > is saved under the name <f i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
The EXPORT statement always completely overwrites the contents of any existing data cluster with the same name <key>.

IMPORT :-
To read data objects from ABAP memory into an ABAP program, use the following statement:
Syntax
IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO <g i > option, the data object <f i > in memory is assigned to the data object in the program with the same name. If you do use the option, the data object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
You do not have to read all of the objects stored under a particular name <key>. You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of whether it contained the data object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.

Explain the READ LINE and MODIFY LINE commands.
READ LINE :-
Use the statements READ LINE and READ CURRENT LINE to read data from the lines of existing list levels. These statements are closely connected to the HIDE technique.

MODIFY LINE :-
To modify the lines of a completed list from within the program, use the MODIFY LINE statement.

What are the differences between calling a program, transaction ‘with return’ and ‘without return’ and how can each be accomplished?
Program
SUBMIT <rep>|(<field>) [AND RETURN] [<options>].
If you use AND RETURN, the system stores the data of the calling executable program and returns to the calling after processing the called program. The system resumes executing the calling program at the statement following the call.
If you omit the AND RETURN addition, all data and list levels of the calling program (the entire internal session) are deleted. After the called executable program has finished, control returns to the level from which you started the calling program.

Transaction
CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>].
This statement saves the data of the calling program, and starts transaction <tcod>. At the end of the transaction, the system returns to the statement following the call in the calling report.
LEAVE TO TRANSACTION <tcod> [AND SKIP FIRST SCREEN].
This statement ends the calling program and starts transaction <tcod>. This deletes the call stack (internal sessions) of all previous programs. At the end of the transaction, the system returns to the area menu from which the original program in the call stack was started.

What are the differences between the parameter SET and GET?
SET PARAMETER ID <pid> FIELD <f>.
This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
GET PARAMETER ID <pid> FIELD <f>.
This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.

WHAT are the commands that allow you to process sequential file? And what is their syntax?
READ DATASET (reading) and TRANSFER (writing)
OPEN DTASET <dataset name> for <input output appending> in <binary text > mode at POSITION <position>   MESSAGE <field>
READ DATASET <dataset name > INTO <field>
CLOSE DATASET <dataset name>
DELETE DATASET <dataset name>
TRANSFER <field> to <dataset name>

What is the difference between opening a dataset for input, output, appending?

FOR OUTPUT
Opens the file for writing if exists it is overwritten if not then it is created.
FOR INPUT
Opens an existing file for reading.
FOR APPENDING
Opens the file for writing at the end of the file .If it does not exist, it is 
created, if opened, you  return to the end.    

When an internal table is created, the settings criteria for the value of occurs?
The objective of setting the value of an occurs for an internal table is a question of optimization. The following facts should be taken into account when making such decision.
1)    The complete data area of a program is 64000 bytes.
2)    The initial size declared is kept in roll area (quicker access to program)
3)    Data entered that exceeds the initial size stores in the roll file (Slower access to program)
You should also analyze the expected volume and access rates before making the decision.

Define "Check " statements, how it works?
To terminate a single loop pass conditionally, use the CHECK <condition> statement in the statement block of the loop.
If the condition is not true, any remaining statements in the current statement block after the CHECK statement are ignored, and the next loop pass starts. <condition> can be any logical expression.

Explain Field Group(extract dataset)?
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.
FIELD-GROUPS <fg>.
This statement defines a field group <fg>. A field group combines several fields under one name. For clarity, you should declare your field groups at the end of the declaration part of your program.
A field group does not reserve storage space for the fields, but contains pointers to existing fields. When filling the extract dataset with records, these pointers determine the contents of the stored records.


What is the difference between Move & assign statement?

Move :-
To assign the value of a data object <f1> to a variable <f2>, use the following statement:
MOVE <f1> TO <f2>.
or the equivalent statement
<f2> = <f1>.
The contents of <f1> remain unchanged. <f1> does not have to be a variable - it can also be a literal, a text symbol, or a constant. You must always specify decimal points with a period (.), regardless of the user’s personal settings.
Multiple value assignments in the form
<f4> = <f3> = <f2> = <f1>.

Assign :-
ASSIGN <f> TO <FS>.
When you assign the data object, the system checks whether the technical attributes of the data object <f> correspond to any type specifications for the field symbol <FS>. The field symbol adopts any generic attributes of <f> that are not contained in its own type specification. Following the assignment, it points to <f> in memory.


How do you run a report for a row in table?
Using Graphics Multiplexer. There is an option some thing similar to screen capture which captures data only. Using that data you can draw graphs (3D and 2D). This option is available all the time from Menu! -> Generate Graphics which captures the data then you need to drag and select the data you want to draw a graph on. Once you select you can click on Graphics, which launches graphics multiplexer.


×