Code: Alles auswählen.
DATA: gt_forms TYPE TABLE OF fpcontext-name,
gf_forms LIKE LINE OF gt_forms,
gf_funcn LIKE rs38l-name,
gf_seq LIKE rs38l-head,
gf_trace LIKE rs38l-head,
gf_lines TYPE i,
gf_lines_c TYPE string,
gf_counter_c TYPE string,
gf_counter TYPE i VALUE 1,
gf_prozent TYPE numc3,
gf_text TYPE string,
gf_timer TYPE i.
**********************************************************************
" Selektion der Tabelle mit nötigen FuBas
SELECT fpcontext~name FROM fpcontext INTO TABLE gt_forms.
**********************************************************************
DESCRIBE TABLE gt_forms LINES gf_lines.
LOOP AT gt_forms INTO gf_forms.
**********************************************************************
" Progress Indicator zur Statusanzeige des momentanen FuBa's
gf_prozent = ( gf_counter / gf_lines ) * 100.
gf_counter_c = gf_counter.
gf_lines_c = gf_lines.
CONCATENATE gf_counter_c '/' gf_lines_c 'Formulare' INTO gf_text SEPARATED BY space.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
percentage = gf_prozent
text = gf_text.
**********************************************************************
**********************************************************************
"Umwandlung Tabelleneintrag in Name des FuBa's
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name = gf_forms
IMPORTING
e_funcname = gf_funcn.
**********************************************************************
**********************************************************************
" Testen des jeweiligen FuBa's
CALL FUNCTION 'SFCS_FA_TEST_FUNCTION'
EXPORTING
funcname = gf_funcn
sequence = gf_seq
run_time_on = 'X'
trace_special_units = gf_trace
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
IF sy-batch = space.
IF NOT sy-msgid IS INITIAL.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
SET SCREEN 0. LEAVE SCREEN.
ENDIF.
ELSE.
ENDIF.
ADD 1 TO gf_counter.
IF sy-tabix <> 0.
wait up to 1 SECONDS.
SET SCREEN 0.
* LEAVE PROGRAM.
CONTINUE.
ENDIF.
ENDLOOP.
Code: Alles auswählen.
IF sy-tabix <> gf_counter.
CONTINUE.
LEAVE TO SCREEN 0.
ENDIF.