Application Development and Automation 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: 
Read only

Module pool Table control

Former Member
0 Likes
1,018

How to get drop down help for a field in table control?

Suppose there is a field for employee status in table control. That field can either have 'Permanent' or 'Temporary'. What is the code and where to write the code in module pool? is it in POV?

Please help.

Thanks in advance.

9 REPLIES 9
Read only

Former Member
0 Likes
805

hi

Welcome to SDN

You can have dropdown list box in Table control.

Select any one cell in table control.In attributes dialog box, there is an option for dropdown.

Just select listbox...

This will result in listbox being included for the field.

check this below link also..

http://www.allsaplinks.com/files/using_table_in_screen.pdf

~~Guduri

Read only

Former Member
0 Likes
805

Hi Saha,

You need to do it as the same way as you do build a static search help for a field in table control. the only diff here is you will have read the screen value based on which you would build your search help internal table using FM

U can Simply use Event PROCESS ON VALUE-REQUEST for Populating the List Box Values in Screen on which u are going to display Table Control.

Suppose We want only few Customer type for field ( WA_CUST-CustomerType )in Table control. Then I will add following code after PBO.

PROCESS ON VALUE-REQUEST.

FIELD WA_CUST-CustomerType

MODULE cust_types.

In Defination of MODULE cust_type

Use the FM 'F4IF_INT_TABLE_VALUE_REQUEST'.

Pass Value_tab to the Above FM which will Contain the Values that you want in Dropdown List.

Regards,

Priyanka.

Read only

0 Likes
805

Hi Priyanka,

I have tried this but it is not working yet....any other way??

Read only

0 Likes
805

Hi Saha,

Check these sample programs.

DEMO_DYNPRO_TABCONT_LOOP Table Control with LOOP - ENDLOOP

DEMO_DYNPRO_TABCONT_LOOP_AT Table Control with LOOP AT ITAB

DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement

DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB

demo_dynpro_tabcont_loop - demo example with scrolling.

demo_dynpro_tabcont_loop_at- demo example with table control modification

Regards,

Priyanka.

Read only

Former Member
0 Likes
805

Hi,

Please check the link,

Regards,

Hema.

    • Reward points if it is useful.

Read only

Former Member
0 Likes
805

saha,

Just go thru this programs..

DEMO_DYNPRO_TABLE_CONTROL_1

DEMO_DYNPRO_TABLE_CONTROL_2

Pls. reward if helpful

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
805

HI,

Simple and easy thing will be have these values as the fised values for the Domain of the field's TYPE.

You should be able to make a filed as dropdown in the screen painter.

Regards,

Sesh

Read only

Former Member
0 Likes
805

hi Friend,

You need to follow the following steps for this:

1->go to Screen Painter, choose the column which you need to make as drop down.

2->Click F2 to go tothe properties screen.

3->Select <b>Listbox or Listbox with Key</b> for the <b>DROPDOWN</b> field (3rd field in properties tab)

4->give value for the FCODE field also, to track the actions in SY_UCOMM when the user selects the value.

5->in the ABAP code, you need to include the logic to populate values for this drop down. You can use the function module <b>VRM_SET_VALUES</b> to populate the listbox in each line of the table control. The fucntion module has to be called in the PBO module, which is defined inside the loop...endloop statement in the flow logic.

6->for changing the values based on user selection, you can include the code in the PAI module, checking SY_UCOMM or OK_CODE.

Hope this helps,

Sajan Joseph.

Read only

Former Member
0 Likes
805

HI

pl set the attributes of the screen field as mentioned in the above posts...

in the following code, i am displaying version id (plaf-verid) in the dropdown..should be useful...thanks

TYPE-POOLS: VRM.

DATA: NAME TYPE VRM_ID, LIST TYPE VRM_VALUES,

VALUE LIKE LINE OF LIST.

NAME = 'H_VERID'. "Your screen field name for which u want dropdown

SELECT VERID FROM MKAL INTO VALUE-KEY WHERE MATNR = P_MATNR AND WERKS = P_WERKS.

VALUE-TEXT = VALUE-KEY.

APPEND VALUE TO LIST.

ENDSELECT.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = NAME

VALUES = LIST

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2.

ENDIF.

cheers,

Sathish. R