Material Master Report Original

  • Uploaded by: Sanjay Parab
  • 0
  • 0
  • August 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Material Master Report Original as PDF for free.

More details

  • Words: 2,264
  • Pages: 13
*&---------------------------------------------------------------------* *& REPORT ZMATERIAL_MASTAR_REPORT *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT zmaterial_mastar_report. TYPE-POOLS: slis. TABLES: mvke, mara, mchb, mard, marc. TYPES: BEGIN OF ty_mchb, matnr TYPE mchb-matnr, werks TYPE mchb-werks, END OF ty_mchb, BEGIN OF ty_marc, matnr TYPE marc-matnr, werks TYPE marc-werks, prctr TYPE marc-prctr, STEUC TYPE marc-STEUC, END OF ty_marc, BEGIN OF ty_makt, matnr TYPE makt-matnr, maktx TYPE makt-maktx, END OF ty_makt, BEGIN OF ty_ausp, objek TYPE ausp-objek, atinn TYPE ausp-atinn, klart TYPE ausp-klart, END OF ty_ausp, BEGIN OF ty_mara, matnr TYPE mara-matnr, spart TYPE mara-spart, mtart TYPE mara-mtart, meins TYPE mara-meins, ean11 TYPE mara-ean11, matkl TYPE mara-matkl, xchpf TYPE mara-xchpf, mhdrz TYPE mara-mhdrz, mhdhb TYPE mara-mhdhb, iprkz TYPE mara-iprkz, rdmhd TYPE mara-rdmhd, objek TYPE inob-objek, END OF ty_mara, BEGIN OF ty_mvke, matnr TYPE mvke-matnr, vkorg TYPE mvke-vkorg, vtweg TYPE mvke-vtweg, mvgr1 TYPE mvke-mvgr1, mvgr2 TYPE mvke-mvgr2, mvgr3 TYPE mvke-mvgr3,

"""added 05072017

mvgr4 TYPE mvke-mvgr4, mvgr5 TYPE mvke-mvgr5, END OF ty_mvke, BEGIN OF ty_tvm1t, mvgr1 TYPE tvm1t-mvgr1, bezei TYPE tvm1t-bezei, spras TYPE tvm1t-spras, END OF ty_tvm1t, BEGIN OF ty_tvm2t, mvgr2 TYPE tvm2t-mvgr2, bezei TYPE tvm2t-bezei, spras TYPE tvm2t-spras, END OF ty_tvm2t, BEGIN OF ty_tvm3t, mvgr3 TYPE tvm3t-mvgr3, bezei TYPE tvm3t-bezei, spras TYPE tvm3t-spras, END OF ty_tvm3t, BEGIN OF ty_tvm4t, mvgr4 TYPE tvm4t-mvgr4, bezei TYPE tvm4t-bezei, spras TYPE tvm4t-spras, END OF ty_tvm4t, BEGIN OF ty_tvm5t, mvgr5 TYPE tvm5t-mvgr5, bezei TYPE tvm5t-bezei, spras TYPE tvm5t-spras, END OF ty_tvm5t, BEGIN OF ty_mbew, matnr TYPE mbew-matnr, bwkey TYPE mbew-bwkey, verpr TYPE mbew-verpr, bklas TYPE mbew-bklas, END OF ty_mbew, BEGIN OF ty_klah, klart TYPE klah-klart, class TYPE klah-class, clint TYPE klah-clint, END OF ty_klah, BEGIN OF ty_a900, matnr TYPE a900-matnr, knumh TYPE a900-knumh, kschl TYPE a900-kschl, END OF ty_a900, BEGIN OF ty_a304, matnr TYPE a304-matnr, knumh TYPE a304-knumh, kschl TYPE a304-kschl, END OF ty_a304,

BEGIN OF ty_konp, knumh TYPE konp-knumh, kbetr TYPE konp-kbetr, END OF ty_konp, BEGIN OF ty_mard, matnr TYPE mard-matnr, werks TYPE mard-werks, lgort TYPE mard-lgort, END OF ty_mard, BEGIN OF ty_t023, matkl TYPE t023t-matkl, wgbez TYPE t023t-wgbez, END OF ty_t023, BEGIN OF ty_vapma, vkorg TYPE vapma-vkorg, vtweg TYPE vapma-vtweg, matnr TYPE vapma-matnr, END OF ty_vapma, BEGIN OF ty_inob1, objek TYPE inob-objek, klart TYPE inob-klart, cuobj TYPE inob-cuobj, iobj1(18) TYPE c, END OF ty_inob1, BEGIN OF ty_final, matnr TYPE mara-matnr, spart TYPE mara-spart, mtart TYPE mara-mtart, meins TYPE mara-meins, ean11 TYPE mara-ean11, matkl TYPE mara-matkl, xchpf TYPE mara-xchpf, mhdrz TYPE mara-mhdrz, mhdhb TYPE mara-mhdhb, iprkz TYPE mara-iprkz, rdmhd TYPE mara-rdmhd, STEUC TYPE marc-STEUC, """"added 05072017 maktx TYPE makt-maktx, verpr TYPE mbew-verpr, bklas TYPE mbew-bklas, mrp TYPE konp-kbetr, srm TYPE konp-kbetr, rem TYPE konp-kbetr, lgort TYPE mard-lgort, mvgr1 TYPE mvke-mvgr1, mvgr2 TYPE mvke-mvgr2, mvgr3 TYPE mvke-mvgr3, mvgr4 TYPE mvke-mvgr4, mvgr5 TYPE mvke-mvgr5, tmvgr1 TYPE tvm1t-bezei, tmvgr2 TYPE tvm2t-bezei, tmvgr3 TYPE tvm3t-bezei, tmvgr4 TYPE tvm4t-bezei, tmvgr5 TYPE tvm5t-bezei,

vtweg TYPE mvke-vtweg, klart TYPE klah-klart, class TYPE klasse_d, werks TYPE marc-werks, prctr TYPE marc-prctr, wgbez TYPE t023t-wgbez, prtxt TYPE prdkzt-prtxt, clint TYPE kssk-clint, END OF ty_final, BEGIN OF ty_inob, obj TYPE inob-objek, END OF ty_inob, BEGIN OF ty_prdk, iprkz TYPE prdkzt-iprkz, prtxt TYPE prdkzt-prtxt, spras TYPE prdkzt-spras, END OF ty_prdk, BEGIN OF ty_kssk, objek TYPE kssk-objek, klart TYPE kssk-klart, clint TYPE clint, END OF ty_kssk. DATA: it_inob TYPE TABLE OF ty_inob, wa_inob TYPE ty_inob. DATA: it_final it_final1 wa_final it_t023 wa_t023 it_prdk wa_prdk it_inob1 wa_inob1 it_mchb wa_mchb it_konp wa_konp it_konp2 wa_konp2 it_konp3 wa_konp3 it_a304 wa_a304 it_a3042 wa_a3042 it_marc wa_marc it_mbew wa_mbew it_mara wa_mara it_makt wa_makt it_ausp

TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE

TABLE OF ty_final, TABLE OF ty_final, ty_final, TABLE OF ty_t023, ty_t023, TABLE OF ty_prdk, ty_prdk, TABLE OF ty_inob1, ty_inob1, TABLE OF ty_mchb, ty_mchb, TABLE OF ty_konp, ty_konp, TABLE OF ty_konp, ty_konp, TABLE OF ty_konp, ty_konp, TABLE OF ty_a304, ty_a304, TABLE OF ty_a304, ty_a304, TABLE OF ty_marc, ty_marc, TABLE OF ty_mbew, ty_mbew, TABLE OF ty_mara, ty_mara, TABLE OF ty_makt, ty_makt, TABLE OF ty_ausp,

wa_ausp it_mvke wa_mvke it_mvke1 wa_mvke1 it_tvm1t wa_tvm1t it_tvm2t wa_tvm2t it_tvm3t wa_tvm3t it_tvm4t wa_tvm4t it_tvm5t wa_tvm5t it_vapma wa_vapma it_klah wa_klah it_a900 wa_a900 it_mard wa_mard

TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE TYPE

ty_ausp, TABLE OF ty_mvke, ty_mvke, TABLE OF ty_mvke, ty_mvke, TABLE OF ty_tvm1t, ty_tvm1t, TABLE OF ty_tvm2t, ty_tvm2t, TABLE OF ty_tvm3t, ty_tvm3t, TABLE OF ty_tvm4t, ty_tvm4t, TABLE OF ty_tvm5t, ty_tvm5t, TABLE OF ty_vapma, ty_vapma, TABLE OF ty_klah, ty_klah, TABLE OF ty_a900, ty_a900, TABLE OF ty_mard, ty_mard,

it_kssk wa_kssk

