---------------------------------------------------------------------*
* Author : JATIN SINGHAL *
* Date : 17.06.2014 *
REPORT yj_bom_rep_alv_hier MESSAGE-ID ymsg.
*INCLUDE y_inc_bom_hier_alv.
TYPE-POOLS :slis.
TYPES: BEGIN OF ty_header,
matnr TYPE matnr,
matkl TYPE kunag,
werks TYPE werks_d,
stlal TYPE stalt,
stktx TYPE stktx,
bmeng TYPE basmn,
bmein TYPE basme,
datuv TYPE datuv,
andat TYPE andat,
annam TYPE annam,
aedat TYPE aedat,
aenam TYPE aenam,
END OF ty_header.
DATA: w_header TYPE ty_header,
t_header TYPE STANDARD TABLE OF ty_header.
TYPES: BEGIN OF ty_item,
matnr TYPE matnr,
posnr TYPE sposn,
postp TYPE postp,
idnrk TYPE idnrk,
menge TYPE kmpmg,
meins TYPE kmpme,
potx1 TYPE potx1,
potx2 TYPE potx2,
sanin TYPE sanin,
erskz TYPE erskz,
* yystand_comp type mara-yystand_comp,
* YYPART_MATERIAL type mara-YYPART_MATERIAL,
* YYPART_COMMENT type mara-YYPART_COMMENT,
* normt TYPE mara-normt,
* mfrnr TYPE mara-mfrnr,
* mfrpn TYPE mara-mfrpn,
END OF ty_item.
DATA: w_item TYPE ty_item,
t_item TYPE STANDARD TABLE OF ty_item.
TYPES : BEGIN OF ty_mast,
matnr TYPE matnr,
werks TYPE werks_d,
stlan TYPE stlan,
stlal TYPE stlal,
matkl TYPE matkl,
END OF ty_mast.
DATA : it_mast TYPE TABLE OF ty_mast,
wa_mast TYPE ty_mast.
DATA : gs_top TYPE cstmat,
gt_stb TYPE TABLE OF stpox,
w_stb LIKE LINE OF gt_stb,
w_keyinfo TYPE slis_keyinfo_alv,
w_fcat TYPE slis_fieldcat_alv,
t_fcat TYPE slis_t_fieldcat_alv,
it_layout TYPE slis_layout_alv.
CONSTANTS: c_header TYPE slis_tabname VALUE 'w_header',
c_item TYPE slis_tabname VALUE 'w_item'.
DATA : gv_matnr TYPE matnr,
gv_werks TYPE werks_d,
it_stpov TYPE TABLE OF stpov.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_matnr FOR gv_matnr,
s_werks FOR gv_werks.
PARAMETERS : p_stlal TYPE stlal DEFAULT '1',
p_stlan TYPE mast-stlan DEFAULT '4'.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON s_matnr.
*Validate Material Range
PERFORM chk_material.
AT SELECTION-SCREEN ON s_werks.
*Validate Plant Range
PERFORM chk_werks.
AT SELECTION-SCREEN ON p_stlan.
*Validate Bom Usage
PERFORM chk_usage.
START-OF-SELECTION.
*Determine Material Bom Link
PERFORM get_material_bom_link.
*Get data for each Material Plant
LOOP AT it_mast INTO wa_mast .
PERFORM get_data USING wa_mast-matnr wa_mast-werks wa_mast-stlal wa_mast-stlan.
ENDLOOP.
*Display O/P using ALV list
PERFORM display_alv.
FORM get_data USING matnr TYPE matnr werks type werks_d stlal TYPE stlal stlan TYPE stlan.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
* aumng = 'X'
capid = 'PP01'
cuobj = 000000000000000
datuv = sy-datum
* emeng = '2.000'
mbwls = 'X'
mktls = 'X'
mehrs = 'X'
mmory = '1'
mtnrv = matnr
stlal = stlal
stlan = stlan
stpst = '0'
svwvo = 'X'
werks = werks
vrsvo = 'X'
IMPORTING
topmat = gs_top
* DSTST =
TABLES
stb = gt_stb
* MATCAT = gt_matca
EXCEPTIONS
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
MOVE-CORRESPONDING gs_top TO w_header.
APPEND w_header TO t_header.
LOOP AT gt_stb INTO w_stb.
MOVE-CORRESPONDING w_stb TO w_item.
APPEND w_item TO t_item.
ENDLOOP.
ENDFORM.
FORM build_fieldcat .
w_keyinfo-header01 = 'MATNR'.
w_keyinfo-item01 = 'MATNR'.
*&---------------------------------------------------------------------*
INCLUDE y_inc_build_fieldcat.
ENDFORM. " BUILD_FIELDCAT
*to expand the header table for item details
form build_layout .
it_layout-expand_fieldname = 'EXPAND'.
it_layout-window_titlebar = 'Hierarchical ALV list display'.
* it_layout-lights_tabname = 'IT_DD03L'.
it_layout-colwidth_optimize = 'X'.
endform. " build_layout
FORM display_alv .
*SORT t_item BY matnr.
*SORT t_header BY matnr.
PERFORM build_fieldcat.
PERFORM build_layout.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
it_fieldcat = t_fcat
i_tabname_header = 'W_HEADER'
i_tabname_item = 'W_ITEM'
is_keyinfo = w_keyinfo
TABLES
t_outtab_header = t_header
t_outtab_item = t_item.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form CHK_MATERIAL
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM chk_material .
IF s_matnr IS NOT INITIAL.
SELECT SINGLE matnr
FROM mara
INTO gv_matnr
WHERE matnr IN s_matnr.
IF sy-subrc <> 0.
MESSAGE e001.
ENDIF.
ENDIF.
ENDFORM. " CHK_MATERIAL
*&---------------------------------------------------------------------*
*& Form CHK_WERKS
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM chk_werks .
IF s_werks IS NOT INITIAL.
SELECT SINGLE werks
FROM t001w
INTO gv_werks
WHERE werks IN s_werks.
IF sy-subrc <> 0.
MESSAGE e002.
ENDIF.
ENDIF.
ENDFORM. " CHK_WERKS
*&---------------------------------------------------------------------*
*& Form CHK_USAGE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM chk_usage .
IF p_stlan IS NOT INITIAL.
SELECT SINGLE stlan
FROM t416
INTO p_stlan
WHERE stlan = p_stlan.
IF sy-subrc <> 0.
MESSAGE e003.
ENDIF.
ENDIF.
ENDFORM. " CHK_USAGE
*&---------------------------------------------------------------------*
*& Form GET_MATERIAL_BOM_LINK
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM get_material_bom_link .
SELECT mast~matnr mast~werks mast~stlan mast~stlal mara~matkl
INTO TABLE it_mast
FROM mast AS mast
JOIN mara AS mara
ON mast~matnr = mara~matnr
WHERE mast~matnr IN s_matnr
AND mast~werks IN s_werks
AND mast~stlan = p_stlan
AND mast~stlal = p_stlal.
SORT it_mast BY matnr werks ."stlan stlal.
ENDFORM. " GET_MATERIAL_BOM_LINK
*&---------------------------------------------------------------------*
*& Form VALIDATIONS_ON_FIELDS
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Include Y_INC_BUILD_FIELDCAT
*&---------------------------------------------------------------------*
w_fcat-col_pos = 1.
w_fcat-fieldname = 'MATNR'.
w_fcat-seltext_m = 'Material Number'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 2.
w_fcat-fieldname = 'MATKL'.
w_fcat-seltext_m = 'Material Group'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 3.
w_fcat-fieldname = 'WERKS'.
w_fcat-seltext_m = 'Plant'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 4.
w_fcat-fieldname = 'STLAL'.
w_fcat-seltext_m = 'Alternative BOM'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 5.
w_fcat-fieldname = 'BMENG'.
w_fcat-seltext_m = 'Base quantity'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 6.
w_fcat-fieldname = 'DATUV'.
w_fcat-seltext_m = 'Valid from date'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 7.
w_fcat-fieldname = 'ANDAT'.
w_fcat-seltext_m = 'Created on'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 8.
w_fcat-fieldname = 'ANNAM'.
w_fcat-seltext_m = 'Created by'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 9.
w_fcat-fieldname = 'AEDAT'.
w_fcat-seltext_m = 'Changed on'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 10.
w_fcat-fieldname = 'AENAM'.
w_fcat-seltext_m = 'Changed by'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 11.
w_fcat-fieldname = 'POSTP'.
w_fcat-seltext_m = 'Item Category (Bill of Material)'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 12.
w_fcat-fieldname = 'IDNRK'.
w_fcat-seltext_m = 'BOM component'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 13.
w_fcat-fieldname = 'MENGE'.
w_fcat-seltext_l = 'Component quantity'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 14.
w_fcat-fieldname = 'MEINS'.
w_fcat-seltext_m = 'Component unit of measure'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 15.
w_fcat-fieldname = 'POTX1'.
w_fcat-seltext_m = 'BOM Item Text (Line 1)'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 16.
w_fcat-fieldname = 'POTX2'.
w_fcat-seltext_m = 'BOM item text (line 2)'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 17.
w_fcat-fieldname = 'SANIN'.
w_fcat-seltext_m = 'Indicator: item relevant to plant maintenance'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 18.
w_fcat-fieldname = 'ERSKZ'.
w_fcat-seltext_m = 'Indicator: spare part'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
* Author : JATIN SINGHAL *
* Date : 17.06.2014 *
REPORT yj_bom_rep_alv_hier MESSAGE-ID ymsg.
*INCLUDE y_inc_bom_hier_alv.
TYPE-POOLS :slis.
TYPES: BEGIN OF ty_header,
matnr TYPE matnr,
matkl TYPE kunag,
werks TYPE werks_d,
stlal TYPE stalt,
stktx TYPE stktx,
bmeng TYPE basmn,
bmein TYPE basme,
datuv TYPE datuv,
andat TYPE andat,
annam TYPE annam,
aedat TYPE aedat,
aenam TYPE aenam,
END OF ty_header.
DATA: w_header TYPE ty_header,
t_header TYPE STANDARD TABLE OF ty_header.
TYPES: BEGIN OF ty_item,
matnr TYPE matnr,
posnr TYPE sposn,
postp TYPE postp,
idnrk TYPE idnrk,
menge TYPE kmpmg,
meins TYPE kmpme,
potx1 TYPE potx1,
potx2 TYPE potx2,
sanin TYPE sanin,
erskz TYPE erskz,
* yystand_comp type mara-yystand_comp,
* YYPART_MATERIAL type mara-YYPART_MATERIAL,
* YYPART_COMMENT type mara-YYPART_COMMENT,
* normt TYPE mara-normt,
* mfrnr TYPE mara-mfrnr,
* mfrpn TYPE mara-mfrpn,
END OF ty_item.
DATA: w_item TYPE ty_item,
t_item TYPE STANDARD TABLE OF ty_item.
TYPES : BEGIN OF ty_mast,
matnr TYPE matnr,
werks TYPE werks_d,
stlan TYPE stlan,
stlal TYPE stlal,
matkl TYPE matkl,
END OF ty_mast.
DATA : it_mast TYPE TABLE OF ty_mast,
wa_mast TYPE ty_mast.
DATA : gs_top TYPE cstmat,
gt_stb TYPE TABLE OF stpox,
w_stb LIKE LINE OF gt_stb,
w_keyinfo TYPE slis_keyinfo_alv,
w_fcat TYPE slis_fieldcat_alv,
t_fcat TYPE slis_t_fieldcat_alv,
it_layout TYPE slis_layout_alv.
CONSTANTS: c_header TYPE slis_tabname VALUE 'w_header',
c_item TYPE slis_tabname VALUE 'w_item'.
DATA : gv_matnr TYPE matnr,
gv_werks TYPE werks_d,
it_stpov TYPE TABLE OF stpov.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_matnr FOR gv_matnr,
s_werks FOR gv_werks.
PARAMETERS : p_stlal TYPE stlal DEFAULT '1',
p_stlan TYPE mast-stlan DEFAULT '4'.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON s_matnr.
*Validate Material Range
PERFORM chk_material.
AT SELECTION-SCREEN ON s_werks.
*Validate Plant Range
PERFORM chk_werks.
AT SELECTION-SCREEN ON p_stlan.
*Validate Bom Usage
PERFORM chk_usage.
START-OF-SELECTION.
*Determine Material Bom Link
PERFORM get_material_bom_link.
*Get data for each Material Plant
LOOP AT it_mast INTO wa_mast .
PERFORM get_data USING wa_mast-matnr wa_mast-werks wa_mast-stlal wa_mast-stlan.
ENDLOOP.
*Display O/P using ALV list
PERFORM display_alv.
FORM get_data USING matnr TYPE matnr werks type werks_d stlal TYPE stlal stlan TYPE stlan.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
* aumng = 'X'
capid = 'PP01'
cuobj = 000000000000000
datuv = sy-datum
* emeng = '2.000'
mbwls = 'X'
mktls = 'X'
mehrs = 'X'
mmory = '1'
mtnrv = matnr
stlal = stlal
stlan = stlan
stpst = '0'
svwvo = 'X'
werks = werks
vrsvo = 'X'
IMPORTING
topmat = gs_top
* DSTST =
TABLES
stb = gt_stb
* MATCAT = gt_matca
EXCEPTIONS
alt_not_found = 1
call_invalid = 2
material_not_found = 3
missing_authorization = 4
no_bom_found = 5
no_plant_data = 6
no_suitable_bom_found = 7
conversion_error = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
MOVE-CORRESPONDING gs_top TO w_header.
APPEND w_header TO t_header.
LOOP AT gt_stb INTO w_stb.
MOVE-CORRESPONDING w_stb TO w_item.
APPEND w_item TO t_item.
ENDLOOP.
ENDFORM.
FORM build_fieldcat .
w_keyinfo-header01 = 'MATNR'.
w_keyinfo-item01 = 'MATNR'.
*&---------------------------------------------------------------------*
INCLUDE y_inc_build_fieldcat.
ENDFORM. " BUILD_FIELDCAT
*to expand the header table for item details
form build_layout .
it_layout-expand_fieldname = 'EXPAND'.
it_layout-window_titlebar = 'Hierarchical ALV list display'.
* it_layout-lights_tabname = 'IT_DD03L'.
it_layout-colwidth_optimize = 'X'.
endform. " build_layout
FORM display_alv .
*SORT t_item BY matnr.
*SORT t_header BY matnr.
PERFORM build_fieldcat.
PERFORM build_layout.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
it_fieldcat = t_fcat
i_tabname_header = 'W_HEADER'
i_tabname_item = 'W_ITEM'
is_keyinfo = w_keyinfo
TABLES
t_outtab_header = t_header
t_outtab_item = t_item.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form CHK_MATERIAL
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM chk_material .
IF s_matnr IS NOT INITIAL.
SELECT SINGLE matnr
FROM mara
INTO gv_matnr
WHERE matnr IN s_matnr.
IF sy-subrc <> 0.
MESSAGE e001.
ENDIF.
ENDIF.
ENDFORM. " CHK_MATERIAL
*&---------------------------------------------------------------------*
*& Form CHK_WERKS
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM chk_werks .
IF s_werks IS NOT INITIAL.
SELECT SINGLE werks
FROM t001w
INTO gv_werks
WHERE werks IN s_werks.
IF sy-subrc <> 0.
MESSAGE e002.
ENDIF.
ENDIF.
ENDFORM. " CHK_WERKS
*&---------------------------------------------------------------------*
*& Form CHK_USAGE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM chk_usage .
IF p_stlan IS NOT INITIAL.
SELECT SINGLE stlan
FROM t416
INTO p_stlan
WHERE stlan = p_stlan.
IF sy-subrc <> 0.
MESSAGE e003.
ENDIF.
ENDIF.
ENDFORM. " CHK_USAGE
*&---------------------------------------------------------------------*
*& Form GET_MATERIAL_BOM_LINK
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM get_material_bom_link .
SELECT mast~matnr mast~werks mast~stlan mast~stlal mara~matkl
INTO TABLE it_mast
FROM mast AS mast
JOIN mara AS mara
ON mast~matnr = mara~matnr
WHERE mast~matnr IN s_matnr
AND mast~werks IN s_werks
AND mast~stlan = p_stlan
AND mast~stlal = p_stlal.
SORT it_mast BY matnr werks ."stlan stlal.
ENDFORM. " GET_MATERIAL_BOM_LINK
*&---------------------------------------------------------------------*
*& Form VALIDATIONS_ON_FIELDS
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Include Y_INC_BUILD_FIELDCAT
*&---------------------------------------------------------------------*
w_fcat-col_pos = 1.
w_fcat-fieldname = 'MATNR'.
w_fcat-seltext_m = 'Material Number'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 2.
w_fcat-fieldname = 'MATKL'.
w_fcat-seltext_m = 'Material Group'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 3.
w_fcat-fieldname = 'WERKS'.
w_fcat-seltext_m = 'Plant'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 4.
w_fcat-fieldname = 'STLAL'.
w_fcat-seltext_m = 'Alternative BOM'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 5.
w_fcat-fieldname = 'BMENG'.
w_fcat-seltext_m = 'Base quantity'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 6.
w_fcat-fieldname = 'DATUV'.
w_fcat-seltext_m = 'Valid from date'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 7.
w_fcat-fieldname = 'ANDAT'.
w_fcat-seltext_m = 'Created on'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 8.
w_fcat-fieldname = 'ANNAM'.
w_fcat-seltext_m = 'Created by'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 9.
w_fcat-fieldname = 'AEDAT'.
w_fcat-seltext_m = 'Changed on'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 10.
w_fcat-fieldname = 'AENAM'.
w_fcat-seltext_m = 'Changed by'.
w_fcat-tabname = 'W_HEADER'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 11.
w_fcat-fieldname = 'POSTP'.
w_fcat-seltext_m = 'Item Category (Bill of Material)'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 12.
w_fcat-fieldname = 'IDNRK'.
w_fcat-seltext_m = 'BOM component'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 13.
w_fcat-fieldname = 'MENGE'.
w_fcat-seltext_l = 'Component quantity'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 14.
w_fcat-fieldname = 'MEINS'.
w_fcat-seltext_m = 'Component unit of measure'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 15.
w_fcat-fieldname = 'POTX1'.
w_fcat-seltext_m = 'BOM Item Text (Line 1)'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 16.
w_fcat-fieldname = 'POTX2'.
w_fcat-seltext_m = 'BOM item text (line 2)'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 17.
w_fcat-fieldname = 'SANIN'.
w_fcat-seltext_m = 'Indicator: item relevant to plant maintenance'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
w_fcat-col_pos = 18.
w_fcat-fieldname = 'ERSKZ'.
w_fcat-seltext_m = 'Indicator: spare part'.
w_fcat-tabname = 'W_ITEM'.
APPEND w_fcat TO t_fcat.
Clear w_fcat.
No comments:
Post a Comment