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

VRm set vAlues

Former Member
0 Likes
6,929

hi,

i am tryiNg to provide drop down list In a module pool program

In which event i need to write?PAI or PBo?

there is a chain staTement alsO Defined for this Field

Thanks in advance

9 REPLIES 9
Read only

Former Member
0 Likes
2,202

it should be in PBO,

before displaying the DropDown.

Once the field is created in screen painter...

Double click on it....In the pop up..select the field on the box called "Dropdown"

We will have -> list box and list box with key.....select list box(...list box with key is just like extra field display in addition to the dropdown value...eg:if material is dropdown we can give material/material description in the dropdown and give material as the key)..Assign a function code to the field of the dropdown say "DROP"

Now the field is ready as dropdown...

There are many options to fill the dropdown

Static filling ->

(1) We can give fixed values in the domain and use the field referring to the data element..so that values

will always come from domain

Dynamic filling->

(2) use the function module VRM_SET_VALUES

check progrm DEMO_DYNPRO_DROPDOWN_LISTBOX

basically we have 2 fields for the table as dropdown ..key/text...we need to fill the field 'key' and pass it to the function module

call function 'VRM_SET_VALUES'

exporting

id = param -> field name in Caps

values = values. -> internal table that contains values to be shown in dropdown

Hope it helps

Rajnesh

Edited by: Rajnesh Dharmat on Mar 4, 2009 12:00 PM

Read only

Former Member
0 Likes
2,202

Check this [link|;

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
2,202

Hi,

Kindly refer:

Regards,

Tarun

Read only

dev_parbutteea
Active Contributor
0 Likes
2,202

Hi,

I would suggest to put your codes in initialization section because each time you perform some action on the selection screen this will trigger PBO and run your codes again.

Regards.

Read only

Former Member
0 Likes
2,202

Hi Chitra,

Kindly go through this link below:

http://sap.niraj.tripod.com/id38.html

Hope it helps

Regrds

Mansi

Read only

Former Member
0 Likes
2,202

Hi,

First create drop down list box on screen and push values into it in PBO

using VRM_SET_VALUES. i think you know how to provide values.

PBO.

Module list_box.(Double Click on it and write the code to enter values into list box)

then goto PAI module.

PAI.

CHAIN.

xxxxxxxx.

ENDCHAIN.

Read only

Former Member
0 Likes
2,202

hi you can give in

process on value-request event.

Read only

0 Likes
2,202

Hi ,

You have to code in any include of PBO event

please find the below relevant code for you clarification.



FORM update_listbox_material.

  REFRESH: values.

    values-key = '121101'.
    values-text = 'SHG'.
    APPEND values.
    values-key = '121102'.
    values-text = 'TOLL SHG'.
    APPEND values.
    values-key = '121104'.
    values-text = 'J.SHG'.
    APPEND values.
    values-key = '121111'.
    values-text = 'HG'.
    APPEND values.
    values-key = '121113'.
    values-text = 'J.HG'.
    APPEND values.
    values-key = '121121'.
    values-text = 'PW'.
    APPEND values.

    values-key = '121201'.
    values-text = 'LEAD'.
    APPEND values.
 
    v_id = 'WA_MATDET-MATNR'.

  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id              = v_id
      values          = values[]
    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.                               " Update_Listbox_Tables

Thanks.

Murugan.B

Read only

Former Member
0 Likes
2,202

thanks