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

Regarding ABAP query when using the LDB

Former Member
0 Likes
603

Hi Experts,

Iam preparing one ABAP query by using LDB.

And i added two more table VBPA and KNA1.

When i add the VBPA table the system will automatically generate

the sql query and we need to pass the where condition to thet query.

system generated like this..

SELECT SINGLE * FROM VBPA

WHERE VBELN =

AND POSNR =

AND PARVW =

but in the above query i need to pass the values to PARVW as 'AG' or 'SP'.

how can i pass the two values to that query?

rgds,

Sruthi.

4 REPLIES 4
Read only

Former Member
0 Likes
575

hi,

just simply write the select statement as you do it in the normal abap.

revert back if you need more help.

Read only

0 Likes
575

HI,

It is system generated....just we need to pass the values to where condition.

in normal ABAP we can do like this...

SELECT SINGLE * FROM VBPA

WHERE VBELN = EKPO-ZZVBELN

AND POSNR = EKPO-ZZPOSNR

AND PARVW in ( 'AG' , 'SP').

or

SELECT SINGLE * FROM VBPA

WHERE VBELN = EKPO-ZZVBELN

AND POSNR = EKPO-ZZPOSNR

AND ( PARVW = 'AG' or PARVW = 'SP' ).

Rgds,

Sruthi.

Read only

0 Likes
575

Hi,

Yes,you can declare them as it is and it will give th desiered output . Few days i had also worked on the logical databases for this concept.

If you have doubt then do tell me about it.

Read only

Former Member
0 Likes
575

Thank you very much for all.

I got the solution,

Thank you very much

..

Rgds,

Sruthi.