Skip to Content
-1

Excel Download negative sign is coming after the value..Need to change before the HTML conversion.

Hi All,

Am using the function module, "LIST TO ASCI" here the output is listasci.

listasci = itdata.

this itdata contains the values of :

abc | 12345 | 55.90- | hhhh

ddc| 1445| 55.90- | test

aoo | 10005-|55.90- |rrds

these 3 line items are going to download in excel sheets as:

abc 12345 55.90- hhh

But my user asks the -ve sign should be the front like -55.90.

Here abc#12345#55.90- #hhhh (it considered the singe field) so i cant use the

negative sign front function module here. so am using the split syntax.

LOOP AT itdata INTO wadata.
SPLIT wadata AT '|' INTO TABLE lt_split..

DESCRIBE TABLE lt_split LINES gv_comp.
DO gv_comp TIMES.
READ TABLE lt_split INTO ls_split INDEX sy-index.
SEARCH ls_split FOR '-'.
IF sy-subrc = 0.
REPLACE ALL OCCURRENCES OF '-' IN ls_split WITH space.
CONCATENATE '-' ls_split INTO wa_listtxt.(Wrong)
ENDIF.
ENDDO.
ENDLOOP.

So after replace the negative sign how can i modify this into the final internal table itdata?

abc | 12345 | -55.90 | hhhh

Anyone suggest please.

Thanks,

Nithya

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers