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

external subroutine

Former Member
0 Likes
295

hi all,

how can i rectify the following problem,

this is the main program

parameters x type 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(znava).

-


this is the second program

reports znava.

form sub.

select vbeln ernam netwr from vbak into table itab where vbeln = x.

loop at itab.

write : wa-a,wa-b,wa-c.

endloop.

endform.

in the above program i used external subroutine.whenever i give input in the parameter the result will show all the records from the database table. i need only one record that which i enter the value in parameters

ie : i enter 4969 sales order number but the result will show all the records from the database table instead of particular one record.

how can i rectify this problem.

thanks & regards,

Navneeth.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
281

Hi,

For that you have use one more parameter like vbeln and you have to pass that one.

It should be like below.

perform sub(znava) USING x.

In second program..

form sub USING x.

select vbeln ernam netwr from vbak into table itab where vbeln = x.

loop at itab.

write : wa-a,wa-b,wa-c.

endloop.

endform.

Now it will work.

Reward if useful...

1 REPLY 1
Read only

Former Member
0 Likes
282

Hi,

For that you have use one more parameter like vbeln and you have to pass that one.

It should be like below.

perform sub(znava) USING x.

In second program..

form sub USING x.

select vbeln ernam netwr from vbak into table itab where vbeln = x.

loop at itab.

write : wa-a,wa-b,wa-c.

endloop.

endform.

Now it will work.

Reward if useful...