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

Selection-screen : Default values from TVARV

Former Member
0 Likes
1,392

Hello Experts,

I have a require ment to make fileds on selection screen to be defaulted from TVARV variables.

I read the values from TVARV and assign to my select-option. After that as soon as I add new value to the same fields on selection-screen, it reset to TVARV value and my new value is gone.

Example.

Select-option : s_vkorg Sales Organization

in INITIALIZATION event, I read from TVARV values (1000 & 2000) and assign to s_vkorg.

Now, my selection-screen is displayed.

if I add another value (i.e. 3000) for s_vkorg from selection-screen, it processes INITIALIZATION again and put only TVARV values (1000 & 2000) back insted I was expecting ((1000, 2000 & 3000) to process further.

Does anybody get idea about it?

Regards,

Ronny Hanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,122

Hi,

Before assigning the value to select option, put an if condition to check if its initial.

only then populate the default value.

Megs

6 REPLIES 6
Read only

Former Member
0 Likes
1,122

Hi Ronny,

Assign to S_vkorg only if it is initial.

Regards

Bala

Read only

Former Member
0 Likes
1,123

Hi,

Before assigning the value to select option, put an if condition to check if its initial.

only then populate the default value.

Megs

Read only

0 Likes
1,122

Bala and Meg,

Thanks for your replay but as soon as INITIALIZATION triggered 2nd time (when we press execute button), it reset (making blank) the value of our select-option fields.

That is the issue,

Regatds,

Ronny

Read only

Former Member
0 Likes
1,122

Hi,

You can try uploading the data in AT SELECTION SCREEN Event rather then INITIALIZATION.

Hope it helps

Regards

Mansi

Read only

Former Member
0 Likes
1,122

Thanks

Read only

Former Member
0 Likes
1,122

Hi,

I guess Initialization event is processed only once after the Load-of-program.

Refer : http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9a2135c111d1829f0000e829fbfe/content.htm

So it should work, check whether you have correctly coded inside the appropriate events.

Regards

Karthik D