Code: Alles auswählen.
PROCESS BEFORE OUTPUT.
MODULE readdatabands.
LOOP WITH CONTROL TABLE_BANDS.
MODULE i_band2tc. " StepLoop - zeilenweise Daten von
ENDLOOP. " der itab auf den Steploop bringen
Code: Alles auswählen.
PROCESS AFTER INPUT.
LOOP WITH CONTROL TABLE_BANDS.
Module tc2i_band.
ENDLOOP. " der itab auf den Steploop bringen
Code: Alles auswählen.
MODULE readdatabands OUTPUT.
IF do_readdbband = 1.
do_readdbband = 0.
CLEAR i_band.
REFRESH i_band.
SELECT * FROM zz3akdvk0709_ban INTO CORRESPONDING FIELDS OF k_band ORDER BY b_id.
k_band-ausw = ' '.
k_band-flag = ' '.
APPEND k_band TO i_band.
ENDSELECT.
ENDIF.
DESCRIBE TABLE i_band LINES table_bands-lines.
ENDMODULE. " readdatabands OUTPUT
Code: Alles auswählen.
MODULE i_band2tc OUTPUT.
READ TABLE i_band INTO k_band INDEX table_bands-current_line.
ENDMODULE. " i_band2tc OUTPUT
Code: Alles auswählen.
MODULE tc2i_band INPUT.
CLEAR band_orig.
IF table_bands-current_line > table_bands-lines.
* Es wurden neue Zeilen eingetippt
ELSE.
READ TABLE i_band INTO band_orig INDEX table_bands-current_line.
ENDIF.
IF ( table_bands-current_line > table_bands-lines AND
k_band-b_id IS NOT INITIAL AND
k_band-b_name IS NOT INITIAL AND
k_band-b_datum IS NOT INITIAL ) OR
( table_bands-current_line <= table_bands-lines ).
ENDIF.
IF k_band-b_id = band_orig-b_id AND
k_band-b_name = band_orig-b_name AND
k_band-b_datum = band_orig-b_datum AND
k_band-b_bild = band_orig-b_bild.
ELSE.
do_saveindbtabband = 0.
IF table_bands-current_line > table_bands-lines.
k_band-flag = 'I'.
APPEND k_band TO i_band.
ELSE.
k_band-flag = 'M'.
MODIFY i_band FROM k_band INDEX table_bands-current_line.
ENDIF.
ENDIF.
IF k_band-ausw = band_orig-ausw.
ELSE.
MODIFY i_band FROM k_band INDEX table_bands-current_line.
ENDIF.
ENDMODULE. " tc2i_band INPUT