Migrationsreport Swisssalary
*&---------------------------------------------------------------------*
*& Report ZHR_ST_IT
*&---------------------------------------------------------------------*
* ___ _____ ___ _ _ ____ ____ ____ ### ###
* / __)( _ )/ __)( )/ )( _ \(_ _)(_ _) ###=ooO=========Ooo=###
*( (__ )(_)(( (__ ) ( )___/ _)(_ )( ### \\ (o o) // ###
* \___)(_____)\___)(_)\_)(__) (____) (__) ----------(_)----------
*&---------------------------------------------------------------------*
******************************* MREGOTZ **************************
************************************************************************
*&H PROGRAMMNAME : ZHR_ST_IT
*&H TRANSAKTIONSCODE : ZHR_ST_IT
*&H PROGRAMMTITEL : Sap Migrations Schnittstelle
*&H ZWECK : Holt verschiedene HR Daten für Swisssalary
*&H AUTOR : Regotz Michel
*&H DATUM : 01.05.2018
*&H VORAUSSETZUNGEN : Swisscom Spezifisch
*&H SAP-MODUL : HR-PA
*&H
*&H Company/Department : Swisscom AG
*&H Phone : +41 79 322 04 86 (Mobil)
*&H E-Mail : Michel.Regotz@Swisscom.ch
*&H
************************************************************************
*&D Beschreibung : Migration zu Swisssalary
*&D --------------------------------------------------------------------
*&D Leistung : Swisssalary
*&D --------------------------------------------------------------------
*&D Tabellen : Infotypen
*&D --------------------------------------------------------------------
*&D Verarbeitung : Aufbau eines ALVs
*&D Anzeigen des ALVs
*&D Downlaod als CSV
************************************************************************
*&C Change history :
*&C --------------------------------------------------------------------
*&C Developer | Date | Description
*&C --------------------------------------------------------------------
*&C Michel Regotz | 17.05.2017 | Produktivsetzung
*&C --------------------------------------------------------------------
*&C <Name> | <Date> | <Description>
*&C --------------------------------------------------------------------
*&C <Name> | <Date> | <Description>
*&C --------------------------------------------------------------------
*&C <Name> | <Date> | <Description>
************************************************************************
REPORT zhr_st_it." MESSAGE-ID zhr_lv_cockpit.
"Wird für den Befehl GET PERAS benötigt
NODES: person, group, peras.
"Tabelle der Personalnummer für GET PERAS
TABLES: pernr, pa0000.
"Folgende Infotypen werden bei der Daten Selektion im Report verwendet
INFOTYPES: 0000, 0001, 0002, 0006, 0007, 0008, 0009, 0011, 0014, 0015, 0016, 0021, 0027,
0036, 0038, 0046, 0278, 0279, 0288, 0416, 0980, 2006, 2001, 2010.
"=======================================================================
" Datendeklaration
"=======================================================================
*-----------------------------------------------------------------------
* Beginn Datendeklarationen fuer den Tabelle ZHR_LV_COCKPIT
*-----------------------------------------------------------------------
* Werte beschaffen
*-----------------------------------------------------------------------
DATA: gs_pa0000 TYPE pa0000.
DATA: gt_pa0000 TYPE TABLE OF pa0000.
DATA: gs_pa0001 TYPE pa0001.
DATA: gt_pa0001 TYPE TABLE OF pa0001.
DATA: gs_pa0002 TYPE pa0002.
DATA: gt_pa0002 TYPE TABLE OF pa0002.
DATA: gs_pa0006 TYPE pa0006.
DATA: gt_pa0006 TYPE TABLE OF pa0006.
DATA: gs_pa0008 TYPE pa0008.
DATA: gt_pa0008 TYPE TABLE OF pa0008.
DATA: gs_pa0028 TYPE pa0028.
DATA: gt_pa0028 TYPE TABLE OF pa0028.
DATA: gs_pa0040 TYPE pa0040.
DATA: gt_pa0040 TYPE TABLE OF pa0040.
DATA: gs_t526 TYPE t526.
DATA: gt_t526 TYPE TABLE OF t526.
DATA: gt_data_1 TYPE TABLE OF zhr_data_it0001.
DATA: gs_data_1 TYPE zhr_data_it0001.
DATA: gt_data_2 TYPE TABLE OF zhr_data_it0002.
DATA: gs_data_2 TYPE zhr_data_it0002.
DATA: gt_data_6 TYPE TABLE OF zhr_data_it0006.
DATA: gs_data_6 TYPE zhr_data_it0006.
DATA: gt_data_7 TYPE TABLE OF zhr_data_it0007.
DATA: gs_data_7 TYPE zhr_data_it0007.
DATA: gt_data_8 TYPE TABLE OF zhr_data_it0008.
DATA: gs_data_8 TYPE zhr_data_it0008.
DATA: gt_data_9 TYPE TABLE OF zhr_data_it0009.
DATA: gs_data_9 TYPE zhr_data_it0009.
DATA: gt_data_11 TYPE TABLE OF zhr_data_it0011.
DATA: gs_data_11 TYPE zhr_data_it0011.
DATA: gt_data_14 TYPE TABLE OF zhr_data_it0014.
DATA: gs_data_14 TYPE zhr_data_it0014.
DATA: gt_data_15 TYPE TABLE OF zhr_data_it0015.
DATA: gs_data_15 TYPE zhr_data_it0015.
DATA: gt_data_16 TYPE TABLE OF zhr_data_it0016.
DATA: gs_data_16 TYPE zhr_data_it0016.
DATA: gt_data_21 TYPE TABLE OF zhr_data_it0021.
DATA: gs_data_21 TYPE zhr_data_it0021.
DATA: gt_data_27 TYPE TABLE OF zhr_data_it0027.
DATA: gs_data_27 TYPE zhr_data_it0027.
DATA: gt_data_36 TYPE TABLE OF zhr_data_it0036.
DATA: gs_data_36 TYPE zhr_data_it0036.
DATA: gt_data_38 TYPE TABLE OF zhr_data_it0038.
DATA: gs_data_38 TYPE zhr_data_it0038.
DATA: gt_data_46 TYPE TABLE OF zhr_data_it0046.
DATA: gs_data_46 TYPE zhr_data_it0046.
DATA: gt_data_278 TYPE TABLE OF zhr_data_it0278.
DATA: gs_data_278 TYPE zhr_data_it0278.
DATA: gt_data_279 TYPE TABLE OF zhr_data_it0279.
DATA: gs_data_279 TYPE zhr_data_it0279.
DATA: gt_data_288 TYPE TABLE OF zhr_data_it0288.
DATA: gs_data_288 TYPE zhr_data_it0288.
DATA: gt_data_416 TYPE TABLE OF zhr_data_it0416.
DATA: gs_data_416 TYPE zhr_data_it0416.
DATA: gt_data_980 TYPE TABLE OF zhr_data_it0980.
DATA: gs_data_980 TYPE zhr_data_it0980.
DATA: gt_data_2001 TYPE TABLE OF zhr_data_it2001.
DATA: gs_data_2001 TYPE zhr_data_it2001.
***DATA: gt_data_2006 TYPE TABLE OF zhr_data_it2006.
***DATA: gs_data_2006 TYPE zhr_data_it2006.
DATA: gt_data_2010 TYPE TABLE OF zhr_data_it2010.
DATA: gs_data_2010 TYPE zhr_data_it2010.
DATA: gt_data_cs TYPE TABLE OF zhr_data_cs.
DATA: gs_data_cs TYPE zhr_data_cs.
DATA: gf_datum TYPE sy-datum.
DATA: gf_begda TYPE sy-datum.
DATA: gf_endda TYPE sy-datum.
DATA: gt_result_tab TYPE TABLE OF swhactor,
gt_result_objec TYPE TABLE OF objec,
gt_result_struc TYPE TABLE OF struc,
gs_rs_tab TYPE swhactor,
gs_rs_objec TYPE objec,
gs_rs_struc TYPE struc,
gf_objid_p TYPE objid,
gf_objid TYPE objid,
gf_count TYPE i,
gf_vorge TYPE char40,
gf_vorge_pernr TYPE p_pernr,
gf_vorge_mail TYPE comm_id_long.
DATA: gf_sbjkt TYPE sbjkt.
DATA: gf_count2 TYPE p LENGTH 8.
"Tabelle für die .CSV-Konvertierung
TYPES truxs_t_text_data(4096) TYPE c OCCURS 0.
DATA: outtab_csv TYPE truxs_t_text_data.
DATA: gs_outtab_csv LIKE LINE OF outtab_csv.
"Big Version Pfad auswählen um CSV zuspeichern
DATA: ld_filename TYPE string,
ld_path TYPE string,
ld_fullpath TYPE string,
ld_result TYPE i,
gd_file TYPE c.
"Merkmal lesen mit HR_FEATURE_BACKFIELD
DATA structure LIKE pme02.
DATA feature LIKE t549b-namen.
DATA back LIKE t5csw-abreinheit.
DATA status(1).
DATA: gf_btrtl TYPE btrtl,
gf_werks TYPE persa,
gf_bukrs TYPE bukrs,
gf_abkrs TYPE abkrs,
gf_abein TYPE p02_abrehlaw,
gf_unent TYPE xfeld,
gf_lunch TYPE xfeld.
"=======================================================================
" Datendeklaration für ALV
"=======================================================================
*-----------------------------------------------------------------------
* Beginn Datendeklarationen fuer den ALV
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block zu den Datendeklarationen des ABAP-Programms
* Auch die Handler-Definition fuer Doppeklick ist eine Deklaration
*-----------------------------------------------------------------------
DATA go_alv TYPE REF TO cl_salv_table.
DATA go_functions TYPE REF TO cl_salv_functions_list.
DATA: go_columns TYPE REF TO cl_salv_columns_table,
go_column TYPE REF TO cl_salv_column_table.
DATA: gs_color TYPE lvc_s_colo.
DATA go_display TYPE REF TO cl_salv_display_settings.
DATA go_events TYPE REF TO cl_salv_events_table.
DATA: go_layout TYPE REF TO cl_salv_layout,
gf_variant TYPE slis_vari,
gs_key TYPE salv_s_layout_key.
DATA: go_selections TYPE REF TO cl_salv_selections.
DATA: go_err_salv TYPE REF TO cx_salv_msg.
DATA: go_err_salv_exist TYPE REF TO cx_salv_existing.
DATA: go_err_wrong_call TYPE REF TO cx_salv_wrong_call.
DATA: gf_string TYPE string.
DATA: go_func TYPE REF TO cl_salv_functions_list.
"=======================================================================
" Selektionsscreen für ALV
"=======================================================================
*-----------------------------------------------------------------------
* Selektion
*-----------------------------------------------------------------------
"Auswahl
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE TEXT-010.
PARAMETERS p1 AS CHECKBOX.
PARAMETERS p2 AS CHECKBOX.
PARAMETERS: p6 AS CHECKBOX.
PARAMETERS: p7 AS CHECKBOX.
PARAMETERS: p8 AS CHECKBOX."5
PARAMETERS: p9 AS CHECKBOX.
PARAMETERS: p11 AS CHECKBOX.
PARAMETERS: p14 AS CHECKBOX.
PARAMETERS: p15 AS CHECKBOX.
PARAMETERS: p16 AS CHECKBOX."10
PARAMETERS: p21 AS CHECKBOX.
PARAMETERS: p27 AS CHECKBOX.
PARAMETERS: p36 AS CHECKBOX.
PARAMETERS: p38 AS CHECKBOX.
PARAMETERS: p46 AS CHECKBOX."15
PARAMETERS: p278 AS CHECKBOX.
PARAMETERS: p279 AS CHECKBOX.
PARAMETERS: p288 AS CHECKBOX.
PARAMETERS: p416 AS CHECKBOX.
PARAMETERS: p980 AS CHECKBOX.
PARAMETERS: p01 AS CHECKBOX.
**PARAMETERS: p06 AS CHECKBOX."20
PARAMETERS: p10 AS CHECKBOX.
PARAMETERS: pcs AS CHECKBOX.
*PARAMETERS: p13 RADIOBUTTON GROUP 1.
SELECTION-SCREEN END OF BLOCK b1.
"Download Selektion
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE TEXT-020.
"Hier kann man das XLS eingeben
PARAMETERS: p_file TYPE rlgrap-filename.
PARAMETERS: p_csv AS CHECKBOX.
PARAMETERS: p_dat AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b2.
"Beschreibun
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE TEXT-030.
SELECTION-SCREEN COMMENT 1(75) TEXT-031.
SELECTION-SCREEN END OF BLOCK b3.
*=======================================================================
* INITIALIZATION
*==========================================pnpbegda=============================
INITIALIZATION.
pnpbegda = sy-datum.
p_csv = 'X'.
* IF sy-uname = 'REGOTZ M'.
* p_file = 'C:\Users\anxc\Google Drive\Desktop'.
* ENDIF.
*=======================================================================
* START OF SELECTION
*=======================================================================
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM f4_help.
*=======================================================================
* START OF SELECTION
*=======================================================================
START-OF-SELECTION.
"Datum aus der Selektion
gf_begda = pn-begda.
gf_endda = pn-endda.
GET peras.
"Logik
IF p1 = 'X'.
PERFORM read_data.
ENDIF.
IF p2 = 'X'.
PERFORM read_data2.
ENDIF.
IF p6 = 'X'.
PERFORM read_data6.
ENDIF.
IF p7 = 'X'.
PERFORM read_data7.
ENDIF.
IF p8 = 'X'.
PERFORM read_data8..
ENDIF.
IF p9 = 'X'.
PERFORM read_data9.
ENDIF.
IF p11 = 'X'.
PERFORM read_data11.
ENDIF.
IF p14 = 'X'.
PERFORM read_data14.
ENDIF.
IF p15 = 'X'.
PERFORM read_data15.
ENDIF.
IF p16 = 'X'.
PERFORM read_data16.
ENDIF.
IF p21 = 'X'.
PERFORM read_data21.
ENDIF.
IF p27 = 'X'.
PERFORM read_data27.
ENDIF.
IF p36 = 'X'.
PERFORM read_data36.
ENDIF.
IF p38 = 'X'.
PERFORM read_data38.
ENDIF.
IF p46 = 'X'.
PERFORM read_data46.
ENDIF.
IF p278 = 'X'.
PERFORM read_data278.
ENDIF.
IF p279 = 'X'.
PERFORM read_data279 .
ENDIF.
IF p288 = 'X'.
PERFORM read_data288 .
ENDIF.
IF p416 = 'X'.
PERFORM read_data416.
ENDIF.
IF p980 = 'X'.
PERFORM read_data980.
ENDIF.
IF p01 = 'X'.
PERFORM read_data2001.
ENDIF.
*** ELSEIF p06 = 'X'.
*** PERFORM read_data2006.
IF p10 = 'X'.
PERFORM read_data2010.
ENDIF.
IF pcs = 'X'.
PERFORM read_datacs.
ENDIF.
END-OF-SELECTION.
"Logik
IF p1 = 'X'.
PERFORM show_alv.
IF p_csv = 'X'.
PERFORM download_csv.
ENDIF.
ENDIF.
IF p2 = 'X'.
PERFORM show_alv2.
IF p_csv = 'X'.
PERFORM download_csv2.
ENDIF.
ENDIF.
IF p6 = 'X'.
PERFORM show_alv6.
IF p_csv = 'X'.
PERFORM download_csv6.
ENDIF.
ENDIF.
IF p7 = 'X'.
PERFORM show_alv7.
IF p_csv = 'X'.
PERFORM download_csv7.
ENDIF.
ENDIF.
IF p8 = 'X'.
PERFORM show_alv8.
IF p_csv = 'X'.
PERFORM download_csv8.
ENDIF.
ENDIF.
IF p9 = 'X'.
PERFORM show_alv9.
IF p_csv = 'X'.
PERFORM download_csv9.
ENDIF.
ENDIF.
IF p11 = 'X'.
PERFORM show_alv11.
IF p_csv = 'X'.
PERFORM download_csv11.
ENDIF.
ENDIF.
IF p14 = 'X'.
PERFORM show_alv14.
IF p_csv = 'X'.
PERFORM download_csv14.
ENDIF.
ENDIF.
IF p15 = 'X'.
PERFORM show_alv15.
IF p_csv = 'X'.
PERFORM download_csv15.
ENDIF.
ENDIF.
IF p16 = 'X'.
PERFORM show_alv16.
IF p_csv = 'X'.
PERFORM download_csv16.
ENDIF.
ENDIF.
IF p21 = 'X'.
PERFORM show_alv21.
IF p_csv = 'X'.
PERFORM download_csv21.
ENDIF.
ENDIF.
IF p27 = 'X'.
PERFORM show_alv27.
IF p_csv = 'X'.
PERFORM download_csv27.
ENDIF.
ENDIF.
IF p36 = 'X'.
PERFORM show_alv36.
IF p_csv = 'X'.
PERFORM download_csv36.
ENDIF.
ENDIF.
IF p38 = 'X'.
PERFORM show_alv38.
IF p_csv = 'X'.
PERFORM download_csv38.
ENDIF.
ENDIF.
IF p46 = 'X'.
PERFORM show_alv46.
IF p_csv = 'X'.
PERFORM download_csv46.
ENDIF.
ENDIF.
IF p278 = 'X'.
PERFORM show_alv278.
IF p_csv = 'X'.
PERFORM download_csv278.
ENDIF.
ENDIF.
IF p279 = 'X'.
PERFORM show_alv279.
IF p_csv = 'X'.
PERFORM download_csv279.
ENDIF.
ENDIF.
IF p288 = 'X'.
PERFORM show_alv288.
IF p_csv = 'X'.
PERFORM download_csv288.
ENDIF.
ENDIF.
IF p416 = 'X'.
PERFORM show_alv416.
IF p_csv = 'X'.
PERFORM download_csv416.
ENDIF.
ENDIF.
IF p980 = 'X'.
PERFORM show_alv980.
IF p_csv = 'X'.
PERFORM download_csv980.
ENDIF.
ENDIF.
IF p01 = 'X'.
PERFORM show_alv2001.
IF p_csv = 'X'.
PERFORM download_csv2001.
ENDIF.
ENDIF.
*** ELSEIF p06 = 'X'.
*** PERFORM read_data2006.
IF p10 = 'X'.
PERFORM show_alv2010.
IF p_csv = 'X'.
PERFORM download_csv2010.
ENDIF.
ENDIF.
IF pcs = 'X'.
PERFORM show_alvcs.
IF p_csv = 'X'.
PERFORM download_csvcs.
ENDIF.
ENDIF.
*=======================================================================
* FORM READ DATA
*=======================================================================
*=======================================================================
* Basic Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data .
**************************************************************************
* IT0000
**************************************************************************
PROVIDE * FROM p0000 BETWEEN gf_begda AND gf_endda.
"*********************************************************************
"* Beschäftigung
"*********************************************************************
* gs_data_1-status = p0000-stat2.
* IF gs_data_1-status = '3'.
* gs_data_1-status = 'ACTIVE'.
* ELSE.
* gs_data_1-status = 'INACTIVE'.
* ENDIF.
ENDPROVIDE.
**************************************************************************
* IT0001
**************************************************************************
PROVIDE * FROM p0001 BETWEEN gf_begda AND gf_endda.
gs_data_1-pernr = pernr-pernr.
OVERLAY gs_data_1-pernr WITH '0000000000'.
gs_data_1-endda = p0001-endda.
gs_data_1-begda = p0001-begda.
gs_data_1-bukrs = p0001-bukrs.
gs_data_1-persa = p0001-werks.
gs_data_1-persg = p0001-persg.
gs_data_1-persk = p0001-persk.
gs_data_1-btrtl = p0001-btrtl.
gs_data_1-juper = p0001-juper.
gs_data_1-abkrs = p0001-abkrs.
gs_data_1-ansvh = p0001-ansvh.
gs_data_1-kostl = p0001-kostl.
gs_data_1-orgeh = p0001-orgeh.
gs_data_1-plans = p0001-plans.
gs_data_1-stell = p0001-stell.
gs_data_1-sacha = p0001-sacha.
gs_data_1-sachz = p0001-sachz.
gs_data_1-sachp = p0001-sachp.
gs_data_1-kokrs = p0001-kokrs.
gs_data_1-sachx = p0001-zzconsultant.
gs_data_1-sachy = p0001-zzcontroller.
CLEAR: feature, structure, back, status.
structure-werks = p0001-werks.
structure-btrtl = p0001-btrtl.
feature = 'CHFIW'.
CALL FUNCTION 'HR_FEATURE_BACKFIELD'
EXPORTING
feature = feature
struc_content = structure
kind_of_error = space
IMPORTING
back = back
CHANGING
status = status
EXCEPTIONS
dummy = 1
error_operation = 2
no_backvalue = 3
feature_not_generated = 4
invalid_sign_in_funid = 5
field_in_report_tab_in_pe03 = 6
OTHERS = 7.
*case sy-subrc.
*when 2. ... .
*when 3. ... .
*when 4. ... .
*when 5. ... .
*when 6. ... .
*endcase.
gs_data_1-abreinh = back.
SELECT SINGLE pstlz FROM t5csw INTO gs_data_1-pstlz
WHERE abreinheit = gs_data_1-abreinh
AND endda = '99991231'.
*SELECT carrid connid FROM spfli
*INTO (carr, conn)
*WHERE (where_clause).
*WRITE: / carr, conn.
*ENDSELECT.
IF p_dat = 'X'.
IF p0001-begda = pn-begda AND p0001-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0001 INTO ( gs_data_1-endda, gs_data_1-begda )
WHERE pernr = p0001-pernr
AND subty = p0001-subty
AND objps = p0001-objps
AND sprps = p0001-sprps
AND endda >= p0001-endda
AND begda <= p0001-begda
AND seqnr = p0001-seqnr.
ELSEIF p0001-begda = pn-begda AND p0001-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0001 INTO ( gs_data_1-endda, gs_data_1-begda )
WHERE pernr = p0001-pernr
AND subty = p0001-subty
AND objps = p0001-objps
AND sprps = p0001-sprps
AND endda = p0001-endda
AND begda <= p0001-begda
AND seqnr = p0001-seqnr.
ELSEIF p0001-begda >= pn-begda AND p0001-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0001 INTO ( gs_data_1-endda, gs_data_1-begda )
WHERE pernr = p0001-pernr
AND subty = p0001-subty
AND objps = p0001-objps
AND sprps = p0001-sprps
AND endda = p0001-endda
AND begda = p0001-begda
AND seqnr = p0001-seqnr.
ELSEIF p0001-begda >= pn-begda AND p0001-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0001 INTO ( gs_data_1-endda, gs_data_1-begda )
WHERE pernr = p0001-pernr
AND subty = p0001-subty
AND objps = p0001-objps
AND sprps = p0001-sprps
AND endda >= p0001-endda
AND begda = p0001-begda
AND seqnr = p0001-seqnr.
ENDIF.
ENDIF.
PERFORM austritt.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_1 TO gt_data_1.
CLEAR: gs_data_1, structure, feature, status .
ENDPROVIDE.
ENDFORM. " READ_DATA
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data2 .
**************************************************************************
* IT0002
**************************************************************************
PROVIDE * FROM p0002 BETWEEN gf_begda AND gf_endda.
gs_data_2-pernr = pernr-pernr.
OVERLAY gs_data_2-pernr WITH '0000000000'.
gs_data_2-endda = p0002-endda.
gs_data_2-begda = p0002-begda.
gs_data_2-nachn = p0002-nachn.
gs_data_2-vorna = p0002-vorna.
gs_data_2-titel = p0002-titel.
gs_data_2-anred = p0002-anred.
gs_data_2-gesch = p0002-gesch.
gs_data_2-gbdat = p0002-gbdat.
gs_data_2-gblnd = p0002-gblnd.
gs_data_2-gbort = p0002-gbort.
gs_data_2-natio = p0002-natio.
gs_data_2-sprsl = p0002-sprsl.
gs_data_2-konfe = p0002-konfe.
gs_data_2-famst = p0002-famst.
gs_data_2-famdt = p0002-famdt.
gs_data_2-anzkd = p0002-anzkd.
IF p_dat = 'X'.
IF p0002-begda = pn-begda AND p0002-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0002 INTO ( gs_data_2-endda, gs_data_2-begda )
WHERE pernr = p0002-pernr
AND subty = p0002-subty
AND objps = p0002-objps
AND sprps = p0002-sprps
AND endda >= p0002-endda
AND begda <= p0002-begda
AND seqnr = p0002-seqnr.
ELSEIF p0002-begda = pn-begda AND p0002-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0002 INTO ( gs_data_2-endda, gs_data_2-begda )
WHERE pernr = p0002-pernr
AND subty = p0002-subty
AND objps = p0002-objps
AND sprps = p0002-sprps
AND endda = p0002-endda
AND begda <= p0002-begda
AND seqnr = p0002-seqnr.
ELSEIF p0002-begda >= pn-begda AND p0002-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0002 INTO ( gs_data_2-endda, gs_data_2-begda )
WHERE pernr = p0002-pernr
AND subty = p0002-subty
AND objps = p0002-objps
AND sprps = p0002-sprps
AND endda = p0002-endda
AND begda = p0002-begda
AND seqnr = p0002-seqnr.
ELSEIF p0002-begda >= pn-begda AND p0002-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0002 INTO ( gs_data_2-endda, gs_data_2-begda )
WHERE pernr = p0002-pernr
AND subty = p0002-subty
AND objps = p0002-objps
AND sprps = p0002-sprps
AND endda >= p0002-endda
AND begda = p0002-begda
AND seqnr = p0002-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_2 TO gt_data_2.
CLEAR gs_data_2.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data6.
**************************************************************************
* IT0006
**************************************************************************
PROVIDE * FROM p0006 BETWEEN gf_begda AND gf_endda.
gs_data_6-pernr = pernr-pernr.
OVERLAY gs_data_6-pernr WITH '0000000000'.
gs_data_6-endda = p0006-endda .
gs_data_6-begda = p0006-begda.
gs_data_6-subty = p0006-subty.
gs_data_6-stras = p0006-stras.
gs_data_6-ort01 = p0006-ort01.
gs_data_6-pstlz = p0006-pstlz.
gs_data_6-land1 = p0006-land1.
IF p_dat = 'X'.
IF p0006-begda = pn-begda AND p0006-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0006 INTO ( gs_data_6-endda, gs_data_6-begda )
WHERE pernr = p0006-pernr
AND subty = p0006-subty
AND objps = p0006-objps
AND sprps = p0006-sprps
AND endda >= p0006-endda
AND begda <= p0006-begda
AND seqnr = p0006-seqnr.
ELSEIF p0006-begda = pn-begda AND p0006-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0006 INTO ( gs_data_6-endda, gs_data_6-begda )
WHERE pernr = p0006-pernr
AND subty = p0006-subty
AND objps = p0006-objps
AND sprps = p0006-sprps
AND endda = p0006-endda
AND begda <= p0006-begda
AND seqnr = p0006-seqnr.
ELSEIF p0006-begda >= pn-begda AND p0006-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0006 INTO ( gs_data_6-endda, gs_data_6-begda )
WHERE pernr = p0006-pernr
AND subty = p0006-subty
AND objps = p0006-objps
AND sprps = p0006-sprps
AND endda = p0006-endda
AND begda = p0006-begda
AND seqnr = p0006-seqnr.
ELSEIF p0006-begda >= pn-begda AND p0006-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0006 INTO ( gs_data_6-endda, gs_data_6-begda )
WHERE pernr = p0006-pernr
AND subty = p0006-subty
AND objps = p0006-objps
AND sprps = p0006-sprps
AND endda >= p0006-endda
AND begda = p0006-begda
AND seqnr = p0006-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_6 TO gt_data_6.
CLEAR gs_data_6.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data7 .
**************************************************************************
* IT0007
**************************************************************************
PROVIDE * FROM p0007 BETWEEN gf_begda AND gf_endda.
gs_data_7-pernr = pernr-pernr.
OVERLAY gs_data_7-pernr WITH '0000000000'.
gs_data_7-endda = p0007-endda.
gs_data_7-begda = p0007-begda.
gs_data_7-schkz = p0007-schkz.
gs_data_7-zterf = p0007-zterf.
gs_data_7-empct = p0007-empct.
gs_data_7-mostd = p0007-mostd.
gs_data_7-wostd = p0007-wostd.
gs_data_7-arbst = p0007-arbst.
gs_data_7-wkwdy = p0007-wkwdy.
IF p_dat = 'X'.
IF p0007-begda = pn-begda AND p0007-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0007 INTO ( gs_data_7-endda, gs_data_7-begda )
WHERE pernr = p0007-pernr
AND subty = p0007-subty
AND objps = p0007-objps
AND sprps = p0007-sprps
AND endda >= p0007-endda
AND begda <= p0007-begda
AND seqnr = p0007-seqnr.
ELSEIF p0007-begda = pn-begda AND p0007-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0007 INTO ( gs_data_7-endda, gs_data_7-begda )
WHERE pernr = p0007-pernr
AND subty = p0007-subty
AND objps = p0007-objps
AND sprps = p0007-sprps
AND endda = p0007-endda
AND begda <= p0007-begda
AND seqnr = p0007-seqnr.
ELSEIF p0007-begda >= pn-begda AND p0007-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0007 INTO ( gs_data_7-endda, gs_data_7-begda )
WHERE pernr = p0007-pernr
AND subty = p0007-subty
AND objps = p0007-objps
AND sprps = p0007-sprps
AND endda = p0007-endda
AND begda = p0007-begda
AND seqnr = p0007-seqnr.
ELSEIF p0007-begda >= pn-begda AND p0007-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0007 INTO ( gs_data_7-endda, gs_data_7-begda )
WHERE pernr = p0007-pernr
AND subty = p0007-subty
AND objps = p0007-objps
AND sprps = p0007-sprps
AND endda >= p0007-endda
AND begda = p0007-begda
AND seqnr = p0007-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_7 TO gt_data_7.
CLEAR gs_data_7.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data8 .
**************************************************************************
* IT0008
**************************************************************************
PROVIDE * FROM p0008 BETWEEN gf_begda AND gf_endda.
gs_data_8-pernr = pernr-pernr.
OVERLAY gs_data_8-pernr WITH '0000000000'.
gs_data_8-endda = p0008-endda.
gs_data_8-begda = p0008-begda.
gs_data_8-trfar = p0008-trfar.
gs_data_8-trfgb = p0008-trfgb.
gs_data_8-trfgr = p0008-trfgr.
gs_data_8-trfst = p0008-trfst.
gs_data_8-bsgrd = p0008-bsgrd.
gs_data_8-divgv = p0008-divgv.
gs_data_8-ansal = p0008-ansal.
gs_data_8-lga01 = p0008-lga01.
gs_data_8-bet01 = p0008-bet01.
gs_data_8-anz01 = p0008-anz01.
gs_data_8-ein01 = p0008-ein01.
gs_data_8-opk01 = p0008-opk01.
gs_data_8-lga02 = p0008-lga02.
gs_data_8-bet02 = p0008-bet02.
gs_data_8-anz02 = p0008-anz02.
gs_data_8-ein02 = p0008-ein02.
gs_data_8-opk02 = p0008-opk02.
gs_data_8-lga03 = p0008-lga03.
gs_data_8-bet03 = p0008-bet03.
gs_data_8-anz03 = p0008-anz03.
gs_data_8-ein03 = p0008-ein03.
gs_data_8-opk03 = p0008-opk03.
gs_data_8-lga04 = p0008-lga04.
gs_data_8-bet04 = p0008-bet04.
gs_data_8-anz04 = p0008-anz04.
gs_data_8-ein04 = p0008-ein04.
gs_data_8-opk04 = p0008-opk04.
gs_data_8-lga05 = p0008-lga05.
gs_data_8-bet05 = p0008-bet05.
gs_data_8-anz05 = p0008-anz05.
gs_data_8-ein05 = p0008-ein05.
gs_data_8-opk05 = p0008-opk05.
gs_data_8-lga06 = p0008-lga06.
gs_data_8-bet06 = p0008-bet06.
IF p_dat = 'X'.
IF p0008-begda = pn-begda AND p0008-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0008 INTO ( gs_data_8-endda, gs_data_8-begda )
WHERE pernr = p0008-pernr
AND subty = p0008-subty
AND objps = p0008-objps
AND sprps = p0008-sprps
AND endda >= p0008-endda
AND begda <= p0008-begda
AND seqnr = p0008-seqnr.
ELSEIF p0008-begda = pn-begda AND p0008-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0008 INTO ( gs_data_8-endda, gs_data_8-begda )
WHERE pernr = p0008-pernr
AND subty = p0008-subty
AND objps = p0008-objps
AND sprps = p0008-sprps
AND endda = p0008-endda
AND begda <= p0008-begda
AND seqnr = p0008-seqnr.
ELSEIF p0008-begda >= pn-begda AND p0008-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0008 INTO ( gs_data_8-endda, gs_data_8-begda )
WHERE pernr = p0008-pernr
AND subty = p0008-subty
AND objps = p0008-objps
AND sprps = p0008-sprps
AND endda = p0008-endda
AND begda = p0008-begda
AND seqnr = p0008-seqnr.
ELSEIF p0008-begda >= pn-begda AND p0008-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0008 INTO ( gs_data_8-endda, gs_data_8-begda )
WHERE pernr = p0008-pernr
AND subty = p0008-subty
AND objps = p0008-objps
AND sprps = p0008-sprps
AND endda >= p0008-endda
AND begda = p0008-begda
AND seqnr = p0008-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_8 TO gt_data_8.
CLEAR gs_data_8.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data9 .
**************************************************************************
* IT0009
**************************************************************************
PROVIDE * FROM p0009 BETWEEN gf_begda AND gf_endda.
gs_data_9-pernr = pernr-pernr.
OVERLAY gs_data_9-pernr WITH '0000000000'.
gs_data_9-endda = p0009-endda.
gs_data_9-begda = p0009-begda.
gs_data_9-subty = p0009-subty.
gs_data_9-zlsch = p0009-zlsch.
gs_data_9-emftx = p0009-emftx.
gs_data_9-betrg = p0009-betrg.
gs_data_9-bkplz = p0009-bkplz.
gs_data_9-bkort = p0009-bkort.
gs_data_9-banks = p0009-banks.
gs_data_9-bankl = p0009-bankl.
gs_data_9-bankn = p0009-bankn.
gs_data_9-zweck = p0009-zweck.
gs_data_9-stras = p0009-stras.
gs_data_9-iban = p0009-iban.
IF p_dat = 'X'.
IF p0009-begda = pn-begda AND p0009-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0009 INTO ( gs_data_9-endda, gs_data_9-begda )
WHERE pernr = p0009-pernr
AND subty = p0009-subty
AND objps = p0009-objps
AND sprps = p0009-sprps
AND endda >= p0009-endda
AND begda <= p0009-begda
AND seqnr = p0009-seqnr.
ELSEIF p0009-begda = pn-begda AND p0009-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0009 INTO ( gs_data_9-endda, gs_data_9-begda )
WHERE pernr = p0009-pernr
AND subty = p0009-subty
AND objps = p0009-objps
AND sprps = p0009-sprps
AND endda = p0009-endda
AND begda <= p0009-begda
AND seqnr = p0009-seqnr.
ELSEIF p0009-begda >= pn-begda AND p0009-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0009 INTO ( gs_data_9-endda, gs_data_9-begda )
WHERE pernr = p0009-pernr
AND subty = p0009-subty
AND objps = p0009-objps
AND sprps = p0009-sprps
AND endda = p0009-endda
AND begda = p0009-begda
AND seqnr = p0009-seqnr.
ELSEIF p0009-begda >= pn-begda AND p0009-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0009 INTO ( gs_data_9-endda, gs_data_9-begda )
WHERE pernr = p0009-pernr
AND subty = p0009-subty
AND objps = p0009-objps
AND sprps = p0009-sprps
AND endda >= p0009-endda
AND begda = p0009-begda
AND seqnr = p0009-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_9 TO gt_data_9.
CLEAR gs_data_9.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA11
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data11 .
**************************************************************************
* IT00011
**************************************************************************
PROVIDE * FROM p0011 BETWEEN gf_begda AND gf_endda.
gs_data_11-pernr = pernr-pernr.
OVERLAY gs_data_11-pernr WITH '0000000000'.
gs_data_11-subty = p0011-subty.
gs_data_11-endda = p0011-endda.
gs_data_11-begda = p0011-begda.
gs_data_11-lgart = p0011-lgart.
gs_data_11-opken = p0011-opken.
gs_data_11-betrg = p0011-betrg.
gs_data_11-waers = p0011-waers.
gs_data_11-anzhl = p0011-anzhl.
gs_data_11-zeinh = p0011-zeinh.
gs_data_11-zdate = p0011-zdate.
gs_data_11-zfper = p0011-zfper.
gs_data_11-zanzl = p0011-zanzl.
gs_data_11-zeinz = p0011-zeinz.
gs_data_11-prity = p0011-prity.
gs_data_11-emfsl = p0011-emfsl.
gs_data_11-emftx = p0011-emftx.
gs_data_11-bkplz = p0011-bkplz.
gs_data_11-bkort = p0011-bkort.
gs_data_11-banks = p0011-banks.
gs_data_11-bankl = p0011-bankl.
gs_data_11-bankn = p0011-bankn.
gs_data_11-bankp = p0011-bankp.
gs_data_11-bkont = p0011-bkont.
gs_data_11-swift = p0011-swift.
gs_data_11-dtaws = p0011-dtaws.
gs_data_11-dtams = p0011-dtams.
gs_data_11-stcd2 = p0011-stcd2.
gs_data_11-pskto = p0011-pskto.
gs_data_11-esrnr = p0011-esrnr.
gs_data_11-esrre = p0011-esrre.
gs_data_11-esrpz = p0011-esrpz.
gs_data_11-zweck = p0011-zweck.
gs_data_11-zlsch = p0011-zlsch.
gs_data_11-uwdat = p0011-uwdat.
gs_data_11-bkref = p0011-bkref.
gs_data_11-stras = p0011-stras.
gs_data_11-state = p0011-state.
gs_data_11-iban = p0011-iban.
IF p_dat = 'X'.
IF p0011-begda = pn-begda AND p0011-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0011 INTO ( gs_data_11-endda, gs_data_11-begda )
WHERE pernr = p0011-pernr
AND subty = p0011-subty
AND objps = p0011-objps
AND sprps = p0011-sprps
AND endda >= p0011-endda
AND begda <= p0011-begda
AND seqnr = p0011-seqnr.
ELSEIF p0011-begda = pn-begda AND p0011-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0011 INTO ( gs_data_11-endda, gs_data_11-begda )
WHERE pernr = p0011-pernr
AND subty = p0011-subty
AND objps = p0011-objps
AND sprps = p0011-sprps
AND endda = p0011-endda
AND begda <= p0011-begda
AND seqnr = p0011-seqnr.
ELSEIF p0011-begda >= pn-begda AND p0011-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0011 INTO ( gs_data_11-endda, gs_data_11-begda )
WHERE pernr = p0011-pernr
AND subty = p0011-subty
AND objps = p0011-objps
AND sprps = p0011-sprps
AND endda = p0011-endda
AND begda = p0011-begda
AND seqnr = p0011-seqnr.
ELSEIF p0011-begda >= pn-begda AND p0011-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0011 INTO ( gs_data_11-endda, gs_data_11-begda )
WHERE pernr = p0011-pernr
AND subty = p0011-subty
AND objps = p0011-objps
AND sprps = p0011-sprps
AND endda >= p0011-endda
AND begda = p0011-begda
AND seqnr = p0011-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_11 TO gt_data_11.
CLEAR gs_data_11.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data14 .
**************************************************************************
* IT0014
**************************************************************************
PROVIDE * FROM p0014 BETWEEN gf_begda AND gf_endda.
gs_data_14-pernr = pernr-pernr.
OVERLAY gs_data_14-pernr WITH '0000000000'.
gs_data_14-endda = p0014-endda.
gs_data_14-begda = p0014-begda.
gs_data_14-lgart = p0014-lgart.
gs_data_14-opken = p0014-opken.
gs_data_14-betrg = p0014-betrg.
gs_data_14-waers = p0014-waers.
gs_data_14-anzhl = p0014-anzhl.
gs_data_14-zeinh = p0014-zeinh.
gs_data_14-zdate = p0014-zdate.
gs_data_14-zfper = p0014-zfper.
gs_data_14-zanzl = p0014-zanzl.
IF p_dat = 'X'.
IF p0014-begda = pn-begda AND p0014-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0014 INTO ( gs_data_14-endda, gs_data_14-begda )
WHERE pernr = p0014-pernr
AND subty = p0014-subty
AND objps = p0014-objps
AND sprps = p0014-sprps
AND endda >= p0014-endda
AND begda <= p0014-begda
AND seqnr = p0014-seqnr.
ELSEIF p0014-begda = pn-begda AND p0014-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0014 INTO ( gs_data_14-endda, gs_data_14-begda )
WHERE pernr = p0014-pernr
AND subty = p0014-subty
AND objps = p0014-objps
AND sprps = p0014-sprps
AND endda = p0014-endda
AND begda <= p0014-begda
AND seqnr = p0014-seqnr.
ELSEIF p0014-begda >= pn-begda AND p0014-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0014 INTO ( gs_data_14-endda, gs_data_14-begda )
WHERE pernr = p0014-pernr
AND subty = p0014-subty
AND objps = p0014-objps
AND sprps = p0014-sprps
AND endda = p0014-endda
AND begda = p0014-begda
AND seqnr = p0014-seqnr.
ELSEIF p0014-begda >= pn-begda AND p0014-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0014 INTO ( gs_data_14-endda, gs_data_14-begda )
WHERE pernr = p0014-pernr
AND subty = p0014-subty
AND objps = p0014-objps
AND sprps = p0014-sprps
AND endda >= p0014-endda
AND begda = p0014-begda
AND seqnr = p0014-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_14 TO gt_data_14.
CLEAR gs_data_14.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data15 .
**************************************************************************
* IT0015
**************************************************************************
PROVIDE * FROM p0015 BETWEEN gf_begda AND gf_endda.
gs_data_15-pernr = pernr-pernr.
OVERLAY gs_data_15-pernr WITH '0000000000'.
gs_data_15-endda = p0015-endda.
gs_data_15-begda = p0015-begda.
gs_data_15-lgart = p0015-lgart.
gs_data_15-opken = p0015-opken.
gs_data_15-betrg = p0015-betrg.
gs_data_15-waers = p0015-waers.
gs_data_15-anzhl = p0015-anzhl.
gs_data_15-zeinh = p0015-zeinh.
gs_data_15-indbw = p0015-indbw.
gs_data_15-zuord = p0015-zuord.
IF p_dat = 'X'.
IF p0015-begda = pn-begda AND p0015-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0015 INTO ( gs_data_15-endda, gs_data_15-begda )
WHERE pernr = p0015-pernr
AND subty = p0015-subty
AND objps = p0015-objps
AND sprps = p0015-sprps
AND endda >= p0015-endda
AND begda <= p0015-begda
AND seqnr = p0015-seqnr.
ELSEIF p0015-begda = pn-begda AND p0015-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0015 INTO ( gs_data_15-endda, gs_data_15-begda )
WHERE pernr = p0015-pernr
AND subty = p0015-subty
AND objps = p0015-objps
AND sprps = p0015-sprps
AND endda = p0015-endda
AND begda <= p0015-begda
AND seqnr = p0015-seqnr.
ELSEIF p0015-begda >= pn-begda AND p0015-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0015 INTO ( gs_data_15-endda, gs_data_15-begda )
WHERE pernr = p0015-pernr
AND subty = p0015-subty
AND objps = p0015-objps
AND sprps = p0015-sprps
AND endda = p0015-endda
AND begda = p0015-begda
AND seqnr = p0015-seqnr.
ELSEIF p0015-begda >= pn-begda AND p0015-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0015 INTO ( gs_data_15-endda, gs_data_15-begda )
WHERE pernr = p0015-pernr
AND subty = p0015-subty
AND objps = p0015-objps
AND sprps = p0015-sprps
AND endda >= p0015-endda
AND begda = p0015-begda
AND seqnr = p0015-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_15 TO gt_data_15.
CLEAR gs_data_15.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data16.
**************************************************************************
* IT0016
**************************************************************************
PROVIDE * FROM p0016 BETWEEN gf_begda AND gf_endda.
gs_data_16-pernr = pernr-pernr.
OVERLAY gs_data_16-pernr WITH '0000000000'.
gs_data_16-endda = p0016-endda.
gs_data_16-begda = p0016-begda.
gs_data_16-nbtgk = p0016-nbtgk.
gs_data_16-prbzt = p0016-prbzt.
gs_data_16-prbeh = p0016-prbeh.
gs_data_16-kdgfr = p0016-kdgfr.
gs_data_16-kdgf2 = p0016-kdgf2.
gs_data_16-arber = p0016-arber.
gs_data_16-eindt = p0016-eindt.
gs_data_16-kondt = p0016-kondt.
gs_data_16-konsl = p0016-konsl.
gs_data_16-cttyp = p0016-cttyp.
gs_data_16-ctedt = p0016-ctedt.
gs_data_16-persg = p0016-persg.
gs_data_16-persk = p0016-persk.
IF p_dat = 'X'.
IF p0016-begda = pn-begda AND p0016-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0016 INTO ( gs_data_16-endda, gs_data_16-begda )
WHERE pernr = p0016-pernr
AND subty = p0016-subty
AND objps = p0016-objps
AND sprps = p0016-sprps
AND endda >= p0016-endda
AND begda <= p0016-begda
AND seqnr = p0016-seqnr.
ELSEIF p0016-begda = pn-begda AND p0016-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0016 INTO ( gs_data_16-endda, gs_data_16-begda )
WHERE pernr = p0016-pernr
AND subty = p0016-subty
AND objps = p0016-objps
AND sprps = p0016-sprps
AND endda = p0016-endda
AND begda <= p0016-begda
AND seqnr = p0016-seqnr.
ELSEIF p0016-begda >= pn-begda AND p0016-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0016 INTO ( gs_data_16-endda, gs_data_16-begda )
WHERE pernr = p0016-pernr
AND subty = p0016-subty
AND objps = p0016-objps
AND sprps = p0016-sprps
AND endda = p0016-endda
AND begda = p0016-begda
AND seqnr = p0016-seqnr.
ELSEIF p0016-begda >= pn-begda AND p0016-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0016 INTO ( gs_data_16-endda, gs_data_16-begda )
WHERE pernr = p0016-pernr
AND subty = p0016-subty
AND objps = p0016-objps
AND sprps = p0016-sprps
AND endda >= p0016-endda
AND begda = p0016-begda
AND seqnr = p0016-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_16 TO gt_data_16.
CLEAR gs_data_16.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data21.
**************************************************************************
* IT0021
**************************************************************************
PROVIDE * FROM p0021 BETWEEN gf_begda AND gf_endda.
gs_data_21-pernr = pernr-pernr.
OVERLAY gs_data_21-pernr WITH '0000000000'.
gs_data_21-subty = p0021-subty.
gs_data_21-objps = p0021-objps.
gs_data_21-endda = p0021-endda.
gs_data_21-begda = p0021-begda.
gs_data_21-famsa = p0021-famsa.
gs_data_21-fgbdt = p0021-fgbdt.
gs_data_21-fgbld = p0021-fgbld.
gs_data_21-fanat = p0021-fanat.
gs_data_21-fasex = p0021-fasex.
gs_data_21-favor = p0021-favor.
gs_data_21-fanam = p0021-fanam.
gs_data_21-fgbot = p0021-fgbot.
gs_data_21-fgdep = p0021-fgdep.
gs_data_21-erbnr = p0021-erbnr.
gs_data_21-fgbna = p0021-fgbna.
gs_data_21-fnac2 = p0021-fnac2.
gs_data_21-fcnam = p0021-fcnam.
gs_data_21-fknzn = p0021-fknzn.
gs_data_21-finit = p0021-finit.
gs_data_21-fvrsw = p0021-fvrsw.
gs_data_21-fvrs2 = p0021-fvrs2.
gs_data_21-fnmzu = p0021-fnmzu.
gs_data_21-ahvnr = p0021-ahvnr.
gs_data_21-kdsvh = p0021-kdsvh.
gs_data_21-kdbsl = p0021-kdbsl.
gs_data_21-kdutb = p0021-kdutb.
gs_data_21-kdgbr = p0021-kdgbr.
gs_data_21-kdart = p0021-kdart.
gs_data_21-kdzug = p0021-kdzug.
gs_data_21-kdzul = p0021-kdzul.
gs_data_21-kdvbe = p0021-kdvbe.
gs_data_21-ermnr = p0021-ermnr.
gs_data_21-ausvl = p0021-ausvl.
gs_data_21-ausvg = p0021-ausvg.
gs_data_21-fasdt = p0021-fasdt.
gs_data_21-fasar = p0021-fasar.
gs_data_21-fasin = p0021-fasin.
gs_data_21-egaga = p0021-egaga.
gs_data_21-fana2 = p0021-fana2.
gs_data_21-fana3 = p0021-fana3.
gs_data_21-betrg = p0021-betrg.
gs_data_21-titel = p0021-titel.
gs_data_21-emrgn = p0021-emrgn.
IF p_dat = 'X'.
IF p0021-begda = pn-begda AND p0021-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0021 INTO ( gs_data_21-endda, gs_data_21-begda )
WHERE pernr = p0021-pernr
AND subty = p0021-subty
AND objps = p0021-objps
AND sprps = p0021-sprps
AND endda >= p0021-endda
AND begda <= p0021-begda
AND seqnr = p0021-seqnr.
ELSEIF p0021-begda = pn-begda AND p0021-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0021 INTO ( gs_data_21-endda, gs_data_21-begda )
WHERE pernr = p0021-pernr
AND subty = p0021-subty
AND objps = p0021-objps
AND sprps = p0021-sprps
AND endda = p0021-endda
AND begda <= p0021-begda
AND seqnr = p0021-seqnr.
ELSEIF p0021-begda >= pn-begda AND p0021-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0021 INTO ( gs_data_21-endda, gs_data_21-begda )
WHERE pernr = p0021-pernr
AND subty = p0021-subty
AND objps = p0021-objps
AND sprps = p0021-sprps
AND endda = p0021-endda
AND begda = p0021-begda
AND seqnr = p0021-seqnr.
ELSEIF p0021-begda >= pn-begda AND p0021-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0021 INTO ( gs_data_21-endda, gs_data_21-begda )
WHERE pernr = p0021-pernr
AND subty = p0021-subty
AND objps = p0021-objps
AND sprps = p0021-sprps
AND endda >= p0021-endda
AND begda = p0021-begda
AND seqnr = p0021-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_21 TO gt_data_21.
CLEAR gs_data_21.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data27.
**************************************************************************
* IT0006
**************************************************************************
PROVIDE * FROM p0027 BETWEEN gf_begda AND gf_endda.
gs_data_27-pernr = pernr-pernr.
OVERLAY gs_data_27-pernr WITH '0000000000'.
gs_data_27-endda = p0027-endda .
gs_data_27-begda = p0027-begda.
gs_data_27-kstar = p0027-kstar.
gs_data_27-kbu01 = p0027-kbu01.
gs_data_27-kgb01 = p0027-kgb01.
gs_data_27-kst01 = p0027-kst01.
gs_data_27-kpr01 = p0027-kpr01.
gs_data_27-kbu02 = p0027-kbu02.
gs_data_27-kgb02 = p0027-kgb02.
gs_data_27-kst02 = p0027-kst02.
gs_data_27-kpr02 = p0027-kpr02.
gs_data_27-kbu03 = p0027-kbu03.
gs_data_27-kst03 = p0027-kst03.
gs_data_27-kpr03 = p0027-kpr03.
IF p_dat = 'X'.
IF p0027-begda = pn-begda AND p0027-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0027 INTO ( gs_data_27-endda, gs_data_27-begda )
WHERE pernr = p0027-pernr
AND subty = p0027-subty
AND objps = p0027-objps
AND sprps = p0027-sprps
AND endda >= p0027-endda
AND begda <= p0027-begda
AND seqnr = p0027-seqnr.
ELSEIF p0027-begda = pn-begda AND p0027-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0027 INTO ( gs_data_27-endda, gs_data_27-begda )
WHERE pernr = p0027-pernr
AND subty = p0027-subty
AND objps = p0027-objps
AND sprps = p0027-sprps
AND endda = p0027-endda
AND begda <= p0027-begda
AND seqnr = p0027-seqnr.
ELSEIF p0027-begda >= pn-begda AND p0027-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0027 INTO ( gs_data_27-endda, gs_data_27-begda )
WHERE pernr = p0027-pernr
AND subty = p0027-subty
AND objps = p0027-objps
AND sprps = p0027-sprps
AND endda = p0027-endda
AND begda = p0027-begda
AND seqnr = p0027-seqnr.
ELSEIF p0027-begda >= pn-begda AND p0027-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0027 INTO ( gs_data_27-endda, gs_data_27-begda )
WHERE pernr = p0027-pernr
AND subty = p0027-subty
AND objps = p0027-objps
AND sprps = p0027-sprps
AND endda >= p0027-endda
AND begda = p0027-begda
AND seqnr = p0027-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_27 TO gt_data_27.
CLEAR gs_data_27.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data36.
**************************************************************************
* IT0036
**************************************************************************
PROVIDE * FROM p0036 BETWEEN gf_begda AND gf_endda.
gs_data_36-pernr = pernr-pernr.
OVERLAY gs_data_36-pernr WITH '0000000000'.
gs_data_36-endda = p0036-endda.
gs_data_36-begda = p0036-begda.
gs_data_36-ahvpf = p0036-ahvpf.
" gs_data_36-ahvnr = p0036-ahvnr.
IF p0036-ahvnr IS NOT INITIAL.
CONCATENATE p0036-ahvnr+0(3)
'.'
p0036-ahvnr+3(2)
'.'
p0036-ahvnr+5(3)
'.'
p0036-ahvnr+8(3)
INTO gs_data_36-ahvnr.
ENDIF.
gs_data_36-nbupf = p0036-nbupf.
gs_data_36-intbt = p0036-intbt.
gs_data_36-uvgpf = p0036-uvgpf.
gs_data_36-btrte = p0036-btrte.
gs_data_36-alvka = p0036-alvka.
gs_data_36-famka = p0036-famka.
gs_data_36-famfi = p0036-famfi.
gs_data_36-prozsv = p0036-prozsv.
gs_data_36-ueb_modif = p0036-ueb_modif.
gs_data_36-kt_modif = p0036-kt_modif.
gs_data_36-cus1_modif = p0036-cus1_modif.
gs_data_36-cus2_modif = p0036-cus2_modif.
gs_data_36-cus3_modif = p0036-cus3_modif.
" gs_data_36-nahvn = p0036-nahvn.
IF p0036-nahvn IS NOT INITIAL.
CONCATENATE p0036-nahvn+0(3)
'.'
p0036-nahvn+3(4)
'.'
p0036-nahvn+7(4)
'.'
p0036-nahvn+11(2)
INTO gs_data_36-nahvn.
ENDIF.
IF p_dat = 'X'.
IF p0036-begda = pn-begda AND p0036-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0036 INTO ( gs_data_36-endda, gs_data_36-begda )
WHERE pernr = p0036-pernr
AND subty = p0036-subty
AND objps = p0036-objps
AND sprps = p0036-sprps
AND endda >= p0036-endda
AND begda <= p0036-begda
AND seqnr = p0036-seqnr.
ELSEIF p0036-begda = pn-begda AND p0036-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0036 INTO ( gs_data_36-endda, gs_data_36-begda )
WHERE pernr = p0036-pernr
AND subty = p0036-subty
AND objps = p0036-objps
AND sprps = p0036-sprps
AND endda = p0036-endda
AND begda <= p0036-begda
AND seqnr = p0036-seqnr.
ELSEIF p0036-begda >= pn-begda AND p0036-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0036 INTO ( gs_data_36-endda, gs_data_36-begda )
WHERE pernr = p0036-pernr
AND subty = p0036-subty
AND objps = p0036-objps
AND sprps = p0036-sprps
AND endda = p0036-endda
AND begda = p0036-begda
AND seqnr = p0036-seqnr.
ELSEIF p0036-begda >= pn-begda AND p0036-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0036 INTO ( gs_data_36-endda, gs_data_36-begda )
WHERE pernr = p0036-pernr
AND subty = p0036-subty
AND objps = p0036-objps
AND sprps = p0036-sprps
AND endda >= p0036-endda
AND begda = p0036-begda
AND seqnr = p0036-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_36 TO gt_data_36.
CLEAR gs_data_36.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data38.
**************************************************************************
* IT0038
**************************************************************************
PROVIDE * FROM p0038 BETWEEN gf_begda AND gf_endda.
gs_data_38-pernr = pernr-pernr.
OVERLAY gs_data_38-pernr WITH '0000000000'.
gs_data_38-endda = p0038-endda.
gs_data_38-begda = p0038-begda.
gs_data_38-kanto = p0038-kanto.
gs_data_38-gemnd = p0038-gemnd.
gs_data_38-qstpf = p0038-qstpf.
gs_data_38-lauwg = p0038-lauwg.
gs_data_38-arbor = p0038-arbor.
gs_data_38-bemz1 = p0038-bemz1.
gs_data_38-bemz2 = p0038-bemz2.
gs_data_38-bemz3 = p0038-bemz3.
gs_data_38-qstab = p0038-qstab.
gs_data_38-qspro = p0038-qspro.
gs_data_38-qsbtr = p0038-qsbtr.
gs_data_38-acl01 = p0038-acl01.
gs_data_38-ema01 = p0038-ema01.
gs_data_38-acl02 = p0038-acl02.
gs_data_38-ema02 = p0038-ema02.
gs_data_38-acl03 = p0038-acl03.
gs_data_38-ema03 = p0038-ema03.
gs_data_38-wgmge = p0038-wgmge.
gs_data_38-agmge = p0038-agmge.
gs_data_38-akant = p0038-akant.
gs_data_38-neben = p0038-neben.
gs_data_38-andbe = p0038-andbe.
gs_data_38-concu = p0038-concu.
gs_data_38-prsca = p0038-prsca.
gs_data_38-dif_munidliving = p0038-dif_munidliving.
gs_data_38-annui = p0038-annui.
CLEAR: feature, structure, back, status, gf_bukrs, gf_abkrs, gf_werks, gf_btrtl, gf_abein, gf_unent, gf_lunch.
SELECT SINGLE bukrs abkrs werks btrtl FROM pa0001
INTO ( gf_bukrs, gf_abkrs, gf_werks, gf_btrtl )
WHERE pernr = p0038-pernr
AND begda <= p0038-begda
AND endda >= p0038-begda.
structure-bukrs = gf_bukrs.
structure-werks = gf_werks.
structure-btrtl = gf_btrtl.
structure-abkrs = gf_abkrs.
feature = 'CHFI8'.
CALL FUNCTION 'HR_FEATURE_BACKFIELD'
EXPORTING
feature = feature
struc_content = structure
kind_of_error = space
IMPORTING
back = back
CHANGING
status = status
EXCEPTIONS
dummy = 1
error_operation = 2
no_backvalue = 3
feature_not_generated = 4
invalid_sign_in_funid = 5
field_in_report_tab_in_pe03 = 6
OTHERS = 7.
CASE sy-subrc.
WHEN 2.
WHEN 3.
WHEN 4.
WHEN 5.
WHEN 6.
WHEN 7.
ENDCASE.
gf_abein = back.
SELECT SINGLE unent lunch FROM t5c2n
INTO ( gf_unent, gf_lunch )
WHERE abreinheit = gf_abein
AND begda <= p0038-begda
AND endda >= p0038-begda.
IF p0038-ema01 = '00' OR p0038-ema01 = '01'.
IF gf_unent = 'X'. "Ja 2
gs_data_38-ema01 = '02'.
ELSEIF gf_unent = ''. "Nein 3
gs_data_38-ema01 = '03'.
ENDIF.
ENDIF.
IF p0038-ema02 = '00' OR p0038-ema02 = '01'.
IF gf_lunch = 'X'. "Ja 2
gs_data_38-ema02 = '02'.
ELSEIF gf_lunch = ''. "Nein 3
gs_data_38-ema02 = '03'.
ENDIF.
ENDIF.
IF p_dat = 'X'.
IF p0038-begda = pn-begda AND p0038-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0038 INTO ( gs_data_38-endda, gs_data_38-begda )
WHERE pernr = p0038-pernr
AND subty = p0038-subty
AND objps = p0038-objps
AND sprps = p0038-sprps
AND endda >= p0038-endda
AND begda <= p0038-begda
AND seqnr = p0038-seqnr.
ELSEIF p0038-begda = pn-begda AND p0038-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0038 INTO ( gs_data_38-endda, gs_data_38-begda )
WHERE pernr = p0038-pernr
AND subty = p0038-subty
AND objps = p0038-objps
AND sprps = p0038-sprps
AND endda = p0038-endda
AND begda <= p0038-begda
AND seqnr = p0038-seqnr.
ELSEIF p0038-begda >= pn-begda AND p0038-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0038 INTO ( gs_data_38-endda, gs_data_38-begda )
WHERE pernr = p0038-pernr
AND subty = p0038-subty
AND objps = p0038-objps
AND sprps = p0038-sprps
AND endda = p0038-endda
AND begda = p0038-begda
AND seqnr = p0038-seqnr.
ELSEIF p0038-begda >= pn-begda AND p0038-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0038 INTO ( gs_data_38-endda, gs_data_38-begda )
WHERE pernr = p0038-pernr
AND subty = p0038-subty
AND objps = p0038-objps
AND sprps = p0038-sprps
AND endda >= p0038-endda
AND begda = p0038-begda
AND seqnr = p0038-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_38 TO gt_data_38.
CLEAR gs_data_38.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data46.
**************************************************************************
* IT0046
**************************************************************************
PROVIDE * FROM p0046 BETWEEN gf_begda AND gf_endda.
gs_data_46-pernr = pernr-pernr.
OVERLAY gs_data_46-pernr WITH '0000000000'.
gs_data_46-endda = p0046-endda .
gs_data_46-begda = p0046-begda.
gs_data_46-vsart = p0046-vsart.
gs_data_46-vsges = p0046-vsges.
gs_data_46-eintv = p0046-eintv.
gs_data_46-renbg = p0046-renbg.
gs_data_46-prbas = p0046-prbas.
gs_data_46-koord = p0046-koord.
gs_data_46-vssum = p0046-vssum.
gs_data_46-vspra = p0046-vspra.
gs_data_46-praag = p0046-praag.
IF p_dat = 'X'.
IF p0046-begda = pn-begda AND p0046-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0046 INTO ( gs_data_46-endda, gs_data_46-begda )
WHERE pernr = p0046-pernr
AND subty = p0046-subty
AND objps = p0046-objps
AND sprps = p0046-sprps
AND endda >= p0046-endda
AND begda <= p0046-begda
AND seqnr = p0046-seqnr.
ELSEIF p0046-begda = pn-begda AND p0046-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0046 INTO ( gs_data_46-endda, gs_data_46-begda )
WHERE pernr = p0046-pernr
AND subty = p0046-subty
AND objps = p0046-objps
AND sprps = p0046-sprps
AND endda = p0046-endda
AND begda <= p0046-begda
AND seqnr = p0046-seqnr.
ELSEIF p0046-begda >= pn-begda AND p0046-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0046 INTO ( gs_data_46-endda, gs_data_46-begda )
WHERE pernr = p0046-pernr
AND subty = p0046-subty
AND objps = p0046-objps
AND sprps = p0046-sprps
AND endda = p0046-endda
AND begda = p0046-begda
AND seqnr = p0046-seqnr.
ELSEIF p0046-begda >= pn-begda AND p0046-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0046 INTO ( gs_data_46-endda, gs_data_46-begda )
WHERE pernr = p0046-pernr
AND subty = p0046-subty
AND objps = p0046-objps
AND sprps = p0046-sprps
AND endda >= p0046-endda
AND begda = p0046-begda
AND seqnr = p0046-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_46 TO gt_data_46.
CLEAR gs_data_46.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data278.
**************************************************************************
* IT0278
**************************************************************************
PROVIDE * FROM p0278 BETWEEN gf_begda AND gf_endda.
gs_data_278-pernr = pernr-pernr.
OVERLAY gs_data_278-pernr WITH '0000000000'.
gs_data_278-kasse = p0278-kasse.
gs_data_278-extid = p0278-extid.
gs_data_278-eindt = p0278-eindt.
gs_data_278-invgr = p0278-invgr.
gs_data_278-vorbh = p0278-vorbh.
gs_data_278-ausdt = p0278-ausdt.
gs_data_278-pendt = p0278-pendt.
gs_data_278-acl01 = p0278-acl01.
gs_data_278-ema01 = p0278-ema01.
gs_data_278-acl02 = p0278-acl02.
gs_data_278-ema02 = p0278-ema02.
gs_data_278-acl03 = p0278-acl03.
gs_data_278-ema03 = p0278-ema03.
gs_data_278-acl04 = p0278-acl04.
gs_data_278-ema04 = p0278-ema04.
gs_data_278-acl05 = p0278-acl05.
gs_data_278-ema05 = p0278-ema05.
gs_data_278-acl06 = p0278-acl06.
gs_data_278-ema06 = p0278-ema06.
gs_data_278-acl07 = p0278-acl07.
gs_data_278-ema07 = p0278-ema07.
gs_data_278-acl08 = p0278-acl08.
gs_data_278-ema08 = p0278-ema08.
gs_data_278-invdc = p0278-invdc.
gs_data_278-zrebg = p0278-zrebg.
IF p_dat = 'X'.
* IF p0278-begda = pn-begda AND p0278-endda = pn-endda.
*
* SELECT SINGLE endda begda FROM pa0278 INTO ( gs_data_278-endda, gs_data_278-begda )
* WHERE pernr = p0278-pernr
* AND subty = p0278-subty
* AND objps = p0278-objps
* AND sprps = p0278-sprps
* AND endda >= p0278-endda
* AND begda <= p0278-begda
* AND seqnr = p0278-seqnr.
*
* ELSEIF p0278-begda = pn-begda AND p0278-endda <= pn-endda.
*
* SELECT SINGLE endda begda FROM pa0278 INTO ( gs_data_278-endda, gs_data_278-begda )
* WHERE pernr = p0278-pernr
* AND subty = p0278-subty
* AND objps = p0278-objps
* AND sprps = p0278-sprps
* AND endda = p0278-endda
* AND begda <= p0278-begda
* AND seqnr = p0278-seqnr.
*
* ELSEIF p0278-begda >= pn-begda AND p0278-endda <= pn-endda.
*
* SELECT SINGLE endda begda FROM pa0278 INTO ( gs_data_278-endda, gs_data_278-begda )
* WHERE pernr = p0278-pernr
* AND subty = p0278-subty
* AND objps = p0278-objps
* AND sprps = p0278-sprps
* AND endda = p0278-endda
* AND begda = p0278-begda
* AND seqnr = p0278-seqnr.
*
* ELSEIF p0278-begda >= pn-begda AND p0278-endda = pn-endda.
*
* SELECT SINGLE endda begda FROM pa0278 INTO ( gs_data_278-endda, gs_data_278-begda )
* WHERE pernr = p0278-pernr
* AND subty = p0278-subty
* AND objps = p0278-objps
* AND sprps = p0278-sprps
* AND endda >= p0278-endda
* AND begda = p0278-begda
* AND seqnr = p0278-seqnr.
*
* ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_278 TO gt_data_278.
CLEAR gs_data_278.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data279.
**************************************************************************
* IT0279
**************************************************************************
PROVIDE * FROM p0279 BETWEEN gf_begda AND gf_endda.
gs_data_279-pernr = pernr-pernr.
OVERLAY gs_data_279-pernr WITH '0000000000'.
gs_data_279-kasse = p0279-kasse.
gs_data_279-waers = p0279-waers.
gs_data_279-vae01 = p0279-vae01.
gs_data_279-vam01 = p0279-vam01.
gs_data_279-vty01 = p0279-vty01.
gs_data_279-vae02 = p0279-vae02.
gs_data_279-vam02 = p0279-vam02.
gs_data_279-vty02 = p0279-vty02.
gs_data_279-vae03 = p0279-vae03.
gs_data_279-vam03 = p0279-vam03.
gs_data_279-vty03 = p0279-vty03.
gs_data_279-vae04 = p0279-vae04.
gs_data_279-vam04 = p0279-vam04.
gs_data_279-vty04 = p0279-vty04.
gs_data_279-vae05 = p0279-vae05.
gs_data_279-vam05 = p0279-vam05.
gs_data_279-vty05 = p0279-vty05.
gs_data_279-vae06 = p0279-vae06.
gs_data_279-vam06 = p0279-vam06.
gs_data_279-vty06 = p0279-vty06.
gs_data_279-vae07 = p0279-vae07.
gs_data_279-vam07 = p0279-vam07.
gs_data_279-vty07 = p0279-vty07.
gs_data_279-vae08 = p0279-vae08.
gs_data_279-vam08 = p0279-vam08.
gs_data_279-vty08 = p0279-vty08.
gs_data_279-vae09 = p0279-vae09.
gs_data_279-vam09 = p0279-vam09.
gs_data_279-vty09 = p0279-vty09.
gs_data_279-vae10 = p0279-vae10.
gs_data_279-vam10 = p0279-vam10.
gs_data_279-vty10 = p0279-vty10.
gs_data_279-vae11 = p0279-vae11.
gs_data_279-vam11 = p0279-vam11.
gs_data_279-vty11 = p0279-vty11.
gs_data_279-vae12 = p0279-vae12.
gs_data_279-vam12 = p0279-vam12.
gs_data_279-vty12 = p0279-vty12.
gs_data_279-vae13 = p0279-vae13.
gs_data_279-vam13 = p0279-vam13.
gs_data_279-vty13 = p0279-vty13.
gs_data_279-vae14 = p0279-vae14.
gs_data_279-vam14 = p0279-vam14.
gs_data_279-vty14 = p0279-vty14.
gs_data_279-vae15 = p0279-vae15.
gs_data_279-vam15 = p0279-vam15.
gs_data_279-vty15 = p0279-vty15.
gs_data_279-vae16 = p0279-vae16.
gs_data_279-vam16 = p0279-vam16.
gs_data_279-vty16 = p0279-vty16.
gs_data_279-vae17 = p0279-vae17.
gs_data_279-vam17 = p0279-vam17.
gs_data_279-vty17 = p0279-vty17.
gs_data_279-vae18 = p0279-vae18.
gs_data_279-vam18 = p0279-vam18.
gs_data_279-vty18 = p0279-vty18.
gs_data_279-vae19 = p0279-vae19.
gs_data_279-vam19 = p0279-vam19.
gs_data_279-vty19 = p0279-vty19.
gs_data_279-vae20 = p0279-vae20.
gs_data_279-vam20 = p0279-vam20.
gs_data_279-vty20 = p0279-vty20.
gs_data_279-vae21 = p0279-vae21.
gs_data_279-vam21 = p0279-vam21.
gs_data_279-vty21 = p0279-vty21.
gs_data_279-vae22 = p0279-vae22.
gs_data_279-vam22 = p0279-vam22.
gs_data_279-vty22 = p0279-vty22.
gs_data_279-vae23 = p0279-vae23.
gs_data_279-vam23 = p0279-vam23.
gs_data_279-vty23 = p0279-vty23.
gs_data_279-vae24 = p0279-vae24.
gs_data_279-vam24 = p0279-vam24.
gs_data_279-vty24 = p0279-vty24.
gs_data_279-vae25 = p0279-vae25.
gs_data_279-vam25 = p0279-vam25.
gs_data_279-vty25 = p0279-vty25.
gs_data_279-vae26 = p0279-vae26.
gs_data_279-vam26 = p0279-vam26.
gs_data_279-vty26 = p0279-vty26.
gs_data_279-vae27 = p0279-vae27.
gs_data_279-vam27 = p0279-vam27.
gs_data_279-vty27 = p0279-vty27.
gs_data_279-vae28 = p0279-vae28.
gs_data_279-vam28 = p0279-vam28.
gs_data_279-vty28 = p0279-vty28.
gs_data_279-vae29 = p0279-vae29.
gs_data_279-vam29 = p0279-vam29.
gs_data_279-vty29 = p0279-vty29.
gs_data_279-vae30 = p0279-vae30.
gs_data_279-vam30 = p0279-vam30.
gs_data_279-vty30 = p0279-vty30.
IF p_dat = 'X'.
* IF p0279-begda = pn-begda AND p0279-endda = pn-endda.
*
* SELECT SINGLE endda begda FROM pa0279 INTO ( gs_data_279-endda, gs_data_279-begda )
* WHERE pernr = p0279-pernr
* AND subty = p0279-subty
* AND objps = p0279-objps
* AND sprps = p0279-sprps
* AND endda >= p0279-endda
* AND begda <= p0279-begda
* AND seqnr = p0279-seqnr.
*
* ELSEIF p0279-begda = pn-begda AND p0279-endda <= pn-endda.
*
* SELECT SINGLE endda begda FROM pa0279 INTO ( gs_data_279-endda, gs_data_279-begda )
* WHERE pernr = p0279-pernr
* AND subty = p0279-subty
* AND objps = p0279-objps
* AND sprps = p0279-sprps
* AND endda = p0279-endda
* AND begda <= p0279-begda
* AND seqnr = p0279-seqnr.
*
* ELSEIF p0279-begda >= pn-begda AND p0279-endda <= pn-endda.
*
* SELECT SINGLE endda begda FROM pa0279 INTO ( gs_data_279-endda, gs_data_279-begda )
* WHERE pernr = p0279-pernr
* AND subty = p0279-subty
* AND objps = p0279-objps
* AND sprps = p0279-sprps
* AND endda = p0279-endda
* AND begda = p0279-begda
* AND seqnr = p0279-seqnr.
*
* ELSEIF p0279-begda >= pn-begda AND p0279-endda = pn-endda.
*
* SELECT SINGLE endda begda FROM pa0279 INTO ( gs_data_279-endda, gs_data_279-begda )
* WHERE pernr = p0279-pernr
* AND subty = p0279-subty
* AND objps = p0279-objps
* AND sprps = p0279-sprps
* AND endda >= p0279-endda
* AND begda = p0279-begda
* AND seqnr = p0279-seqnr.
*
* ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_279 TO gt_data_279.
CLEAR gs_data_279.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA288
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data288.
**************************************************************************
* IT0021
**************************************************************************
PROVIDE * FROM p0288 BETWEEN gf_begda AND gf_endda.
gs_data_288-pernr = pernr-pernr.
OVERLAY gs_data_288-pernr WITH '0000000000'.
gs_data_288-subty = p0288-subty.
gs_data_288-objps = p0288-objps.
gs_data_288-sprps = p0288-sprps.
gs_data_288-endda = p0288-endda.
gs_data_288-begda = p0288-begda.
gs_data_288-seqnr = p0288-seqnr.
gs_data_288-aedtm = p0288-aedtm.
gs_data_288-uname = p0288-uname.
gs_data_288-histo = p0288-histo.
gs_data_288-itxex = p0288-itxex.
gs_data_288-refex = p0288-refex.
gs_data_288-ordex = p0288-ordex.
gs_data_288-itbld = p0288-itbld.
gs_data_288-preas = p0288-preas.
gs_data_288-flag1 = p0288-flag1.
gs_data_288-flag2 = p0288-flag2.
gs_data_288-flag3 = p0288-flag3.
gs_data_288-flag4 = p0288-flag4.
gs_data_288-rese1 = p0288-rese1.
gs_data_288-rese2 = p0288-rese2.
gs_data_288-grpvl = p0288-grpvl.
gs_data_288-auszfak = p0288-auszfak.
gs_data_288-kzkuerz = p0288-kzkuerz.
gs_data_288-nahvn = p0288-nahvn.
gs_data_288-lcoun = p0288-lcoun.
gs_data_288-lcant = p0288-lcant.
gs_data_288-difal = p0288-difal.
gs_data_288-empyn = p0288-empyn.
gs_data_288-wcoun = p0288-wcoun.
gs_data_288-wcant = p0288-wcant.
gs_data_288-eradr = p0288-eradr.
gs_data_288-etrnr = p0288-etrnr.
gs_data_288-etrnz = p0288-etrnz.
gs_data_288-etbeg = p0288-etbeg.
gs_data_288-etend = p0288-etend.
gs_data_288-whtdeduc = p0288-whtdeduc.
gs_data_288-paybegda = p0288-paybegda.
gs_data_288-payendda = p0288-payendda.
gs_data_288-workcomp = p0288-workcomp.
gs_data_288-neben = p0288-neben.
IF p_dat = 'X'.
IF p0288-begda = pn-begda AND p0288-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0288 INTO ( gs_data_288-endda, gs_data_288-begda )
WHERE pernr = p0288-pernr
AND subty = p0288-subty
AND objps = p0288-objps
AND sprps = p0288-sprps
AND endda >= p0288-endda
AND begda <= p0288-begda
AND seqnr = p0288-seqnr.
ELSEIF p0288-begda = pn-begda AND p0288-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0288 INTO ( gs_data_288-endda, gs_data_288-begda )
WHERE pernr = p0288-pernr
AND subty = p0288-subty
AND objps = p0288-objps
AND sprps = p0288-sprps
AND endda = p0288-endda
AND begda <= p0288-begda
AND seqnr = p0288-seqnr.
ELSEIF p0288-begda >= pn-begda AND p0288-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0288 INTO ( gs_data_288-endda, gs_data_288-begda )
WHERE pernr = p0288-pernr
AND subty = p0288-subty
AND objps = p0288-objps
AND sprps = p0288-sprps
AND endda = p0288-endda
AND begda = p0288-begda
AND seqnr = p0288-seqnr.
ELSEIF p0288-begda >= pn-begda AND p0288-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0288 INTO ( gs_data_288-endda, gs_data_288-begda )
WHERE pernr = p0288-pernr
AND subty = p0288-subty
AND objps = p0288-objps
AND sprps = p0288-sprps
AND endda >= p0288-endda
AND begda = p0288-begda
AND seqnr = p0288-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_288 TO gt_data_288.
CLEAR gs_data_288.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data416.
**************************************************************************
* IT0416
**************************************************************************
PROVIDE * FROM p0416 BETWEEN gf_begda AND gf_endda.
gs_data_416-pernr = pernr-pernr.
OVERLAY gs_data_416-pernr WITH '0000000000'.
gs_data_416-subty = p0416-subty.
gs_data_416-objps = p0416-objps.
gs_data_416-sprps = p0416-sprps.
gs_data_416-endda = p0416-endda.
gs_data_416-begda = p0416-begda.
gs_data_416-qctyp = p0416-qctyp.
gs_data_416-stype = p0416-stype.
gs_data_416-waers = p0416-waers.
gs_data_416-qtype = p0416-qtype.
gs_data_416-srule = p0416-srule.
gs_data_416-numbr = p0416-numbr.
gs_data_416-amont = p0416-amont.
gs_data_416-wgtyp = p0416-wgtyp.
gs_data_416-quonr = p0416-quonr.
gs_data_416-docsy = p0416-docsy.
gs_data_416-docnr = p0416-docnr.
gs_data_416-nopay = p0416-nopay.
IF p_dat = 'X'.
IF p0416-begda = pn-begda AND p0416-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0416 INTO ( gs_data_416-endda, gs_data_416-begda )
WHERE pernr = p0416-pernr
AND subty = p0416-subty
AND objps = p0416-objps
AND sprps = p0416-sprps
AND endda >= p0416-endda
AND begda <= p0416-begda
AND seqnr = p0416-seqnr.
ELSEIF p0416-begda = pn-begda AND p0416-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0416 INTO ( gs_data_416-endda, gs_data_416-begda )
WHERE pernr = p0416-pernr
AND subty = p0416-subty
AND objps = p0416-objps
AND sprps = p0416-sprps
AND endda = p0416-endda
AND begda <= p0416-begda
AND seqnr = p0416-seqnr.
ELSEIF p0416-begda >= pn-begda AND p0416-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0416 INTO ( gs_data_416-endda, gs_data_416-begda )
WHERE pernr = p0416-pernr
AND subty = p0416-subty
AND objps = p0416-objps
AND sprps = p0416-sprps
AND endda = p0416-endda
AND begda = p0416-begda
AND seqnr = p0416-seqnr.
ELSEIF p0416-begda >= pn-begda AND p0416-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0416 INTO ( gs_data_416-endda, gs_data_416-begda )
WHERE pernr = p0416-pernr
AND subty = p0416-subty
AND objps = p0416-objps
AND sprps = p0416-sprps
AND endda >= p0416-endda
AND begda = p0416-begda
AND seqnr = p0416-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_416 TO gt_data_416.
CLEAR gs_data_416.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data980.
**************************************************************************
* IT0980
**************************************************************************
PROVIDE * FROM p0980 BETWEEN gf_begda AND gf_endda.
gs_data_980-pernr = pernr-pernr.
OVERLAY gs_data_980-pernr WITH '0000000000'.
gs_data_980-subty = p0980-subty.
gs_data_980-endda = p0980-endda.
gs_data_980-begda = p0980-begda.
gs_data_980-evtnr = p0980-evtnr.
gs_data_980-inkey = p0980-inkey.
gs_data_980-aukey = p0980-aukey.
gs_data_980-aubeg = p0980-aubeg.
gs_data_980-auend = p0980-auend.
gs_data_980-ftext = p0980-ftext.
gs_data_980-dat01 = p0980-dat01.
gs_data_980-lga01 = p0980-lga01.
gs_data_980-bet01 = p0980-bet01.
gs_data_980-dat02 = p0980-dat02.
gs_data_980-lga02 = p0980-lga02.
gs_data_980-bet02 = p0980-bet02.
gs_data_980-dat03 = p0980-dat03.
gs_data_980-lga03 = p0980-lga03.
gs_data_980-bet03 = p0980-bet03.
gs_data_980-dat04 = p0980-dat04.
gs_data_980-lga04 = p0980-lga04.
gs_data_980-bet04 = p0980-bet04.
gs_data_980-dat05 = p0980-dat05.
gs_data_980-lga05 = p0980-lga05.
gs_data_980-bet05 = p0980-bet05.
gs_data_980-betrg = p0980-betrg.
gs_data_980-waers = p0980-waers.
gs_data_980-emfsl = p0980-emfsl.
gs_data_980-zweck = p0980-zweck.
gs_data_980-zz_betrag_tot = p0980-zz_betrag_tot.
gs_data_980-zz_betrag_mit = p0980-zz_betrag_mit.
gs_data_980-zz_betrag_tam = p0980-zz_betrag_tam.
gs_data_980-zz_ubernahme = p0980-zz_ubernahme.
gs_data_980-zz_bemerkung = p0980-zz_bemerkung.
IF p_dat = 'X'.
IF p0980-begda = pn-begda AND p0980-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0980 INTO ( gs_data_980-endda, gs_data_980-begda )
WHERE pernr = p0980-pernr
AND subty = p0980-subty
AND objps = p0980-objps
AND sprps = p0980-sprps
AND endda >= p0980-endda
AND begda <= p0980-begda
AND seqnr = p0980-seqnr.
ELSEIF p0980-begda = pn-begda AND p0980-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0980 INTO ( gs_data_980-endda, gs_data_980-begda )
WHERE pernr = p0980-pernr
AND subty = p0980-subty
AND objps = p0980-objps
AND sprps = p0980-sprps
AND endda = p0980-endda
AND begda <= p0980-begda
AND seqnr = p0980-seqnr.
ELSEIF p0980-begda >= pn-begda AND p0980-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa0980 INTO ( gs_data_980-endda, gs_data_980-begda )
WHERE pernr = p0980-pernr
AND subty = p0980-subty
AND objps = p0980-objps
AND sprps = p0980-sprps
AND endda = p0980-endda
AND begda = p0980-begda
AND seqnr = p0980-seqnr.
ELSEIF p0980-begda >= pn-begda AND p0980-endda = pn-endda.
SELECT SINGLE endda begda FROM pa0980 INTO ( gs_data_980-endda, gs_data_980-begda )
WHERE pernr = p0980-pernr
AND subty = p0980-subty
AND objps = p0980-objps
AND sprps = p0980-sprps
AND endda >= p0980-endda
AND begda = p0980-begda
AND seqnr = p0980-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_980 TO gt_data_980.
CLEAR gs_data_980.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data2001.
**************************************************************************
* IT2001
**************************************************************************
PROVIDE * FROM p2001 BETWEEN gf_begda AND gf_endda.
gs_data_2001-pernr = pernr-pernr.
OVERLAY gs_data_2001-pernr WITH '0000000000'.
gs_data_2001-endda = p2001-endda.
gs_data_2001-begda = p2001-begda.
gs_data_2001-awart = p2001-awart.
gs_data_2001-abwtg = p2001-abwtg.
gs_data_2001-stdaz = p2001-stdaz.
gs_data_2001-abrtg = p2001-abrtg.
gs_data_2001-abrst = p2001-abrst.
IF p_dat = 'X'.
IF p2001-begda = pn-begda AND p2001-endda = pn-endda.
SELECT SINGLE endda begda FROM pa2001 INTO ( gs_data_2001-endda, gs_data_2001-begda )
WHERE pernr = p2001-pernr
AND subty = p2001-subty
AND objps = p2001-objps
AND sprps = p2001-sprps
AND endda >= p2001-endda
AND begda <= p2001-begda
AND seqnr = p2001-seqnr.
ELSEIF p2001-begda = pn-begda AND p2001-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa2001 INTO ( gs_data_2001-endda, gs_data_2001-begda )
WHERE pernr = p2001-pernr
AND subty = p2001-subty
AND objps = p2001-objps
AND sprps = p2001-sprps
AND endda = p2001-endda
AND begda <= p2001-begda
AND seqnr = p2001-seqnr.
ELSEIF p2001-begda >= pn-begda AND p2001-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa2001 INTO ( gs_data_2001-endda, gs_data_2001-begda )
WHERE pernr = p2001-pernr
AND subty = p2001-subty
AND objps = p2001-objps
AND sprps = p2001-sprps
AND endda = p2001-endda
AND begda = p2001-begda
AND seqnr = p2001-seqnr.
ELSEIF p2001-begda >= pn-begda AND p2001-endda = pn-endda.
SELECT SINGLE endda begda FROM pa2001 INTO ( gs_data_2001-endda, gs_data_2001-begda )
WHERE pernr = p2001-pernr
AND subty = p2001-subty
AND objps = p2001-objps
AND sprps = p2001-sprps
AND endda >= p2001-endda
AND begda = p2001-begda
AND seqnr = p2001-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_2001 TO gt_data_2001.
CLEAR gs_data_2001.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_data2010.
**************************************************************************
* IT0006
**************************************************************************
PROVIDE * FROM p2010 BETWEEN gf_begda AND gf_endda.
gs_data_2010-pernr = pernr-pernr.
OVERLAY gs_data_2010-pernr WITH '0000000000'.
gs_data_2010-endda = p2010-endda .
gs_data_2010-begda = p2010-begda.
gs_data_2010-lgart = p2010-lgart.
gs_data_2010-anzhl = p2010-anzhl.
gs_data_2010-zeinh = p2010-zeinh.
gs_data_2010-bwgrl = p2010-bwgrl.
gs_data_2010-betrg = p2010-betrg.
gs_data_2010-zvatx = p2010-zvatx.
IF p_dat = 'X'.
IF p2010-begda = pn-begda AND p2010-endda = pn-endda.
SELECT SINGLE endda begda FROM pa2010 INTO ( gs_data_2010-endda, gs_data_2010-begda )
WHERE pernr = p2010-pernr
AND subty = p2010-subty
AND objps = p2010-objps
AND sprps = p2010-sprps
AND endda >= p2010-endda
AND begda <= p2010-begda
AND seqnr = p2010-seqnr.
ELSEIF p2010-begda = pn-begda AND p2010-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa2010 INTO ( gs_data_2010-endda, gs_data_2010-begda )
WHERE pernr = p2010-pernr
AND subty = p2010-subty
AND objps = p2010-objps
AND sprps = p2010-sprps
AND endda = p2010-endda
AND begda <= p2010-begda
AND seqnr = p2010-seqnr.
ELSEIF p2010-begda >= pn-begda AND p2010-endda <= pn-endda.
SELECT SINGLE endda begda FROM pa2010 INTO ( gs_data_2010-endda, gs_data_2010-begda )
WHERE pernr = p2010-pernr
AND subty = p2010-subty
AND objps = p2010-objps
AND sprps = p2010-sprps
AND endda = p2010-endda
AND begda = p2010-begda
AND seqnr = p2010-seqnr.
ELSEIF p2010-begda >= pn-begda AND p2010-endda = pn-endda.
SELECT SINGLE endda begda FROM pa2010 INTO ( gs_data_2010-endda, gs_data_2010-begda )
WHERE pernr = p2010-pernr
AND subty = p2010-subty
AND objps = p2010-objps
AND sprps = p2010-sprps
AND endda >= p2010-endda
AND begda = p2010-begda
AND seqnr = p2010-seqnr.
ENDIF.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
APPEND gs_data_2010 TO gt_data_2010.
CLEAR gs_data_2010.
ENDPROVIDE.
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM read_datacs.
**************************************************************************
* Abrechnungscluster lesen
**************************************************************************
*DATA: lt_RESULT_TAB TYPE TABLE OF PAY99_RESULT.
*Data: Ls_RESULT_TAB type PAY99_RESULT.
DATA: lt_result_tab TYPE paych_result OCCURS 0 WITH HEADER LINE.
DATA: lt_rt TYPE TABLE OF pc207,
ls_rt TYPE pc207.
CALL FUNCTION 'HR_GET_PAYROLL_RESULTS'
EXPORTING
pernr = pernr-pernr
* PERMO = 01
pabrj = pn-begda(4)
pabrp = pn-begda+4(2)
* PABRJ_END =
* PABRP_END =
* INPER_LST =
inper_act = '999912'
actual = 'X'
* WAERS =
* ARCH_TOO =
TABLES
result_tab = lt_result_tab
EXCEPTIONS
no_results = 1
error_in_currency_conversion = 2
t500l_entry_not_found = 3
period_mismatch_error = 4
t549q_entry_not_found = 5
internal_error = 6
wrong_structure_of_result_tab = 7
OTHERS = 8.
IF sy-subrc <> 0.
* Implement suitable error handling here
ELSE.
* LOOP AT lt_result_tab.
LOOP AT lt_result_tab-inter-rt INTO ls_rt.
IF ls_rt-lgart(3) = '/4F'.
gs_data_cs-pernr = pernr-pernr.
OVERLAY gs_data_cs-pernr WITH '0000000000'.
gs_data_cs-lgart = ls_rt-lgart.
SELECT SINGLE lgtxt FROM t512t INTO gs_data_cs-lgtxt
WHERE sprsl = 'DE' AND
molga = '02' AND
lgart = gs_data_cs-lgart.
gs_data_cs-objps = ls_rt-cntr3.
gs_data_cs-betrg = ls_rt-betrg.
APPEND gs_data_cs TO gt_data_cs.
CLEAR gs_data_cs.
ENDIF.
ENDLOOP.
* ENDLOOP.
ENDIF.
**************************************************************************
* In Tabelle einfügen
**************************************************************************
ENDFORM.
*=======================================================================
* Person Info Import
*=======================================================================
*&---------------------------------------------------------------------*
*& Form READ_DATA2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form download_csv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM download_csv.
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_1
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0001_Organisatorische Zuordnung' '.csv' INTO l_filename.
"Header einfügen
CONCATENATE
'Personalnummer;Austrittsdatum;Gültig bis;Gültig ab;Buchungskreis;'
'Personalbereich;Mitarbeitergruppe;Mitarbeiterkreis;Personalteilbereich;'
'Juristische Person;Abrechnungskreis;Anstellungsverhältnis;Kostenstelle;'
'Organisationseinheit;Planstelle;Stellenschlüssel;HR_Payroll;'
'HR_BusinessPartner;HR Administrator;Kostenrechnungskreis;HR Administrator;'
'HR Administrator;Abr.einheit Arbeitsplatz;PLZ;'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;ENDDA;BEGDA;BUKRS;PERSA;PERSG;PERSK;BTRTL;JUPER;ABKRS;ANSVH;'
'KOSTL;ORGEH;PLANS;STELL;SACHA;SACHZ;SACHP;KOKRS;SACHZ;SACHZ;ABREINH;PSTLZ'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM. "download_csv
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv2 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_2
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
* l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0002_Daten zur Person' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Nachname;Vorname;Titel;'
'Anredeschlüssel;Geschlecht;Geburtsdatum;Geburtsland;Geburtsort;'
'Nationalität;Kommunikations- und Korrespondenzsprache;Konfession;'
'Familienstand;Familienstand seit;Anzahl Kinder'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;NACHN;VORNA;TITEL;ANREX;GESCH;GBPAS;GBLND;'
'GBORT;NATIO;SPRSL;KITXT;FATXT;FAMDT;ANZKD'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv6 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_6
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
* l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0006_Anschriften' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Anschriftenart;Straße und Hausnummer;Ort;'
'Postleitzahl / Ort;Länderschlüssel'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;SUBTY;STRAS;'
'ORT01;PSTLZ;LAND1'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv7 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_7
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0007_Sollarbeitszeit' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Arbeitszeitplanregel;Status Zeitwirtschaft;'
'Arbeitszeitanteil;Arbeitsstd pro Monat;Arbeitsstd pro Woche;Arbeitsstd. pro Tag;'
'Wöch. Arbeitsage'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;SCHKZ;ZTERF;EMPCT;'
'MOSTD;WOSTD;ARBST;WKWDY'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv8 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_8
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0008_Basisbezüge' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Tarifart;Tarifgebiet;Tarifgruppe;'
'Tarifstufe;Beschäftigungsgrad;Arbeitsstd.Periode;Jahresgehalt;Lohnart;'
'Betrag;Anzahl/Einheit;Zeit-/Maßeinheit;Operationsknz.;Lohnart;Betrag;'
'Anzahl/Einheit;Zeit-/Maßeinheit;Operationsknz.;Lohnart;Betrag;'
'Anzahl/Einheit;Zeit-/Maßeinheit;Operationsknz.;Lohnart;Betrag;'
'Anzahl/Einheit;Zeit-/Maßeinheit;Operationsknz.;Lohnart;Betrag;'
'Anzahl/Einheit;Zeit-/Maßeinheit;Operationsknz.;Lohnart;Betrag;'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;TRFAR;TRFGB;TRFGR;TRFST;BSGRD;DIVGV;ANSAL;LGA01;'
'BET01;ANZ01;EIN01;OPK01;LGA02;BET02;ANZ02;EIN02;OPK02;LGA03;BET03;'
'ANZ03;EIN03;OPK03;LGA04;BET04;ANZ04;EIN04;OPK04;LGA05;BET05;ANZ05;'
'EIN05;OPK05;LGA06;BET06'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv9 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_9
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0009_Bankverbindung' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Bankverbindungsart;Zahlweg;Empfänger;'
'Vorgabewert;Postleitzahl / Ort;Ort;Bankland;Bankschlüssel;Bankkonto;'
'Verwendungszweck;Straße und Hausnummer;IBAN'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;SUBTY;ZLSCH;EMFTX;BETRG;BKPLZ;BKORT;'
'BANKS;BANKL;BANKN;ZWECK;STRAS;IBAN'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form f4_help
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM f4_help.
* Dialog Bildschirm zum speichern der Daten
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
* window_title = ' '
default_extension = 'CSV'
default_file_name = 'D1_Sätze'
initial_directory = 'c:\temp\'
CHANGING
filename = ld_filename
path = ld_path
fullpath = ld_fullpath
user_action = ld_result.
" p_file = ld_fullpath.
p_file = ld_path.
ENDFORM. "f4_help
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv11 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_11
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0011_Externe Überweisungen' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Art;Gültig bis;Gültig ab;LArt;OpKnz;Betrag;'
'Währg;Anzahl;ZME;Erstes AD;EA;Abs;ZE;P;Empfä;Empfänger;PLZ;'
'Ort;Lnd;Bankschl.;Bankkonto;PZ;KS;SWIFT/BIC;WS;M;St.-Nr. 1;'
'St.-Nr. 2;Postb.Giro;ESR-Nr.;ESR-Referenz;PZ;Verwendungszweck;'
'ZW;Überw.;Referenz;Straße;Rg;IBAN'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;SUBTY;ENDDA;BEGDA;LGART;OPKEN;BETRG;WAERS;ANZHL;ZEINH;'
'ZDATE;ZFPER;ZANZL;ZEINZ;PRITY;EMFSL;EMFTX;BKPLZ;BKORT;BANKS;'
'BANKL;BANKN;BANKP;BKONT;SWIFT;DTAWS;DTAMS;STCD1;STCD2;PSKTO;'
'ESRNR;ESRRE;ESRPZ;ZWECK;ZLSCH;UWDAT;BKREF;STRAS;STATE;IBAN'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv14 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_14
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0014_Wiederkehrende Be- Abzüge' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Lohnart;Operationsknz.;Betrag;'
'Währung;Anzahl/Einheit;Zeit-/Maßeinheit;Erstes Auszahldatum;'
'Erste Auszahlperiode;Abstand/Einheit'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;LGART;OPKEN;BETRG;'
'WAERS;ANZHL;ZEINH;ZDATE;ZFPER;ZANZL'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv15 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_15
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0015_Ergänzende Zahlung' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Lohnart;Operationsknz.;Betrag;'
'Währung;Anzahl/Einheit;Zeit-/Maßeinheit;Ind. Bewertung;Zuordnungsnummer'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;LGART;OPKEN;BETRG;'
'WAERS;ANZHL;ZEINH;INDBW;ZUORD'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv16 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_16
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0016_Vertragsbestandteile' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Nebentätigkeit;Probezeit;'
'Prb;Kündigungsfrist AG;Kündigungsfrist AN;Arbeitserlaubnis;Ersteintrittsdatum;'
'Eintritt Konzern;Konzernschlüssel;Vertragsart;Befristet bis;Mitarbeitergruppe;'
'Mitarbeiterkreis'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;NBTGK;PRBZT;PRBEH;KDGFR;KDGF2;ARBER;EINDT;'
'KONDT;KONSL;CTTYP;CTEDT;PERSG;PERSK'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv21 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_21
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0021_Familie Bezugsperson' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Art;ObjID;Gültig bis;Gültig ab;Mitgl;Geb-Datum;'
'GLd;Nat;Gsch;Vorname;Nachname;Geb-Ort;BL;PersNr;GebName;2. Name;'
'Name;KN;Initialen;Vorsatz;Vorsatz;Zusatzwort;AHV-Nr.;Kdsvh;Kdbsl;'
'Kdutb;Kdgbr;Kdart;Kdzug;Kdzul;KSB;ENr;SVNr;SV-Nr;Bestät.bis;Ab;'
'Institut;AG-Adr;Na2;Na3;Betrag;Titel;Emergency contact'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;SUBTY;OBJPS;ENDDA;BEGDA;FAMSA;FGBDT;FGBLD;FANAT;FASEX;FAVOR;'
'FANAM;FGBOT;FGDEP;ERBNR;FGBNA;FNAC2;FCNAM;FKNZN;FINIT;FVRSW;FVRS2;'
'FNMZU;AHVNR;KDSVH;KDBSL;KDUTB;KDGBR;KDART;KDZUG;KDZUL;KDVBE;ERMNR;'
'AUSVL;AUSVG;FASDT;FASAR;FASIN;EGAGA;FANA2;FANA3;BETRG;TITEL;EMRGN'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv27 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_27
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0027_Kostenverteilung' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Kostenverteilung für;Buchungskreis;'
'Geschäftsbereich;Kostenstelle;Prozentsatz Kosten;Buchungskreis;'
'Geschäftsbereich;Kostenstelle;Prozentsatz Kosten;Buchungskreis;'
'Geschäftsbereich;Kostenstelle;Prozentsatz Kosten'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;KSTAR;KBU01;KGB01;KST01;KPR01;KBU02;KGB02;KST02;'
'KPR02;KBU03;KGB03;KST03;KPR03'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv36 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_36
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0036_Sozialversicherung CH' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;AHV-Pflicht;AHV-Nummer;'
'NBU-Zusatzversicher.;Btrtl. intern UVG/SUVA;UVG/SUVA Pflicht;'
'Betriebsteil;Arbeitslosenkasse;FamAusgKasse;Firmenregel FamAusgleichkasse;'
'Prozentuale SV-Pflicht;Gruppierung Vers.;Gruppierung Vers.;Gruppierung Vers.;'
'Gruppierung Vers.;Gruppierung Vers.;SV-Nummer'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;BEGDA;ENDDA;AHVPF;AHVNR;NBUPF;INTBT;UVGPF;BTRTE;ALVKA;FAMKA;'
'FAMFI;PROZSV;UEB_MODIF;KT_MODIF;CUS1_MODIF;CUS2_MODIF;CUS3_MODIF;'
'NAHVN'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv38 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_38
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0038_Steuerdaten CH' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Kanton;Gemeinde;Steuerpflicht;'
'Pauschalvergütungen von Spesen;Arbeitsort;Bemerkungen Zeile 1;'
'Bemerkungen Zeile 2;Bemerkungen Zeile 3;Quellensteuertarif;'
'Quellenst.-Prozents.;Quellensteuerbetrag;MA-Attributklasse;'
'Mitarbeiterattribut;MA-Attributklasse;Mitarbeiterattribut;'
'MA-Attributklasse;Mitarbeiterattribut;Wohnsitz Gemeindecode Genf;'
'Gemeindecode Arbeitsort GE;Kanton Arbeitsort;Nebenerwerb;'
'Weitere Beschäftigungen;Person lebt in Konkubinat;'
'Bewilligter Quellensteuertarif;Von Steuergem. abweichende Wohngem.;'
'Person erhält Rente QSt'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;BEGDA;ENDDA;KANTO;GEMND;QSTPF;LAUWG;ARBOR;BEMZ1;BEMZ2;BEMZ3;'
'QSTAB;QSPRO;QSBTR;ACL01;EMA01;ACL02;EMA02;ACL03;EMA03;WGMGE;AGMGE;'
'AKANT;NEBEN;ANDBE;CONCU;PRSCA;DIF_MUNIDLIVING;ANNUI'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv46.
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_46
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0046_Berufliche Vorsorge CH' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Versicherungsart;Pensionskasse;'
'Eintrittsdatum;Rentenbeginn;Prämienbasis;Koord.-Korrektur;'
'Versicherungssumme;Versicherungsprämie;Prämie Arbeitgeber'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;BEGDA;ENDDA;VSART;VSGES;EINTV;RENBG;PRBAS;KOORD;VSSUM;'
'VSPRA;PRAAG'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv278 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_278
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0278_Grunddaten Pensionskasse' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Pensionskasse;Externe Identifikation;Eintrittsdatum;'
'Invaliditätsgrad;Vorbehalt bis;Austrittsdatum;individ. Pensionierungsdatum;'
'MA-Attributklasse;Mitarbeiterattribut;MA-Attributklasse;Mitarbeiterattribut;'
'MA-Attributklasse;Mitarbeiterattribut;MA-Attributklasse;Mitarbeiterattribut;'
'MA-Attributklasse;Mitarbeiterattribut;MA-Attributklasse;Mitarbeiterattribut;'
'MA-Attributklasse;Mitarbeiterattribut;MA-Attributklasse;Mitarbeiterattribut;'
'Invaliditätsgrad;Rentenbeginn'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;KASSE;EXTID;EINDT;INVGR;VORBH;AUSDT;PENDT;ACL01;EMA01;ACL02;EMA02;ACL03;'
'EMA03;ACL04;EMA04;ACL05;EMA05;ACL06;EMA06;ACL07;EMA07;ACL08;EMA08;INVDC;ZREBG;'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv279.
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_279
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0279_Individ. Werte Pensionskasse' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Pensionskasse;Währung;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
'Wert (berechnet);Wert (manuell);VS-Wertart;'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;KASSE;WAERS;VAE01;VAM01;VTY01;VAE02;VAM02;VTY02;VAE03;VAM03;'
'VTY03;VAE04;VAM04;VTY04;VAE05;VAM05;VTY05;VAE06;VAM06;VTY06;VAE07;'
'VAM07;VTY07;VAE08;VAM08;VTY08;VAE09;VAM09;VTY09;VAE10;VAM10;VTY10;'
'VAE11;VAM11;VTY11;VAE12;VAM12;VTY12;VAE13;VAM13;VTY13;VAE14;VAM14;'
'VTY14;VAE15;VAM15;VTY15;VAE16;VAM16;VTY16;VAE17;VAM17;VTY17;VAE18;'
'VAM18;VTY18;VAE19;VAM19;VTY19;VAE20;VAM20;VTY20;VAE21;VAM21;VTY21;'
'VAE22;VAM22;VTY22;VAE23;VAM23;VTY23;VAE24;VAM24;VTY24;VAE25;VAM25;'
'VTY25;VAE26;VAM26;VTY26;VAE27;VAM27;VTY27;VAE28;VAM28;VTY28;VAE29;'
'VAM29;VTY29;VAE30;VAM30;VTY30'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv288 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_288
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0288_Personal-Stammsatz Infotyp 21 Zusatz Schweiz' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Subtyp;Objekt-Identifikation;'
'Sperrkennzeichen fuer Personalstammsatz;'
'Gültigkeitsende;Gültigkeitsbeginn;'
'Nummer eines Infotypsatzes bei gleichem Schlüssel;'
'Datum der letzten Änderung;'
'Name des Sachbearbeiters, der das Objekt geändert hat.;'
'Historisierungskennzeichen;Text zum Infotyp existiert;'
'Referenzfelder existieren (Primär/Sekundärkosten);'
'Rückmeldungsfelder existieren;Infotypbildsteuerung;'
'Änderungsgrund Stammdaten;Reservefeld / unbenutztes Feld;'
'Reservefeld / unbenutztes Feld;Reservefeld / unbenutztes Feld;'
'Reservefeld / unbenutztes Feld;'
'Reservefeld / unbenutztes Feld der Länge 2;'
'Reservefeld / unbenutztes Feld der Länge 2;'
'Gruppierungswert für Beschäftigungsverträge;'
'HR-CH: Auszahlungsfaktor Kinder-/Geburtszulage;'
'HR-CH: Steuerkennzeichen Familienzulage;'
'Sozialversicherungsnummer (CH);'
'Wohnland des Kindes Wohnkanton des Kindes;'
'Zulage der erstanspruchsberechtigten Person;'
'Anstellungsverhältnis Partner;Arbeitsland Partner;'
'Arbeitskanton Partne;Arbeitgeber;Zulagenreferenznummer (FamZReg);'
'Zulagennummer;'
'Beginn des Anspruchzeitraums einer Familienzulage (FamZReg);'
'Ende des Anspruchzeitraums einer Familienzulage (FamZReg);'
'ELM 4.0 (Quellensteuer): Abzugsberechtigung;'
'ELM 4.0: Gültigkeitsbeginn (Lohn, Rente,...);'
'ELM 4.0: Gültigkeitsende (Lohn, Rente,...);'
'ELM 4.0 (Quellensteuer): Art der Auszahlung (Partner);'
'Nebenerwerb'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;SUBTY;OBJPS;SPRPS;ENDDA;BEGDA;SEQNR;AEDTM;UNAME;HISTO;'
'ITXEX;REFEX;ORDEX;ITBLD;PREAS;FLAG1;FLAG2;FLAG3;FLAG4;RESE1;'
'RESE2;GRPVL;AUSZFAK;KZKUERZ;NAHVN;LCOUN;LCANT;DIFAL;EMPYN;'
'WCOUN;WCANT;ERADR;ETRNR;ETRNZ;ETBEG;ETEND;WHTDEDUC;PAYBEGDA;'
'PAYENDDA;WORKCOMP;NEBEN;'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv416 .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_416
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0416_Zeitkontingentabgeltungen' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Art;ObjID;Sp;Gültig bis;Gültig ab;'
'AbgeltVor;AKtp;Währg;AbKTy;Regel;AnzAbgg;Betrag;'
'LArt;Konti.nr.;System;Belegnummer;nicht abr.'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;SUBTY;OBJPS;SPRPS;ENDDA;BEGDA;QCTYP;STYPE;WAERS;QTYPE;'
'SRULE;NUMBR;AMONT;WGTYP;QUONR;DOCSY;DOCNR;NOPAY'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv980.
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_980
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT0980_Aus- und Weiterbildungskosten CH' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Art;Gültig bis;Gültig ab;Nr. Ereig.;Institut;'
'Ausb.code;Beginn;Ende;Alt. Text;EntstDatum;LGart AN;Betrag;'
'EntstDatum;LGart AN;Betrag;EntstDatum;LGart AN;Betrag;EntstDatum;'
'LGart AN;Betrag;EntstDatum;LGart AN;Betrag;Gesamt;Währg;Empf.;'
'Verwendungszweck;Betrag;Betrag;Betrag;boolsche Variable (X=Ja, -=Nein);'
'ZZ_BEMERKUNG'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;SUBTY;ENDDA;BEGDA;EVTNR;INKEY;AUKEY;AUBEG;AUEND;FTEXT;DAT01;LGA01;'
'BET01;DAT02;LGA02;BET02;DAT03;LGA03;BET03;DAT04;LGA04;BET04;DAT05;LGA05;'
'BET05;BETRG;WAERS;EMFSL;ZWECK;ZZ_BETRAG_TOT;ZZ_BETRAG_MIT;ZZ_BETRAG_TAM;'
'ZZ_UBERNAHME;ZZ_BEMERKUNG'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv2001.
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_2001
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT2001_Abwesenheiten' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Ab-/Anwesenheitsart;'
'Ab/Anwesenheitstage;Abwesenheitsstunden;Abrechnungstage;'
'Abrechnungsstunden'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;AWART;'
'ABWTG;STDAZ;ABRTG;ABRST'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csv2010.
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_2010
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_IT2010_Entgeltbelege' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Gültig bis;Gültig ab;Lohnart;Anzahl je Zeiteinheit;'
'Zeit-/Maßeinheit;Bewertungsgrundlage;Betrag;'
'Routen-Art/-Nummer;Routen-Nummer;ID Variabler Text;Lohnstufe'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;ENDDA;BEGDA;LGART;ANZHL;'
'ZEINH;BWGRL;BETRG;ZROBJ;ZRTNR;ZVATX;ZZLST'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form DOWNLOAD_CSV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM download_csvcs .
****************************************************************
* Daten konvertieren
****************************************************************
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
i_field_seperator = ';'
TABLES
i_tab_sap_data = gt_data_cs
CHANGING
i_tab_converted_data = outtab_csv
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim konvertieren ins .CSV-Format!'.
ENDIF.
****************************************************************
* Daten speichern
****************************************************************
DATA: l_filename TYPE string.
" l_filename = p_file.
CLEAR: l_filename.
l_filename = p_file.
CONCATENATE l_filename pnpbukrs-low '_LART_Abrechnungsergebnisse' '.csv' INTO l_filename.
"Header einfügen
"Header einfügen
CONCATENATE
'Personalnummer;Lohnart;Langtext für Lohnart;Objekt-Identifikation;'
'Betrag'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Header einfügen 2
CLEAR gs_outtab_csv.
CONCATENATE
'PERNR;LGART;LGTXT;OBJS;'
'BETRG'
INTO gs_outtab_csv.
INSERT gs_outtab_csv INTO outtab_csv INDEX 1.
"Download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = l_filename
TABLES
data_tab = outtab_csv
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
WRITE: 'Fehler ', sy-subrc, ' beim Speichern der .CSV-Datei!'.
ENDIF.
ENDFORM.
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv .
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_1 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*&---------------------------------------------------------------------*
*& Form SHOW_ALV2
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM show_alv2 .
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_2 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. " SHOW_ALV2
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv6 .
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_6 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv7 .
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_7 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv8.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_8 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv9.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_9 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv11 .
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_11 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv14 .
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_14 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv15.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_15 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv16.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_16 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv21.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_21 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv27.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_27 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv36.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_36 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv38.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_38 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv46.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_46 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv278.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_278 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv279.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_279 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv288.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_288 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM.
FORM show_alv416.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_416 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv980.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_980 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv2001.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_2001 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alv2010.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_2010 ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM. "show_alv
*=======================================================================
* FORM SHOW_ALV
*=======================================================================
*&---------------------------------------------------------------------*
*& Form show_alv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM show_alvcs.
*-----------------------------------------------------------------------
* Beginn ALV-Ausgabe
*-----------------------------------------------------------------------
* Kopieren Sie diesen Block an das Endes des Verarbeitungsblocks
* des ABAP-Programms
*-----------------------------------------------------------------------
"**************************************************************************
"* Instanz der Klasse cl_salv_table erzeugen
"**************************************************************************
TRY.
cl_salv_table=>factory(
EXPORTING list_display = if_salv_c_bool_sap=>false
r_container = cl_gui_custom_container=>default_screen
IMPORTING r_salv_table = go_alv
CHANGING t_table = gt_data_cs ).
CATCH cx_salv_msg INTO go_err_salv.
* Fehler anzeigen
gf_string = go_err_salv->get_text( ).
MESSAGE gf_string TYPE 'E'.
ENDTRY.
"**************************************************************************
"* optimale Spaltenbreite aktivieren
"**************************************************************************
" Instanz für Spalten holen
go_columns = go_alv->get_columns( ).
" Spaltenbreite optimieren
go_columns->set_optimize( abap_true ). " nur ein 'X'
"**************************************************************************
"* Selection-Mode aktivieren
"**************************************************************************
" Instanz des Selection-Objektes holen
go_selections = go_alv->get_selections( ).
" Selektionsmodus setzen
go_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
"**************************************************************************
"* Alle Standard-Funktionen auf aktiv setzen
"**************************************************************************
" Instanz für Funktionen holen Funktionstasten (Sortieren, Filtern, Excel-Export etc.)
go_functions = go_alv->get_functions( ).
" Alle Standardfunktionen aktivieren
go_functions->set_all( abap_true ). " nur ein 'X'
"**************************************************************************
"* Alle Standard-Anzeige Möglichkeiten definieren
"**************************************************************************
" Titel und/oder Streifenmuster
go_display = go_alv->get_display_settings( ).
" Titel
go_display->set_list_header( value = TEXT-001 ).
" Streifenmuster
go_display->set_striped_pattern( abap_true ).
"***************************************************************************
"* Alle Standard-Layout Möglichkeiten definieren
"***************************************************************************
" Instanz des Layouts holen get layout object
go_layout = go_alv->get_layout( ).
" set Layout save restriction
" 1. Set Layout Key .. Unique key identifies the Differenet ALVs
gs_key-report = sy-repid.
go_layout->set_key( gs_key ).
" 2. Remove Save layout the restriction.
go_layout->set_save_restriction( if_salv_c_layout=>restrict_none ).
" Default Layout hinterlegen set initial Layout
gf_variant = '/DEFAULT'.
go_layout->set_initial_layout( gf_variant ).
* "***************************************************************************
* "* Doppelklick Ereigniss einbauen.
* "***************************************************************************
* " Ereignisse einlesen und Handler für Doppelklick registrieren
* go_events = go_alv->get_event( ).
* SET HANDLER lcl_event_handler=>on_double_click FOR go_events.
* "**************************************************************************
* "* Toolbar um eigene Funktionen erweitern
* "**************************************************************************
* TRY.
* " Neue Funktion für das ALV vorsehen
* go_functions->add_function(
* name = 'NFUNC'
* icon = '@L1@' " Irgendein ICON aus Tabelle ICON
* text = 'ZHR_LV_COCKPIT_VIEW bearbeiten'
* tooltip = 'Hinzugefügte Funktion'
* position = if_salv_c_function_position=>right_of_salv_functions ).
* CATCH cx_salv_existing INTO go_err_salv_exist.
* " Fehler anzeigen
* gf_string = go_err_salv_exist->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* CATCH cx_salv_wrong_call INTO go_err_wrong_call.
* " Fehler anzeigen
* gf_string = go_err_wrong_call->get_text( ).
* MESSAGE gf_string TYPE 'E'.
* ENDTRY.
"**************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"**************************************************************************
* " Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
* " Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler.
** EXPORTING
** ir_salv = go_alv
** it_cockpit = gt_cockpit.
*
* " ... und bei den Plegeview aufruf registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* Ampel einbauen
"*************************************************************************
* " Ampel einbauen
* " 1. Hole die Zeilen
* go_columns = go_alv->get_columns( ).
* " 2. Hole sag bei welcher Spalte eine Ampelfunktion hinterlegt werden soll.
* go_columns->set_exception_column( value = 'LIGHT' ).
* TRY.
* go_column ?= go_columns->get_column( 'LIGHT' ).
* go_column->set_medium_text( 'STATUS' ).
* go_column->set_long_text( 'STATUS' ).
* go_column->set_short_text( 'STATUS' ).
* CATCH cx_salv_not_found. "#EC NO_HANDLER
* ENDTRY.
"***************************************************************************
"* Ereignis zum Behandeln des Button-Click registrieren
"***************************************************************************
** Das Objekt für die möglichen ALV-Ereignisse holen
* go_events = go_alv->get_event( ).
** Objekt für die Ereignisbehandlung erzeugen ...
* CREATE OBJECT go_event_handler
* EXPORTING
* cr_salv = go_alv
* it_sflight = gt_sflight.
** ... und bei den ALV-Ereignissen registrieren
* SET HANDLER go_event_handler->handle_toolbar_click FOR go_events.
"**************************************************************************
"* ALV-Anzeige anstoßen
"**************************************************************************
" Liste anzeigen
go_alv->display( ).
"**************************************************************************
"* Toolbar um eigene Funktionen erweitern dafür braucht es ein Container
"**************************************************************************
"Trägerbildschirm" für Container rufen (Sonst findet es keinen Container)
WRITE: space.
ENDFORM.
*
*START-OF-SELECTION.
* "Datum aus der Selektion
* gf_begda = pn-begda.
* gf_endda = pn-endda.
*
* GET peras.
* "Logik
* IF p1 = 'X'.
* PERFORM read_data.
* ELSEIF p2 = 'X'.
* PERFORM read_data2.
* ELSEIF p6 = 'X'.
* PERFORM read_data6.
* ELSEIF p7 = 'X'.
* PERFORM read_data7.
* ELSEIF p8 = 'X'.
* PERFORM read_data8.
* ELSEIF p9 = 'X'.
* PERFORM read_data9.
* ELSEIF p11 = 'X'.
* PERFORM read_data11.
* ELSEIF p14 = 'X'.
* PERFORM read_data14.
* ELSEIF p15 = 'X'.
* PERFORM read_data15.
* ELSEIF p16 = 'X'.
* PERFORM read_data16.
* ELSEIF p21 = 'X'.
* PERFORM read_data21.
* ELSEIF p27 = 'X'.
* PERFORM read_data27.
* ELSEIF p36 = 'X'.
* PERFORM read_data36.
* ELSEIF p38 = 'X'.
* PERFORM read_data38.
* ELSEIF p46 = 'X'.
* PERFORM read_data46.
* ELSEIF p278 = 'X'.
* PERFORM read_data278.
* ELSEIF p279 = 'X'.
* PERFORM read_data279 .
* ELSEIF p416 = 'X'.
* PERFORM read_data416.
* ELSEIF p980 = 'X'.
* PERFORM read_data980.
* ELSEIF p01 = 'X'.
* PERFORM read_data2001.
**** ELSEIF p06 = 'X'.
**** PERFORM read_data2006.
* ELSEIF p10 = 'X'.
* PERFORM read_data2010.
* ENDIF.
*
*END-OF-SELECTION.
**=======================================================================
** Ausgabe
**=======================================================================
* IF p1 = 'X'.
* PERFORM show_alv.
* IF p_csv = 'X'.
* PERFORM download_csv.
* ENDIF.
* ELSEIF p2 = 'X'.
* PERFORM show_alv2.
* IF p_csv = 'X'.
* PERFORM download_csv2.
* ENDIF.
* ELSEIF p6 = 'X'.
* PERFORM show_alv6.
* IF p_csv = 'X'.
* PERFORM download_csv6.
* ENDIF.
* ELSEIF p7 = 'X'.
* PERFORM show_alv7.
* IF p_csv = 'X'.
* PERFORM download_csv7.
* ENDIF.
* ELSEIF p8 = 'X'.
* PERFORM show_alv8.
* IF p_csv = 'X'.
* PERFORM download_csv8.
* ENDIF.
* ELSEIF p9 = 'X'.
* PERFORM show_alv9.
* IF p_csv = 'X'.
* PERFORM download_csv9.
* ENDIF.
* ELSEIF p11 = 'X'.
* PERFORM show_alv11.
* IF p_csv = 'X'.
* PERFORM download_csv11.
* ENDIF.
* ELSEIF p14 = 'X'.
* PERFORM show_alv14.
* IF p_csv = 'X'.
* PERFORM download_csv14.
* ENDIF.
* ELSEIF p15 = 'X'.
* PERFORM show_alv15.
* IF p_csv = 'X'.
* PERFORM download_csv15.
* ENDIF.
* ELSEIF p16 = 'X'.
* PERFORM show_alv16.
* IF p_csv = 'X'.
* PERFORM download_csv16.
* ENDIF.
* ELSEIF p21 = 'X'.
* PERFORM show_alv21.
* IF p_csv = 'X'.
* PERFORM download_csv21.
* ENDIF.
* ELSEIF p27 = 'X'.
* PERFORM show_alv27.
* IF p_csv = 'X'.
* PERFORM download_csv27.
* ENDIF.
* ELSEIF p36 = 'X'.
* PERFORM show_alv36.
* IF p_csv = 'X'.
* PERFORM download_csv36.
* ENDIF.
* ELSEIF p38 = 'X'.
* PERFORM show_alv38.
* IF p_csv = 'X'.
* PERFORM download_csv38.
* ENDIF.
* ELSEIF p46 = 'X'.
* PERFORM show_alv46.
* IF p_csv = 'X'.
* PERFORM download_csv46.
* ENDIF.
* ELSEIF p278 = 'X'.
* PERFORM show_alv278.
* IF p_csv = 'X'.
* PERFORM download_csv278.
* ENDIF.
* ELSEIF p279 = 'X'.
* PERFORM show_alv279.
* IF p_csv = 'X'.
* PERFORM download_csv279.
* ENDIF.
* ENDIF.
*&---------------------------------------------------------------------*
*& Form AUSTRITT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM austritt .
"Datendeklarationen für den Funktionsbaustein RP_HIRE+FIRE
DATA: hiredate LIKE rptxxxxx-datum1, "statt type d.
firedate LIKE rptxxxxx-datum1. "statt type d.
DATA: BEGIN OF phifi OCCURS 5.
INCLUDE STRUCTURE phifi.
DATA: END OF phifi.
DATA: begda LIKE prel-begda,
endda LIKE prel-endda.
begda = '19000101'.
endda = '99991231'.
"Eintritt und Austrittsdatum lesen
CALL FUNCTION 'RP_HIRE_FIRE'
EXPORTING
beg = begda
end = endda
IMPORTING
hire_date = hiredate
fire_date = firedate
TABLES
pp0000 = p0000 "input
pp0001 = p0001 "input
pphifi = phifi. "output
IF sy-subrc <> 0.
"Mache nichts
ELSE.
" Hinzufügen des Eintritt und Austrittsdatums
gs_data_1-hire = firedate.
ENDIF.
ENDFORM.