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: 

fetch code for input field

Former Member
0 Kudos

Hi All!

I have to retrieve the selected value from the input field on screen(module pool program) which is provided with a list down box.

In the fetch code of the input field i had given an id now how to validate it in the code.

Please advise

Praneeth

1 ACCEPTED SOLUTION

Former Member
0 Kudos

using

case sy-ucomm.

when 'id'.

endcase.

Message was edited by: Eswar Kanakanti

4 REPLIES 4

Former Member
0 Kudos

using

case sy-ucomm.

when 'id'.

endcase.

Message was edited by: Eswar Kanakanti

0 Kudos

Hi eswar!

Already i am using sy-ucomm for a button now how will the system validate between a input field and the button.

regards

praneeth

Former Member
0 Kudos

Hi Praneeth

use case statement for validating the listbox.

Case id.

when '01'

.....

when '02'

...

regards

kishore

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Check this sample code.Similarly for validating in module pool,you have to code in PAI.

report z.

type-pools: vrm.

data: it_val type vrm_values,

w_line like line of it_val.

parameters p_bukrs like t001-bukrs as listbox

visible length 25 obligatory.

initialization.

select bukrs butxt from t001 into (w_line-key, w_line-text).

append w_line to it_val.

check p_bukrs is initial.

p_bukrs = w_line-key.

endselect.

at selection-screen output.

call function 'VRM_SET_VALUES'

exporting

id = 'P_BUKRS'

values = it_val.

end-of-selection.

write: / 'Company Code:', p_bukrs.