2013 Nov 14 7:23 PM
Hi,
I defined a SELECT-OPTIONS field as:
"SELECT-OPTIONS : so_tqdat FOR T056P-DATAB."
In the SELECT statement below I used so_tqdat as filter, but not sure why the filter keep getting ignored.
SELECT REFERENZ DATAB ZSOLL
FROM T056P INTO TABLE t_t056p
FOR ALL ENTRIES IN t_ref
where REFERENZ = t_ref-REFERENZ
and ( DATAB > so_tqdat-low and DATAB < so_tqdat-high ).
Not sure if I am missing anything and just wondering if you can see what did I do wrong? Thanks
Really appreciate your input
2013 Nov 15 6:06 AM
Hi,
In the table the date field is in character format. I think better to do this way.
SELECT REFERENZ DATAB ZSOLL
FROM T056P INTO TABLE t_t056p
where REFERENZ = p_REF .
* you have to convert the date field as below.
loop at t_t056p.
convert inverted-date T_t056p-datab into date val_date.
if val_date between so_tqdat-low and so_tqdat-high.
* APPEnD THE DATA INTO ANOTHER INTERNAL TABLE
endif.
ENDLOOP.
Thanks,
Kiran
2013 Nov 15 6:08 AM
Hi
Change select query as below...
SELECT REFERENZ DATAB ZSOLL
FROM T056P INTO TABLE t_t056p
FOR ALL ENTRIES IN t_ref
where REFERENZ = t_ref-REFERENZ
and DATAB in so_tqdat.
2013 Nov 15 6:24 AM
use as follow. SO_TQDAT enter the from and to date. In your case you are comparing the work area of the select option which is blank.. Select option is an internal table with header line.
Use this
SELECT REFERENZ DATAB ZSOLL
FROM T056P INTO TABLE t_t056p
FOR ALL ENTRIES IN t_ref
where REFERENZ = t_ref-REFERENZ
and DATAB in so_tqdat.
2013 Nov 15 11:04 AM
Hi,
in T056p -DATAB is a character field(8), not the date field. Have to convert the date by using conversion exit. CONVERSION_EXIT_INVDT_***
Thanks,
Kiran.