Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

TABLE CONTROL

PROGRAM ZTABLE.

CONTROLS TABLE TYPE TABLEVIEW USING SCREEN 1000.

DATA: ITAB TYPE TABLE OF ZTUSER WITH HEADER LINE.

DATA: cols LIKE LINE OF TABLE-cols.

DATA:

OK_CODE(20) TYPE C.

TABLES:

ZTUSER.

&----


*& Module STATUS_1000 OUTPUT

&----


  • text

----


MODULE STATUS_1000 OUTPUT.

SET PF-STATUS 'STATUS'.

SELECT * FROM ZTUSER INTO CORRESPONDING FIELDS OF TABLE itab.

ENDMODULE. " STATUS_1000 OUTPUT

&----


*& Module USER_COMMAND_1000 INPUT

&----


  • text

----


MODULE USER_COMMAND_1000 INPUT.

CASE OK_CODE.

WHEN 'BACK'.

READ TABLE ITAB INDEX TABLE-CURRENT_LINE.

IF SY-SUBRC <> 0.

ITAB-MANDT = TABLE-ZTUSER-MANDT.

ITAB-UNAME = TABLE-ZTUSER-UNAME.

APPEND ITAB.

ELSE.

MODIFY ITAB.

ENDIF.

LEAVE TO SCREEN 0.

ENDCASE.

There is an error in the program the TABLE-ZTUSER-MANDT doesn't exists.

Table columns are created from Dictionary ztuser.

Tags:
Not what you were looking for? View more on this topic or Ask a question