Application Development and Automation 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: 
Read only

printing quantity field

Former Member
0 Likes
389

hi experts,

I am using perform statement and quantity is one input field.

i have declared the field in the program as vbdpa-kwmeng.

till 999 their is no problem.

when it comes to 1000.sytems take it as 1,000.000 .when this value is coming into program that comma is creating a dump .

it is throwing a message like

unable to interpret "1,000.000" as anumber.

what shall id o.

which Fm i have to use.

regards,

mani

hi experts,

I am using perform statement and quantity is one input field.

i have declared the field in the program as vbdpa-kwmeng.

till 999 their is no problem.

when it comes to 1000.sytems take it as 1,000.000 .when this value is coming into program that comma is creating a dump .

it is throwing a message like

unable to interpret "1,000.000" as anumber.

what shall id o.

which Fm i have to use.

regards,

mani

2 REPLIES 2
Read only

naimesh_patel
Active Contributor
0 Likes
367

Before Assigning in to your variable do this exercise:

data: l_char(17).

l_char = '1,000.000'.  " your variable which contains the value
REPLACE FIRST OCCURRENCE of ',' in l_char with ' '.
REPLACE FIRST OCCURRENCE of ',' in l_char with ' '.
REPLACE FIRST OCCURRENCE of ',' in l_char with ' '.

then

l_KWMENG = l_char.

This exercise is need to remove the format from the that field. Whenever you receive data from the perfrom in FORM it will give the field with the formatted value.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
367

Hi

Check this...


DATA : text type char18.
text = itab-kwmeng.      "field with value 1,0000.00

REPLACE ALL OCCURRENCES OF   ',' IN  text
  WITH ' '.
CONDENSE text.

  WRITE :/ text.