*&———————————————————————*
*& Report ZLMN_DEN_001
*&
*&———————————————————————*
*&
*&
*&———————————————————————*
REPORT ZLMN_DEN_001.
type-pools slis.
data: fieldcat type slis_t_fieldcat_alv.
data: begin of lt_mara occurs 0,
matnr type mara-matnr, ” Malzeme no
maktx type makt-maktx, ” Malzeme Açıklama
renk type slis_t_specialcol_alv, ” ÖzelleÅŸtirme
end of lt_mara.
data: ls_renk type slis_specialcol_alv.
start-of-selection.
perform veriler. ” Verileri Al..
perform raporu_olustur. ” Raporu Bas..
************************************************************************
* VERÄ°LERÄ° AL
************************************************************************
form veriler.
lt_mara-matnr = ‘Deneme 1′.
lt_mara-maktx = ‘Deneme 1 Açıklama’.
append lt_mara.
lt_mara-matnr = ‘Deneme 2′.
lt_mara-maktx = ‘Deneme 2 Açıklama’.
append lt_mara.
lt_mara-matnr = ‘Deneme 3′.
lt_mara-maktx = ‘Deneme 3 Açıklama’.
append lt_mara.
lt_mara-matnr = ‘Deneme 4′.
lt_mara-maktx = ‘Deneme 4 Açıklama’.
append lt_mara.
loop at lt_mara.
if sy-tabix = 2.
clear ls_renk.
ls_renk-fieldname = ‘MAKTX’.
ls_renk-color-col = ‘3’. “Renk Kodu
ls_renk-color-int = ‘1’. “Intensified on/off
ls_renk-color-inv = ‘0’.
append ls_renk to lt_mara-renk.
modify lt_mara.
endif.
endloop.
endform.
************************************************************************
* Raporu OluÅŸtur..
************************************************************************
form raporu_olustur.
data: layout type slis_layout_alv.
layout-coltab_fieldname = ‘TCOLOR’.
perform build_field_catalog.
* CALL ABAP LIST VIEWER (ALV)
CALL FUNCTION ‘REUSE_ALV_GRID_DISPLAY’
EXPORTING
is_layout = layout
it_fieldcat = fieldcat
TABLES
t_outtab = lt_mara.
endform.
************************************************************************
* BUILD_FIELD_CATALOG
************************************************************************
form build_field_catalog.
data: fc_tmp type slis_t_fieldcat_alv with header line.
clear: fieldcat. refresh: fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = ‘Material Number’.
fc_tmp-fieldname = ‘MATNR’.
fc_tmp-tabname = ‘lt_mara’.
fc_tmp-outputlen = ’18’.
fc_tmp-col_pos = 2.
append fc_tmp to fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = ‘Material’.
fc_tmp-fieldname = ‘MAKTX’.
fc_tmp-tabname = ‘lt_mara’.
fc_tmp-outputlen = ’40’.
fc_tmp-col_pos = 3.
append fc_tmp to fieldcat.
endform.
***********************************************************
Serkan AKKAVAK
Bilgisayar Mühendisi
serkurumsal@yandex.com
SAP ve ABAP konusunda tüm sorun ve sorularınızı gönderebilirsiniz.
*& Report ZLMN_DEN_001
*&
*&———————————————————————*
*&
*&
*&———————————————————————*
REPORT ZLMN_DEN_001.
type-pools slis.
data: fieldcat type slis_t_fieldcat_alv.
data: begin of lt_mara occurs 0,
matnr type mara-matnr, ” Malzeme no
maktx type makt-maktx, ” Malzeme Açıklama
renk type slis_t_specialcol_alv, ” ÖzelleÅŸtirme
end of lt_mara.
data: ls_renk type slis_specialcol_alv.
start-of-selection.
perform veriler. ” Verileri Al..
perform raporu_olustur. ” Raporu Bas..
************************************************************************
* VERÄ°LERÄ° AL
************************************************************************
form veriler.
lt_mara-matnr = ‘Deneme 1′.
lt_mara-maktx = ‘Deneme 1 Açıklama’.
append lt_mara.
lt_mara-matnr = ‘Deneme 2′.
lt_mara-maktx = ‘Deneme 2 Açıklama’.
append lt_mara.
lt_mara-matnr = ‘Deneme 3′.
lt_mara-maktx = ‘Deneme 3 Açıklama’.
append lt_mara.
lt_mara-matnr = ‘Deneme 4′.
lt_mara-maktx = ‘Deneme 4 Açıklama’.
append lt_mara.
loop at lt_mara.
if sy-tabix = 2.
clear ls_renk.
ls_renk-fieldname = ‘MAKTX’.
ls_renk-color-col = ‘3’. “Renk Kodu
ls_renk-color-int = ‘1’. “Intensified on/off
ls_renk-color-inv = ‘0’.
append ls_renk to lt_mara-renk.
modify lt_mara.
endif.
endloop.
endform.
************************************************************************
* Raporu OluÅŸtur..
************************************************************************
form raporu_olustur.
data: layout type slis_layout_alv.
layout-coltab_fieldname = ‘TCOLOR’.
perform build_field_catalog.
* CALL ABAP LIST VIEWER (ALV)
CALL FUNCTION ‘REUSE_ALV_GRID_DISPLAY’
EXPORTING
is_layout = layout
it_fieldcat = fieldcat
TABLES
t_outtab = lt_mara.
endform.
************************************************************************
* BUILD_FIELD_CATALOG
************************************************************************
form build_field_catalog.
data: fc_tmp type slis_t_fieldcat_alv with header line.
clear: fieldcat. refresh: fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = ‘Material Number’.
fc_tmp-fieldname = ‘MATNR’.
fc_tmp-tabname = ‘lt_mara’.
fc_tmp-outputlen = ’18’.
fc_tmp-col_pos = 2.
append fc_tmp to fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = ‘Material’.
fc_tmp-fieldname = ‘MAKTX’.
fc_tmp-tabname = ‘lt_mara’.
fc_tmp-outputlen = ’40’.
fc_tmp-col_pos = 3.
append fc_tmp to fieldcat.
endform.
***********************************************************
Serkan AKKAVAK
Bilgisayar Mühendisi
serkurumsal@yandex.com
SAP ve ABAP konusunda tüm sorun ve sorularınızı gönderebilirsiniz.
Social Plugin