TYPE TABLE OF ty_kssk, TYPE ty_kssk,

it_fcat wa_fcat

TYPE slis_t_fieldcat_alv, TYPE slis_fieldcat_alv,

it_layo

TYPE slis_layout_alv.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. PARAMETERS: p_vkorg TYPE mvke-vkorg OBLIGATORY DEFAULT 1000. SELECT-OPTIONS: s_werks FOR mard-werks DEFAULT 1201, s_vtweg FOR mvke-vtweg DEFAULT 10, s_spart FOR mara-spart , s_mtart FOR mara-mtart DEFAULT 'ZFIN', s_lgort FOR mard-lgort DEFAULT 'FG01', s_matnr FOR mvke-matnr. SELECTION-SCREEN END OF BLOCK b1. START-OF-SELECTION. PERFORM get_data. PERFORM loop_data. PERFORM display_data. *&---------------------------------------------------------------------* *& FORM GET_DATA *&---------------------------------------------------------------------* * TEXT *----------------------------------------------------------------------* * --> P1 TEXT * <-- P2 TEXT *----------------------------------------------------------------------* FORM get_data . SELECT matnr vkorg vtweg

mvgr1 mvgr2 mvgr3 mvgr4 mvgr5 WHERE AND AND

FROM mvke INTO TABLE it_mvke matnr IN s_matnr vkorg EQ p_vkorg vtweg IN s_vtweg.

IF it_mvke IS NOT INITIAL. SELECT matnr werks lgort FROM mard INTO TABLE it_mard FOR ALL ENTRIES IN it_mvke WHERE matnr = it_mvke-matnr AND werks IN s_werks AND lgort IN s_lgort. ENDIF. IF it_mard IS NOT INITIAL. SELECT matnr werks prctr STEUC FROM marc INTO TABLE it_marc 05072017 " FOR ALL ENTRIES IN it_mard WHERE matnr = it_mard-matnr AND werks = it_mard-werks. SELECT matnr spart mtart meins ean11 matkl xchpf mhdrz mhdhb iprkz rdmhd FROM mara INTO TABLE it_mara FOR ALL ENTRIES IN it_marc WHERE matnr = it_marc-matnr AND mtart IN s_mtart AND spart IN s_spart. SELECT iprkz prtxt spras FROM prdkzt INTO TABLE it_prdk. ENDIF. IF it_mara IS NOT INITIAL. LOOP AT it_mara INTO wa_mara. IF wa_mara-matnr IS NOT INITIAL. DATA: v_obj(18) TYPE c. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

