Add Material classification field in QA32 ALV

来源:互联网 发布:2017齐鲁软件大赛 编辑:程序博客网 时间:2024/05/16 05:44

1. Append the structure qals_d02 in se11 with the field you want to display..

2. Append the same field in QALS table in se11. (to save you from dump on running QA32)

 

(e.g. you want to add material group matkl in the alv of QA32. go to se11, append 'zzmatkl' in the qals_d02 structure, then goto se11 again and append 'zzmatkl' in QALS table. activate both. )

 

3. in subroutine CALL_LISTVIEWER_F14 , implement an implicit enhancement with the code at the beginning to modify object_tab internal table which displays data. Activate the enhancement.

 

(e.g.

 

ENHANCEMENT 1  ZPP_MAT_GRP_1.    "active version

*

   DATAlv_matkl TYPE matkl.

 

   IF SY-TCODE EQ 'QA33' OR SY-TCODE EQ 'QA32'.

     LOOP AT OBJECT_TAB INTO object_tab.

       SELECT SINGLE matkl FROM mara INTO lv_matkl WHERE matnr object_tab-matnr.

         object_tab-zzmatkl lv_matkl.

         MODIFY object_tab FROM object_tab TRANSPORTING zzmatkl .

     ENDLOOP.

ENDIF.

ENDENHANCEMENT.

 

)

 

4. in subroutine aktualisieren_f14 , also implement the same code as implicit enhancement just before statement ENDFORM. Activate the enhancement.

 

Done....

 

Run QA32 :

 

in alv, select the desired field from layout option(in our case: material group). save the layout as per your need.

0 0
原创粉丝点击