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

Parameters Issue

Former Member
0 Likes
995

Hi All,

How we can set default values in PARAMETER Like

PARAMETER: P like Ztable-gendre.

When user put the cursor on the selection Box it Should get MALE

FEMALE.

Regards

Vikas

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
955

you just paste code REPORT ZTESTRE.

TYPE-POOLS : vrm.

DATA : it_vrm TYPE vrm_values,

x_vrm like line of it_vrm.

PARAMETER: P(10) as listbox visible length 10."Ztable-gendre

INITIALIZATION.

x_vrm-key = '1'.

x_vrm-text = 'MALE'.

APPEND x_vrm TO it_vrm.

x_vrm-key = '2'.

x_vrm-text = 'FEMALE'.

APPEND x_vrm TO it_vrm.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'P'

values = it_vrm

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.

9 REPLIES 9
Read only

Former Member
0 Likes
955

Hi,

You can add a search help to the parameter, either by using

1. Function module :

F4IF_INT_TABLE_VALUE_REQUEST

(Check the FM documentation for how to use it), call this FM under event

at selection-screen on value request of p_parameter

2. Or by attaching a search help.

Thanks & Regards,

Navneeth K.

Read only

0 Likes
955

If you want to fix up some value by default to the parameter then use "Default" addition to the parameter.

Read only

Former Member
0 Likes
955

Search SDN for function module 'VRM_SET_VALUES' for example codes.

~Eswar

Read only

Former Member
0 Likes
955

Refer:

Read only

Former Member
0 Likes
955

Hello,

Try in this way it is working fine i have test it.

PARAMETER: s_matnr TYPE mara-matnr.

AT SELECTION-SCREEN OUTPUT.

s_matnr = '94000000001'.

Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
955

Hi,

You can do with the help of LISTBOX.

For more details

Goto SE38 , type listbox and press F1

Thanks & Regards

Read only

peter_ruiz2
Active Contributor
0 Likes
955

hi Vikas,

In SE11, declare a new data element and assign the allowable values as

M = Male

F = Female

then, use your new data element for Ztable-gendre.

regards,

Peter

Read only

Former Member
0 Likes
955

Hi Vikas,

Check the below code and do the modification according to your issue.

Copy paste and execute the code you can understand.

Type-pools: vrm.

Data: param type vrm_id,

values type vrm_values,

value like line of values.

parameters: p1 as listbox visible length 20 modif id one.

at selection-screen output.

param = 'p1'.

value-key = '1'.

value-text = 'male'.

append value to values.

value-key = '1'.

value-text = 'female'.

append value to values.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = PARAM

VALUES = VALUES

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

ENDIF.

Cheers!!

Balu

Read only

Former Member
0 Likes
956

you just paste code REPORT ZTESTRE.

TYPE-POOLS : vrm.

DATA : it_vrm TYPE vrm_values,

x_vrm like line of it_vrm.

PARAMETER: P(10) as listbox visible length 10."Ztable-gendre

INITIALIZATION.

x_vrm-key = '1'.

x_vrm-text = 'MALE'.

APPEND x_vrm TO it_vrm.

x_vrm-key = '2'.

x_vrm-text = 'FEMALE'.

APPEND x_vrm TO it_vrm.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'P'

values = it_vrm

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.