cancel
Showing results for 
Search instead for 
Did you mean: 

How to SELECT-OPTIONS in smartforms

Former Member
0 Kudos

Hi Experts,

I am create the smartform using parameter but req. is need to SELECT-OPTIONS instead of parameter how to use in smartform.

Thanks un Advance.

purnaneelu

<MOVED BY MODERATOR TO THE CORRECT FORUM>

Edited by: Alvaro Tejada Galindo on Jun 11, 2009 4:18 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you can achieve this requirement in two ways either to use select options in your driver program,if you want to use it in smatform only then create a referance variable table using 'SELOPT' and then code

in smartform to get the data.

Please let me know if you still need any more details.

Thanks and regards,

Rajeshwar

Former Member
0 Kudos

Hi Rajeshwar,

I am using select option in driver program instead of parameter but its not working

How to proceed pls suggest me

Thanks in Advance

purnaneelu

Answers (12)

Answers (12)

Former Member
0 Kudos

helpful

Former Member
0 Kudos

Hi ,

Both the S_route in driver program and used in the smartform must be of same type.

declare like this.

data: s_route1 type selopt.

SELECT-OPTIONS : s_route for s_route1.

please let me know if you still have issues.

Thanks ,

rajeshwar.

Former Member
0 Kudos

Hi,

I am declare lik this.

In smartforms interfaces i am declared like s_route type likp.

and in drive program i declared data: begin of i_likp,

route type route,

end of i_likp.

select-options: s_route type likp-route.

This is may be wrong

tell me how to declared this

thanks inadvance

purnaneelu

Former Member
0 Kudos

Hi Rajeswhar,

Pls help me how to declare the select options in smartforms

Thanks

purnaneelu

Former Member
0 Kudos

Hi ,

put a break-point before S_ROUTE and see whether you are able to populate data in that internal table.

and also check the date and see whether records exists in that combination or not.

Please get back if you are not able to solve still.

Thanks,

rajeshwar.

Former Member
0 Kudos

Hi rajeshwar,

I need to fetch the data from both routes and display the data .

I am try to execute the smartform its showing the error.

I am wrote print program its going to dump.

My print program is

<< Please only post the relevant portions of your code >>

Edited by: Rob Burbank on Jun 11, 2009 4:24 PM

Former Member
0 Kudos

Hi,

i did not get what you mean, can you please give some more details or copy the code here.

Thanks and regards,

Rajeshwar

Former Member
0 Kudos

Dear Rajeshwar ,

I try to showing the printview of the form. At that time is shows the "Field "S_ROUTE": Invalid type "h" (internal ABAP)" this is showing instead of output form.

My code is Here data not coming to the initial table itsself i_likp.

Edited by: Rob Burbank on Jun 11, 2009 4:22 PM

Former Member
0 Kudos
...

Edited by: Rob Burbank on Jun 11, 2009 4:24 PM

Former Member
0 Kudos

Dear rajeshwar,

I need to fecth the data from two routes and combined both route qty.

Thanks in advance

purnaneelu

Former Member
0 Kudos

Hi ,

did you give SIGN = 'I' and option as 'BT' and low value and high value and using this try to

use select statement using 'IN' statement.

PLease let me know if you still unable to proceed.

Thanks and regards,

Rajeshwar

Former Member
0 Kudos

Hi Rajeshwar ,

After exceution of form its showing is Field "S_ROUTE": Invalid type "h" (internal ABAP)

Pls helpme and save me

Thanks in Advance

purnaneelu

Former Member
0 Kudos

Hi ,

goto SE11 click on data type and give name as ZSELOPT and click on create,after this click on table type radio button and give the description of the table type and in line type tab give your structure name

(i.e 'SELOPT') ,now you ZSELOPT table type is created,now in interface give as

s_int type ZSELOPT.

Let me know if you still need any help.

Thanks and regards,

Rajeshwar.

Former Member
0 Kudos

Hi Rajeshwar,

Now in output entries came for sign option low high. i gave values for low (hyderbad) High(chennai).

but its going to dump any wrong thing i have donr here. And i need to change any code in my program

pls suggest me.

Thanks

purnaneelu

Former Member
0 Kudos

Hi Rajeshwar,

I need more suggestions from u.

I am giving the values to Low and High in the smartforms but its going to dump. I need to changes any thing in my code

pls suggest me

Thanks in advance

purnaneelu

Former Member
0 Kudos

Hi Rajeswhar,

Its showing the error

In the function module interface, you can specify only

fields of a specific type and length under "S_ROUTE".

