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: 

Passing CURR value to screen using PARAMETER ID's

Former Member
0 Kudos

Hi all,

I need to pass a value which is of type CURR to a screen field which is of type DEC using parameter id. As of release 6.10 only character-type field is expected to pass to screen fileds. I tried converting the CURR field to char type and pass the same to screen field,but didnt work as in the screen filed it expects some value with typr DEC.

Thanks in advance!

7 REPLIES 7

kesavadas_thekkillath
Active Contributor
0 Kudos

This works for me.


data:lv_curr type dmbtr.
parameters:pa type WEBAZ.

at selection-screen output.
lv_curr = '234.11'.
pa = lv_curr.

0 Kudos

Hi Keshav,

My requirement is that i need to pass values to the screen field by using parameter ids i.e, using the keyword SET.

0 Kudos

What PID are you using?

Rob

0 Kudos

Expanding on Keshav's code give:

PARAMETERS:pa TYPE webaz.
DATA:lv_curr TYPE dmbtr,
     c_amt1(15),
     c_amt2(15).

AT SELECTION-SCREEN OUTPUT.
  lv_curr = '234.11'.
  WRITE lv_curr TO c_amt1.

  SET PARAMETER ID 'AMOU' FIELD c_amt1.
  GET PARAMETER ID 'AMOU' FIELD c_amt2.

  pa = c_amt2.

Rob

0 Kudos

Hi Rob,

I am using STP(EC-CS: Subitem category) pid.

Regards,

Sireesha

0 Kudos

Hi Rob,

while debugging the code i can see the values of pid in SAP memory, but when i run the program to display those values on the screen field with type DEC,it kicks me out of the system.I commented that part of code and exceuted the program and then it went fine so i am for sure that it goes wrong at this part of the code.

Regards,

Sireesha

Edited by: Sireesha on Sep 24, 2010 11:37 AM

0 Kudos

I guess it might be a gui issue. I ran the code and it worked as I expected. You do have to be concerned about number formats though. You'll have to remove commas from things like '1234,567.89'.

Rob