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

variant

Former Member
0 Likes
1,433

tables : mdkp.

data : begin of i_mdkp occurs 0,

MATNR like mdkp-matnr,

PLWRK like mdkp-plwrk,

PLSCN like mdkp-plscn,

end of i_mdkp.

selection-screen begin of block main.

select-options : s_plscn for mdkp-plscn.

selection-screen end of block main.

select MATNR

PLWRK

PLSCN

into corresponding fields of table i_mdkp

from mdkp

where plscn in s_plscn.

loop at i_mdkp.

write : / i_mdkp-matnr,

20 i_mdkp-plwrk,

40 i_mdkp-plscn.

endloop.

This reports did not allow me to save a variant when the Planning Scenario as '000'(triple zero's).could any one help me why it is doing so.

Thanks

Vikranth

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,382

hi vikranth,

try writing like this.write mdkp-plscn in brackets

select-options : s_plscn for (mdkp-plscn).

13 REPLIES 13
Read only

Former Member
0 Likes
1,382

Hi Vikranth,

Can you tell us what message you got, when you tried saving the variant?

Regards,

Raj

Read only

Former Member
0 Likes
1,382

hi,

i had checked out and it is allowing me to save

pls let me know the error

Read only

Former Member
0 Likes
1,382

It didn't give me any error! How are you entering the value in the selection screen?

Read only

Former Member
0 Likes
1,382

Hi,

It is allowing me to create variant. What is the error you are getting.

If you entered "000" but it will save as "blank".

Message was edited by: Lanka Murthy

Read only

Former Member
0 Likes
1,382

I think He is not getting any message but he is unble to save the 000 in the variant....

Try to check the field type ...

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,382

It appears that this field will not hold a value of 000. It is numeric and therefore will only have the value of 0, in selection screen it will show as space. In the database, it will show as "000". You variant should work if you doulbe click the field and select the "=" sign and allow the field to be space.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,382

hi ,

try writing 000 in the extension and save it

hope it should work now

Read only

0 Likes
1,382

To sum up.

FIrst, execute you program, at the selection screen, double click the field, you will get a dialog box, select the "=" icon, now click the save button to save your variant. On the selection screen it will appear as space, but internally the select-options will have a value of something like this.

IEQ000000

Which is exactly what you want. Its just the way that numeric fields are presented on selection-screen that is confusing you.

This will work.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,382

Try to Change the Select option to some char field and convert it to numeric while selecting pass it in where clause..

vijay

Read only

Former Member
0 Likes
1,382

If you are looking to save the variant with the S_PLSCN-LOW value as '000', then simply double click on the 'From' field on the selection screen. In the subsequent popup, select the green '='(Single Value). Now save your variant and that should work. You don't have to enter the value '000' in the field as this is a NUMC field and '000' is the initial value. By doing what I told, you are asking for all those PLSCN which are equal to the initial value only. If you don't do it like this, then it will select all the versions and I think that is what the error is in your case.

Please close the post if answered.

Srinivas

Read only

Former Member
0 Likes
1,383

hi vikranth,

try writing like this.write mdkp-plscn in brackets

select-options : s_plscn for (mdkp-plscn).

Read only

0 Likes
1,382

How did this solve your problem? This is for dynamic select-option, don't know how this is related to your problem with '000'.

Srinivas

Read only

0 Likes
1,382

I'm with you Srinivas, I don't think that that is a very good solution.

Regards,

Rich Heilman