SAP---ABAP

Monday, November 26, 2007


Q) 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 [FROM ] [FROM ] . . . TO MEMORY ID .

This statement stores the data objects specified in the list as a cluster in memory. If you do not use the option FROM , the data object is saved under its own name. if you use the FROM option, the data object is saved under the name . the name identifies the cluster in memory. It ma be up to 32 characters long.

The EXPORT statement always completely overwrites the contents of any existing data cluster with the same name .

IMPORT :-
To read data objects from ABAP memory into an ABAP program, use the following statement :

Syntax:

IMPORT [TO ] [TO ] . . . FROM MEMORY ID .

This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO option, the data object in memory is assigned to the data object in the program with the same name. if you do use the option, the data object is read from memory into the field . the name identifies the cluster in memory. It may be up to 32 characters king.

You do not have to read all of the objects stored under a particular name . You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name , SY-SUBRC is set to 4. if, on the other hand, there is a data cluster in memory with the name , SY-SUBRC is always 0, regardless of whether it contained the data object . if the cluster does not contain the data object, the target field remains unchanged.

Q)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.


Q)What are the differences between calling a program, transaction ‘with return’ and ‘without return’ and how can each be accomplished?


Program

-SUBMIT | {field>) [AND RETURN] []

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 [AND SKIP FIRST SCREEN]
[USING ].

This statement saves the data of the calling program, and starts transaction . At the end of the transaction, the system returns to the statement following the call in the calling report.


-LEAVE TO TRANSACTION [AND SKIP FIRST SCREEN].

This statement ends the calling program and starts transaction . 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.




>>NEXT>>




No comments: