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: 

how to remove comma in 1,007

Former Member
0 Kudos

hi champions,

i hv to remove comma in 1,007.....plz help me.I HV TO USE IN ALV.

looking forward to an early reply.

with regards,

ravi gupta.

Message was edited by:

ravi gupta

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI Ravi,

try this

data: quant(17) type c.
 
* value from mseg-menge to quant
quant = mseg-menge.
 
replace ',' with space into quant.
condense quant no-gaps.


Write:/ quant.

Regards,

Raghav

9 REPLIES 9

Former Member
0 Kudos

Hello Ravi,

If you are using the WRITE statement, use the addition NO-GROUPING with the statement.

WRITE v_variable NO-GROUPING.

Manoj

Former Member
0 Kudos

Hi,

REPLACE ',' IN VARIABLE WITH SPACE .

CONDENSE VARIABLE.

Former Member
0 Kudos

HI Ravi,

try this

data: quant(17) type c.
 
* value from mseg-menge to quant
quant = mseg-menge.
 
replace ',' with space into quant.
condense quant no-gaps.


Write:/ quant.

Regards,

Raghav

Former Member
0 Kudos

Hi Ravi

Move to character data type field, it will get removed.

Eg:

data: val type i value 100007.

data: val1(20) type c.

write:/ val.

val1 = val.

write:/ val1.

Kind Regards

Eswar

Former Member
0 Kudos

hi try this

data : v1(5) type n.

v1 = <your var contain ,>< now v1 contains01007>

shift v1 left deleting leading '0'. <now v1 contains 1007>.

regards

shiba dutta

Former Member
0 Kudos

move the field to a character field and then print it will work

demo code -

data d_value type p value '1007'.

data d_char(10).

d_char = d_value.

write : d_char.

write:/ d_value.

amit

Message was edited by:

Amit Tyagi

Former Member
0 Kudos

to remove comma.

data v1(10) type c.

move value(variable) to V1.

REPLACE ',' IN V1 WITH SPACE .

CONDENSE V1

Former Member
0 Kudos

data:

w_v1 type i value '1007',

w_v2(10).

write:/ w_v1. "for output as 1,007

write w_v1 to w_v2 no-grouping.

write:/ w_v2. "for output as 1007

Regards,

Phani

0 Kudos

Hi,

In ALV display , we have an option for removing the unit splitting by selecing an option 'no_unit_splitting' in the layout.

After selecting this layout option,the structure of layout has to be passed in the

ALV function module.

Check out the code below.

DATA: ls_layout TYPE slis_layout_alv.

ls_layout-no_unit_splitting = 'X'.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

i_callback_program = sy-repid

  • I_CALLBACK_PF_STATUS_SET = l_status

i_callback_user_command = 'USER_COMMAND'

  • I_STRUCTURE_NAME =

<b> is_layout = ls_layout</b>

it_fieldcat = lt_fieldcat

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

it_sort = it_sort

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

i_save = 'U'

  • IS_VARIANT = 'U'

it_events = gt_events

  • IT_EVENT_EXIT =

is_print = gd_prntparams

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IR_SALV_LIST_ADAPTER =

  • IT_EXCEPT_QINFO =

  • I_SUPPRESS_EMPTY_DATA = ABAP_FALSE

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = it_dlpl

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

Thanks & regards,

Sreenivasulu P

Message was edited by:

P Sreenivasulu