on 05-31-2007 12:31 PM
Hello all,
I have a drop down box on a variable for fiscal year / period. I want the VC model to start with the current fiscal period. How to get this working?
I was trying out the NOW() function however fiscal period is in format 001.2006 while NOW() gives something like 01.01.2006. How to solve this?
Thanks in advance,
Ralph
Points will be awarded !!!
Hi Ralph,
you need a converter to do this. I think the best would be to write an ABAP RFC.
In most cases the fiscal year is not similar to the calendar year, that's why you have to programm a lookup in the backend.
If the fiscal year is the same as the calender year then you can do this with formula in VC.
DSTR(NOW(),'MM') returns the month DSTR(NOW(),'YYYY') returns the year
and '0' & DSTR(NOW(),'MM') & '.' DSTR(NOW(),'YYYY') returns 005.2007.
Hope that helps,
best Regards,
Marcel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marcel,
I checked the drop down box. Output field key and value can be filled with three values:
- key
- key ext
- text
In runtime this looks like:
- key = K42006006
- key ext = K4/006.2006
- text = June 2006, but also period 06 2006 (I think this is for a different fiscal variant than K4)
1. How can I change the appearance of the key values? Users would like to see 006.2006?
2. How can I ensure that default values are loaded with current period in format 006.2006?
Thanks in advance,
Ralph
Hi Ralph,
1) for the text of your dropdown you must use a formula to get 006.2006,
e.g. RIGHT(@key_ext,8) should return 006.2006 (8 characters from the right side of @key_ext)
2) You have to enter the formula from my previous post
'0' & DSTR(NOW(),'MM') & '.' DSTR(NOW(),'YYYY')
as default value in your dropdown box.
Best Regards,
marcel
Hi Marcel,
first of all, thanks for your effort !!!
Your suggestion still is not working. I put in place the following:
- Default value = '0' & DSTR(NOW(), 'MM') & DSTR(NOW(),'YYYY')
- Output field value = @KEY
- Output field text = RIGHT(@KEY,'7')
Symptoms:
- The default value is not shown. When the cockpit it loaded the drop down box is empty
- The values in the drop down box appear OK, in format 2006006.
- When selecting a value and pushing submit button the following error message appears: ' Nested Eception.Failure to execute native function. Nested Exception. INVALID_VARIABLE_VALUES '
Hope you have some more ideas,
Ralph
Hi Ralph,
I know the error:
You use:
- Output field value = @KEY
- Output field text = RIGHT(@KEY,'7')
then the keys of your dropdown are like K42006006 and our default value is like 006.2007 so you have to modify the formula:
'K4' & DSTR(NOW(),'YYYY') & '0' & DSTR(NOW(), 'MM')
then it should work.
Best Regards,
Marcel
Hello Marcel,
I changed the formula according to what you descibed but it did not change the problems I have:
1. Default value is not shown in a drop down box. The formula works fine when using an input field.
2. When using a drop down box and changing the output ports in the dynamic entry list the values are not passed on in the right format to the queries. I would like to see 0062006 or 006.2006 in the drop down box, however the query expects K42006006 as a key.
Thanks,
Ralph
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.