‎2010 Mar 08 7:15 AM
Hello All,
I have a requirement to write a query for the below case:
The query should pick up all the ZD2D item category lines (VBAP-PSTYV=ZD2D) , where either of the below cases are fulfilled.
1.For the combination of VBAP_VBELN and VBAP-POSNR, where VBAP-PSTVY = ZD2D, Please check if VBFA-VBTYP_N = blank, then display the output.
2.If VBFA-VBTYP_N = M , then check for VBUP-GBSTA not equal to C.
If either of the above conditions are fulfilled, the lines should be shown in the report.
My question is , can we use a single query to give two different outputs for the above two cases. I was thinkin of using two different variants. Can this be done in any other way?
Thanks,
Rachana.
‎2010 Mar 10 11:48 AM
Hi,
i hope this will help you
IF vbfa-vbtyp_n = 'M'.
SELECT * FROM <table>
WHERE vbup-gbsta <> 'C'.
ELSEIF vbfa-vbtyp_n IS INITIAL.
SELECT * FROM <table>
WHERE vbap-vbeln = 'Value'
AND vbap-posnr = 'Value'
AND vbap-pstvy = 'ZD2D'.
ENDIF.
‎2010 Mar 11 9:35 PM
Hi,
this looks like a programming request. This is no ABAP objects question.
Send me some cash and I will think about your request, thanks you.
Regards,
Clemens
‎2010 Mar 11 10:30 PM
vague subject, wrong forum, likely case of "spec dumping", thread locked.
Thomas