*----------------------------------------------------------------------*
***INCLUDE MZ_GATE_ENTRY_USER_COMMAND_I01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_9000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_9000 INPUT.
CASE sy-ucomm.
WHEN 'EXIT' or 'CANCEL' or 'BACK' .
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*&---------------------------------------------------------------------*
*& Module F4_DATE INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE F4_DATE INPUT.
CALL FUNCTION 'F4_DATE'
EXPORTING
DATE_FOR_FIRST_MONTH = SY-DATUM
DISPLAY = ' '
IMPORTING
SELECT_DATE = WA_GATE-DATE_IN
EXCEPTIONS
CALENDAR_BUFFER_NOT_LOADABLE = 1
DATE_AFTER_RANGE = 2
DATE_BEFORE_RANGE = 3
DATE_INVALID = 4
FACTORY_CALENDAR_NOT_FOUND = 5
HOLIDAY_CALENDAR_NOT_FOUND = 6
PARAMETER_CONFLICT = 7
OTHERS = 8.
ENDMODULE. " F4_DATE INPUT
*&---------------------------------------------------------------------*
*& Module F4_TIME INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE F4_TIME INPUT.
CALL FUNCTION 'F4_CLOCK'
EXPORTING
START_TIME = SY-UZEIT
DISPLAY = ' '
IMPORTING
SELECTED_TIME = WA_GATE-TIN
.
ENDMODULE. " F4_TIME INPUT
*&---------------------------------------------------------------------*
*& Module F4_TIME_OUT INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE F4_TIME_OUT INPUT.
CALL FUNCTION 'F4_CLOCK'
EXPORTING
START_TIME = SY-UZEIT
DISPLAY = ' '
IMPORTING
SELECTED_TIME = WA_GATE-TOUT
.
ENDMODULE. " F4_TIME_OUT INPUT
*&---------------------------------------------------------------------*
*& Module INSERT_DATA_9000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE INSERT_DATA_9000 INPUT.
BREAK 10115.
CASE sy-ucomm.
WHEN 'SAVE'.
* WA_INSERT-CNO = WA_GATE-CNO.
* WA_INSERT-TIN = WA_GATE-TIN.
* WA_INSERT-TOUT = WA_GATE-TOUT.
* WA_INSERT-NOA = WA_GATE-NOA.
* WA_INSERT-NOP = WA_GATE-NOP.
* WA_INSERT-VNO = WA_GATE-VNO.
* WA_INSERT-NOP1 = WA_GATE-NOP1.
* WA_INSERT-REMARKS = WA_GATE-REMARKS.
MOVE-CORRESPONDING wa_gate to wa_insert.
APPEND WA_INSERT TO IT_INSERT.
CLEAR WA_INSERT.
SELECT cno FROM zgateentry INTO wa_temp
WHERE cno = wa_gate-cno.
ENDSELECT.
if wa_temp-cno is INITIAL.
* MOVE-CORRESPONDING WA_GATE TO WA_INSERT.
* INSERT INTO ZGATEENTRY VALUES it_INSERT.
insert zgateentry from table it_insert.
ELSE.
UPDATE ZGATEENTRY FROM WA_INSERT.
ENDIF.
*endif.
*CLEAR wa_temp.
IF sy-subrc = 0.
MESSAGE 'Records created succesfully' TYPE 'S'.
ENDIF.
ENDCASE.
*ENDIF.
*CASE sy-ucomm.
*ENDCASE.
ENDMODULE. " INSERT_DATA_9000 INPUT
*&---------------------------------------------------------------------*
*& Module MODIFY_DATA_9000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE MODIFY_DATA_9000 INPUT.
* BREAK 10115.
* CASE SY-UCOMM.
*
* ENDCASE.
ENDMODULE. " MODIFY_DATA_9000 INPUT
***INCLUDE MZ_GATE_ENTRY_USER_COMMAND_I01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_9000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_9000 INPUT.
CASE sy-ucomm.
WHEN 'EXIT' or 'CANCEL' or 'BACK' .
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*&---------------------------------------------------------------------*
*& Module F4_DATE INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE F4_DATE INPUT.
CALL FUNCTION 'F4_DATE'
EXPORTING
DATE_FOR_FIRST_MONTH = SY-DATUM
DISPLAY = ' '
IMPORTING
SELECT_DATE = WA_GATE-DATE_IN
EXCEPTIONS
CALENDAR_BUFFER_NOT_LOADABLE = 1
DATE_AFTER_RANGE = 2
DATE_BEFORE_RANGE = 3
DATE_INVALID = 4
FACTORY_CALENDAR_NOT_FOUND = 5
HOLIDAY_CALENDAR_NOT_FOUND = 6
PARAMETER_CONFLICT = 7
OTHERS = 8.
ENDMODULE. " F4_DATE INPUT
*&---------------------------------------------------------------------*
*& Module F4_TIME INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE F4_TIME INPUT.
CALL FUNCTION 'F4_CLOCK'
EXPORTING
START_TIME = SY-UZEIT
DISPLAY = ' '
IMPORTING
SELECTED_TIME = WA_GATE-TIN
.
ENDMODULE. " F4_TIME INPUT
*&---------------------------------------------------------------------*
*& Module F4_TIME_OUT INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE F4_TIME_OUT INPUT.
CALL FUNCTION 'F4_CLOCK'
EXPORTING
START_TIME = SY-UZEIT
DISPLAY = ' '
IMPORTING
SELECTED_TIME = WA_GATE-TOUT
.
ENDMODULE. " F4_TIME_OUT INPUT
*&---------------------------------------------------------------------*
*& Module INSERT_DATA_9000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE INSERT_DATA_9000 INPUT.
BREAK 10115.
CASE sy-ucomm.
WHEN 'SAVE'.
* WA_INSERT-CNO = WA_GATE-CNO.
* WA_INSERT-TIN = WA_GATE-TIN.
* WA_INSERT-TOUT = WA_GATE-TOUT.
* WA_INSERT-NOA = WA_GATE-NOA.
* WA_INSERT-NOP = WA_GATE-NOP.
* WA_INSERT-VNO = WA_GATE-VNO.
* WA_INSERT-NOP1 = WA_GATE-NOP1.
* WA_INSERT-REMARKS = WA_GATE-REMARKS.
MOVE-CORRESPONDING wa_gate to wa_insert.
APPEND WA_INSERT TO IT_INSERT.
CLEAR WA_INSERT.
SELECT cno FROM zgateentry INTO wa_temp
WHERE cno = wa_gate-cno.
ENDSELECT.
if wa_temp-cno is INITIAL.
* MOVE-CORRESPONDING WA_GATE TO WA_INSERT.
* INSERT INTO ZGATEENTRY VALUES it_INSERT.
insert zgateentry from table it_insert.
ELSE.
UPDATE ZGATEENTRY FROM WA_INSERT.
ENDIF.
*endif.
*CLEAR wa_temp.
IF sy-subrc = 0.
MESSAGE 'Records created succesfully' TYPE 'S'.
ENDIF.
ENDCASE.
*ENDIF.
*CASE sy-ucomm.
*ENDCASE.
ENDMODULE. " INSERT_DATA_9000 INPUT
*&---------------------------------------------------------------------*
*& Module MODIFY_DATA_9000 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE MODIFY_DATA_9000 INPUT.
* BREAK 10115.
* CASE SY-UCOMM.
*
* ENDCASE.
ENDMODULE. " MODIFY_DATA_9000 INPUT
No comments:
Post a Comment