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

Problem with list box in table control (Module pool) .

biswajit_das6
Participant
0 Likes
1,297

Hi,

I'm facing a problem while populating values in List Box..

While I'm clicking a value from the list box it is not being hold in that box...box got blanked.

Please help me to solve this.

11 REPLIES 11
Read only

Former Member
0 Likes
1,072

hi,

See the example in SE38: demo_dynpro_dropdown_listbox

Refer to this link...

Edited by: avinash kodarapu on Jan 2, 2009 6:21 PM

Read only

biswajit_das6
Participant
0 Likes
1,072

Thanks but I've populated the Drop Down list ...but the problem is while clicking a particular value it does not remain in that box ..the Box got blacked.

Can you please suggest me how to hold that value on that box after clicking?

Thanks again...

Read only

0 Likes
1,072

Lets see you code in the PBO of the screen, need to see the actual screen flow logic as well as the code of the MODULES

Regards,

Rich Heilman

Read only

0 Likes
1,072

process before output.

module pop_drop_down.

...........................................................

module pop_drop_down output.

name1 = 'IO5'.

REFRESH list1.

LOOP AT it_zpoitshead INTO wa_zpoitshead.

value1-key = wa_zpoitshead-createdt.

value1-key = wa_zpoitshead-its_ebeln.

APPEND value1 to list1.

ENDLOOP.

CLEAR value1.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = name1

values = list1

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2

.

IF sy-subrc <> 0.

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

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

ENDIF.

endmodule. " pop_drop_down OUTPUT

Read only

0 Likes
1,072

Well, the NAME1 field needs to be the name of the column in the table control, including the work area name, so if the internal table name is ITAB and has a header line, then this value needs to be....

name1 = 'ITAB-IO5'.

or if you are using the work area, then like this.

name1 = 'WA-IO5'.

Also, I think you need to call that module within the LOOP statement in the screen flow logic in the PBO.

Regards,

Rich Heilman

Read only

0 Likes
1,072

hi,

you must have declared list1, as

DATA: list1 TYPE TABLE OF vrm_value.

and while populating this you have to fill the two columns KEY and TEXT,as

LOOP AT it_zpoitshead INTO wa_zpoitshead.

value1-key = wa_zpoitshead-createdt.
value1-text = <text>
_value1-key = wa_zpoitshead-its_ebeln._   "DO NOT populate for other parameter here itself,for this you  "need to repeat the same procedure again,REMOVE this from here
APPEND value1 to list1.

ENDLOOP.

and while calling the Function Module:

CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = <pass here the parameter name in quotes like ' p_craetedt'>
values = list1
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.

Regards,

Neha

Read only

0 Likes
1,072

Actually the name1 = 'IO5' is the name of Input/Output Field where the list to be populated from another

internal table that is IT_ZPOITSHEAD.

Read only

biswajit_das6
Participant
0 Likes
1,072

Hi Neha,

LOOP AT it_zpoitshead INTO wa_zpoitshead.

value1-key = wa_zpoitshead-createdt.

value1-key = wa_zpoitshead-its_ebeln.

APPEND value1 to list1.

That is typing mistake ...I have used value1-name1 = wa_zpoitshead-its_ebeln

Read only

Former Member
0 Likes
1,072

hi,

No, i don't think you should do that way.

populate it with

value1-key = .....

and value1-text = .......

not NAME1.

It seems you want List box for two i/o fields "createdt" and "its_ebeln"..right?

and as i said in the call to FM

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = <pass the name of i/o field>

values = list1-->this should be populated only with the field which you want to provide "List box" option

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2

Regards,

Neha

Edited by: Neha Shukla on Jan 2, 2009 7:20 PM

Read only

Former Member
0 Likes
1,072

This message was moderated.

Read only

biswajit_das6
Participant
0 Likes
1,072

Thanks every body for the reply and solve my problem..