Skip to Content
0
Former Member
Aug 11, 2007 at 11:57 AM

Doubt in select statement

19 Views

Hi Friends,

I have written a select statement like

select akunnr aj_3avakzt aj_3avakzp into fpi_sold_output from knvv as a inner join vbap as b on akunnr = b~kunnr

where a~vkorg in fp_vkorg and

a~vtweg in fp_vtweg and

a~spart in fp_spart and

a~kunnr in fp_kunnr and

b~parvw eq 'SP'.

my doubt is b~parvw(party function in vbpa) should be in the value from select option it can be any two character. they can give any number of input for parvw in the select option by giving no intervals.

i need to write two select statements

1st select satement should work for b~parvw with the value 'SP' .

2nd select statement should work for b~parvw with the value 'ST'.

i was asked not to use like this

b~parvw eq 'SP'.

instead asked to use the value from selection screen for b~parvw.

but i should extract records only for two parvw which are 'SP' and 'ST'

how to wrute the select statement.

please help.