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

default values

Former Member
0 Likes
774

Hi

i need to display default values with zeros.

o_kunnr FOR vbak-kunnr OBLIGATORY NO INTERVALS DEFAULT '000095'.

with the above statement i am able to get only 95. i want like 000095 in selection screen.

how to do that

6 REPLIES 6
Read only

Former Member
0 Likes
721

Hi,

Eventhough it is displayed as 95..Internally it will be stored as 000095..

Thanks,

Naren

Read only

Former Member
0 Likes
721

Hi Vahi,

In the selection scrren the conversion exit is executed by default , so even if it is 95 , it will serve your purpose.

I tried to modify the value at at selection screen output , but even though the value is 000095 , it is displayed as 95.

Regards

Arun

Read only

former_member150733
Contributor
0 Likes
721

Before displaying the field to the screen use the Function Module CONVERSION_EXIT_ALPHA_INPUT in the program to make this conversion.

Give the Input and output as the same screen field variable .

Hope this helps.

Anish Thomas

Read only

Former Member
0 Likes
721

Hi,

If you want to still display the instead of VBAK-KUNNR use another data type..

Check this example..

DATA: v_char(10).

SELECT-OPTIONS: so_kunnr FOR v_char NO INTERVALS.

INITIALIZATION.

so_kunnr-sign = 'I'.

so_kunnr-option = 'EQ'.

so_kunnr-low = '000095'.

APPEND so_kunnr.

Thanks

Naren

Read only

Former Member
0 Likes
721

Hi vahi,

Use below FM in at selection-screen output event.

CONVERSION_EXIT_ALPHA_INPUT.

Pls. reward points for useful

Read only

Former Member
0 Likes
721

HI

FOLLOW THIS TWO EXAMPLE.....

1)

TABLES:VBAK.

DATA: SCHAR(10).

DATA: V_KUNNR TYPE VBAK-KUNNR.

SELECT-OPTIONS:O_KUNNR FOR SCHAR OBLIGATORY NO INTERVALS DEFAULT '000095'.

V_KUNNR = O_KUNNR.

WRITE:/ V_KUNNR.

2)

DATA: v_char(10).

SELECT-OPTIONS: so_kunnr FOR v_char NO INTERVALS.

INITIALIZATION.

so_kunnr-sign = 'I'.

so_kunnr-option = 'EQ'.

so_kunnr-low = '000095'.

APPEND so_kunnr.

I THINK THIS THE HELFULL ANSWER .

THANKS

REGARD

DEEPAK