‎2009 Feb 18 7:01 AM
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?
‎2009 Feb 18 7:06 AM
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
‎2009 Feb 18 7:17 AM
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
‎2009 Feb 18 7:37 AM
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.