Validating the dd-mm and Year data in webui???

Hi All,
I added two new fields in webui, one is a year field ( i took it as Numeric 4, as the user should enter only years as input here ), the second one is of type char5 ( as the user should enter  dd-moth here ). So i need to validate these inputs in do_validate_input whether the user has entered the years, dd-mm or he entered some other text which is not relevant???? Are there any FM's or some procedure to validate these inputs??
Thanks & Regards,
         Bala.

Hi Bala Krishna,
have you full fill your requirement i will give you a idea how to do it..
in do_validate_input or do_prepare_output get the date and year field.
like
DATA: lr_current         TYPE REF TO if_bol_bo_property_access,
          lv_date type char4, "as per your req.
          lv_year type char4 .  "as per your req.
   lr_current = me->typed_context->cnode->collection_wrapper->get_current( ).
lr_current->get_property_as_string( EXPORTING iv_attr_name      = 'DATE' RECEIVING rv_result = lv_date).
lr_current->get_property_as_string( EXPORTING iv_attr_name      = 'YEAR' RECEIVING rv_result = lv_year).
IF lv_date cs 'abcd'.
throw error.
endif.
if lv_year cs 'abac'.
throw error.
endif.
if you want to more about compare string operators.
go through this link..
https://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm
String Comparison operators - ABAP Development - SCN Wiki
Thanks & Regards,
Srinivask

