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

Module pool input field not defined.

Former Member
0 Likes
2,764

hie, I am working on a module pool program where i have a table control and i need to get VBELN through a input field and based on that field i need to write a select query and display the so items in table control.

i have defined the input field as vbak-vbeln for the input field in the screen, activated it.

the prob is ,When i write the select query,  i get an error that vbak-vbeln is not defined.

can any one tel me what could be wrong ?

5 REPLIES 5
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,667

That name is accessible only in your screen & not in your program. You have to either use tables statement ( obsolete) in your program like tables:VBAK , or declare a individual variable referring to vbeln and use that variable name to your screen field.

Read only

0 Likes
1,667

if that is the problem, previously had a report program where the input field declared in the screen was accessible in the program. I did not declare an individual variable for that ... same here, but a module pool.. and this not working

Additional Information: During the debugging mode, the input field which i declared on the screen is accessible in program holding the VBELN, but when i give the same in the program, it throws an error

Read only

0 Likes
1,667

Report program & module pool both are different.

"During the debugging mode, the input field which i declared on the screen is accessible in program holding the VBELN - Which Program ?, but when i give the same in the program, it throws an error" Which Program. ?

Hope you understood what i meant.

Read only

former_member282968
Contributor
0 Likes
1,667

Dear Karthikeyan,

In the include top declare as below:

data:vbak type vbak.

Vbak will be structure now and when you have defined the input/output fieldname as VBAK-VBELN ( Note: while defining in the input/output field you need to call the variable from program not from dictionary ) then that value will come to the structure field VBAK-VBELN which can be used in your select query.

With thanks & regards,

Read only

0 Likes
1,667

Thank you for all your valuble comments. I solved the problem myself.. The mistake i did was i used program fields window(F6) in the screen and displayed the input field directly from the DB table. So the Input fields acts as a two way both for Saving and displaying.

It will be a confusion there SO what i did was i declared a local varaible refering to vbeln and i used program fields window, insted of getting from attributes, i clicked on Get from program.I linked that local variable to the input field .. Problem solved.