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

database view

Former Member
0 Likes
688

Hi All,

Can you please tell me, If i want to use a DATABASE VIEW (VBAP-VAPMA) in a program, Do I have to declare in 'TABLES:' work area?

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

sridhar_k1
Active Contributor
0 Likes
642

If you use the work area VBAP_VAPMA, or use the fields in select options, you need to declare TABLES VBAP_VAPMA, else you don't need to declare.

REgards

Sridhar

5 REPLIES 5
Read only

sridhar_k1
Active Contributor
0 Likes
643

If you use the work area VBAP_VAPMA, or use the fields in select options, you need to declare TABLES VBAP_VAPMA, else you don't need to declare.

REgards

Sridhar

Read only

0 Likes
642

Sridhar,

Thanks for the response.

The piece of code in which i'm using this view is:

<b> select bstnk

vbeln

kunnr

into table i_cust

from vbap_vapma

where vbap_vapma~matnr = p_matnr

and vbap_vapma~charg = p_charg.</b>

plz let me know I hve to declare for this.

Thnx.

Read only

0 Likes
642

you don't need to declate TABLES statement, and you can change the where condion like this:

where matnr = p_matnr

and charg = p_charg.

Regards

Sridhar

Read only

0 Likes
642

Hi Dev,

I would suggest to go through the link once,

http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ed06446011d189700000e8322d00/content.htm

Regards,

Azaz Ali.

Read only

0 Likes
642

Thank you all for the help.