cancel
Showing results for 
Search instead for 
Did you mean: 

Include Description on my Report

athakyriaz
Participant
0 Kudos

Hello everyone , 

i make a Report and i want to take on my column the description and not the Code from Field data.

My example : 

i want to my Last Column into the Report , to see the material Group .

Now i can see the Code into my report and not the Description.

How can i change my abap Code to take the description of these ?

 

 

*&---------------------------------------------------------------------*
*& Report ZALMM_STOCK_REPORT
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zalmm_stock_report.

TABLES : kna1, knb1, mvke, mara, mard.


SELECTION-SCREEN BEGIN OF BLOCK sel_block WITH FRAME TITLE TEXT-s00.
  PARAMETERS     : plant  TYPE bukrs OBLIGATORY DEFAULT '',
                 SALS_ORG TYPE vkorg OBLIGATORY DEFAULT ''.

SELECT-OPTIONS : cr_date2 FOR mara-ersda,
                 matnr    FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK sel_block.

DATA:gr_alv       TYPE REF TO cl_salv_table,
     gr_functions TYPE REF TO cl_salv_functions_list.


  SELECT mara~matnr,maktx,marc~werks,marc~lgpro, mard~labst ,meins , /CWM/LABST,EINME, /cwm/valum,BWESB,TRAME,MVGR1,MVGR4
    FROM mara
    INNER JOIN makt on makt~matnr = mara~matnr and makt~spras = 'G'
    LEFT JOIN mvke ON mvke~matnr = mara~matnr AND mvke~vkorg = SALS_ORG
    LEFT JOIN marc ON marc~matnr = mara~matnr AND marc~werks = plant
    LEFT JOIN mard ON mard~matnr = mara~matnr AND marc~werks = plant
    WHERE marc~werks = plant
      AND mvke~vkorg = SALS_ORG
      AND mara~ersda IN cr_date2
      AND mara~matnr IN matnr
    INTO TABLE DATA(mmm).


  CALL METHOD cl_salv_table=>factory
    IMPORTING
      r_salv_table = gr_alv
    CHANGING
      t_table      = mmm.


gr_functions = gr_alv->get_functions( ).
gr_functions->set_all( abap_true ).
gr_alv->display( ).

 

Sandra_Rossi
Active Contributor
0 Kudos

EDIT: post deleted.

Sandra_Rossi
Active Contributor
0 Kudos

Join the table of material group texts.

EDIT: you obtain the table name by searching:

table of material group texts site:sap.com

View Entire Topic
athakyriaz
Participant
0 Kudos

Thank you for your Reply. 

Can you attach here the Join that you said ?