05-08-2007 7:40 AM
i need to have the text for my total in ALV. if i m using REUSE_ALV_LIST_DISPLAY. i m able to see the text by using layout-total_text.
but if i use REUSE_ALV_GRID_DISPLAY. i m nt able to see the text by
layout-total_text. what can be the problem here. n what shud i do to show my text in GRID displa.y
05-08-2007 7:49 AM
Hi Nidhi,
It will be dispay the text even in GRID mode, Just increate the output length of the first column to display you text. May be now it is truncationg the values just because of the the short length you are not able to see the total_text.
Warm Regards,
Vijay
05-08-2007 7:48 AM
Hi,
Try to use ifieldcat-seltext_l = 'Total'. in ur fieldcatalog table and then pass this in that Grid Function Module.
Hope this Helps
Regds
Seema
05-08-2007 7:49 AM
Hi Nidhi,
It will be dispay the text even in GRID mode, Just increate the output length of the first column to display you text. May be now it is truncationg the values just because of the the short length you are not able to see the total_text.
Warm Regards,
Vijay
05-08-2007 7:54 AM
Thanks Vijay,
But this is not the issue. i have my first column of length 25. now what can be the issue here. please do help me i need it urgently.
05-08-2007 8:05 AM
May be chack the data type of the first fied like if it is integer then it won't display the text which you are passing.
The following is the rule of for the Totals_text:
Totals_text(60) TYPE c : Text for 1st col. in totals
Value set: SPACE, string (max.60)
' ' = The first column in the total record contains an appropriate number of '*'s to indicate the total by default. If the first column is wide enough, the string 'Total' is output after the asterisks.
'String = The string passed is output after the total indicated by '*', if the column is wide enough.
05-08-2007 8:11 AM
HI,
Give ls_layout-colwidth_optimize = 'x'.
this will automatically make your fileds according to the length
Rewards if useful
regards,
nazeer
05-08-2007 8:06 AM
Hi,
there are 3 types of seltext's in fieldcat. try this:
CLEAR gs_fieldcat.
gs_fieldcat-fieldname = 'DMBTR' .
gs_fieldcat-tabname = 'GT_TOTAL_MOVEMENTS'.
gs_fieldcat-seltext_l = text1.
gs_fieldcat-seltext_m = text2.
gs_fieldcat-seltext_s = text3.
APPEND gs_fieldcat TO gt_fieldcat.
Reward if helpful,
Regards,
Sooness.
05-08-2007 8:22 AM
hi,
internal table with header line.
data : begin of itab_mara,
matnr like mara-matnr,
enum like mara-enum,
end of itab_mara.
data : begin of itab_marc,
matnr like marc-matnr,
werks like marc-werks,
end of itab_marc.
data : begin of itab_final,
matnr like mara-matnr,
enum like mara-enum,
werks like marc-werks,
end of itab_final.
data : d_fieldcat type slis_t_fieldcat_alv,
d_fieldcat_wa type slis_fieldcat_alv.
selection-screen : begin of block blk1 with frame title text-001.
select-options : s_matnr for mara-matnr,
s_werks for marc-werks.
selection-screen : end of block blk1.
select matnr erdat from table itab_mara where matnr in s_matnr.
if not itab_mara is initial.
select matnr werks from table itab_marc where werks in s_werks.
endif.
d_fieldcat_wa-fieldname = 'MATNR'.
d_fieldcat_seltext_l = 'material number'.
d_fieldcat_wa-col_pos = 1.
append d_fieldcat_wa to t_fieldcat.
clear d_fieldcat_wa.
d_fieldcat_wa-fieldname = 'WERKS'.
d_fieldcat_seltext_l = 'plants'.
d_fieldcat_wa-col_pos = 2.
append d_fieldcat_wa to t_fieldcat.
clear d_fieldcat_wa.
data :gd_repid like sy-repid.
gd_repid = sy-repid.
call function module REUSE_ALV_LIST_DISPLAY.
exporting.
proramname = gd_repid.
fieldcat = d_fieldcat.
importing.
t_outtab = itab_final.
exceptions.
reward with points if helpful.
Message was edited by:
Vinutha YV