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: 

Help in Get cursor

Former Member
0 Kudos
71

Hi,

i'm working reports..

Data: f_value(10) type c.

AT LINE-SELECTION.

CASE SY-UCOMM.

WHEN 'PICK'.

GET CURSOR field F_VALUE VALUE f_VALUE .

SET PARAMETER ID 'LIF' FIELD WA_LIFNR-LIFNR.

IF f_VALUE = WA_LIFNR-LIFNR .

SELECT ADRNR.....

end select.

when im debugging for example the value of Wa_lifnr-lifnr = '000000228'.

the value of f_value = '228'.

Please let me know how can i equal both these...

3 REPLIES 3

MarcinPciak
Active Contributor
0 Kudos
45

Hi,

You have two posibilities:

1) type f_value with n


data: f_value(10) type n.

2) convert wa_lifnr-lifnr to type c


data: wa_c_lifnr(10) type c.
wa_c_lifnr = wa_lifnr-lifnr.
SET PARAMETER ID 'LIF' FIELD wa_c_lifnr.

Regards

Marcin

Former Member
0 Kudos
45

You have to run WA_LIFNR-LIFNR through FM CONVERSION_EXIT_ALPHA_INPUT before using the value in a SELECT.

Rob

former_member188685
Active Contributor
0 Kudos
45

apply the changes, and can i know what are you doing here..

i think you need to use get , where are you getting the value wa_lifnr-lifnr

if you want it from parameter id then you have to use get.

also use conversion routine

AT LINE-SELECTION.
CASE SY-UCOMM.
WHEN 'PICK'.
GET CURSOR field F_VALUE VALUE f_VALUE .
"use the coversion routine
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
 input  =   f_value
importing
 output         =  f_value.

GET PARAMETER ID 'LIF' FIELD WA_LIFNR-LIFNR.  "what are you doing, you should use GET 
IF f_VALUE = WA_LIFNR-LIFNR .
SELECT ADRNR.....
end select.

Edited by: Vijay Babu Dudla on Nov 3, 2008 2:18 PM