START-OF-SELECTION.
IMPORT select_src FROM MEMORY ID 'ZSELECT'.
IF sy-subrc NE 0 OR select_src IS INITIAL.
APPEND 'SELECT' TO select_src.
ENDIF.
WHILE NOT select_src IS INITIAL.
CALL SCREEN 100.
CHECK NOT select_src IS INITIAL.
PERFORM select.
ENDWHILE.
*&---------------------------------------------------------------------*
*& Module status_0100 OUTPUT
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
IF container IS INITIAL.
CREATE OBJECT container
EXPORTING
container_name = 'CONTAINER'.
ENDIF.
IF NOT container IS INITIAL AND editor IS INITIAL.
CREATE OBJECT editor
EXPORTING
wordwrap_mode =
cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = 72
wordwrap_to_linebreak_mode = cl_gui_textedit=>true
parent = container.
IF NOT editor IS INITIAL.
CALL METHOD editor->set_text_as_r3table
EXPORTING
table = select_src.
CALL METHOD cl_gui_textedit=>set_focus
EXPORTING
control = editor.
ENDIF.
ENDIF.
ENDMODULE. " status_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module user_command_0100 INPUT
*&---------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
IF NOT editor IS INITIAL.
CALL METHOD editor->get_text_as_r3table
IMPORTING
table = select_src.
LOOP AT select_src ASSIGNING <sel>.
TRANSLATE <sel> TO UPPER CASE.
ENDLOOP.
SEARCH select_src FOR 'UPDATE'.
IF sy-subrc = 0. REFRESH select_src. ENDIF.
SEARCH select_src FOR 'DELETE'.
IF sy-subrc = 0. REFRESH select_src. ENDIF.
SEARCH select_src FOR 'INSERT'.
IF sy-subrc = 0. REFRESH select_src. ENDIF.
SEARCH select_src FOR 'MODIFY'.
IF sy-subrc = 0. REFRESH select_src. ENDIF.
SEARCH select_src FOR 'CALL'.
IF sy-subrc = 0. REFRESH select_src. ENDIF.
SEARCH select_src FOR 'CREATE'.
IF sy-subrc = 0. REFRESH select_src. ENDIF.
SEARCH select_src FOR 'EXPORT'.
IF sy-subrc = 0. REFRESH select_src. ENDIF.
SEARCH select_src FOR 'REPORT'.
IF sy-subrc = 0. REFRESH select_src. ENDIF.
CALL METHOD editor->free.
FREE editor.
ENDIF.
IF NOT container IS INITIAL.
CALL METHOD container->free.
FREE container.
ENDIF.
LEAVE TO SCREEN 0.
ENDMODULE. " user_command_0100 INPUT
*&---------------------------------------------------------------------*
*& Form select
*&---------------------------------------------------------------------*
FORM select.
DATA: prog LIKE sy-repid.
DATA: l_select LIKE select_src.
DATA: msg(20).
DATA: lin TYPE i.
DATA: wrd(20).
DATA: off TYPE i.
APPEND 'PROGRAM Z%%SEL. FORM SEL.' TO l_select.
APPEND LINES OF select_src TO l_select.
APPEND 'ENDFORM.' TO l_select.
GENERATE SUBROUTINE POOL l_select NAME prog
MESSAGE msg
LINE lin
WORD wrd
OFFSET off.
IF sy-subrc NE 0.
MESSAGE s398(00) WITH msg lin wrd off.
ELSE.
PERFORM sel IN PROGRAM (prog).
EXPORT select_src TO MEMORY ID 'ZSELECT'.
REFRESH select_src.
ENDIF.
ENDFORM. " select
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.