‎2007 Apr 03 4:11 AM
Hi,
Hi,
I have a query to search on the below three fields.
1)Product Company (VBPA-PERNR)
2)Network Company (VBPA-PERNR)
3)Account Manager (VBPA-PERNR)
Need to get VBELN field based on the search parameter given.
Here if we search on Product company then need to get all the VBELN where PARVW = 'ER' and in the same way if we search on network company then need to get all the VBELN where
PARVW = 'ZL' and for account manger PARVW = 'Z8'.
We can also pass all the three parameters at a time i.e. Product company, Network company and Account manager. We need to get all the VBELN based on the search condition given. Hope this is clear now.
Regards,
Ramesh
Message was edited by:
Ram Mohan Naidu Thammineni
‎2007 Apr 03 4:29 AM
Ram,
Your requirement is not that much clear.as per my understanding check the below code.
select single PARVW into VBPA-PARAW
from VBPA
where conditions.....
case VBPA-PARAW.
WHEN 'ER'.
WHEN 'ZL'.
WHEN 'Z8'.
Endcase.
Don't forget to reward if useful...
‎2007 Apr 03 4:48 AM
Ram,
DATA : Begin of i_VBPA occurs 0,
VBELN like VBPA-VBELN,
PARVW like VBPA-PARVW,
END OF i_VBPA.
This is for single search parameter...
-
Select vbeln parvw into table i_vbpa from VBPA Where PARVW eq = 'Z8'.
-
This is for all search parameters
Select vbeln parvw into table i_vbpa from VBPA
Where PARVW in ('ER','ZL','ER').
SORT i_VBPA by VBELN PARVW.
Pls. reward if useful