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: 

How to hold the value in List box.

Former Member
0 Kudos
138

Hi All,

On my screen painter Screen I am displaying the Sold to party and ship to party with thier address.

I am also displaying the Shipping condition based on ship to party. To display the shipping condition i am using list box. Once the user enter the sold to party automatically all the field is going to populate in their respective fields. I am facing the problem that, The list box getting populated with shipping condition but once you choose the shipping condition and hit the enter the list box getting refreshed. I am using this code in PAI event. And I can Only use this in PAI.

The Function i am using for list box is CALL FUNCTION 'VRM_SET_VALUES'.

Pls suggest me how to hold the value in List box.

Thanks,

Rakesh

4 REPLIES 4

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
62

When you are filling it for the first time, first check if it is initial. Then only fill it if there is nothing in it.

check not field is initial.

field = 'The value'.

Regards,

Rich Heilman

Former Member
0 Kudos
62

Hi,

The function module VRM_SET_VALUES is to be used in PBO event only.

In ur case export the vrm_values and VRM_ID to memory id.

Import the same in PBO event and call the function VRM_SET_VALUES in PBO.

Please let me know if u have any questions.

Thanks,

Rehan

0 Kudos
62

Hi,

Now i am using in PBO.

the code below in in PBO.It is still not holding the value.

if list[] is initial.

perform SHP_COND.

endif.

form SHP_COND .

*DATA: SHOP(80).

clear : GT_VSBED, list.

refresh : GT_VSBED, list.

select vsbed

from knvv AS K

into table GT_VSBED

where Kvkorg = vbak-vkorg "Kkunnr = GV_STPH

and K~vtweg = vbak-vtweg

and K~spart = vbak-spart.

select VSBED vtext

from TVSBT

into table list

for all entries in GT_VSBED

where spras = sy-langu

and vsbed = GT_VSBED-VSBED.

*break-point.

NAME = 'SHP_CON'.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = NAME

values = LIST[]

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.

endform. " SHP_COND

Thanks,

Rakesh

0 Kudos
62

Hi Rakesh,

You are seeking some help in this topic. And yet you have not marked this topic as a question. I have done it for this time. But please make sure that you do not deselect the option (to mark a topic as a question) the next time.

Please also reward the answers that are helping you.

Regards,

Anand Mandalika.