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: 

Load of program

Former Member
0 Kudos

Hi all,

My requirement is that whenever my selection screen appear it should already be populated with some sample data .

how can I do it

can I use load-of-program event for this

if yes How??

regards

kushagra

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

use initialization event load of program is obselete now

w_fldate LIKE sflight-fldate,

SELECT-OPTIONS:s_fldate FOR w_fldate.

INITIALIZATION. "Initializing the date

w_date1 = w_date1 - 1.

s_fldate-low = w_date.

s_fldate-high = w_date1.

APPEND s_fldate.

when u execute this u have date displayed when screen comes..

Regards,

priya

Edited by: Banupriya R on Apr 18, 2008 8:02 AM

4 REPLIES 4

Former Member
0 Kudos

hi,

use initialization event load of program is obselete now

w_fldate LIKE sflight-fldate,

SELECT-OPTIONS:s_fldate FOR w_fldate.

INITIALIZATION. "Initializing the date

w_date1 = w_date1 - 1.

s_fldate-low = w_date.

s_fldate-high = w_date1.

APPEND s_fldate.

when u execute this u have date displayed when screen comes..

Regards,

priya

Edited by: Banupriya R on Apr 18, 2008 8:02 AM

0 Kudos

my selection screen has field sales order

and in initialization i am writing

s_vbeln = '3'.

but it does not work.

0 Kudos

Hi Sharma,

s_vbeln is not a variable, it is a select-option i.e. an internal table.

hence you do as mentioned below, within the INITIALIZATION event,


s_vbeln-low = '3'.
append s_vbeln.

Reward points to encourage us in giving solutions

Kiran

0 Kudos

Hi,

You should initialize in the INITIALIZATION statement.

The selection options you declare in the screen has the structure similar to SELOPT.

They have SIGN, OPTION, LOW and HIGH fields.

Try the following code

TABLES: VBAK.

SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.

INITIALIZATION.

S_VBELN-LOW = '3'.

APPEND S_VBELN.

Please award points, if helpful.