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

reload list box

former_member194669
Active Contributor
0 Likes
1,642

Hi All,

I am using a dropdown listbox on one of my module pool screen. New values get added every screen call in this. My requirement is to refresh this list box .

I try to use VRM_REFRESH_VALUES but values not get refreshed.

Any suggestions?

Thanks

aRs

Hi All,

I am using a dropdown listbox on one of my module pool screen. New values get added every screen call in this. My requirement is to refresh this list box .

I try to use VRM_REFRESH_VALUES but values not get refreshed.

Any suggestions?

Thanks

aRs

5 REPLIES 5
Read only

Former Member
0 Likes
953

Hi,

Call the function module VRM_SET_VALUES again with the new values in PBO..

Thanks,

Naren

Read only

gopi_narendra
Active Contributor
0 Likes
953

After the Call 'VRM_SET_VALUES' function moduel just clear the LIST.

just like below

call function 'VRM_SET_VALUES'

EXPORTING

ID = NAME1

VALUES = LIST1.

clear LIST1.

Regards

- Gopi

Read only

former_member194669
Active Contributor
0 Likes
953

Naren/Gopi,

Thanks for your reply.

I tried to call the set values funcion module again but values not get refreshed .

and tried to clear the list. But results not refreshed.

If i am using VRM_DELETE_VALUES please give some info related to this.

Thanks

aRs

Read only

0 Likes
953

report ZTEST_2.

type-pools VRM.

data: NAME type VRM_ID,

LIST type VRM_VALUES,

VALUE like line of LIST.

parameters:

CPF_DIFF(2) type C as listbox visible length 18,

$DIFF(10) type C.

    • Create dropdown lists

at selection-screen output.

  • Select the divison

NAME = 'CPF_DIFF'.

VALUE-KEY = 'GT'.

VALUE-TEXT = 'Greater than'.

append VALUE to LIST.

VALUE-KEY = 'GE'.

VALUE-TEXT = 'Greater or equal'.

append VALUE to LIST.

VALUE-KEY = 'LE'.

VALUE-TEXT = 'Less or equal'.

append VALUE to LIST.

VALUE-KEY = 'LT'.

VALUE-TEXT = 'Less than'.

append VALUE to LIST.

VALUE-KEY = 'EQ'.

VALUE-TEXT = 'Equal'.

append VALUE to LIST.

  • Display the divison drop down box

call function 'VRM_SET_VALUES'

exporting

ID = NAME

VALUES = LIST.

clear LIST.

Check the sample program with and with out clear list.

and press enter each time on the selection screen. the same applies for ur screen also.

Hope this helps

Regards

- Gopi

Read only

Former Member
0 Likes
953

Hi,

I tried this code..It worked. fine..I just refreshed the internal table ..

TYPE-POOLS: vrm.

DATA: p_test(10).

DATA: t_data TYPE vrm_values.

DATA: v_first.

CALL SCREEN '0100'.

MODULE status_0100 OUTPUT.

SET PF-STATUS '0100'.

*

DATA: s_data TYPE vrm_value.

<b> refresh: t_data.</b>

IF v_first IS INITIAL.

s_data-key = 'ABCD'.

s_data-text = 'First four'.

APPEND s_data TO t_data.

s_data-key = 'EFGHI'.

s_data-text = 'Second four'.

APPEND s_data TO t_data.

v_first = 'X'.

ELSE.

s_data-key = 'ABCD'.

s_data-text = 'First four'.

APPEND s_data TO t_data.

s_data-key = 'EFGH'.

s_data-text = 'Second four'.

APPEND s_data TO t_data.

s_data-key = 'IJKL'.

s_data-text = 'Third four'.

APPEND s_data TO t_data.

ENDIF.

  • Set the default value.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'P_TEST'

values = t_data

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. " STATUS_0100 OUTPUT

Thanks,

Naren