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

numeric value not passed to out_parameter-value (ITCSY).

Former Member
0 Likes
721

Hi,

While returning the value from a subroutine to out_parameter-value (ITCSY), the numeric value does not get stored in out_parameter-value.

What should I do?

Thanks.

Hi,

While returning the value from a subroutine to out_parameter-value (ITCSY), the numeric value does not get stored in out_parameter-value.

What should I do?

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
667

Hello,

The table ITCSY will treat all fields as char. type.

to pass the numeric value, use MOVE instead of direct assignment.

eg:

<ITCSY-value = <numeric field>.

MOVE <Numeric Field> to ITCSY-value.

Edited by: Sachinkumar Mehta on Jan 5, 2009 11:42 AM

Read only

Former Member
0 Likes
667

Hi,

You can use

WRITE g_num to itcsy-value.

or move gn_num to itcsy-value .

to move the data from routine to output parameter value.

Regards,

Venkatesh

Read only

0 Likes
667

Hi,

Below is the code that I have written.

data : v_kwmeng TYPE vbap-kwmeng,

v_netwr type vbap-netwr,

v_netwr_rt type vbap-netwr.

READ table in_par with KEY 'IT_VBAP-KWMENG'.

check sy-subrc = 0.

REPLACE all OCCURRENCES of ',' in in_par-value WITH ''.

condense in_par-value .

v_kwmeng = in_par-value.

READ table in_par with KEY 'IT_VBAP-NETWR'.

check sy-subrc = 0.

REPLACE all OCCURRENCES of ',' in in_par-value WITH ''.

condense in_par-value .

v_netwr = in_par-value.

if v_kwmeng > 0.

v_netwr_rt = v_netwr / v_kwmeng.

endif.

read table out_par with key 'RATE'.

check sy-subrc = 0.

move v_netwr_rt to out_par-value.

modify out_par index sy-tabix.

The value in v_netwr_rt is not assigned to out_par-value. I have tried

MOVE v_netwr_rt to out_par-value and WRITE v_netwr_rt to out_par-value also but with no success.

Any idea as to what should be done here. When I store tha value of v_netwr_rt var in a string var, then that is passed. But a numeric field can be stored in a string var. So this should have worked.

In case of string, the data is not passed with thousand seperator. Eg : 1234567.00 should actually be 1,234,567.00. Can you guide me on this?

Read only

Former Member
0 Likes
667

-