Skip to Content
0
Feb 21, 2022 at 01:18 PM

Select same field from same table with different condition

103 Views

Hai,

For Withholding tax(WHT), I need to fetch DMPTR from BSEG table where BELNR = i_belnr(from selection screen) and GJAHR = i_gjahr(from selection screen). here, need to pass this dmptr value to ls_output-WHT.

FOR Deduction, I need to fetch DMPTR from BSEG table where BELNR = it_bsak-belnr(from it_bsak internal table value) and GJAHR = it_bsak-gjahr(from it_bsak internal table value). here, need to pass this dmptr value to ls_output-deduction.

How can i achieve this in a single select query?? Any suggestions?

Thank you,

Vidhya V