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

regarding selection screen

Former Member
0 Likes
892

hi all im making a block on the selection screen in which i want to select an integer only 1 or 2 so that i can use it for my reference in the prog. how can i do it. like at the user end i want to provide the user with only two option.

can you help me out in generating a f4 help

1 ACCEPTED SOLUTION
Read only

gopi_narendra
Active Contributor
0 Likes
856
data : NAME  type VRM_ID,
       LIST  type VRM_VALUES,
       VALUE like line of LIST.

at selection-screen output.

  VALUE-KEY = '1'.
  VALUE-TEXT = 'One'.
  append VALUE to LIST.
  VALUE-KEY = '2'.
  VALUE-TEXT = 'Two'.
  append VALUE to LIST.

  call function 'VRM_SET_VALUES'
    exporting
      ID     = NAME
      VALUES = LIST.
  clear LIST.

Regards

Gopi

8 REPLIES 8
Read only

Former Member
0 Likes
856

create a domain in SE11 of char 1.

give the fixed value 1 and 2 in the values tab of the domain .

in selection screen

parameters : p_char type domainname value check

Read only

gopi_narendra
Active Contributor
0 Likes
857
data : NAME  type VRM_ID,
       LIST  type VRM_VALUES,
       VALUE like line of LIST.

at selection-screen output.

  VALUE-KEY = '1'.
  VALUE-TEXT = 'One'.
  append VALUE to LIST.
  VALUE-KEY = '2'.
  VALUE-TEXT = 'Two'.
  append VALUE to LIST.

  call function 'VRM_SET_VALUES'
    exporting
      ID     = NAME
      VALUES = LIST.
  clear LIST.

Regards

Gopi

Read only

0 Likes
856

thanks gopi

what is name and list in the exporting parameter.

how to attach this to the function module to the selection screen parameter.

Read only

S0025444845
Active Participant
0 Likes
856

Hi,

For that u can make a drop down list,

use type-pools :vrm for that.

regards,

sudha.

Read only

Former Member
0 Likes
856

hi madhavi,

you can use radiobuttons for the purpose.

Read only

Former Member
0 Likes
856

Hi,

You can provide the LIST BOX..using the function module VRM_SET_VALUES.

Ex..



TYPE-POOLS: vrm.
 
 
DATA: ivrm_values TYPE vrm_values.
DATA: xvrm_values LIKE LINE OF ivrm_values.
DATA: name TYPE vrm_id.
 
PARAMETERS: p_INT AS LISTBOX VISIBLE LENGTH 10.
 
INITIALIZATION.
 
  name = 'P_INT'.
 
  xvrm_values-key = '1'.
  xvrm_values-text  =  'First value'.
  APPEND xvrm_values TO ivrm_values.

  xvrm_values-key = '2'.
  xvrm_values-text  =  'Second value'.
  APPEND xvrm_values TO ivrm_values. 


  CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
      id     = name
      values = ivrm_values.

Also Check the demo program

DEMO_DYNPRO_DROPDOWN_LISTBOX

Thanks,

Naren

Read only

Former Member
0 Likes
856

Hi Madhvi,

Create a domain using SE11 and in 'Value Range' tab fill '1' and '2'. Name it as YD1.

Create a data element and use 'YD1' as its domain. Name it as YDE1.

In your program you can use this code:

PARAMETER p_test TYPE yde1 AS LISTBOX VISIBLE LENGTH 30 OBLIGATORY.

Hope this will help you..

Read only

Former Member
0 Likes
856

see the sample code

SELECT  connid cityfrom cityto deptime
    FROM  spfli
    INTO  CORRESPONDING FIELDS OF wa_spfli
   WHERE  carrid = demof4help-carrier2.

    value-key  = wa_spfli-connid.

    CONCATENATE value-text
                wa_spfli-cityfrom
                wa_spfli-cityto
                INTO value-text SEPARATED BY space.
    APPEND value TO list.


 CALL FUNCTION 'VRM_SET_VALUES'
       EXPORTING
            id     = name
            values = list.

girish