Register Login

SAP ABAP Development FAQs

Updated Feb 16, 2024

Explain the READ LINE and MODIFY LINE commands.

READ LINE:

The READ LINE statement is utilized to retrieve data from existing list levels. Together with the READ CURRENT LINE statement, it facilitates data retrieval from specific lines within a list. These statements are often employed in conjunction with the HIDE technique.

MODIFY LINE:

The MODIFY LINE statement enables the alteration of completed list entries directly from within the program.

What are the differences between calling a program or transaction with a return and without a return and how can each be accomplished?

Program:

When invoking a program using the SUBMIT statement with the addition "AND RETURN," the system preserves the data of the calling program and resumes execution at the statement following the call after processing the called program. Omitting "AND RETURN" results in the deletion of all data and list levels of the calling program, with control returning to the level from which the calling program originated after the called program finishes.

Transaction:

Using CALL TRANSACTION with AND SKIP FIRST SCREEN saves the data of the calling program and initiates the specified transaction. Upon completion of the transaction, the control returns to the statement following the call in the calling report. On the other hand, LEAVE TO TRANSACTION concludes the calling program and starts the designated transaction, removing the call stack of all prior programs. After the transaction concludes, the control returns to the area menu from which the original program in the call stack originated.

What are the differences between the parameters SET and GET?

SET PARAMETER ID:

  • This statement stores the contents of a field under a specified ID in the SAP memory. If the ID does not exist, it creates a new parameter object.

GET PARAMETER ID:

  • It retrieves the value stored under a specific ID in the SAP memory into a variable. If the value is not found, it sets SY-SUBRC to 4; otherwise, it sets it to 0.

What are the commands that allow you to process sequential files? And what is their syntax?

Commands for processing sequential files include OPEN DATASET, READ DATASET, CLOSE DATASET, DELETE DATASET, and TRANSFER.

Syntax:

OPEN DATASET <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, and appending?

  • FOR OUTPUT: Opens the file for writing; if it exists, it is overwritten; if not, it is created.
  • FOR INPUT: Opens an existing file for reading.
  • FOR APPENDING: Opens the file for writing at the end; if it does not exist, it is created, and if opened, the pointer returns to the end.

When an internal table is created, what criteria are set for the value of occurs?

The value for OCCURS in an internal table is determined based on optimization considerations, considering factors such as available memory, expected data volume, and access rates.

Define "Check" statements, how do they work?

The CHECK statement is used to conditionally terminate a single loop pass. If the specified condition is false, any subsequent statements within the loop block are skipped, and the next iteration begins.

Explain Field Groups (extract dataset).

Field Groups are used to define record types for an extract dataset. Each record type within an extract dataset is declared as a field group using the FIELD-GROUPS statement. Field groups combine multiple fields under a single name for organizational clarity. They do not allocate storage space for the fields but instead contain pointers to existing fields. These pointers determine the contents of the stored records when filling the extract dataset.

What is the difference between the MOVE and ASSIGN statements?

  • MOVE: Copies the value of one data object to another.
  • ASSIGN: Assign a field symbol to point to a specific data object.

How do you run a report for a row in a table?

Running a report for a row in a table typically involves executing a transaction code or program that retrieves and displays data from the table. The method described using Graphics Multiplexer seems unrelated to running a report for a row in a table.


×