Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

select-option in module pool with table Control

Former Member
0 Kudos

HI,

How to use the select-option in Module Pool and how Can i use the Table control in it.

Can any body give me some Clues.

with rgds

Ranjith

11 REPLIES 11

Former Member
0 Kudos

Hi,

You must load selection-screen in module pool screen. Define a select option in selection screen is simple. Selection screen could be defined as subscreen and it can be loaded into subscreen area module pool program. Try with this hint.

Regards,

Former Member
0 Kudos

Hi,

I have defined it as

SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.

SELECT-OPTIONS : S_ID FOR zAUFBAU--ID.

SELECTION-SCREEN END OF SCREEN 300 .

but when i try to execute with the Selection values it does not pick up any thing

0 Kudos

Hi Ranjith,

Have you called the selection screen defined by you in the subscreen area of a new screen correclty?

Former Member
0 Kudos

Hello

I have a solution for your problem.

Follow these steps for select-option:

1. Design a screen in such a way that the parameter will look like the select option(using two input/output fields).

2. Selec the data for these fields using BETWEEN clause. Example is given below

SELECT EMPID ENAME DEPID

FROM EMP

INTO CORRESPONDING FIELDS OF TABLE IT_EMP

WHERE DEPID BETWEEN LOW_DEPID AND HIGH_DEPID.

Here Depid is the field which is used as a select-option. Low_depid and High_depid are the two input/output fields

which have made Depid a select-option.

Thanks & Regards,

Khushboo

Former Member
0 Kudos

Hi Ranjit,

Are you looking some thing similar to SE16n..

where u have Slec options in table control??

Nag

Former Member
0 Kudos

Hi Nag,

Yes i am looking at exactly the same way as se16n .

0 Kudos

Hi Ranjith,

Steps

1. Define internal tablw with stricure - SE16N_SELFIELDS (Or choose only field that you require)

2. Call Method OUTPUT_CONVERT (class - cl_fobu_input_util). - In Loop of PBO

- Pass the rollname when calling the class

3. Call method INPUT_CONVERT (class - cl_fobu_input_util).. In Loop of PAI.

- Pass the rollname when calling the class

You can get rollname from DD03L table.

Hope this help..

Let me know if u need more inouts or sample code (you can debug SE16n transaction for ref)

Nag

Former Member
0 Kudos

Yes , you can make select option and table control in Module Pool program.

Please check this

http://wiki.sdn.sap.com/wiki/display/stage/SELECT-OPTIONSonDialogprogrammingscreen

Former Member
0 Kudos

Hi Nag,

Thanx for the reply .

Can u please give me an Sample code.

with rgds

Ranjith

0 Kudos

Hi ..

PBO.

LOOP at <table contriol>

module --- Inside the module

DATA: g_uti TYPE REF TO cl_fobu_input_util.

if rollname <> space.

CREATE OBJECT g_uti

EXPORTING typename =rollname.

*....convert to external pattern

CALL METHOD g_util->output_convert

EXPORTING

field_value_int = p_value " This is Tablecontrol-low

IMPORTING

field_value_ext = p_value. " Retrun value for Low

ENDLOOP.

lly you have code in PAI

DATA: g_util_1 TYPE REF TO cl_fobu_input_util.

if rollname <> space.

CREATE OBJECT g_util_1

EXPORTING typename = rollname.

*....convert to internal pattern

CALL METHOD g_util_1->input_convert

EXPORTING

field_value_ext = p_value

IMPORTING

field_value_int_c = p_value.

The above code should be written for tablecontrol-high aswell..

you can also refer: Inlcude LSE16NF10 line no 341 & 434 (SE16n)

Nag

Former Member
0 Kudos

thank you all