Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Form anz_grid
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM anz_grid.
DATA: ls_fieldc Type lvc_s_fcat.
ls_fieldc-NO_CONVEXT = 'X'.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
* EXPORTING
* I_PROGRAM_NAME =
* I_INTERNAL_TABNAME =
* I_STRUCTURE_NAME =
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = ls_fieldc
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
* I_CALLBACK_PROGRAM = ' '
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_CALLBACK_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = 'z13k_mat_kalk'
* I_BACKGROUND_ID = ' '
* I_GRID_TITLE =
* I_GRID_SETTINGS =
* IS_LAYOUT =
* IT_FIELDCAT =
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_mat
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.
ENDFORM.
Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Form anz_grid
*&---------------------------------------------------------------------*
FORM anz_grid.
DATA lt_fcat type SLIS_T_FIELDCAT_ALV.
field-symbols <fcat> type slis_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'z13k_mat_kalk'
CHANGING
ct_fieldcat = lt_fcat.
loop at lt_fcat assigning <fcat>.
case <fcat>-fieldname.
when 'MATNR'.
<fcat>-no_convext = 'X'.
endcase.
endloop.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = space
IT_FIELDCAT = lt_Fcat
TABLES
t_outtab = it_mat
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM.
hier...Spookykid hat geschrieben: Ich habe leider keien Ahnung, wie das funktioniert. Kennt jemand Literatur wo ich solche Standardsachen finde?
Code: Alles auswählen.
TYPE-POOLS: SLIS.
Code: Alles auswählen.
*iterieren der Tabelle
LOOP AT it_mat INTO wa_mat.
WRITE:
/ wa_mat-werks UNDER 'Werk',
wa_mat-datum UNDER 'Datum',
wa_mat-matnr UNDER 'Materialnummer',
wa_mat-losgr UNDER 'Losgröße',
wa_mat-aenderer UNDER 'Erstellt von',
wa_mat-erledigt UNDER 'Erledigt',
wa_mat-hinweis UNDER 'Hinweis'.
ENDLOOP.