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: 

if am using the data type is curr in domain , can i set the value interval or value range #abap dictionary

Former Member
0 Kudos

if am using the data type is curr in domain , can i set the value interval or value range #abap dictionary

10 REPLIES 10

Former Member
0 Kudos

Hi Stalin,

Fixed Value Definition is not allowed for data type CURR.

So you can not set any Interval or Data range for data type CURR.

Regards,

Farook.

0 Kudos

THANK YOU Farook .


BUT I NEED SET THE SALARY FIELD MUST IN CURR DATA TYPE AND SET THE VALUE INTERVAL 5000 TO 10000 , THERE IS ANY POSSIBLE AVAILABLE .........................


REGARDS ,

STALIN



0 Kudos

Hi stalin,

      Its not possible to create a value interval for domain type curr, there is one more way,

  you can put a check table for that domain, and in that table use one field for value (domain curr) and another for cuky, but then you have to make 5000 entries (from 5000 to 10000) in it, and its a long way. but that can be useful if you want curr as mandate domain.

  OR why don't you change the domain to decimal (dec), then you can provide your interval.

Regards

Ashish

0 Kudos

THANK YOU Ashish .

Create another table for Employee Salary details which consist of ID, Bank

Name, A/C No., and Salary. [Salary field must be the currency field].

  1. · Link these two tables with foreign key relations
  2. · Design the salary field such that, salary should not accept < 5000 and >10000
  3. · Use proper cardinality value  .

WHAT IS POSSIBLE METHOD ?????


REGARDS ,


STALIN

0 Kudos

Hi stalin,

possible method .??? Didn't get that.

          Only for that salary field create a data element and domain and put check table for that. Create entries of only salary value and currency key. So when you will make the entries for employee in main table , it will check the value from the check table.

matt
Active Contributor
0 Kudos

Moderator message: posts that are ALL (OR MOSTLY) CAPITALS are liable to be rejected. Please be careful with your capslock and read your post before hitting "Post Message".

0 Kudos

Hi,

How are you planning to update this tablew??

If using TMG use source code validation in the TMG or events available. If through a ABAP program put the validation inside the program itself that the value should be between 5000 and 10000.

Hope this helps.

Jelena
Active Contributor
0 Kudos

Why on earth would you want to enforce the salary limits in the data dictionary? It's just lazy. Validate the value wherever the data is entered. Today it's one limit, tomorrow there is inflation and it's another limit. Who knows.

It makes sense to use the dictionary value range only for something more stable and predictable.

matt
Active Contributor
0 Kudos

Quite right. Changing anything about a domain should not be considered lightly, and domain values are supposed to be quite stable. Furthermore, you'd be putting business logic into a technical object!

If you must do it, put a table name in for the domain values. Don't put the values directly into the domain.

Private_Member_7726
Active Contributor
0 Kudos

Not that it's necessarily a good idea, but those kinds of checks could probably be programmed in (or better - called from) the Domain (Input) Conversion Routine...

cheers

Janis