‎2009 Jan 20 4:58 AM
hello,
how can i create a FM for Seach help which in turn will take inputs as range of values? then further fillter
it by the user's selection?
Regards,
Tamanna
‎2009 Jan 20 5:09 AM
Hi,
you can define the ranges within the FM . sample code is here
RANGES: BELNR1 FOR BKPF-BELNR.
REFRESH: BELNR1.
IF NOT P_F_BELNR_HIGH IS INITIAL.
BELNR1-LOW = P_F_BELNR_LOW.
BELNR1-HIGH = P_F_BELNR_HIGH.
BELNR1-SIGN = 'I'.
BELNR1-OPTION = 'BT'.
ELSE.
BELNR1-LOW = P_F_BELNR_LOW.
BELNR1-SIGN = 'I'.
BELNR1-OPTION = 'EQ'.
ENDIF.
APPEND BELNR1.
SELECT * FROM BKPF
INTO TABLE i_bkpf
WHERE belnr IN belnr1.thanks\
Mahesh
‎2009 Jan 20 5:04 AM
in selection condisation u can pass the range value.
create call screen 100
PUT icon filter.
when press pass this parameters through where cluse.
‎2009 Jan 20 5:04 AM
‎2009 Jan 20 5:12 AM
hello All,
let me more specific wit my questions..
ive created a FM which takes in various values n filters it depending on the input and outputs the correspounding entries. for this to achive i used a dynamic select query.
now i want it to further enchance by passing the input parameters as range...
please suggest how i can i achive this.
Regards
Tamanna
‎2009 Jan 20 5:09 AM
Hi,
you can define the ranges within the FM . sample code is here
RANGES: BELNR1 FOR BKPF-BELNR.
REFRESH: BELNR1.
IF NOT P_F_BELNR_HIGH IS INITIAL.
BELNR1-LOW = P_F_BELNR_LOW.
BELNR1-HIGH = P_F_BELNR_HIGH.
BELNR1-SIGN = 'I'.
BELNR1-OPTION = 'BT'.
ELSE.
BELNR1-LOW = P_F_BELNR_LOW.
BELNR1-SIGN = 'I'.
BELNR1-OPTION = 'EQ'.
ENDIF.
APPEND BELNR1.
SELECT * FROM BKPF
INTO TABLE i_bkpf
WHERE belnr IN belnr1.thanks\
Mahesh
‎2009 Jan 20 5:11 AM
‎2009 Jan 20 5:17 AM
hello suhas,
I made the input parameters as of type range..
but i dont know how to refine my select query to give me the result depending on th selection critetia..
Regards,
Tamanna
‎2009 Jan 20 5:16 AM
‎2009 Jan 20 5:19 AM
hello ,
" Dynamic Select statement
TRY.
SELECT *
FROM vdarl
INTO TABLE l_tab_contract
WHERE (l_cond_syntax) .
CATCH cx_sy_dynamic_osql_error.
MESSAGE `Wrong WHERE condition!` TYPE 'I'.
ENDTRY.
here in l_cond_syntax im getting the values depending upon the user selection.,but i want it to work for range of values
regards,
Tamanna
‎2009 Jan 20 5:33 AM
Hello Tamanna,
here in l_cond_syntax im getting the values depending upon the user selection.,but i want it to work for range of values
Can you share the code how you are populating l_cond_syntax?
BR,
Suhas
‎2009 Jan 20 5:20 AM
Hi.
If you want create serach help you can std function modules like F4IF_INT_TABLE_VALUE_REQUEST,
F4IF_DETERMINE_SEARCHHELP,
F4IF_FIELD_VALUE_REQUEST,
F4IF_INT_TABLE_VALUE_REQUEST,
'F4_SEARCH_HELP'
No need to create Z FM for that.
Regards.
Jay
‎2009 Jan 20 5:32 AM
Hi,,
Let's say ur fieldname is field in ur where-clause
IF NOT field_LOW IS INITIAL AND NOT field_HIGH IS INITIAL.
v_where = '& BETWEEN ''&'' AND ''&'' '.
REPLACE '&' WITH key_field INTO v_where.
REPLACE '&' WITH field_LOW INTO v_where.
REPLACE '&' WITH field_HIGH INTO v_where.
CONDENSE v_where.
select * into corresponding fields of table ITAB
from (table_name)
where (v_where).hope u got it
thanks\
Mahesh