Similar Messages

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

    hi Experts,
    while running SQL Query i am getting an error as
    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    T2.LineText
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,T2.LineText
    how to resolve the issue

    Dear Meghanath,
    Please use the following query, Hope your purpose will serve.
    select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
    CAST(T2.LineText as nvarchar (MAX))[LineText]
    from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
    QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
    group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
    ,CAST(T2.LineText as nvarchar (MAX))
    Regards,
    Amit

  • I want to accumulate rain for the day, month and year; What formula can I use?

    I want to accumulate rain for the day, month and year; What formula or expression can I use.
    I am using a Rain Wise product that converts pulses to an analog value.  The Rain Wise device can be
    set to measure up to 1", 5", or 10".  I will be setting the unit to 10 inches in increments of 0.01 inches.
    What I would like to do is everytime the signal increments I would like to count it as 0.01 then after reaching
    a period of time whether it be a day or a month reset back to zero.
    Need some advise on this problem.
    Solved!
    Go to Solution.

    Hello Ryan,
    Lookout gets a Modbus over Ethernet signal which originates as a 4-20mA input to a Moxa Ethernet I/O Module (E1240) in the field.  In Lookout I created a ModbusEthernet Driver and a tag which scales 0 - 65534 RAW to 0-10 Eng.  [0 - 10 is inches of rain]  Also, another piece of information is that after the rain gauge maxes out at 10 inches it will zero out and start over.
    I though the accumulator was time based and took a sample over a specific time period, for instance, one sample every 30 seconds then accumulate.  If this is so then if I have 5 inches of rain and then it stopped raining, then 30 seconds latter it would sample, it would see 5 inches and add that to be 10 inches when actually it had only rained 5 inches. 
    I really need some help with this process,
    David Lopez
    City of Corpus Christi

  • DRQ: Isolate the Daily, Monthly and Yearly CheckBoxes in Selection Criteria

    Module: Financials => Financial Reports => Accounting => General Ledger
    Request to Isolate the Daily, Monthly and Yearly Check Boxes in the General Ledger - Selection Criteria screen, instead of an option in the report window.
    Problem:  If there is BP/General Ledger having long transaction list, then once user un-check any of the check boxes system takes long time to remove/hide those rows which contains Totals. Which is effecting the performance of the report also.  Also those checkboxes appeared with check marked by default.
    If user has an option in the selection criteria screen, then they can choose which Total they want before previewing the report and mark accordingly.
    Thanks & Regards
    Anjan Bhowmick

    Being reached to 10 open question, I am forced to close this thread

  • Find the difference between two dates for the specific month and year

    Hi,
    I have two dates, start date is 30/12/2012 and end date is 04/01/2013. Using datediff I found the difference of days between two dates. But I find the no of days in January 2013. ie output is 4 instead of 6. I input month and year to find the no of days
    for that date. In this case I input Jan 2013. How can I sql this ?

    I don't understand how most of the answers provided here not analytically solving the problem with many cases possible.
    First let me understand you:
    You have 2 dates range and you want to calculate day range for specific month and year between the original date range.
    declare @for_month int = 1 --January
    declare @for_year int = 2013
    declare @StartDate date = '2012-12-20'
    declare @EndDate date = '2013-01-04'
    SELECT
    CASE
    WHEN (DATEPART(MONTH, @StartDate) = @for_month and DATEPART(MONTH, @EndDate) = @for_month) and ((DATEPART(YEAR, @StartDate) = @for_year or DATEPART(YEAR, @EndDate) = @for_year)) THEN
    DATEDIFF(DAY, @StartDate,@EndDate)
    WHEN (@StartDate < cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (@EndDate between (cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date))) THEN
    DATEDIFF(DAY, DATEADD(MONTH, DATEDIFF(MONTH, -1, @EndDate)-1, 0),@EndDate)
    WHEN (@EndDate > cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date)) and (@StartDate between (cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date))) THEN
    DATEDIFF(DAY, @StartDate,DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, @StartDate) + 1, 0))) + 1
    WHEN ((DATEDIFF(DAY, @StartDate, cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date)) >= 0) and (DATEDIFF(DAY, cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date), @EndDate) >= 0)) THEN
    DATEDIFF(DAY, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as datetime), DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as datetime)) + 1, 0))) + 1
    ELSE
    0
    END as [DD]
    I don't know how you calculate day range between 01/01/2013 and 04/01/2013
    is 4, it is actually is 3 but if that is the case, you can add 1 from the condition.

  • Monday's Date  of the given week  and year

    Hi gurus,
    I have the data for week ( eg.52 ) and year ( eg. 08 ) and I need to get the date of the Monday of that week (21-DEC-2008...i.e 52th week of 2008 Year.)
    Pls let me knw the sql statement solution for this ..
    THanks,
    shashi..

    Hi, Shashi,
    There's a bug in what I posted before.
    Do this instead:
    TRUNC ( TO_DATE ( '01-Jul-' || :year_txt
                    , 'DD-Mon-YYYY'
          , 'IY'
          ) + (7 * (:week_val - 1))The only change is in TO_DATE.
    Here's the problem.
    TO_DATE won't work with ISO years; it only takes calendar years.
    When you don't specify a day and month in TO_DATE (like I originally did) it defaults to the first day of the current month. So TO_DATE ('2011', 'YYYY') returns October 1, 2011 when the current month is October, and it returns January 1, 2011 when the current month is January.
    January 1, 2011, however, is in ISO year 2010. (ISO 2011 begins on the Monday closest to January 1, which is January 3, 2011). My original solution, therefore, would return dates from ISO year 2010 when anyone asked for year 2011 and they happend to be running the program during January.
    Specifying a full date makes the expression behave the same regardless of when it is run.

  • Dublicate the database with one year data

    Hi DBA's
    I need to create the duplicate database instance. But only one year data from the source instance to target instance, source instance is having 3 years data.
    is it possible to do so? and which method i have to follow to create a Duplicate instance?
    One year data is having in size nearly 1 TB .
    Regards,
    SG

    Please see this thread for similar discussion -- ebs cloning version 11.5.10.2
    Thanks,
    Hussein

  • SAP Work Manager 6.0 - Creating notification on mobile device (customizing the default Start and End date)

    Dear all,
    When I create a notification in SAP Work Manager 6.0, the notification gets created in the back-end with Start Date equal to Current Date + 1 day and End Date equal to Current Date + 3 days.
    Can you advise where I can customize this behaviour, so that the Start Date is for example equal to the Current Date and End Date being 14 days in the future? Is this something that would need to be configured in Agentry Editor or within the ABAP stack?
    Many thanks for your support.
    Pavel
    Tags edited by: Michael Appleby

    Hi Jason,
    We went this route and identified the initial values, and tried to modify those.
    No impact though, as if those values are being overwritten elsewhere (whatever value we set, no change on the backend).
    Please see the attachments with screenshots of Agentry Editor.
    Many thanks.
    Pavel

  • How to get the previous month and year accordingly

    Hi friends,
    I wanted to select month as number like 4 and year as 2011
    but I want to select the previous month as of sysdate
    like if the sysdate is 10-jun-2011
    it should give me 5 as month and
    in the year it should give as 2011
    if the sysdate is 01-jan-2012
    the month should be as 12 and year should be as 2011
    thanks

    Hi,
    776317 wrote:
    thanks a lot I just dont need the 0 being prefixed... can you pls tell how to avoid that as well pls
    TO_CHAR ( ADD_MONTHS (SYSDATE, -1)
            , 'FMmm yyyy'
           )For details about how the FM modifier works, wee the SQL Language manual:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/sql_elements004.htm#sthref456

  • SID table in the general tab and master data/text tab

    Hello Bi Experts,
      For example 0material Info-object:
    There is a SID table in the general tab i.e /BI0/SCOMP_CODE
    There is another  SID table Attribute  in the master data/text tab i.e /BI0/XCOMP_CODE,here there are Nav attributes with name S__0COMPANY.
    When i got 0company info-object it got its own SID table i.e /BI0/SCOMPANY
    Can some body explain me what is significance of SID table Attribute  in the master data/text tab and what is difference with SID Table of attribute?
    Cheers,
    Stalin

    Hi,
    SID is surrogate ID generated by the system. The SID tables are created when we create a master data IO. In SAP BW star schema, the distinction is made between two self contained areas: Infocube & master data tables/SID tables.
    The master data doesn't reside in the satr schema but resides in separate tables which are shared across all the star schemas in SAP BW. A numer ID is generated which connects the dimension tables of the infocube to that of the master data tables.
    The dimension tables contain the dim ID and SID of a particular IO. Using this SID the attributes and texts of an master data Io is accessed.
    The SID table is connected to the associated master data tables via teh char key 
    Sid Tables are like pointers in C
    Tables Starting with  Description:
    M - View of master data table 
    Q  - Time Dependent master data table 
    H - Hierarchy table 
    K - Hierarchy SID table 
    I  - SID Hierarchy structure 
    J  - Hierarchy interval table 
    S  - SID table 
    Y  - Time Dependent SID table 
    T  - Text Table 
        F  - Fact Table - Direct data for cube ( B-Tree Index ) 
    E  - Fact Table - Compress cube ( Bitmap Index ) 
    For more info go through the belwo link
    http://www.sap-img.com/bw010.htm
    Regards,
    Marasa.

  • IPhone 6 Plus Gold 64 bit on the Edge Plan and Delivery Date?

    After reading a ton of the posts, a lot of people are saying that they are receiving confirmations that their phones are shipping Friday.  I ordered mine 3am CST (that's how long it took the pages to load).  My screen said delivery by Friday the 19th but then my confirmation said Oct 7th.  Most people are saying they know it has been shipped to Fed Ex when they get charged for the phone in their bank/credit accounts.  But, I signed up for the Edge plan and there was not a charge, just what my monthly bill would be.  I just need to know what day I have to stay home from work to sign for the package.  My company likes at least a few days notice.  Can anyone from Verizon shed some light on my order, did it go through OK (status still says unknown), I did receive the original order confirmation email within an hour of ordering the phone at 3am.  I know you are being bombarded with the same question over and over but I am starting to get a little concerned with all the different answers to other people's posts.  If a Verizon Person can help me out I would be truly grateful!!! Thanks so much!
    Suezyg

        I understand your anticipation and concerns regarding your new phone and your order status Suezyg23451! Please visit this link http://vz.to/RWWFB and enter your order information for that latest status available.
    AntonioC_VZW Follow us on Twitter at www.twitter.com/VZWSupport

  • How to get the currrent month and year from a new date object

    If I create a new Date object as "d",
    java.util.Date d = new java.util.Date();how can I format the date to get the current Month as 'Jan' and the current year as '2008'. So if I have something like d.getMonth() gets the current month as 'Oct' and d.getYear() gets '2008'
    Thanks,
    Zub

    [Read the flamin' manual you must. Hmm.|http://en.wikipedia.org/wiki/RTFM]
    ~~ Yoda.
    Well no actually, he didn't say that, but he should have.
    Cheers. Keith.
    PS: Don't say that to a 7 foot pissedOff wookie when he's got his head stuck in a smoking hyperdrive, and you're being chased by a S-class battle cruiser... Ask Yoda how he got to be so short.
    PPS: It is the SimpleDateFormat you seek ;-)
    Edited by: corlettk on 14/10/2008 22:37 ~~ Also far to slow... but funny.

  • Different results for the same query and same data !  (oracle 9i)

    Hi,
    This is a mystery for me. I've got on my database exactly the same data that my customer (exported schema). We both launch the same query (generated by the software that we sold him). This query has a criteria IN (SELECT MAX()...) to get only data from the last year.
    The query gives 477 rows on my computer (correct answer), but no row on his! We have the same data! The only difference is the Oracle release : 9.2.0.6.0 for him, 9.2.0.1.0 for me.
    If he executes the subquery alone, it gives the expected result.
    If he replaces the MAX() in the subquery by the returned value (year 2016), he gets his 477 rows.
    I've rewritten the query with a NOT EXISTS, and now all is fine. (Less efficient but it works).
    I have no rational explication. Did I miss something ?
    Thanks for any answer.
    This is the query:
    SELECT ...
    FROM
    CRA, GRA, ...
    WHERE
    /* subselect */
    (CRA.COLLCOD, CRA.CRANEXE, CRA.CRANCODBUD, CRA.GRANNUM, CRA.CRANCOD1, CRA.CRANCOD2, CRA.CRANCOD3, CRA.CRANCOD4)
    IN (
    SELECT b.COLLCOD, MAX(cranexe), b.CRANCODBUD, b.GRANNUM, b.CRANCOD1, b.CRANCOD2, b.CRANCOD3, b.CRANCOD4
    FROM CRA b
    GROUP BY b.COLLCOD, b.CRANCODBUD, b.GRANNUM, b.CRANCOD1, b.CRANCOD2, b.CRANCOD3, b.CRANCOD4
    AND... /* other filters and joins */

    v9.2.0.1 was full of bugs. a lot of these bugs had to do with "incorrect results", typically associated with old stats or complex queries (certain types of subqueries were very likely to give wrong resutls, due to the way they were rewritten by the optimizer).
    apply the 9.2.0.6 patch set

  • Retail PO (ME21N) - Make the season category and year visible

    There is a tab called "Retail" in the PO transaction ME21N.  When I go in the screen designer for this subscreen (SAPLMEGUI - 1322).  I see that there are the season fields that I wanted to be displayed.
    Unfortunately they are hidden and I don't know how to bring them visible.  When I go in the screen layout definition of the PO in SPRO and that I check the field selection NBF (the one that is assigned to our document type) I don't even see the "Retail" tab so I could not change the configuration ? do you know why ???
    Thanks

    I think Season Category and Season year both are related to Retail and they fall under po item detail Retail tab.
    I assume if you make Season field required in spro-mm-purchasing-purchase order-define screen layout at document level foe field selection key NBF (under adminstrative data, item) then your purpose will be solved.

Maybe you are looking for

  • What are the preferred methods for backing up a cluster node bootdisk?

    Hi, I would like to use flarcreate to backup the bootdisks for each of the nodes in my cluster... but I cannot see this method mentioned in any cluster documentation... Has anybody used flash backups for cluster nodes before (and more importantly - s

  • Having trouble formatting excel chart using Chart Wizard command.

    Problem Description : Trying to create an excel chart derived from an excel spreadsheet. Having trouble understanding the parameters to format in the Chart Wizard function to get the desired results. There are no error messages, just chart is not wha

  • Help uninstalling

    I would like to uninstall adobe reader because I get a lot of error messages - The root object is missing or invalid. and I can't figure out how to fix that - it is not helpful at all.  Now I am trying to uninstall and I can't seem to get the name an

  • Insert a RSS from Internet into Table

    Hi Friends, Ihave a Problem , I Wanna Insert A (google news RSS Content ) into a table the Url is http://news.google.com.br/news?pz=1&cf=all&ned=pt-BR_br&hl=pt-BR&output=rss I Found some Examples But al the examples is files in local directory . You

  • Unexpected end of file occurred while opening Photoshop CC psd in Photoshop Cs4

    Can anyone help me? I'm using Photoshop CC 2014 on Windows 7 at home and Photoshop CS4 at school. I get an Unexpected end of file occurred when I try to open my assignements at school. How can this be fixed? Thank you! Sas