Skip to Content
0
Jan 11, 2019 at 04:47 AM

table control

65 Views

I was create table i try to modify the value. below i give the my query's kindly correct it.

PROCESS BEFORE OUTPUT.

MODULE GET_DATA.

LOOP AT IT_EMP INTO WA_EMP WITH CONTROL TABLC.

MODULE CURR_LINE.

ENDLOOP.

CALL SUBSCREEN SUB1 INCLUDING SY-REPID '1001'.

PROCESS AFTER INPUT.

CALL SUBSCREEN SUB1.

LOOP AT IT_EMP.

FIELD:

WA_EMP-EID,

WA_EMP-ENAME,

WA_EMP-DATE1,

WA_EMP-GEND.

MODULE MODIFY.

ENDLOOP.

MODULE USER_COMMAND_1000.

DATA: IT_ZEMP TYPE TABLE OF ZEMP WITH HEADER LINE,

WA_ZEMP TYPE ZEMP.

SELECTION-SCREEN: BEGIN OF SCREEN 1001 AS SUBSCREEN.

SELECT-OPTIONS: ID FOR WA_EMP-EID.

SELECTION-SCREEN: END OF SCREEN 1001.

MODULE GET_DATA OUTPUT.

IF IT_EMP IS INITIAL AND GV_FLAG EQ 'X'.

SELECT EID ENAME DATE1 GEND FROM ZEMP INTO TABLE IT_EMP WHERE EID IN ID .

ELSEIF IT_EMP IS NOT INITIAL AND GV_FLAG NE 'X' .

REFRESH: IT_EMP.

ENDIF.

ENDMODULE. " GET_DATA OUTPUT

MODULE MODIFY INPUT.

MODIFY IT_EMP FROM WA_EMP INDEX TABLC-CURRENT_LINE.

ENDMODULE.

MODULE USER_COMMAND_1000 INPUT.

OK_CODE = SY-UCOMM.

CLEAR SY-UCOMM.

CASE OK_CODE.

WHEN 'SUBMIT'.

GV_FLAG ='X'.

WHEN 'CLEAR'. CLEAR GV_FLAG.

WHEN 'EDIT'.

ZEMP-EID = WA_EMP-EID.

ZEMP-ENAME = WA_EMP-ENAME.

ZEMP-DATE1 = WA_EMP-DATE1.

ZEMP-GEND = WA_EMP-GEND.

APPEND WA_EMP TO IT_ZEMP. MOVE-CORRESPONDING IT_ZEMP TO WA_ZEMP.

MODIFY ZEMP FROM WA_ZEMP.

ENDCASE.

ENDMODULE.