Calendar Component to support generic rules like weekends, holidays etc.

Hi all,
I am trying to build a tool which allows me to define various rules for a valid date, e.g.
- only certain days of the week, e.g. monday, tuesday etc.
- date range(s), e.g. 1.JAN.2003-31.MAR.2003, 1.JUL.2003-31.DEC.2003
- blackout range(s), e.g. not between 1.JUL and 5.JUL (independance day in the U.S)
- floating holidays, e.g. easter
etc.
The tool should provide a method
boolean validate(Calendar cal)
which returns true if the passed date is valid, false otherwise.
any suggestions ? are you aware of any commercial or open source products ?
Thanks

look at this:
     * Get weekday for a date. E.g. 21.05.2004 was a friday.
     * @param date Date to inspect.
     * @return One of Calendar.SUNDAY, Calendar.MONDAY, ... or -1 of input date is null.
     * @since 1.6.0
    static public int getWeekday(Date date) {
        int result = -1;
        if (date != null) {
            GregorianCalendar gc = new GregorianCalendar();
            gc.setTime(date);
            result = gc.get(Calendar.DAY_OF_WEEK); //1 = sunday
        }//else: input unavailable
        return result;
    }//getWeekday()
     * Check if date is a weekend (saturday or sunday).
     * @param date Date to check.
     * @return True, if input date is a saturday or sunday.
    static public boolean isWeekend(Date date) {
        boolean result = false;
        if (date != null) {
            int day = getWeekday(date);
            if (day == Calendar.SATURDAY || day == Calendar.SUNDAY) {
                result = true;
        }//else: input unavailable
        return result;
    }//isWeekend()
      * Get easter day in a year (easter sunday).
      * @param year Year to get easter date of.
      * @return Date of easter in <i>year</i>.
     static public Date getEasterDate(int year) {
        Date result = null;
        int a = year % 19;
        int b = year / 100;
        int c = year % 100;
        int d = b / 4;
        int e = b % 4;
        int f = ( b + 8 ) / 25;
        int g = ( b - f + 1 ) / 3;
        int h = ( 19 * a + b - d - g + 15 ) % 30;
        int i = c / 4;
        int k = c % 4;
        int l = (32 + 2 * e + 2 * i - h - k) % 7;
        int m = (a + 11 * h + 22 * l) / 451;
        int p = (h + l - 7 * m + 114) % 31;
        int month = ( h + l - 7 * m + 114 ) / 31;
        int day = p + 1;
        GregorianCalendar gc = new GregorianCalendar(year, month - 1, day);
        result = gc.getTime();
        return result;
    }//getEasterDate()
      * Check if a date is a holiday.
      * @param date Date to check.
     * @param locale Optional locale to check for locale specific holidays.
      * @return True, if <i>date</i> is a holiday.
     * @see <a href="http://www.loisl.de/kalender/Berechnung.htm">Kalenderberechnung</a>
     static public boolean isHoliday(Date date, Locale locale) {
        boolean result = false;
        if (date != null) {
            date = setTime(date, null); //set time to 00:00:00
            GregorianCalendar gc = new GregorianCalendar();
            gc.setTime(date);
            int day = gc.get(Calendar.DAY_OF_MONTH); //first day = 1
            int month = gc.get(Calendar.MONTH); //first month = 0
            int year = gc.get(Calendar.YEAR);
            //******* variable holidays for all locales: *******
            //easter:
            GregorianCalendar easter = new GregorianCalendar();
            easter.setTime(setTime(getEasterDate(year), null)); //set time to 00:00:00
            //******* locale specific holidays: *******
            if (locale == null) {
                locale = Locale.getDefault();
            if (locale.getCountry().equals(Locale.GERMANY.getCountry())) {
                if (day == 1 && month == Calendar.JANUARY) { //Neujahr
                    result = true;
                } else if (day == 1 && month == Calendar.MAY) { //Maifeiertag (Tag der Arbeit)
                    result = true;
                } else if (day == 3 && month == Calendar.OCTOBER) { //Tag der deutschen Einheit
                    result = true;
//                    } else if (day == 31 && month == Calendar.OCTOBER) { //Reformationstag (nicht in allen Bundesl�ndern)
//                        result = true;
//                    } else if (day == 1 && month == Calendar.NOVEMBER) { //Allerheiligen (nicht in allen Bundesl�ndern)
//                        result = true;
                } else if (day == 25 && month == Calendar.DECEMBER) { //1. Weihnachtstag
                    result = true;
                } else if (day == 26 && month == Calendar.DECEMBER) { //2. Weihnachtstag
                    result = true;
//                  easter.add(Calendar.DAY_OF_YEAR, -46);
//                  if (date.equals(easter.getTime())) { //Aschermittwoch
//                      result = true;
//                  easter.add(Calendar.DAY_OF_YEAR, 46);
//                  easter.add(Calendar.DAY_OF_YEAR, -3);
//                  if (date.equals(easter.getTime())) { //Gr�ndonnerstag
//                      result = true;
//                  easter.add(Calendar.DAY_OF_YEAR, 3);
                easter.add(Calendar.DAY_OF_YEAR, -2);
                if (date.equals(easter.getTime())) { //Karfreitag
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, 2);
                if (date.equals(easter.getTime())) { //Ostersonntag?
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, 1);
                if (date.equals(easter.getTime())) { //Ostermontag
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, -1);
                easter.add(Calendar.DAY_OF_YEAR, 39);
                if (date.equals(easter.getTime())) { //Christi Himmelfahrt
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, -39);
                easter.add(Calendar.DAY_OF_YEAR, 49);
                if (date.equals(easter.getTime())) { //Pfingstsonntag
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, -49);
                easter.add(Calendar.DAY_OF_YEAR, 50);
                if (date.equals(easter.getTime())) { //Pfingstmontag
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, -50);
                easter.add(Calendar.DAY_OF_YEAR, 60);
                if (date.equals(easter.getTime())) { //Fronleichnam
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, -60);
            } else if (locale.getCountry().equals(Locale.FRANCE.getCountry())) {
                if (day == 15 && month == Calendar.AUGUST) { //Assomption
                    result = true;
                } else if (day == 1 && month == Calendar.NOVEMBER) { //Toussaint
                    result = true;
                } else if (day == 11 && month == Calendar.NOVEMBER) { //F�te de l'Armistice 1918
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, 39);
                if (date.equals(easter.getTime())) { //Ascension
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, -39);
                easter.add(Calendar.DAY_OF_YEAR, 49);
                if (date.equals(easter.getTime())) { //Pentec�te
                    result = true;
                easter.add(Calendar.DAY_OF_YEAR, -49);
            } else if (locale.getCountry().equals(Locale.US.getCountry())) { //USA?
                if (day == 4 && month == Calendar.JULY) { //Independence Day
                    result = true;
                } else if (day == 6 && month == Calendar.SEPTEMBER) { //Labour Day
                    result = true;
                } else if (day == 11 && month == Calendar.OCTOBER) { //Columbus Day
                    result = true;
                } else if (day == 11 && month == Calendar.NOVEMBER) { //Veterans' Day
                    result = true;
            } else if (locale.getCountry().equals(Locale.JAPAN.getCountry())) {
                if (day == 23 && month == Calendar.SEPTEMBER) { //Autumnal Equinox Day
                    result = true;
                } else if (day == 11 && month == Calendar.OCTOBER) { //Health-Sports Day
                    result = true;
                } else if (day == 3 && month == Calendar.NOVEMBER) { //Culture Day
                    result = true;
            }//else: unknown locale
        }//else: input unavailable
        return result;
    }//isHoliday()

Similar Messages

  • Web-Calendar component in Wiki get lost after Open Directory installation

    if I change my Lion Server to use opendirectory and not work in standalone mode, I lose the ability of the server for web-calendar for example at the wiki-webpage.
    servername/webcal
    The error-message tells me, the service calendar is deaktivated and I should activate it at Server App.
    But at Server App:
    a) iCal Service IS ACTIVE
    b) I find NO OPTION for activating the Web-Calender function under iCal like at the Mail-Service (one above) -> activate Webmail
    So, HOW I can BRING the web calendar component BACK TO MY WIKI?
    I wanted to use it in company, but now I not touch this "open directory activation" anymore, because I will lose. Without opendirectory the webcalendar working!
    I tried to find that function with Server - Admin, but this programm is much limited to what it was at the Snow Leopard Server and there I cannot select the iCal Service anymore. It's same with the new Airport Utility 6.0. Terrible reduced and I just installed back 5.6 and this is good working for my needs.

    I found the solution: Like with the PPTP-VPN problem it depends on the certificate. If you BUY an official public certificate (yes spend money for your Server more than the server price!), at once the Webcalender and the PPTP-VPN working!
    If in other way you fight through your selfsigned certificate problems and rebuild it, at once you will get all your problems again. So, not wonder why Apple at once mention in the help-line, that you need to buy a certificate. This, they mean true! You should support the certificate system of the new IPv6 and vanishing IPv4 world (I mean the IBM VeriSystem) for the new TRANSACTION orientated usage-fee-world. And not forget in this new Internet 2 world: E-Mail will become a service that get paid per transaction and 19% VAT tax (Germany) on top of it and 1 Cent communication tax (like the energy cent we pay today for each unit of energy source) for the EU. This, they realy plan to realize next years. So, why we wonder about this strange certificate issue it such transactions need be identified unique? In April in greater region Hannover-Braunschweig they will change the bankingcards for the new cashfree-system (GiroGo). And who wonders: cash-transfers will get transaction fees. They tell: Only 1 Cent / 5 Euro, only 2 Cent for 10 Euro, only 15 cent for 15 Euro. So, you understand what this new transaction and veriSigned world in real means? It is a change from a pocessing-free-world into a usage-fee-world. And you realy think that 2013 we still will speak from a banking crisis under such new conditions? They will get billions each day cash-transaction-fees. With NFC-iPhone 5 no problem (NCF -> look at Near field communications). The people will say: Oh, it's only 1, 2, 3 Cent but so practical not change money coins anymore. You will see how good this transaction usage-fee money-machine will work. And the EU will get billions transaction-communication-tax each day from the emails, there will be no discussion about Greek, Irland, Portugal, Spain (PIGS) ... economic-crisis anymore. You will see, such will happen! No banking crisis with Internet 2, no economic crisis with Internet 2. All will be solved by us, the people. Oh, our Merkel, when she come back from a G20 meeting already said: "We decided that each economic member and part need be 100% in focus in future and not uncontrolled anymore."
    If somebody more interested at this plan, you can watch this docu movie "one mainframe to rule the world" that describes deeper the issue of certification, identification, verification of people or things. The near world we drive directly into. And this certification system is ruled by whom?
    http://www.youtube.com/watch?v=uXTwS_T-CvM
    When I at least go to the Apple-Center I found the teacher with a Microsoft-T-Shirt of certification and wonderd very much. Than he told me, that the only groupware that is true for a good usage together with Apple is Exchange Server. And the more he told the more I wonder because he is Apple-Highgraded. But I not so much wonder anymore. Understand the game this companies play with us. It's a licence crisis and it can be described as: Microsoft is a the one end of the coordination system with x = price and y = pieces sold. Apple is exaclty at the opposite. Look what MS does, look what Apple does and at the end it's not difficult to see, that they moving to eachother to meet. And the missing 3d coordinate z in this new room is IBM with it's VeriSystem.
    So, a perfect xyz-combination for all giants.
    How Google, Linux ... matches inside this "new computer world order"?
    I will mention that much IT-professionals at the moment going to such new curses and explain that 2013 they will change all hardware to "certified hardware" that NEED BE used in businesses and for example Linux will not be part of this new "certified world".

  • Format calendar component times to  "hh:mm a"

    Hi all,
    I would like to format the calendar component time slots  to "hh:mm a" (Example 01:30 AM), Is it possible? By default, caldendar component shows  times in hh:mm (Example 24:00) format.
    regards,
    Jhon

    Hi,
    You mean the Choose date Component or Input Date Component ?
    For InputDate Component its' possible
    Put InputDate Component , Then put a ConverDateTime Component to it.
    Change its TimeStyle to Short  and Type to Time on rules.
    Regards
    Nalin

  • Clicking on 'ADF Calendar Component activity' should navigate to New page

    Jdeveloper Version - 11.1.2.0.0
    We implemented the ADF calendar component and it displays fine. However, we have a requirement that by clicking on the activity, it should navigate to another new page. For an activity, there are options like contextMenu, acitivtyHover, activityDetail etc.., where all shows the details in popup of the same page. We want to navigate to new page by clicking on the activity. Is it possible?
    Thanks in Advance.

    Hi,
    I don't think it is possible.
    All the facets you mentioned support only af:popup as child to them.
    http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_calendar.html
    -Arun

  • Has anyone here configured a google calendar component?

    I recently bought a flash AS3 Google Calendar component.  I installed in a Flash site I'm building http://www.droolpigs.com/April5/
    It lookd great I'm having no problems with it other than I don't know how to make it work and it came with no instructions.  I guess the developer assumed everyone knows how to use google calendar feeds.  It comes with an xml file that looks like this:
    <config>
        <proxyURL>http://www.rmcyouth.com/temp/proxy.php</proxyURL>
        <gcalURL>http://www.google.com/calendar/feeds/ehrenck%40gmail.com/public/full?</gcalURL>
    </config>
    and a php file that looks like this:
    <?php
    // PHP Proxy
    // Responds to both HTTP GET and POST requests
    // Author: Abdul Qabiz
    // March 31st, 2006
    // Get the url of to be proxied
    // Is it a POST or a GET?
    $url = ($_POST['url']) ? $_POST['url']: $_GET['url'];
    $headers = ($_POST['headers']) ? $_POST['headers'] : $_GET['headers'];
    $mimeType =($_POST['mimeType']) ? $_POST['mimeType'] : $_GET['mimeType'];
    //Start the Curl session
    $session = curl_init($url);
    // If it's a POST, put the POST data in the body
    if ($_POST['url']) {
        $postvars = '';
        while ($element = current($_POST)) {
            $postvars .= key($_POST).'='.$element.'&';
            next($_POST);
        curl_setopt ($session, CURLOPT_POST, true);
        curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars);
    // Don't return HTTP headers. Do return the contents of the call
    curl_setopt($session, CURLOPT_HEADER, ($headers == "true") ? true : false);
    curl_setopt($session, CURLOPT_FOLLOWLOCATION, true);
    //curl_setopt($ch, CURLOPT_TIMEOUT, 4);
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
    // Make the call
    $response = curl_exec($session);
    if ($mimeType != "")
        // The web service returns XML. Set the Content-Type appropriately
        header("Content-Type: ".$mimeType);
    echo $response;
    curl_close($session);
    ?>

    never mind I figured it out.

  • Oracle ADF Calendar Component Customization

    Hi,
    I am starting my journey to learn ADF. I am using Oracle ADF Calendar component as read only calendar. We need to further customize the calender to incorporate CUD operations. I am using ADF BC @ business layer and which in turns talk to DB for Calendar entries.
    I am able to implement UI facets (like Hover effect, Detail Calendar Entry, Delete Entry) but I am not clear about how to implement the corresponding events (like delete event, edit event etc).
    I am using Dialog and which refers to a managed Bean component for listeners (e.g Delete Dialog refers to dialogListener="#{CustomCalendarBean.deleteListener}").
    My Question is,
    In the bean, to implement the listener, i would need to make use of Delete operation available in my Data Control (Exposed by ADF BC VO). I am not sure how to do the same. My managed bean is POJO and not sure how it can call Delete operation available in data control.
    Appreciate your help.
    Thanks, Mihir Parekh

    I am able to achieve this functionality with Operation Binding.

  • Announcement: Introducing a Flex Calendar Component

    Hi Everyone,
      I'm pleased to announce the release of the Flextras Calendar Component.  This was a big undertaking for us and we can't wait to have a few people take a look and tell us what we did wrong (or right).
    The Calendar is a great way for you to deal with date based data in a Flex Application and it allows you to build Calendar or scheduling applications.  The component features:
    Views for a Month, Week, and      Day. 
    Extensive renderers so that      you can make the component suit your needs.
    Standard Flex APIs for drag      and drop, itemEditors, and localization. 
    Support for Flex 3 and Flex 4
    You can download our no cost developer edition along with samples and documentation at http://www.flextras.com/index.cfm?event=loginForm&c=218
    Here are some links to find out more:
    Product Page
    Documentation
    Demos
    Register and Download
    Flextras Home
    We are here to help and would love to hear your feedback.  Drop us a line! What can we do for you today?

    Take a look at ours and try out our Free Developer Edition:
    http://www.flextras.com/?event=ProductHome&productID=15
    We believe it creates a strong foundation for you to extend to build scheduling / Calendar applications with Flex.
    If you want to build a Google Calendar style implementation, you'll need to create a custom DayRenderer with an embedded Gantt chart.  We're working on a sample, but have no ETA for delivery.

  • Java Studio Creator 2 Update 1 - Problems with Calendar component

    Hello,
    I just made a very simple webapplication, consiting of 2 webpages. Webpage 1 has a button that sends the user to webpage 2. That works fine. When I add a calendar from the components palette, and select a date thats in 2010, I keep getting redirected to page 1 when I press the button that should send me to page 2. I don't even try to access the selected date from the calendar. When I select a date in 2009, it all works fine. I don't see any exception, not on screen, not in the server log. I'm using the Sun Application Server that comes with Studio Creator.
    Kind regards,
    Sven

    Ok, I now know what my foot tastes like. Have personally verified that the calendar component in JSC 2 update 1 accepts dates (at least) 1970 - 4100. With this range you can see that there some work going on in the background but performance is adequate (a second or two delay). Considering that this is a ridiculous range the Calendar component performs well.
    I dug up my old copy of JSC EA 2 and that calendar component seems to have a 9 year range with no settable minDate maxDate.
    I appear to have deleted my copy of JSC EA [1] but I guess this must be where I had a poor experience of the component. I'm fairly sure this had a minDate / maxDate property and if they were set too far apart it caused heap space problems. I guess I made a mental note not to try this again and never have since. Anyway, it's irrelevant because the Calendar Component works right now and that's what counts. My apologies to all concerned.

  • Calendar component width after updating to Update 1

    Hi.
    Since updating to Creator 2 update1 I have found that the calendar component appears to be calculating its width differently.
    Previously it appeared to include the calendar popup button when working out its own width.
    Now it seems to only include the textfield area. This means that the popup button now is outside its boundaries.
    The effect of this is that when putting the calendar in a grid, any components to its right (also in the grid) overlap the button part of the calendar.
    Has anyone else seen similar behaviour, and is there any workaround ?
    Regards,
    Ian

    Edwin, can you please, oh pretty please change the
    Calendar component to use SimpleDateFormat instead of
    DateFormat?I don't remember where DateFormat is used, but a SimpleDateFormat extends DateFormat so you may be able to use SimpleDateFormat. Having had to fix various bugs with the built-in calendar, I think that it needs a redesign. So instead you may want to look at the prototype popup calendar that is will be included in the AJAX V3 complib. I hope that one will suit your needs. I'd like to hear your feedback on the new component.
    -Edwin

  • Tutorial - Calendar Component

    Hi,
    I'm trying to add the Calendar component to a Page fragment but I 'm getting the following error:
    java.lang.IllegalStateException: Not nested inside a form
    So, I added the h:form as in the following sample:
    <?xml version="1.0" encoding="UTF-8"?>
    <div style="-rave-layout: grid" xmlns:a="http://www.sun.com/creator/addons" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
    <p>Included Content Here</p>
    <h:form>
    <a:calendar binding="#{expense$final$incidentArea.calendar1}" id="calendar1" style="left: 48px; top: 72px; position: absolute"/>
    </h:form>
    </div>
    But now, one of the two things are happing:
    a) I got a "The prefix for element "h" is not bounded
    b) Or, I don't get the above message, but the calendar isn;t reder. In his place, there is a "Red" box.
    Question: Is valid add tags like "h" in a page fragment? If yes, how can one bound the correct xmlns to the prefix since one can't use jsp:root?
    Thanks.

    Thanks for the information. But I have a question on Calendar component . I want the Calendar component to be open when user wants to enter a date. Otherwie it looks akward in a page to keep the component visible all the time. How do I do that? What I am thinking is, i want to make this small and upon clicking it will open the calendar and select date. Thanks for your help in advance.
    About Fileupload
    Do I have to copy any jar file from MyFaces. I am using SUN Studio Creator. Do I have to import anything?

  • ADF Calendar Component

    Hi!
    Do you guys have some code you can share in order to initialize (like adding activities on page load, something simple) an af:calendar from a managed bean? not using bindings or VO
    I downloaded the adffacesdemo war but there are way too many classes and is really difficult just to add one activity and test the component
    is there an easier way?
    I use Jdev 11.1.2.3.0 and Jdev 12c
    thanks

    Well, there isn't much about the calendar component. My be ADF Faces Calendar Component is of help. Or http://www.gebs.ro/blog/oracle/oracle-adf-calendar-step-by-step-implementation/
    Timo

  • Interactive calendar component installation

    I downloaded a cool looking flash calendar component from the following site:
    http://www.flashscope.com/blog/free-flash-interactive-calendar-components/
    It is the second one on that page but after looking at the source files I don't have the slightest idea of how to install it. I think I'm in way over my head on this one. Any assistance would be greatly appreciated.

    BTW, This is what it looks like...

  • Calendar component: I am a bit confused on the bean to use

    Hi all,
    I would like to use the calendar component.
    I have just read http://www.oracle.com/technology/products/jdev/11/how-tos/calendar/calendar.htm , http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/web_adv.htm#CHDIFFGA (paragraph 27.5) , the chapter 15 of the user interface developer's guide and I have seen the adf demo.
    I am a bit confused on the classes to use to manage the calendar. I can't find the class calendar model described on the manual and other links, while the adf demo uses a lot of classes: DemoCalendarActivityBean, DemoCalendarBean, DemoCalendarModelBean, DemoDateCustomerBean, DemoCalendarActivity, DemoCalendarModelWrapper, DemoCalendarProvider, DemoSingleProviderCalendarModel.
    First of all, I don't understand all the functionality of these classe, but the most important is that I don't understand the difference between DemoCalendarModelBean and DemoCalendarModelBean.
    If I define a table in my database, like described on the links/manual, what classes do I need?
    Thanks
    Andrea

    User,
    OK, now I'm completely, utterly, and totally confused.
    The sample application workspace that I downloaded from the how-to link you provided has a CalendarBean class, which is simply a managed bean. I don't see either DemoCalendarBean nor DemoCalendarModelBean. If you are using ADF Business Components as your model layer, you don't need to muck about creating calendar models. As the how-to says:
    An ADF Faces Calendar component must be bound to a CalendarModel class. This class can be created for you when you use ADF Business Components to manage your calendar's data. For example, say you have data in your data store that represents the details of an activity, such as the date, time, title, location, and owner. When you create an entity object to represent that data, and then a view object to display the data, you can drag and drop the associated collection from the Data Controls panel to create the calendar. JDeveloper will declaratively create the model and bind the view to that model so that the correct data will display when the calendar is launched. The [url http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_calendar.htm]web user interface developers guide secton on creating a calendar is pretty clear on all of the classes you have to create if you are not using ADF BC.
    John

  • Where to download Free Calendar Component

    where to download Free Calendar Component??
    thank a lot!!

    You can download the smart jswing calendar swing component from http://www.activetree.com. It is a free ware. This calendar component supports DATE as well as TIME. Therefore, you can manipulate the time in milliseconds. It has got spin controls to change the time, and various kinds easy controls for changing date, month, and years.
    You can use the TIME field seperately if the component need to be just a time field.

  • In R12 can we have approval based on rules like Cost Cente or Account?

    Hi All,
    -In R12 GL can we have approval based on rules like Cost Centers or Account. I know a rule based on Amount can be setup
    -In R12 GL can we use the PO hierarchy and its Rules
    Thanks.

    Dear Srinivasan Muthu,
    Assuming that Red,Blue and white are the values for the chracteristic say Colour and if this assigned to
    a class type say 023 batch,while uploading the stock,the system asks the chracteristic value.
    Say suppose if you are entering 561in MB1C or 101 movement in MIGO for that material and if you
    select for Blue,then in MMBE you can click on the stock quantity and right click-->batch classification.
    The system shows for Blue colour.
    check and revert back.
    Regards
    Mangalraj.S

Maybe you are looking for