Skip to Content
author's profile photo Former Member
Former Member

select options passed to function module

Hey

I would like to know how r the select-options of a program passed to the function module that is called internally in that program? I want to use this select-options in the function module to fetch frm the database tables?

Shakr

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2008 at 06:00 AM

    Hi,

    Use ranges in function modules. You can declare in import/export/ changing or tables parameters

    Example of ranges:

    ERDAT_RAN

    ERDAT_RAN

    SHP_R_ERZET

    RVBELN

    ERNAM_RAN

    Please see them in se11.

    Pass the select options in the report to these ranges or use below coding:

    DATA: wa_cmfre LIKE erdat_ran,

    wa_erdat LIKE erdat_ran,

    wa_erzet LIKE shp_r_erzet,

    wa_vbeln LIKE rvbeln,

    wa_ernam LIKE ernam_ran.

    SELECT-OPTIONS: s_erdat FOR vbak-erdat, s_erzet FOR vbak-erzet NO-EXTENSION,

    s_cmfre FOR vbak-cmfre OBLIGATORY ,

    s_vbeln FOR vbak-vbeln NO-EXTENSION,

    s_auart FOR vbak-auart OBLIGATORY, s_bsark FOR vbak-bsark.

    wa_cmfre-sign = s_cmfre-sign.

    wa_cmfre-option = s_cmfre-option.

    wa_cmfre-low = s_cmfre-low.

    wa_cmfre-high = s_cmfre-high.

    IF NOT s_erdat[] IS INITIAL.

    wa_erdat-sign = s_erdat-sign.

    wa_erdat-option = s_erdat-option.

    wa_erdat-low = s_erdat-low.

    wa_erdat-high = s_erdat-high.

    ENDIF.

    IF NOT s_erzet[] IS INITIAL.

    wa_erzet-sign = s_erzet-sign.

    wa_erzet-option = s_erzet-option.

    wa_erzet-low = s_erzet-low.

    wa_erzet-high = s_erzet-high.

    ENDIF.

    IF NOT s_vbeln[] IS INITIAL.

    wa_vbeln-sign = s_vbeln-sign.

    wa_vbeln-option = s_vbeln-option.

    wa_vbeln-low = s_vbeln-low.

    wa_vbeln-high = s_vbeln-high.

    ENDIF.

    IF NOT s_ernam[] IS INITIAL.

    wa_ernam-sign = s_ernam-sign.

    wa_ernam-option = s_ernam-option.

    wa_ernam-low = s_ernam-low.

    wa_ernam-high = s_ernam-high.

    ENDIF.

    you can pass these work areas to function module.

    Thanks,

    Shravan G.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2008 at 06:01 AM

    Hi,

    in the FM in tables option declare a table of type ACE_S_RANGE_TABLE.....

    in program pass ur sel-option table to dat table of fm...

    Cheers,

    jose.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2008 at 06:09 AM

    Better you can use Ranges instead of select-options.

    Regards,

    ajay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 20, 2008 at 06:18 AM

    Hi,

    FKKCORRR_LAUFD and FKKCORRR_LAUFI

    use these ranges.

    Thanks,

    Shravan G.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.