Hi,
COuld you just check this:
This is the current code:
SELECT SINGLE * FROM v_anlhz
WHERE bukrs = '3166'
AND anlkl = 'GB060'
AND aktiv = sy-datum
AND erdat = sy-datum
AND txt50 = bdc_inrec-txt50
AND kostl = v_kostl.
Sometimes the value for anlkl can be XXX, so is the following code okay?
SELECT SINGLE * FROM v_anlhz
WHERE bukrs = '3166'
AND anlkl = 'GB060'
OR anlkl = 'GB060'
AND aktiv = sy-datum
AND erdat = sy-datum
AND txt50 = bdc_inrec-txt50
AND kostl = v_kostl.
Many Thanks!