"""added

EXPORTING input = wa_mara-matnr IMPORTING output = v_obj. MOVE v_obj TO wa_inob-obj. APPEND wa_inob TO it_inob. ENDIF. CLEAR wa_inob. ENDLOOP. SELECT objek klart cuobj FROM inob INTO TABLE it_inob1 FOR ALL ENTRIES IN it_inob WHERE objek = it_inob-obj. SELECT matkl wgbez FROM t023t INTO TABLE it_t023 FOR ALL ENTRIES IN it_mara WHERE matkl = it_mara-matkl. SELECT matnr bwkey verpr bklas FROM mbew INTO TABLE it_mbew FOR ALL ENTRIES IN it_mara WHERE matnr = it_mara-matnr. ENDIF. SELECT matnr knumh FROM a900 INTO TABLE it_a900 FOR ALL ENTRIES IN it_mara WHERE matnr = it_mara-matnr AND kschl = 'ZMRP' AND datbi GE sy-datum. IF it_a900 IS NOT INITIAL. SELECT knumh kbetr FROM konp INTO TABLE it_konp FOR ALL ENTRIES IN it_a900 WHERE knumh = it_a900-knumh. ENDIF. SELECT matnr knumh FROM a304 INTO TABLE it_a304 FOR ALL ENTRIES IN it_mara WHERE matnr = it_mara-matnr AND kschl = 'ZSRM' AND datbi GE sy-datum. IF it_a304 IS NOT INITIAL. SELECT knumh kbetr FROM konp INTO TABLE it_konp2 FOR ALL ENTRIES IN it_a304 WHERE knumh = it_a304-knumh. ENDIF. SELECT matnr

knumh FROM a304 INTO TABLE it_a3042 FOR ALL ENTRIES IN it_mara WHERE matnr = it_mara-matnr AND kschl = 'ZREM' AND datbi GE sy-datum. IF it_a3042 IS NOT INITIAL. SELECT knumh kbetr FROM konp INTO TABLE it_konp3 FOR ALL ENTRIES IN it_a3042 WHERE knumh = it_a3042-knumh. ENDIF. SELECT matnr maktx FROM makt INTO TABLE it_makt FOR ALL ENTRIES IN it_mara WHERE matnr = it_mara-matnr. IF it_mvke IS NOT INITIAL. SELECT mvgr1 bezei spras FROM tvm1t INTO TABLE it_tvm1t FOR ALL ENTRIES IN it_mvke WHERE mvgr1 = it_mvke-mvgr1 AND spras = 'EN'. SELECT mvgr2 bezei spras FROM tvm2t INTO TABLE it_tvm2t FOR ALL ENTRIES IN it_mvke WHERE mvgr2 = it_mvke-mvgr2 AND spras = 'EN'. SELECT mvgr3 bezei spras FROM tvm3t INTO TABLE it_tvm3t FOR ALL ENTRIES IN it_mvke WHERE mvgr3 = it_mvke-mvgr3 AND spras = 'EN'. SELECT mvgr4 bezei spras FROM tvm4t INTO TABLE it_tvm4t FOR ALL ENTRIES IN it_mvke WHERE mvgr4 = it_mvke-mvgr4 AND spras = 'EN'. SELECT mvgr5 bezei spras FROM tvm5t INTO TABLE it_tvm5t FOR ALL ENTRIES IN it_mvke WHERE mvgr5 = it_mvke-mvgr5 AND spras = 'EN'. ENDIF. IF it_inob IS NOT INITIAL. SELECT objek klart clint FROM kssk INTO TABLE it_kssk. SELECT klart class clint FROM klah INTO TABLE it_klah.

ENDIF. ENDFORM. " GET_DATA *&---------------------------------------------------------------------* *& FORM LOOP_DATA *&---------------------------------------------------------------------* * TEXT *----------------------------------------------------------------------* * --> P1 TEXT * <-- P2 TEXT *----------------------------------------------------------------------* FORM loop_data . LOOP AT it_mvke INTO wa_mvke. wa_final-matnr = wa_mvke-matnr. wa_final-vtweg = wa_mvke-vtweg. wa_final-mvgr1 = wa_mvke-mvgr1. wa_final-mvgr2 = wa_mvke-mvgr2. wa_final-mvgr3 = wa_mvke-mvgr3. wa_final-mvgr4 = wa_mvke-mvgr4. wa_final-mvgr5 = wa_mvke-mvgr5. READ TABLE it_tvm1t INTO wa_tvm1t WITH KEY mvgr1 = wa_final-mvgr1. wa_final-tmvgr1 = wa_tvm1t-bezei. CLEAR wa_tvm1t. READ TABLE it_tvm2t INTO wa_tvm2t WITH KEY mvgr2 = wa_final-mvgr2. wa_final-tmvgr2 = wa_tvm2t-bezei. CLEAR wa_tvm2t. READ TABLE it_tvm3t INTO wa_tvm3t WITH KEY mvgr3 = wa_final-mvgr3. wa_final-tmvgr3 = wa_tvm3t-bezei. CLEAR wa_tvm3t. READ TABLE it_tvm4t INTO wa_tvm4t WITH KEY mvgr4 = wa_final-mvgr4. wa_final-tmvgr4 = wa_tvm4t-bezei. CLEAR wa_tvm4t. READ TABLE it_tvm5t INTO wa_tvm5t WITH KEY

mvgr5 = wa_final-mvgr5 .

wa_final-tmvgr5 = wa_tvm5t-bezei. CLEAR wa_tvm5t. READ TABLE it_makt INTO wa_makt WITH KEY matnr = wa_final-matnr. wa_final-maktx = wa_makt-maktx. CLEAR wa_makt. READ TABLE it_a900 INTO wa_a900 WITH KEY matnr = wa_final-matnr. IF sy-subrc = 0. READ TABLE it_konp INTO wa_konp WITH KEY knumh = wa_a900-knumh. wa_final-mrp = wa_konp-kbetr. CLEAR wa_konp. ENDIF. READ TABLE it_a304 INTO wa_a304 WITH KEY matnr = wa_final-matnr.

IF sy-subrc = 0. READ TABLE it_konp2 INTO wa_konp2 WITH KEY knumh = wa_a304-knumh. wa_final-srm = wa_konp2-kbetr * '0.10'. CLEAR wa_konp2. ENDIF. READ TABLE it_a3042 INTO wa_a3042 WITH KEY matnr = wa_final-matnr. IF sy-subrc = 0. READ TABLE it_konp3 INTO wa_konp3 WITH KEY knumh = wa_a3042-knumh. wa_final-rem = wa_konp3-kbetr * '0.10'. CLEAR wa_konp3. ENDIF. DATA: cobj(18) TYPE c. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_final-matnr IMPORTING output = cobj. READ TABLE it_inob INTO wa_inob WITH KEY obj = cobj. READ TABLE it_inob1 INTO wa_inob1 WITH KEY objek = wa_inob-obj. wa_final-klart = wa_inob1-klart. IF wa_inob1-cuobj IS NOT INITIAL. DATA: iobj(18) TYPE c. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING input = wa_inob1-cuobj IMPORTING output = iobj. ENDIF. MOVE iobj TO wa_inob1-iobj1. READ TABLE it_kssk INTO wa_kssk WITH KEY objek = wa_inob1-iobj1 klart = wa_inob1-klart. wa_final-clint = wa_kssk-clint. READ TABLE it_klah INTO wa_klah WITH KEY clint = wa_kssk-clint. wa_final-class = wa_klah-class. LOOP AT it_mara INTO wa_mara WHERE matnr = wa_final-matnr. wa_final-spart = wa_mara-spart. wa_final-mtart = wa_mara-mtart. wa_final-meins = wa_mara-meins. wa_final-ean11 = wa_mara-ean11. wa_final-matkl = wa_mara-matkl. wa_final-xchpf = wa_mara-xchpf. wa_final-mhdrz = wa_mara-mhdrz. wa_final-mhdhb = wa_mara-mhdhb.

wa_final-iprkz = wa_mara-iprkz. wa_final-rdmhd = wa_mara-rdmhd. CLEAR wa_mara. READ TABLE it_t023 INTO wa_t023 WITH KEY matkl = wa_final-matkl. wa_final-wgbez = wa_t023-wgbez. CLEAR wa_t023. IF wa_final-iprkz IS NOT INITIAL. IF wa_final-iprkz = '1'. READ TABLE it_prdk INTO wa_prdk WITH KEY spras = 'EN' iprkz = '1'. wa_final-prtxt = wa_prdk-prtxt. CLEAR wa_prdk. ELSEIF wa_final-iprkz = '2'. READ TABLE it_prdk INTO wa_prdk WITH KEY spras = 'EN' iprkz = '2'. wa_final-prtxt = wa_prdk-prtxt. CLEAR wa_prdk. ELSEIF wa_final-iprkz = '3'. READ TABLE it_prdk INTO wa_prdk WITH KEY spras = 'EN' iprkz = '3'. wa_final-prtxt = wa_prdk-prtxt. CLEAR wa_prdk. ELSE. READ TABLE it_prdk INTO wa_prdk WITH KEY spras = 'EN' iprkz = '4'. wa_final-prtxt = wa_prdk-prtxt. CLEAR wa_prdk. ENDIF. ENDIF. LOOP AT it_mard INTO wa_mard WHERE matnr = wa_final-matnr. wa_final-werks = wa_mard-werks. wa_final-lgort = wa_mard-lgort. READ TABLE it_marc INTO wa_marc WITH KEY matnr = wa_mard-matnr werks = wa_mard-werks. wa_final-prctr = wa_marc-prctr. wa_final-STEUC = wa_marc-STEUC. ""added 05072017 CLEAR wa_marc. IF wa_final-werks IS NOT INITIAL. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = wa_final-prctr IMPORTING output = wa_final-prctr. DATA: vwerks(4) TYPE c. vwerks = wa_final-werks. READ TABLE it_mbew INTO wa_mbew WITH KEY matnr = wa_mard-matnr bwkey = vwerks. IF sy-subrc = 0. wa_final-verpr = wa_mbew-verpr.

wa_final-bklas = wa_mbew-bklas. CLEAR wa_mbew. CLEAR wa_mard. ENDIF. ENDIF. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = wa_final-matnr IMPORTING output = wa_final-matnr. APPEND wa_final TO it_final. CLEAR wa_mard. ENDLOOP. ENDLOOP. CLEAR wa_final. ENDLOOP. ENDFORM.

" LOOP_DATA

*&---------------------------------------------------------------------* *& FORM DISPLAY_DATA *&---------------------------------------------------------------------* * TEXT *----------------------------------------------------------------------* * --> P1 TEXT * <-- P2 TEXT *----------------------------------------------------------------------* FORM display_data . PERFORM fldcat1 USING: 'MATNR' 'IT_FINAL' 'MATERIAL CODE', 'STEUC' 'IT_FINAL' 'HSN CODE', """ADDED 05072017 'MAKTX' 'IT_FINAL' 'MATERIAL DESCRIPTION', 'MTART' 'IT_FINAL' 'MATERIAL TYPE', 'MEINS' 'IT_FINAL' 'UNIT OF MEASURE', 'EAN11' 'IT_FINAL' 'EAN NUMBER ', 'VERPR' 'IT_FINAL' 'AVG. MOVING PRICE', 'MRP' 'IT_FINAL' 'MRP ', 'SRM' 'IT_FINAL' 'STOCKIST MARGIN% ', 'REM' 'IT_FINAL' 'RETAILER MARGIN% ', 'MHDHB' 'IT_FINAL' 'TOTAL SHELF LIFE ', 'MHDRZ' 'IT_FINAL' 'MIN. REMAINING SHELF LIFE', 'PRTXT' 'IT_FINAL' 'PERIOD INDICATOR FOR SLED', 'RDMHD' 'IT_FINAL' 'ROUNDING RULE SLED ', 'MATKL' 'IT_FINAL' 'MAIN MATERIAL GROUP ', 'WGBEZ' 'IT_FINAL' 'MAIN MATERIAL GRUP NAME ', 'MVGR1' 'IT_FINAL' 'BRAND CODE ', 'TMVGR1' 'IT_FINAL' 'BRAND NAME ', 'MVGR2' 'IT_FINAL' 'SUB-BRAND CODE ', 'TMVGR2' 'IT_FINAL' 'SUB-BRAND NAME ', 'MVGR3' 'IT_FINAL' 'CATEGORY CODE ', 'TMVGR3' 'IT_FINAL' 'CATEGORY NAME ', 'MVGR4' 'IT_FINAL' 'MAT. GROUP-4 CODE ', 'TMVGR4' 'IT_FINAL' 'MAT. GROUP-4 NAME ', 'MVGR5' 'IT_FINAL' 'MAT. GROUP-5 CODE ', 'TMVGR5' 'IT_FINAL' 'MAT. GROUP-5 NAME',

