Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

integer value display in alv grid with out commas

sivakrishna_boddapati
Participant
0 Kudos

Hi Experts,

I am reuse_alv_grid_display to show my output, there are so many quantity fileds , i teke these data types as Integer,

when i use WRITE statment it shows comma seperated value . but when it pass to Grid it did not get Commas in my ouput alv Grid .

1 ACCEPTED SOLUTION

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Check your profile parameters. In that, decimal notation. Try changing it to comma separated and then execute program after log off and then log in.

9 REPLIES 9

Former Member
0 Kudos

Integers will be always displayed in output without commas. use QUAN data type for quantity fields. It would be dispayed with commas,

0 Kudos

I want my Output with whole numbers ,if i use the quantity field then it display outut with length 15 and decimal value 3 ,

i want whole numbers with commas in my alv grid.

0 Kudos

then declare type p with length you want and 0 decimals....

kesavadas_thekkillath
Active Contributor
0 Kudos

This code displays comms for me . Check the user profile parameters , try to choose the second one in decimal notation.


type-pools:slis.

data:ift type table of slis_fieldcat_alv,
      waf type slis_fieldcat_alv.

types:begin of ty,
      int type i,
      end of ty.


data:it type table of ty.
data:wa type ty.

wa-int = '2345'.
append wa to it.
wa-int = '1345'.
append wa to it.

waf-fieldname = 'INT'.
append waf to ift.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
 EXPORTING
   I_CALLBACK_PROGRAM                = sy-repid
   IT_FIELDCAT                       = ift[]
  TABLES
    t_outtab                          = it.

Former Member
0 Kudos

Hi,

Here we can add the datatype field to WA_FCAT_VBAK IN THAT GIVE THE DATA TYPE NAME.

WA_FCAT_VBAK-FIELDNAME = 'NETWR'.

WA_FCAT_VBAK-COL_POS = '3'.

WA_FCAT_VBAK-SELTEXT_M = 'NET VAUE'.

WA_FCAT_VBAK-DATATYPE = 'QUAN'.

APPEND WA_FCAT_VBAK TO IT_FCAT_VBAK.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = SY-REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

I_CALLBACK_TOP_OF_PAGE = 'TOPOFPAGE '

IT_FIELDCAT = IT_FCAT_VBAK

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

IT_SORT = IT_SORT_VBAK

TABLES

T_OUTTAB = IT_VBAK.

regards,

muralii

Edited by: Muralii on Dec 1, 2010 1:11 PM

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Check your profile parameters. In that, decimal notation. Try changing it to comma separated and then execute program after log off and then log in.

0 Kudos

Thanks for reply , where can i check profile parameters.

Thanks & Regards

Siva Krishna

0 Kudos

Hi,

tcode SU01.

For your user name, in defaults tab, change decimal notation. Then try log off and log in.

sivakrishna_boddapati
Participant
0 Kudos

WHEN I PREPARE DYNAMIC FIELD CATALOG I USE DATA TYPE AS C THAT WHY I DIDN'T GET COMMAS NOW I AM CHANGING DATA TYPE C TO DATA TYPE I, NOW I GET COMMAS IN MY OUT PUT