I have a field in my ztable which should hold the attendence of a user in hours. This value should be between 0.00 and 42.00
Now I found in the domain under the Value Range tab three points:
Single values: I do not want to enter all the 4200 possible entries.
Intervals: I did not suceed using those to restrict values. It showed some dialog while entring but I was never the less able to enter 45.00
Value Table: same as 1, I do not want to enter all the 4200 possible entries.
So how can I do this?
As you have found out you cannot do this on the data dictionary level. So, you'd have to do it at the application level.
If a message to the user on an out of bound value is not necessary, you could automate this for every field that uses the specific domain by creating a conversion exit that changes out of bounds entries to 0.00 or 42.00. However, this might be rather confusing for the users that the value would change to 42.00 when they enter 43.00 without any warning.
The F1 Help answered my question why it does not work:
Lower limit of interval
The value range of a domain can be limited by defining fixed values. In this case, only the values entered in the fixed values are possible for all the table fields referring to this domain. The fixed values can be single values or intervals.
You can only define fixed values for domains of data types CHAR, NUMC, DEC, INT1, INT2 and INT4.
Dependencies
There is only an input check of the mask for data types CHAR and NUMC. Note that the system only checks single values for NUMC.
if a check table and fixed values are defined for a table field, only values that exist in both the check table and in the fixed values can be entered in the field
Related
Is it possible to store a variable in a SQL table which will only take effect once a certain date is reached? The variable is the amount of days that would be added to a date to create a "TargetDate", this variable can be changed by user input but must have an "EffectiveDate" ?
You can certainly create a configuration table that you store config data in. In your case, one of the items would be 'EFCTV_BUFFER' as the value in the key column, and (for an example) '5' as the number of days in the value column. Then you can reference that key value to select the buffer days value, and add that to whatever date you want.
This allows you to modify it at any time as requested.
You would reference this table in an insert/update trigger on your table where you store your dates. I would suggest having two dates so that the calculation is only done once, unless you need the calculation to be dynamic based upon the current 'EFCTV_BUFFER' configuration value.
I want to be able to choose a value in E4 on the Invoice (which must have a drop down list of Client ID, Then I want the Client Name to populate into B5 the client address into B6, The vat number into B7, Terms into E6
All the info must come from the Customer sheet as shown in the picture
Column A: Client no (ID100)
Column B: Client Name
Column C: Client Address
Column D: Vat No
Column E : Terms
I have tried everything but I cant seem to get it right, My knowledge is limited but I did write the invoice program....with help from the internet
Customer list:
Invoice:
This is deceptively simple if you stretch the boundaries of your preferred solution a little bit. Instead of entering data in E4, use a combo box. Set the source row as the ID100 column. - Your ID Column only lists unique IDs with no duplicates right?
If there are duplicates in the ID field then you have three choices.
Overhaul the table and clean your data
Take a day or week or a weekday to really think about how you want select and/or display the extra information and handle the that you'll encounter complexities
3 Give the project to someone else
I recommend the combobox because
The combo box can intellitype/autofill as you type
The autofill perk doesn't misspell, or display anything that isn't in that column that means any lookup is a guaranteed return if the user is not being a dill
You aren't looking anything up until the ID is populated so this control acts as an um..... well.... control. It's a great starting trigger.
using the combobox results you simply use your favorite lookup to get the row number (vlookup, match, find, filter, you get the point)
now grab the values from the community you need and populate the cells.
Done! Easy right?
Can somebody help me figure out if there is a way for the query below:
I have an internal table with one column with 69 records.
I want all these 69 records to be populated into a variant and get saved so that with this variant and the values saved in it I can run a particular program
How can I populate these values ?
Your question is a bit unclear for me.
Do you speak about two programs or one program?
What's the parameter you want to fill in the variant?
I'll just give you some hints - depending on your situation you must pick the correct parts.
I have an internal table with one column with 69 records.
How is the internal table filled?
I want all these 69 records to be populated into a variant and get saved so that with this variant and the values saved in it I can run a particular program
You have a program and you want to save a selection in a variant. So you need some parameters for the selection screen.
You want a table, so you need a SELECT-OPTION.
To define a SELECT-OPTION you need a DDIC-reference (you must say, what kind of field you want.). In the following example I use a material number (MARA-MATNR).
So you program contains something like:
TABLES mara.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
With this you would get:
You can define ranges (from-to) and list of values. As you want only single values, you need something like:
SELECT-OPTIONS: s_matnr FOR mara-matnr NO INTERVALS.
Now you get:
When you push (1) you can enter values.
With (2) you can load from an external file,
with (3) you can load values from clipboard.
So you can fill your values and store the selection in a variant.
When you execute your program, the data is stored in a ranges table:
Now you can loop on this table and copy the S_MATNR-LOW value into your internal table for further processing.
If I misunderstood you question and you want to create a variant dynamically, then take a look on function module RS_VARIANT_ADD (or RS_VARIANT_COPY,RS_VARIANT_CHANGE...)
You could always put the values in TVARVC, either manually or via code. Then specify the TVARVC variable in the variant definition.
I am using Adempiere which has database Oracle
I have window called Stock Code from table called M_StockCode
The fields are Code and Description.
Currently, Code data type is Number and Description is Varchar2
I want to input Sparepart with Code 01, and Body Repair with Code 02.
As I input the data in Adempiere and save it, what will show is Sparepart with Code 1 (without leading zero)
I've tried putting LPAD function but it's still failed.
How can I put 01 both in Adempiere interface and in database?
Any suggestion will be appreciated :)
A NUMBER cannot have leading zero, a STRING can.
If you want to store the codes with leading zero in the database table, then you must use VARCHAR2 and not NUMBER.
If you want to just display the number with leading zero, then use TO_CHAR to convert the number into string.
For example,
SQL> SELECT TO_CHAR(1, '00') FROM DUAL;
TO_
---
01
You could also use LPAD, but remember, the data type of the result would be a string and not a number.
For example,
SQL> SELECT LPAD(1, 2, '0') FROM DUAL;
LP
--
01
In Adempiere you manage the model via the Application Dictionary, it's the equivalent of the Data Dictionary used by relational databases.
Login to Adempiere as the System Administrator.
Select menu option Application Dictionary->Table & Column.
Select the M_StockCode table and from its window, click on the Columns Tab.
Here, select the Code column and if need be toggle to the Form view
Now, from the drop-down select the Reference value of String and set a Length equal 2.
Finally, hit the Synchronize Column button to have Admepiere modify the database.
If this code is some kind of classification it might be useful to create new Reference type in the Application Dictionary and then you could point your column to it; this would ensure consistency, offering the user a selection to choose from rather than entering values. A Reference can be a List type which is handy for short lists or Table driven which is useful when the classification is more volatile and needs to maintained by the users.
I'm trying to make a Crystal Reports 11 report off an Oracle database that's grouped by user. I've got over one thousand users. I want to create a parameter field that prompts the person to select which users they would like to view the results for. However my parameter selection field is only showing 221 of the possible users. The users appear in alphabetical order because of the SQL command's Order By statement. I'm wondering if there is a limit to the number of dynamic default values that a parameter field can store. Any help with this would be great.
The default limit in Crystal 11 appears to be 1000 (held in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV\MaxRowsetRecords), so your problem may lie in the construction of the parameter field itself. Make sure it is a dynamic parameter field that will query the database when used, as the odd number of values shown makes me think this was the list generated when the report was first run and saved, and therefore a static parameter list.
I tried to reproduce your situation using a database table with 5,000+ records.
I created a dynamic parameter (Crystal Reports XI R3, full version) on this field. It generated a unique list of values that appeared to be about 1,000 (I started to count it, but estimated its total size based on the scroll bar's position).
I added the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite \Crystal Reports\DatabaseOptions\LOV\MaxRowsetRecords (String) and set its value to -1.
With the registry entry change, the LoV included all values.
When the LoVs had the record limitation, it appeared to sample values from each letter of the alphabet indiscriminately. Maybe this is what you are encountering.
221 sounds awfully low to be the default selection limit, at least to me. But there is a way to increase the number of records that these dynamic parameters pull in. It involves editing the registry.
See Here
The following is for Crystal Reports 2013.
Add a new registry entry under:
For 32 Bit computer
HKEY_HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions
For 64 Bit Computer (Wow6432Node sub note)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions
Add a new key at that level called: \LOV
Add a string called MaxRowsetRecords
Set the value to whatever limit you want, I have selected 100000 in the development. (0 or -1, meaning all values, is no longer supported. )
After making changes to the registry, restart the affected service or application as required.
Just to clarify that the MaxRowsetRecords value does NOT refer to the number of distinct parameter values you can select from. It is the maximum number of records that Crystal will look at from which it extracts the dynamic parameter values. Most likely if you look at your query you will find that there are 221 unique values in the first 1000 records. Apply the registry change to a larger number and you should see more parameter values from which you can choose.