‎2008 Feb 18 9:16 AM
tables vbak.
select-options p_vbeln for vbak-vbeln.
types : begin of ty,
a type vbak-vbeln,
b type vbak-ernam,
c type vbak-netwr,
end of ty.
data : itab type table of ty,
wa type ty.
perform sub.
form sub.
select vbeln ernam netwr from vbak into table itab where vbeln in p_vbeln.
loop at itab into wa.
write : wa-a,wa-b,wa-c.
endloop.
endform.
In the above program.
if we give vbeln is 4969 to 4972 as a input in selection screen. It will so the full content of the database table instead of the 4969-4972 range.how can i get the correct result.
anyone one guide me.
thanks and regards,
Navneeth.
‎2008 Feb 18 9:27 AM
Hi,
It is better if you pass the range p_vbeln to the subroutine explicitly with USING parameter.
Also, debug and check the p_vbeln parameter. It might be blank, and hence causing the reading of all entries from VBAK table.
Cheers,
Aditya
‎2008 Feb 18 9:27 AM
Hi,
It is better if you pass the range p_vbeln to the subroutine explicitly with USING parameter.
Also, debug and check the p_vbeln parameter. It might be blank, and hence causing the reading of all entries from VBAK table.
Cheers,
Aditya
‎2008 Feb 18 9:28 AM
Hi
u r program is giving the correct output only .
what is u r doubt .
‎2008 Feb 18 9:36 AM
sorry, i am not getting the correct output.
the output contains all the datas from vbak table . but i need the ranges from 4969 to 4972
‎2008 Feb 18 9:41 AM
Hi navaneet,
Your program works properly and gives the correct out put with in that range only..
I checked in my system , It gives with in that range only.
Still you did nt get the proper output, Just debug your code, Then you will identify where is the problem.
Reward if points useful...
Regards
Srihari...
‎2008 Feb 18 9:31 AM
there is nothing wrong in ur program. That will work fine.
If not Tell me your problem clearly
Regards,
ajay
‎2008 Feb 18 9:34 AM
hi ajay,
it will run properly but it will show the whole content of the vbak table.