cancel
Showing results for 
Search instead for 
Did you mean: 

Passing select-options to the smartforms

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

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...

Former Member
0 Kudos

hi

Check this link

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

surya

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

venkatesan_nagiah
Active Participant
0 Kudos

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