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

get cursor field

Former Member
0 Likes
468

hi friends,

i am using this code and also using hotspot on in loop.

but its not working it can not go to next screen.can any body help me out of this situation.

at line-selection.

case sy-lsind.

when '1'.

get cursor field f.

if f = ' w_ftab-mp '.

loop at t_ftab into w_ftab.

write : 'kkkkkkkk'.

endloop.

elseif f = 'w_ftab-dp'.

write : 'Bhupinder Singh'.

elseif f = 'w_ftab-cp'.

write : 'lkadlfj'.

endif.

when '2'.

write : 'as'.

endcase.

thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
412

You need to use capital letters when you are checking the fieldnames. so the mistake is from small case.

at line-selection.
case sy-lsind.
when '1'.
get cursor field f.
if f = ' W_FTAB-MP '.  "<======CAPS
loop at t_ftab into w_ftab.
write : 'kkkkkkkk'.
endloop.
elseif f = 'W_FTAB-DP'.    "<========CAPS
write : 'Bhupinder Singh'.
elseif f = 'W_FTAB-CP'.    "<========CAPS
write : 'lkadlfj'.
endif.

when '2'.
write : 'as'.
endcase.

2 REPLIES 2
Read only

Former Member
0 Likes
412

Post your whole program.

You want us to expect your remaining program there must be some sense if you post anything

Read only

Former Member
0 Likes
413

You need to use capital letters when you are checking the fieldnames. so the mistake is from small case.

at line-selection.
case sy-lsind.
when '1'.
get cursor field f.
if f = ' W_FTAB-MP '.  "<======CAPS
loop at t_ftab into w_ftab.
write : 'kkkkkkkk'.
endloop.
elseif f = 'W_FTAB-DP'.    "<========CAPS
write : 'Bhupinder Singh'.
elseif f = 'W_FTAB-CP'.    "<========CAPS
write : 'lkadlfj'.
endif.

when '2'.
write : 'as'.
endcase.