SAP ABAP SYNTAX FOR Editor Call

Basic form
EDITOR-CALL FOR itab.

Additions

1. ... TITLE text
2. ... DISPLAY-MODE

Effect

Displays the internal table itab in the ABAP/4 Editor. You can then use normal editor functions (e.g. insert, delete, search, replace) to make changes. When you save (with F11 ) or leave (with F3 ), any changes are adopted.

The return code value is set as follows:


SY-SUBRC = 0 Changes saved before leaving editor.
SY_SUBRC = 4 Changes not saved before leaving editor.

Notes

The internal table can contain only type C components.
The lines of the internal table can be up 72 characters long.

Addition 1

... TITLE text

Effect

Displays the specified text string (up to 30 characters) in the editor header line.

Addition 2

.. DISPLAY MODE

&ABAP_EFFETC& Calls the editor in display mode. You can neither make changes here nor switch to change mode.

Example

Define and fill the internal table T . Then, use EDITOR-CALL to present it to the user for modification. Finally, output the table.

DATA: BEGIN OF T OCCURS 200,
TEXT1(60),TEXT2(12),
END OF T.

T-TEXT1 = 'Text 1'. T-TEXT2 = 'A'. APPEND T.
T-TEXT1 = 'Text 2'. T-TEXT2 = 'B'. APPEND T.
T-TEXT1 = 'Text 3'. T-TEXT2 = 'C'. APPEND T.
T-TEXT1 = 'Text 4'. T-TEXT2 = 'D'. APPEND T.

EDITOR-CALL FOR T TITLE 'Editor for internal tables'.

LOOP AT T.
WRITE: / T-TEXT1, T-TEXT2.
ENDLOOP.

RELATED POST

SMART FORMS PART THREE
MySAP CRM and customer relationship management
My SAP CRM , Business Scenarios and SAP Solutions
Business View and Mysap.com
Customer Relationship Management Software and Interaction with Customer

No comments :

Post a Comment