'WERKS' 'PRCTR' 'SPART' 'VTWEG' 'LGORT' 'KLART' 'CLASS' 'XCHPF' 'BKLAS'

'IT_FINAL' 'IT_FINAL' 'IT_FINAL' 'IT_FINAL' 'IT_FINAL' 'IT_FINAL' 'IT_FINAL' 'IT_FINAL' 'IT_FINAL'

'PLANT CODE 'PROFIT CENTRE 'MATERIAL DIVISION 'DIST. CHANNEL 'STORAGE LOC. 'CLASS TYPE 'CLASS 'BATCH MANAGEMENT 'VALUATION CLASS

', ', ', ', ', ', ', ', '.

it_layo-colwidth_optimize = 'X'. it_layo-zebra = 'X'.

* * * *

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = sy-repid i_callback_pf_status_set = 'SET_PF_STATUS' is_layout = it_layo it_fieldcat = it_fcat TABLES t_outtab = it_final EXCEPTIONS PROGRAM_ERROR = 1 OTHERS = 2 . IF sy-subrc <> 0. IMPLEMENT SUITABLE ERROR HANDLING HERE ENDIF.

ENDFORM.

" DISPLAY_DATA

FORM set_pf_status USING rt_extab TYPE slis_t_extab. SET PF-STATUS 'ZSTANDARD' EXCLUDING rt_extab . ENDFORM. "Set_pf_status *&---------------------------------------------------------------------* *& FORM FLDCAT1 *&---------------------------------------------------------------------* * TEXT *----------------------------------------------------------------------* * -->P_1724 TEXT * -->P_1725 TEXT * -->P_1726 TEXT *----------------------------------------------------------------------* FORM fldcat1 USING VALUE(p_1724) VALUE(p_1725) VALUE(p_1726). wa_fcat-fieldname = p_1724. wa_fcat-tabname = p_1725. wa_fcat-seltext_l = p_1726. APPEND wa_fcat TO it_fcat. ENDFORM. " FLDCAT1

Related Documents


More Documents from ""