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

subroutine

Former Member
0 Likes
754

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
738

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

6 REPLIES 6
Read only

Former Member
0 Likes
739

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

Read only

Former Member
0 Likes
738

Hi

u r program is giving the correct output only .

what is u r doubt .

Read only

0 Likes
738

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

Read only

0 Likes
738

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...

Read only

Former Member
0 Likes
738

there is nothing wrong in ur program. That will work fine.

If not Tell me your problem clearly

Regards,

ajay

Read only

0 Likes
738

hi ajay,

it will run properly but it will show the whole content of the vbak table.