Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

use check box in function module

Former Member
0 Likes
481

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 .

3 REPLIES 3
Read only

Former Member
0 Likes
357

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>

Read only

Former Member
0 Likes
357

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

Read only

0 Likes
357

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>