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: 

Default values in Module pool

Former Member
0 Kudos

Can I specify default values in screen.

for example for date I want to use default value sy-datum.

I dont want to write the code in screen flow logic.

screenfield-name = sy-datum.

Is there any other way for specify default value in screen?

6 REPLIES 6

Former Member
0 Kudos

I think the only way is to assign the default values in the PBO only.

But for transactions, by creating the TRANSACTION VARIANTS you can given the default values and it is also possible to make it NON-EDITABLE or INVISIBLE as well.

0 Kudos

Hi Santosh,

Can you just brief me about the transaction variants and how do I use in the screen

former_member333737
Active Participant
0 Kudos

Hi,

If you want to display as default values you can write the code in PBO only.

Regrds,

Nikhil.

awin_prabhu
Active Contributor
0 Kudos

Hi Shah,

S we can do it.

In screen layout, -> Goto -> Secondary Window -> Dictionary/Program Fields -> Enter 'SYST' in Table name

-> Select DATUM field and place it in ur layout. If u want, u can change the text label for date also.

Save & activate.

It will contain today's date as default value.

Thanks,

Edited by: Sap Fan on Nov 12, 2009 8:31 AM

Former Member
0 Kudos

Yap I took the field in syst structure.

But this is only for date for about other fields.

former_member632458
Participant
0 Kudos

Hi,

Check the Screen field whether initial or not. if initial set the default vale in PBO.

In PBO Event

IF <Screen Field> IS INITIAL.

<Screen Field> = Default Value.

ENDIF.

Regards,

Rajesh S