‎2006 Dec 19 4:43 PM
Hallow I build a function module and I declare a check box (check_str in tab import) that u can choose if u wont to see relat 027 push x else u can see 027 +034 my error is with definition of ceck_str it bring me an error that called field relat is unknown. how can I declare it .maybe I am not do it write I do it in first time. (relat is field from table hrp1001).
regards
DATA ceck_str TYPE string.
if SWITC_HISTORY = 'X' .
ceck_str = ( relat EQ '027' ).
else
ceck_str = ( relat EQ '027' OR relat EQ '034' ).
endif.
This is my select
SELECT objid sobid priox istat endda begda
FROM hrp1001
INTO CORRESPONDING FIELDS OF TABLE d_itab
FOR ALL ENTRIES IN z_course_table
WHERE otype = 'D'
AND objid = z_course_table-objid
AND sclas = 'P'
AND ceck_str .
‎2006 Dec 19 4:46 PM
Ur select statement looks like kind of a error ..Please check the last statement in select
SELECT objid sobid priox istat endda begda
FROM hrp1001
INTO CORRESPONDING FIELDS OF TABLE d_itab
FOR ALL ENTRIES IN z_course_table
WHERE otype = 'D'
AND objid = z_course_table-objid
AND sclas = 'P'
AND ceck_str = <b>'your Value'.</b>
‎2006 Dec 19 4:58 PM
What are you expecting CECK_STR to be storing, is it a boolean value.
The select will have to change accordingly. More over, RELAT is it a variable you have declared?
Regards,
Ravi
‎2006 Dec 19 5:49 PM
hi ravi yes somthing like this, boolean value is ok .how can i do that ?and how can i declared field that belong to table like <b>relat</b> from <b>table hrp1001</b> thankes for your time.<b>regards</b>