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

Passing select-options to the smartforms

Hi,

I working for smartform, I have to print select-options (S_INNUM) value in the one of the window of the smartform

what is the approach for this

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 17, 2009 at 09:30 AM

    you can pass this range S_INNUM as internal table in one of code block in the smartforms.

    The loop throuogh S_INNUM this and print it..

    venkat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 17, 2009 at 11:56 AM

    Hi,

    Through driver program, pass the select-options variable.

    In smartform, declare the select-options holding table in the tables tab of form interface.

    Eg: s_select type SELOPT

    Then, in the window,create a text node and display the select-options.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 17, 2009 at 12:04 PM

    Hi,

    Create an internal table of type SELOPT. Pass the values of selection criteria to this table. Add this table in Form Interface of the smartform. Create a text node and display the Values if sign = 'I' Option = 'BT' then you can dispaly select option as S_INNUM-LOW to S_INNUM-HIGH. Hope this solves your problem.

    Regards,

    Vaishali.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 17, 2009 at 12:29 PM

    Hi,

    1. Go to SE11 and create a structure(say Z_SELECTOPTION) as below and activate it.

    Z_SELECTOPTION Struture:

    SIGN --- CHAR1 --- CHAR1

    OPTION --- OPTION --- CHAR2

    LOW --- MATNR --- CHAR18

    HIGH --- MATNR --- CHAR18

    2. In Form Interface->table, declare the following.

    ITAB_SELECT LIKE Z_SELECTOPTION

    3. in your print program create the select option as shown

    SELECT-OPTIONS : S_MATNR FOR MARA-MATNR .

    4. call the form pasing the select-option as shown

    CALL FUNCTION v_form_name

    TABLES

    itab_select = s_matnr

    EXCEPTIONS

    FORMATTING_ERROR = 1

    INTERNAL_ERROR = 2

    SEND_ERROR = 3

    USER_CANCELED = 4

    OTHERS = 5.

    IF sy-subrc <> 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    5. I have explained for matnr, similarly you can create for any other type, in that case just replace matnr by thst type

    hope this helps,

    Venkatesh.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2009 at 06:32 AM

    hi

    Check this link

    http://saptechnical. com/Tutorials/Smartforms/SelectOptions/Demo.htm

    surya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 04, 2013 at 06:58 AM

    1. Go to se11

    cteate a structure zselect_option.

    with the fields: low types kunnr

    high types kunnr

    sign types char1

    options types char2.

    than save,check and activate the structure.

    2.go to smartforms

    Doubl click on form interface.

    in table tab declare the parameters as

    s_kunnr like zselect_option

    it_kna1 like kna1.

    3.Double click on global definition

    declare a work area in global data like as

    wa_kna1 type kna1.

    4.Click on Main window

    create -> flow logic -> prgmlines.

    Give the input paramer as s_kunnr

    output parameter as it_kna1.

    again..Click on Main window

    create -> flow logic -> loop.

    in that loop click on data tab

    provide it_kna1 into wa_kna1.

    than click on loop -> create -> text.

    drag and drop our fields from Globel Data.

    save and activate our smartform.

    5. create a driver prmg as..shown below

    tables:kna1.

    select-options:s_kunnr for kna1-kunnr.

    data:it_kna1 type table of kna1.

    DATA:F_NAME TYPE RS38L_FNAM.

    start-of-selection.

    select *

    from kna1

    into table it_kna1

    where kunnr in s_kunnr.

    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

    EXPORTING

    FORMNAME = 'ZSMARTFORM' "(Give Smartform name)

    * VARIANT = ' '

    * DIRECT_CALL = ' '

    IMPORTING

    FM_NAME = F_NAME.

    CALL FUNCTION f_name

    TABLES

    S_KUNNR = s_kunnr

    IT_KNA1 = it_kna1.

    save ,check and activate and exicute the prgm...

    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.