cancel
Showing results for 
Search instead for 
Did you mean: 

Change Column name on my Report

athakyriaz
Participant
0 Kudos

Hello everyone , 

i make my Report from SE38 Transaction.

On my code i select some Field from Tables.

 SELECT mara~matnr,maktx,marc~werks,marc~lgpro, mard~labst ,meins , /CWM/LABST,EINME, /cwm/valum,BWESB,TRAME, TVM1T~BEZEI, TVM4T~BEZEI AS TEMP
    FROM mara
    INNER JOIN etc......

I want to rename TVM1T~BEZEI, TVM4T~BEZEI  when i execute the report with my Names.

Who can i do ?

Now when i Execute i take the same Field Names "Description"

athakyriaz_0-1716298004317.png

 

View Entire Topic
athakyriaz
Participant
0 Kudos

Look all my ABAP Code for my Report : 

REPORT mm_stock_report.      

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


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

SELECT-OPTIONS : cr_date2 FOR mara-ersda,      
                 matnr    FOR mard-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,mard~lgort, mard~labst ,meins , /CWM/LABST,EINME, /cwm/valum,BWESB,TRAME, 
TVM1T~BEZEI, TVM4T~BEZEI AS PRGRP
    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   
    LEFT JOIN TVM1T ON TVM1T~MVGR1 = mvke~MVGR1 AND marc~werks = @plant   
    LEFT JOIN TVM4T ON TVM4T~MVGR4 = mvke~MVGR4 AND marc~werks = @plant   

      WHERE marc~werks = @plant
      AND mvke~vkorg = @SALS_ORG
      AND mara~matkl = @Mat_grp
      AND mara~ersda IN @CR_date2
      AND mard~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( ).
raymond_giuseppi
Active Contributor
0 Kudos

I executed a copy of your program, and no problem, fields are correct with correct header texts.

  • Just some warnings on missing unit of measure, perform the ALV consistency check
  • If you executed some tests with less fields defined, reset ALV buffer with report BALVBUFDEL