Code: Alles auswählen.
REPORT zv9bk0007 LINE-SIZE 255 .
TABLES: vbak.
TYPES: BEGIN OF auftrag,
kunnr TYPE kunnr,
vkbur TYPE vkbur,
vbeln TYPE vbeln_va,
auart TYPE auart,
ernam TYPE ernam,
erdat TYPE erdat,
netwr TYPE netwr_ak,
waerk TYPE waerk,
land TYPE land,
name1 TYPE name,
anz_pos TYPE p,
edi(1) TYPE c,
END OF auftrag.
TYPES: BEGIN OF itab,
vkbur TYPE vkbur,
kunnr TYPE kunnr,
land TYPE land,
name1 TYPE name,
edi(1) TYPE c,
anz_auf_teccom TYPE i,
anz_auf_sonst TYPE i,
anz_pos_teccom TYPE i,
anz_pos_sonst TYPE i,
anz_auf_ges TYPE i,
anz_pos_ges TYPE i,
prozent_pos TYPE p DECIMALS 1,
wert_sonst TYPE p DECIMALS 2,
wert_teccom TYPE p DECIMALS 2,
wert_ges TYPE p DECIMALS 2,
prozent_wert TYPE p DECIMALS 1,
END OF itab.
DATA: wa_auftrag TYPE auftrag.
DATA: wa_tab TYPE itab.
DATA: gt_auftrag TYPE HASHED TABLE OF auftrag WITH UNIQUE KEY vbeln.
DATA: gt_tab TYPE HASHED TABLE OF itab WITH UNIQUE DEFAULT KEY.
DATA: ausgabe_tab TYPE STANDARD TABLE OF itab.
DATA: g_datum_low TYPE sy-datum,
g_datum_high TYPE sy-datum.
DATA: g_land TYPE land,
g_name1 TYPE name.
CONSTANTS: name(12) VALUE 'TECCOM'.
RANGES: r_auart FOR vbak-auart.
* ALV
TYPE-POOLS: slis.
CONSTANTS:
gc_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
DATA: gt_list_top_of_page TYPE slis_t_listheader,
gt_events TYPE slis_t_event,
g_repid LIKE sy-repid.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
gs_layout TYPE slis_layout_alv,
gt_sp_group TYPE slis_t_sp_group_alv,
g_variant LIKE disvariant,
gt_excluding TYPE slis_extab OCCURS 1,
wa_excluding TYPE slis_extab,
gt_print TYPE slis_print_alv,
params LIKE pri_params,
valid TYPE c,
spras(1) TYPE c.
DATA: gt_event_exit TYPE slis_t_event_exit,
wa_event_exit TYPE slis_event_exit,
gt_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
* ALV Ende
PARAMETERS p_waerk TYPE vbak-waerk DEFAULT 'EUR' OBLIGATORY.
SELECT-OPTIONS: s_erdat FOR sy-datum,
s_kunnr FOR vbak-kunnr,
s_edi FOR vbak-kunnr NO INTERVALS,
s_vkorg for vbak-vkorg default '3000' obligatory,
s_vtweg for vbak-vtweg default '03' obligatory.
INITIALIZATION.
s_erdat-low = sy-datum.
s_erdat-low+4(4) = '0101'.
IF sy-datum+4(2) = '01'.
s_erdat-high = s_erdat-low - 1.
s_erdat-low = s_erdat-high.
s_erdat-low+4(4) = '0101'.
ELSE.
s_erdat-high = sy-datum.
s_erdat-high+6(2) = '01'.
s_erdat-high = s_erdat-high - 1.
ENDIF.
s_erdat-option = 'BT'.
s_erdat-sign = 'I'.
APPEND s_erdat.
START-OF-SELECTION.
g_datum_low = sy-datum.
r_auart-low = 'ZTA'.
r_auart-sign = 'I'.
r_auart-option = 'EQ'.
APPEND r_auart.
r_auart-low = 'ZSO'.
APPEND r_auart.
SELECT vbak~vbeln vbak~auart vbak~ernam
vbak~erdat vbak~kunnr vbak~vkbur
vbak~netwr vbak~waerk
COUNT( * ) AS anz_pos
FROM vbak
INNER JOIN vbap ON vbak~vbeln = vbap~vbeln
INTO CORRESPONDING FIELDS OF TABLE gt_auftrag
WHERE vkorg in s_vkorg
AND vtweg in s_vtweg
AND auart IN r_auart
AND vbak~erdat IN s_erdat
AND kunnr IN s_kunnr
GROUP BY VBAK~VBELN vbak~auart VBAK~ERNAM
vbak~erdat vbak~kunnr vbak~vkbur
vbak~netwr vbak~waerk.
SORT gt_auftrag BY kunnr ernam.
LOOP AT gt_auftrag INTO wa_auftrag.
IF wa_auftrag-erdat < g_datum_low.
g_datum_low = wa_auftrag-erdat.
ENDIF.
IF wa_auftrag-erdat > g_datum_high.
g_datum_high = wa_auftrag-erdat.
ENDIF.
IF wa_auftrag-waerk <> p_waerk.
PERFORM waehrungsumrechnung
USING wa_auftrag-netwr wa_auftrag-waerk wa_auftrag-erdat.
ENDIF.
AT NEW kunnr.
SELECT SINGLE name1 land1 FROM kna1 INTO (g_name1, g_land)
WHERE kunnr = wa_auftrag-kunnr.
ENDAT.
wa_auftrag-land = g_land.
wa_auftrag-name1 = g_name1.
MODIFY TABLE gt_auftrag FROM wa_auftrag
TRANSPORTING land name1 netwr.
ENDLOOP.
LOOP AT gt_auftrag INTO wa_auftrag.
AT NEW kunnr.
CLEAR wa_tab.
ENDAT.
MOVE-CORRESPONDING wa_auftrag TO wa_tab.
IF wa_auftrag-ernam = name.
ADD 1 TO wa_tab-anz_auf_teccom.
ADD wa_auftrag-anz_pos TO wa_tab-anz_pos_teccom.
ADD wa_auftrag-netwr TO wa_tab-wert_teccom.
ELSE.
ADD 1 TO wa_tab-anz_auf_sonst.
ADD wa_auftrag-anz_pos TO wa_tab-anz_pos_sonst.
ADD wa_auftrag-netwr TO wa_tab-wert_sonst.
ENDIF.
AT END OF kunnr.
wa_tab-anz_pos_ges = wa_tab-anz_pos_sonst + wa_tab-anz_pos_teccom.
wa_tab-anz_auf_ges = wa_tab-anz_auf_sonst + wa_tab-anz_auf_teccom.
wa_tab-wert_ges = wa_tab-wert_sonst + wa_tab-wert_teccom.
IF wa_tab-kunnr IN s_edi and not s_edi is initial.
wa_tab-edi = 'X'.
ADD wa_tab-anz_pos_sonst TO wa_tab-anz_pos_teccom.
ADD wa_tab-anz_auf_sonst TO wa_tab-anz_auf_teccom.
ADD wa_tab-wert_sonst TO wa_tab-wert_teccom.
ENDIF.
IF wa_tab-anz_pos_teccom = 0.
wa_tab-prozent_pos = 0.
ELSE.
wa_tab-prozent_pos =
( wa_tab-anz_pos_teccom / wa_tab-anz_pos_ges ) * 100.
ENDIF.
IF wa_tab-wert_teccom = 0.
wa_tab-prozent_wert = 0.
ELSE.
wa_tab-prozent_wert =
( wa_tab-wert_teccom / wa_tab-wert_ges ) * 100.
ENDIF.
INSERT wa_tab INTO TABLE gt_tab.
CLEAR wa_tab.
ENDAT.
ENDLOOP.
END-OF-SELECTION.
APPEND LINES OF gt_tab TO ausgabe_tab.
PERFORM layout_build USING gs_layout.
PERFORM sort_build USING gt_sort.
PERFORM init_fieldcat USING gt_fieldcat.
* PERFORM e04_comment_build USING gt_list_top_of_page[].
* PERFORM e03_eventtab_build USING gt_events[].
g_repid = sy-repid.
* g_variant-report = sy-repid.
* g_variant-variant = '/Z1_1PREIS'.
wa_event_exit-ucomm = 'Z001'.
wa_event_exit-before = 'X'.
APPEND wa_event_exit TO gt_event_exit.
*Top-Of-Page
PERFORM set_event_for_alv USING gt_events.
* NO_COVERPAGE bewirkt, dass die Datenstatistik nicht auf einem
* Extrablatt ausgegeben wird.
gt_print-no_coverpage = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
i_bypassing_buffer = 'X'
* I_BUFFER_ACTIVE = ' '
i_callback_program = g_repid
* i_callback_pf_status_set = ''
* i_callback_user_command = ''
* i_structure_name = 'z1m0mm_0001'
is_layout = gs_layout
it_fieldcat = gt_fieldcat
* it_excluding = gt_excluding
* IT_SPECIAL_GROUPS =
it_sort = gt_sort
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* i_save = 'U' "JS 22.09.2003
i_save = 'A' "JS 22.09.2003
is_variant = g_variant
it_events = gt_events[]
* it_event_exit = gt_event_exit
is_print = gt_print
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = ausgabe_tab.
* EXCEPTIONS
* PROGRAM_ERROR = 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.
ENDIF.
*---------------------------------------------------------------------*
* FORM waehrungsumrechnung *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> BETRAG *
* --> WAEHRUNG *
* --> DATUM *
*---------------------------------------------------------------------*
FORM waehrungsumrechnung USING betrag waehrung datum.
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
EXPORTING
* CLIENT = SY-MANDT
date = datum
foreign_amount = betrag
foreign_currency = waehrung
local_currency = p_waerk
* RATE = 0
* TYPE_OF_RATE = 'M'
* READ_TCURR = 'X'
IMPORTING
* EXCHANGE_RATE =
* FOREIGN_FACTOR =
local_amount = betrag
* LOCAL_FACTOR =
* EXCHANGE_RATEX =
* FIXED_RATE =
* DERIVED_RATE_TYPE =
EXCEPTIONS
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
derived_2_times = 5
OTHERS = 6.
IF sy-subrc > 0.
WRITE: / 'Fehler beim umrechnen'.
ENDIF.
ENDFORM.
*---------------------------------------------------------------------*
* FORM init_fieldcat *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> P_GT_FIELDCAT *
*---------------------------------------------------------------------*
FORM init_fieldcat USING p_gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: ls_fieldcat TYPE slis_fieldcat_alv,
wa_textpool TYPE textpool.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'VKBUR'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Verkaufsbüro'.
ls_fieldcat-seltext_m = 'Verk.büro'.
ls_fieldcat-seltext_s = 'Vkbüro'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'LAND'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Land'.
ls_fieldcat-seltext_m = 'Land'.
ls_fieldcat-seltext_s = 'Land'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'KUNNR'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Kunde'.
ls_fieldcat-seltext_m = 'Kunde'.
ls_fieldcat-seltext_s = 'Kunde'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'NAME1'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Name'.
ls_fieldcat-seltext_m = 'Name'.
ls_fieldcat-seltext_s = 'Name'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'EDI'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'EDI'.
ls_fieldcat-seltext_m = 'EDI'.
ls_fieldcat-seltext_s = 'EDI'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_AUF_TECCOM'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Aufträge TecCom'.
ls_fieldcat-seltext_m = 'Auftr. TecCom'.
ls_fieldcat-seltext_s = 'A.TecCom'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_AUF_SONST'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'sonstige Aufträge'.
ls_fieldcat-seltext_m = 'sonst. Auftr.'.
ls_fieldcat-seltext_s = 'sonst. A.'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_POS_TECCOM'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Positionen TecCom'.
ls_fieldcat-seltext_m = 'Pos. TecCom'.
ls_fieldcat-seltext_s = 'P. TecCom'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_POS_SONST'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'sonst. Positionen'.
ls_fieldcat-seltext_m = 'sonst. Pos.'.
ls_fieldcat-seltext_s = 'sonst. P.'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_AUF_GES'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Aufträge gesamt'.
ls_fieldcat-seltext_m = 'Auftr. ges.'.
ls_fieldcat-seltext_s = 'A. ges.'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_POS_GES'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Positionen gesamt'.
ls_fieldcat-seltext_m = 'Pos. ges.'.
ls_fieldcat-seltext_s = 'P. ges.'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'PROZENT_POS'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'real. Pos. in %'.
ls_fieldcat-seltext_m = 'Pos. %'.
ls_fieldcat-seltext_s = 'P. %'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'WERT_TECCOM'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Auftragswert TecCom'.
ls_fieldcat-seltext_m = 'Wert TecCom'.
ls_fieldcat-seltext_s = 'Wert T'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'WERT_SONST'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Auftragswert sonst.'.
ls_fieldcat-seltext_m = 'Wert sonst.'.
ls_fieldcat-seltext_s = 'Wert S'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'WERT_GES'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Auftragswert ges.'.
ls_fieldcat-seltext_m = 'Wert ges.'.
ls_fieldcat-seltext_s = 'gesamt'.
APPEND ls_fieldcat TO p_gt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'PROZENT_WERT'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'real. Auftragswert %.'.
ls_fieldcat-seltext_m = 'real. Wert %'.
ls_fieldcat-seltext_s = 'Wert %'.
APPEND ls_fieldcat TO p_gt_fieldcat.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form LAYOUT_BUILD
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_GS_LAYOUT text
*----------------------------------------------------------------------*
FORM layout_build USING p_gs_layout TYPE slis_layout_alv.
p_gs_layout-colwidth_optimize = 'X'.
* p_gs_layout-no_vline = 'X'.
p_gs_layout-zebra = 'X'.
p_gs_layout-cell_merge = 'X'.
p_gs_layout-info_fieldname = 'LINE_COLOR'.
ENDFORM. " LAYOUT_BUILD
*&---------------------------------------------------------------------*
*& Form sort_build
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM sort_build USING p_gt_sort TYPE slis_t_sortinfo_alv.
wa_sort-spos = '01'.
wa_sort-fieldname = 'VKBUR'.
wa_sort-tabname = 'AUSGABE_TAB'.
wa_sort-up = 'X'.
* wa_sort-down = 'X'.
*wa_sort-group
*wa_sort-subtot
*wa_sort-comp
*wa_sort-expa
*wa_sort-obligatory
APPEND wa_sort TO p_gt_sort.
ENDFORM. " sort_build
*---------------------------------------------------------------------*
* FORM top_of_page *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
*---------------------------------------------------------------------*
* FORM top_of_page *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM top_of_page.
*
DATA: ls_line TYPE slis_listheader,
lt_top_of_page TYPE TABLE OF slis_listheader.
SET LOCALE LANGUAGE spras.
* Listenüberschrift: Typ H
CLEAR ls_line.
ls_line-typ = 'H'.
* LS_LINE-KEY: not used for this type
ls_line-info = sy-repid.
ls_line-info+15 = sy-title.
APPEND ls_line TO lt_top_of_page.
* Kopfinfo: Typ S
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-key = 'Zeitraum:'.
WRITE g_datum_low TO ls_line-info.
WRITE '-' TO ls_line-info+10.
WRITE g_datum_high TO ls_line-info+11.
APPEND ls_line TO lt_top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lt_top_of_page.
ENDFORM.
*---------------------------------------------------------------------*
* FORM set_event_for_alv *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
* --> LT_EVENTS *
*---------------------------------------------------------------------*
FORM set_event_for_alv USING lt_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = lt_events.
* prüfen, ob das event für den listentyp 0 gibt.
READ TABLE lt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
* wenn ja dann unseren Perform setzten.
MOVE 'TOP_OF_PAGE' TO ls_event-form.
APPEND ls_event TO lt_events.
ENDIF.
ENDFORM. "set_event_for_alv
khb hat geschrieben:Die Summierung erfolgt für diese Spalte:
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = 'ANZ_POS_TECCOM'.
ls_fieldcat-ref_tabname = 'AUSGABE_TAB'.
ls_fieldcat-seltext_l = 'Positionen TecCom'.
ls_fieldcat-seltext_m = 'Pos. TecCom'.
ls_fieldcat-seltext_s = 'P. TecCom'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO p_gt_fieldcat.
Aufbau des Fieldcats s.u.
Grüße HartmutCode: Alles auswählen.
FORM init_fieldcat USING p_gt_fieldcat TYPE slis_t_fieldcat_alv. DATA: ls_fieldcat TYPE slis_fieldcat_alv, wa_textpool TYPE textpool. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'VKBUR'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Verkaufsbüro'. ls_fieldcat-seltext_m = 'Verk.büro'. ls_fieldcat-seltext_s = 'Vkbüro'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'LAND'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Land'. ls_fieldcat-seltext_m = 'Land'. ls_fieldcat-seltext_s = 'Land'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'KUNNR'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Kunde'. ls_fieldcat-seltext_m = 'Kunde'. ls_fieldcat-seltext_s = 'Kunde'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'NAME1'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Name'. ls_fieldcat-seltext_m = 'Name'. ls_fieldcat-seltext_s = 'Name'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'EDI'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'EDI'. ls_fieldcat-seltext_m = 'EDI'. ls_fieldcat-seltext_s = 'EDI'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'ANZ_AUF_TECCOM'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Aufträge TecCom'. ls_fieldcat-seltext_m = 'Auftr. TecCom'. ls_fieldcat-seltext_s = 'A.TecCom'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'ANZ_AUF_SONST'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'sonstige Aufträge'. ls_fieldcat-seltext_m = 'sonst. Auftr.'. ls_fieldcat-seltext_s = 'sonst. A.'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'ANZ_POS_TECCOM'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Positionen TecCom'. ls_fieldcat-seltext_m = 'Pos. TecCom'. ls_fieldcat-seltext_s = 'P. TecCom'. ls_fieldcat-do_sum = 'X'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'ANZ_POS_SONST'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'sonst. Positionen'. ls_fieldcat-seltext_m = 'sonst. Pos.'. ls_fieldcat-seltext_s = 'sonst. P.'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'ANZ_AUF_GES'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Aufträge gesamt'. ls_fieldcat-seltext_m = 'Auftr. ges.'. ls_fieldcat-seltext_s = 'A. ges.'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'ANZ_POS_GES'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Positionen gesamt'. ls_fieldcat-seltext_m = 'Pos. ges.'. ls_fieldcat-seltext_s = 'P. ges.'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'PROZENT_POS'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'real. Pos. in %'. ls_fieldcat-seltext_m = 'Pos. %'. ls_fieldcat-seltext_s = 'P. %'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'WERT_TECCOM'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Auftragswert TecCom'. ls_fieldcat-seltext_m = 'Wert TecCom'. ls_fieldcat-seltext_s = 'Wert T'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'WERT_SONST'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Auftragswert sonst.'. ls_fieldcat-seltext_m = 'Wert sonst.'. ls_fieldcat-seltext_s = 'Wert S'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'WERT_GES'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'Auftragswert ges.'. ls_fieldcat-seltext_m = 'Wert ges.'. ls_fieldcat-seltext_s = 'gesamt'. APPEND ls_fieldcat TO p_gt_fieldcat. CLEAR ls_fieldcat. ls_fieldcat-fieldname = 'PROZENT_WERT'. ls_fieldcat-ref_tabname = 'AUSGABE_TAB'. ls_fieldcat-seltext_l = 'real. Auftragswert %.'. ls_fieldcat-seltext_m = 'real. Wert %'. ls_fieldcat-seltext_s = 'Wert %'. APPEND ls_fieldcat TO p_gt_fieldcat. ENDFORM.