cancel
Showing results for 
Search instead for 
Did you mean: 

percentage(%) symbol in grid

Former Member
0 Kudos

Hi all,

Iam displaying the percentage value in the last column by using oops grid,

values are like 23.45 , 50

but we need to display in the format 23.45% , 50%.

wat I need to do for that.

Regards,

Anil.

A SUGGESTION CAN MAKE A DIFFERENCE.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi frnd,

After populating the internal table, put loop on that table and copy the type P field value to char type variable and concatenate "%" and modify the internal table.

For eg:

ur internal table has 2 filed

f1 type p decimals 2,

f2 type matnr,

add one more filed to the structure,

f3 type char10.

then populate internal table.

after that put loop on this table.

Loop at table into wa.

wa-f3 = wa-f1.

concatenate wa-f3

'%'

into wa-f3.

MODIFY table FROM wa TRANSPORTING f3.

ENDLOOP.

Former Member
0 Kudos

thanks for the reply,

I think both the fields will be there in the output I mean f1 and f3.

Former Member
0 Kudos

Hi Nivetha,

concatenate statement is not working on type p , for that it must be type C,N,D,T,or STRING.

can u check and revert back.

Thanks,

anil./

Edited by: Anil kumar on Mar 9, 2009 10:35 AM

Former Member
0 Kudos

Hi frnd,

Concatnate 23.45, 20 with "%" and display it in the oops grid it will work.

Former Member
0 Kudos

Hi Nivetha,

At what step we can concatnate the symbol (%),

while populating it in the internal table,but it defined as type p .

while displaying we are just sending internal table into the method set_table_for_first_display.

can we do something in fieldcat .

One more point is - it is last column in the display.

Thanks,

Anil.

Former Member
0 Kudos

hi,

You need to use symbols to achieve such functionality in ALVs.

In this link a sample program for displaying symbols has been given Check it. A similar programming would help achieve your requirement.

[Symbol|https://wiki.sdn.sap.com/wiki/display/Snippets/DISPLAYINGSYMBOLSINALVWITHCLASScl_salv_table]

Thanks

Sharath

Former Member
0 Kudos

Thanks for the reply.

Hi sharath,

Iam doing the things by container's concept.