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

Code change for a hard coded value

Former Member
0 Likes
700

Hi All,

I need some help in a code change.

I have a program in which a variable is hardcoded as 10. now i should change this value...i should retrive it from one field in transaction vk13. that screen field is konp-kbetr.

I have analysed and i found that i should get knumh field for getting this kbetr. I am getting this knumh from a910 table upon giving some inputs.

Now can u ppl suggest me how can i make a proper change in the program for that variable?

3 REPLIES 3
Read only

Former Member
0 Likes
623

hi,

try selecting the records (knumh) from a910 table using where condition to the inputs you are giving in an internal table it_tab.

then you can use select to get this field konp-kbetr using for all entries in the above internal table it_tab

thanks

Read only

Former Member
0 Likes
623

if it is a single value use select single for a910 and check if sy-subrc eq o then get kbetr and populate.

If there are multiple values use select * and get data from a910. use for all entries to get data for kbetr and populate. as u said if it is variable it will be single value. check it

Read only

awin_prabhu
Active Contributor
0 Likes
623

Hi friend,

Inside your program, implement folowing steps.

1. select knumh from a910 into itab where (conditions).

2. Now export this knumh field to memory.

3. Import knumh field from memory to transaction vk13 and use.

4. Export konp-kbetr value from transaction to memory.

5. Import konp-kbetr from memory to program and use.

Thanks.