Although the currently specified field

"S_ROUTE" is the correct type, its length is incorrect.

Pls help me

Thanks in Advance

purnaneelu

Former Member
0 Kudos

Hi,

See the below example.

SELECT-OPTIONS : s_exnum FOR j_1iexchdr-exnum.

in s_exnum-low and s_exnum-high u have the values.

CALL FUNCTION '/1BCDWB/SF00000013'

EXPORTING

s_exnum-low = s_exnum-low

s_exnum-high = s_exnum-high

TABLES

i_final = i_final.

In smartform>Form Interface>In Import tab declare s_exnum-low,s_exnum-high.

s_exnum-low type j_1iexchdr-exnum

s_exnum-high type j_1iexchdr-exnum

Based on these two variables u can fetch the data in form.

Former Member
0 Kudos

Hi purnaneelu,

first of all create a table type using SELOPT.i have created a ZSELOPT table type in smartform

click on form interface tab and in that tables tab.parameter

S_tab type ZSELOPT.

and in smartform when u enter the values as hyd and chenna then in the code ,move these values

to our ZSELOPT internal table and write select statement based on this internal table.

Please let me know if you need any more help.

Thanks and regards

Rajeshwar\

Former Member
0 Kudos

Hi,

In Interface i am giving s_tab type zselopt. In Global declation ZSELOPT type table of SELOPT

but its showing the error

Pls suggest me

purnaneelu

Former Member
0 Kudos

Hi Purnaneelu,

plese try in this way

proior to doing the above thing..in the SMART FORM you have to do the following things first

1)Create a Structure ZSTRUC in SE11 with the required fields.

2)In smart form u2018ZXXXXXu2019, create an entry in to TABLES tab "parametername in the Form Interface.

3)Define Structures in TYPES tabs in GLOBAL DEFINITIONS.

4)Write the logic in the main window "program Lines".

5)Loop the internal table you have used in the smartform. then follow as the below driver program procedure this will solve your problem

*******************************************

tables:<your table from which you are fetching the data>

select-options.

s_<fieldname> for <tablename-fieldname>.

data: fname type rs38L_fname. "this is for the function module name

Start-of-Selection.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = <your form name>

IMPORTING

FM_NAME = fname

EXCEPTIONS

NO_FORM = 1

NO_FUNCTION_MODULE = 2

OTHERS = 3

.

*now call the function module which will be generated when you create the smart form, and replace the form name with "fname"

CALL FUNCTION <fname>

  • EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

(or)

call function fname

tables

<the table name which you have used in the FORM INTERFACE parameter name> = <the checking value>

*********************************************

Regards,

Abdul Samad.

Former Member
0 Kudos

samad

Tables means final internal table ? where i am passing the final data?

Thanks in Advance

purnaneelu

Former Member
0 Kudos

Hi,

in this case create a ref table as SELOPT and in that move hyderabad to SELOPT-LOW and

chennai to SELOPT-HIGH, append the internal table.

if you are using driver program then check your calling function module or check the select

statement whether u have used 'IN' in where clause.

Please let me know if you have any issues.

Thanks and regards,

Rajeshwar.

Former Member
0 Kudos

Dear Rajehwasr,

Thanks for u r quick response

I am little bit confusion . Need to declare the internal table ie, hyd and chennai

Its in driver program or in print program

than how to pass the data to SELOP pls pls suggest me

Thanks in Advance

purnaneelu

Former Member
0 Kudos

hi,

1. Declare a structure in abap dictionary with select-option parameters

2. Declare a work area for the structure you created.

3. Pass the select option values into that work area.

4. in the smartform function module pass the work area.

5. before that declare structure in you smartform global data.

Regards,

Arasukumar

Former Member
0 Kudos

Hi,

You can declare the internal table with refrence to SELOPT (which has the structue like ranges) and pass to smartfrom. Use this structure in smartform.

Former Member
0 Kudos

Hi purnaneelu,

Could you be a bit clear more and Paste your piece of code.

Regards,

Suneel G

former_member212005
Active Contributor
0 Kudos

You want to use select-options in smartforms or in its driver program?

Former Member
0 Kudos

Hi

I am create smartform and wrote tha all the logic in smartforms using one route like Chennai.

Based on that i am fetching the data below.

route: Chennai

Sno Product Qty

1 Tn500 10

2 Tn250 20

Now my req. is now i need to fecth the data from two routes like Chennai and Hyderabad. And i need to fetch the data from both routes and i need the add the total qty from the two routes for the same material

Thanks in Advance

purnaneelu