Help needed on Mapping logic

Hi guys,
I have logic like,
pernr>logic>pernr.
Pernr is the first field.
Whenever the logic fails, it should not process rest of the below fields.
it should directly go to next record.
Any ideas.......
santosh.

You can achieve this using gloval variable.
1. right click on the parent node  of pernr. -
>Add Variable (say ifPernrTrue)
2. Map this variable with the same logic and give value "true" if logic successful and "false" if logic fails
Whenever the logic fails, it should not process rest of the below fields.
3.Map rest of fields as :
ifPernrTrue (the variable u created) \
>   if  (without else )  -
> fields...
               source filed     /

Similar Messages

  • Help Needed in mapping business scenario

    Hi All,
    I have a RM inter unit despatches for this we are using STO. While doing inter unit despatches we have to pay freight on per kg (Gross Weight) for a source and destination. This has already been mapped by creating a condition type and condition record.
    But there is a scenario where in when inter unit despatches happens there is an agreement b/w transporter and company if the company does not load full truck then the company needs to pay a minimum amount which has been negotiated with the transporter in this case, the freight condition is not being payed only minimum gurantee amount is payed to the transporter.
    Could any of us help me in mapping only the minimum gurantee scenario in R/3.
    We are using STO to do inter unit despatches.
    Regards,
    Sreekanth

    hai
    i think u can use condition type AMIW

  • Help needed on mapping information for AT701 element in EDI X12 214 Transportation type (X12_00401_214 schema)

    Hi all,
    As per the EDI defined standard schema, AT701 element takes the following Enumeration values.
    <xs:element minOccurs="0" name="AT701" type="X12_ID_1650">
    <xs:annotation>
    <xs:appinfo>
    <b:fieldInfo notes="Shipment Status Code_1650" />
    </xs:appinfo>
    </xs:annotation>
    </xs:element>
    <xs:simpleType name="X12_ID_1650">
    <xs:restriction base="xs:string">
    <xs:enumeration value="A3" />
    <xs:enumeration value="A7" />
    <xs:enumeration value="A9" />
    <xs:enumeration value="AF" />
    <xs:enumeration value="AG" />
    <xs:enumeration value="AH" />
    <xs:enumeration value="AI" />
    <xs:enumeration value="AJ" />
    <xs:enumeration value="AM" />
    <xs:enumeration value="AN" />
    <xs:enumeration value="AP" />
    <xs:enumeration value="AR" />
    <xs:enumeration value="AV" />
    <xs:enumeration value="B6" />
    <xs:enumeration value="BA" />
    <xs:enumeration value="BC" />
    <xs:enumeration value="C1" />
    <xs:enumeration value="CA" />
    <xs:enumeration value="CD" />
    <xs:enumeration value="CL" />
    <xs:enumeration value="CP" />
    <xs:enumeration value="D1" />
    <xs:enumeration value="I1" />
    <xs:enumeration value="J1" />
    <xs:enumeration value="K1" />
    <xs:enumeration value="L1" />
    <xs:enumeration value="OA" />
    <xs:enumeration value="OO" />
    <xs:enumeration value="P1" />
    <xs:enumeration value="PR" />
    <xs:enumeration value="R1" />
    <xs:enumeration value="RL" />
    <xs:enumeration value="S1" />
    <xs:enumeration value="SD" />
    <xs:enumeration value="X1" />
    <xs:enumeration value="X2" />
    <xs:enumeration value="X3" />
    <xs:enumeration value="X4" />
    <xs:enumeration value="X5" />
    <xs:enumeration value="X6" />
    <xs:enumeration value="X8" />
    <xs:enumeration value="XB" />
    </xs:restriction>
    </xs:simpleType>
    Now, in my sample input file I am having a column "MileStone", and for example: If I have
    "Picked Up Date" in that column, I need to pass "A3" as the value for
    AT701 element as per the above code snippets. 
    Please let me know how to map the "Milestone to "AT701" element.
    If I straight away map those two fields, I am getting the below error : 
    error btm1046: Output validation error: The 'AT701' element is invalid - The value 'MileStone_0' is invalid according to its datatype 'http://schemas.microsoft.com/BizTalk/EDI/X12/2006:X12_ID_1650' - The Enumeration constraint failed.
    So, please guide me on how to map the above fields using the functoids. 
    Thanks in Advance..

    Hi Anand,
    You can try
    Value Mapping functiod along with Logical Equal functiod for this requirement.
    Connect the element “MileStone”
    to the Logical Equal functiod as the it’s first parameter. And add “Picked Up Date”
    as the second parameter.
    Connect output of the Logical Equal functiod as the first parameter to the Value Mapping functiod and “A3"
    as the second parameter.
    Connect the output of
    Value Mapping functiod “AT701”
    element.
    This maps the value “A3”
    to the element “AT701”, if the value of “MileStone” element is
    “Picked Up Date”
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Help needed with Map function in Lumira

    Hi,
    I've bee using Luira for lots of great tile charts and bar charts, but now I am looking to make use of the mapping visulization in Lumira.
    Bascially I want to get a count of the number of retail stores by state. 
    I uploaded my data , and some have been populated and looks nice (see first screenshot) , but for others the state is not found (see second screenshot).
    I have looked in the help documents, and some of the training, but have yet to find a solution.
    What I'd like to know is how I can fix the "unfound" states, or at least find out what is the source file which stores all the states?
    Above is the results so far, below is the missing states that I need to resolve. How can I fix for these "not found" states  or compare the format of my original excel data vs the data from Lumira.
    Alteratively if there is a way to match via post-code / zip-code please tell me how.
    Thanks,
    Paul

    Hi Paul,
    the geo-hierarchies take all cities that are greater than 100.000 for the name resolution and for the smaller ones you would need to use latitude/longitude information to get them resolved by Lumira.
    You can find mre information on how to use latitude/ longitude information from here:
    https://scn.sap.com/docs/DOC-33118
    Regards,
    Clarissa

  • Help Needed in Relational logic

    Hi
    Working in 2008 R2 version.
    Below is the sample data to play with.
    declare @users table (IDUser int primary key identity(100,1),name varchar(20),CompanyId int, ClientID int);
    declare @Cards table (IdCard int primary key identity(1000,1),cardName varchar(50),cardURL varchar(50));
    declare @usercards table (IdUserCard int primary key identity(1,1), IDUser int,IdCard int,userCardNumber bigint);
    Declare @company table (CompanyID int primary key identity(1,1),name varchar(50),ClientID int);
    Declare @client table (ClientID int primary key identity(1,1),name varchar(50));
    Declare @company_cards table (IdcompanyCard int primary key identity(1,1),CompanyId int,IdCard int)
    Declare @Client_cards table (IdclientCard int primary key identity(1,1),ClientID int,IdCard int)
    insert into @users(name,CompanyId,ClientID)
    select 'john',1,1 union all
    select 'sam',1,1 union all
    select 'peter',2,1 union all
    select 'james',3,2
    Insert into @usercards (IdUser,IdCard,userCardNumber)
    select 100,1000,11234556 union all
    select 100,1000,11234557 union all
    select 100,1001,123222112 union all
    select 200,1000,2222222 union all
    select 200,1001,2222221 union all
    select 200,1001,2222223 union all
    select 200,1002,23454323 union all
    select 300,1000,23454345 union all
    select 300,1003,34543456;
    insert into @Cards(cardName,cardURL)
    select 'BOA','BOA.com' union all
    select 'DCU','DCU.com' union all
    select 'Citizen','Citizen.com' union all
    select 'Citi','Citi.com' union all
    select 'Americal Express','AME.com';
    insert into @Client(name)
    select 'AMC1' union all
    select 'AMC2'
    insert into @company(name,ClientId)
    select 'Microsoft',1 union all
    select 'Facebook',1 union all
    select 'Google',2;
    insert into @company_cards(CompanyId,IdCard)
    select 1,1000 union all
    select 1,1001 union all
    select 1,1002 union all
    select 1,1003 union all
    select 2,1000 union all
    select 2,1001 union all
    select 2,1002;
    Requirement : 
    1. Get the distict Users card details. the reason for using distinct is, user can have same card multiple with different UserCardNumber.
    Ex : user can have more than BOA card in the @usercards table with different UserCardNumber. But though he has two BOA card, my query should take one row.
    2. After the 1st step, i need to check if any details on @company_cards based on Users companyId.If yes then selct the details from @company_cards. if not select it from @client_cards
    In this case we need to make sure that we shouln't have repeated data on @FinalData table. 
    My Logic:
    Declare @FinalData table (IDCard int,CardName varchar(50),CardURL varchar(50))
    declare @IdUser int = 100, @ClientID int,@companyID int;
    select @ClientID = ClientID,@companyID = CompanyId from @users where IDUser = @IdUser;
    insert into @FinalData (IDCard,CardName,CardURL)
    Select distinct c.IdCard,c.cardName,c.cardURL from @usercards UC join @Cards C on(uc.IdCard = c.IdCard)
    where IDUser=@IdUser;
    if exists(select 1 from @company_cards where @companyID = @companyID)
    BEGIN
    insert into @FinalData(IDCard,CardName,CardURL)
    select c.IdCard,c.cardName,c.cardURL from @company_cards cc join @Cards c on(cc.IdCard = c.IdCard) where CompanyId = @companyID
    and cc.IdCard not in(select IDCard from @FinalData);
    END
    ELSE
    BEGIN
    insert into @FinalData(IDCard,CardName,CardURL)
    select c.IdCard,c.cardName,c.cardURL from @client_cards cc join @Cards c on(cc.IdCard = c.IdCard) where ClientID = @ClientID
    and cc.IdCard not in(select IDCard from @FinalData);
    END
    select * from @FinalData;
    the logic produces the valid result. Is there any alternative way to achieve this logic. I feel there might be some proper way to query this kind of logic. any suggestion please.
    [the sample schema and data i provided just to test. i didn't include the index and etc.]
    loving dotnet

    You can simply merge the statements like below
    Declare @FinalData table (IDCard int,CardName varchar(50),CardURL varchar(50))
    declare @IdUser int = 100
    ;With CTE
    AS
    Select IdCard, cardName, cardURL,
    ROW_NUMBER() OVER (PARTITION BY IdCard ORDER BY Ord) AS Seq
    FROM
    Select c.IdCard,c.cardName,c.cardURL,1 AS Ord
    from @usercards UC join @Cards C on(uc.IdCard = c.IdCard)
    where IDUser=@IdUser
    union all
    select c.IdCard,c.cardName,c.cardURL,2
    from @company_cards cc join @Cards c on(cc.IdCard = c.IdCard)
    join @users u on u.CompanyId = cc.CompanyId
    where u.IDUser = @IdUser
    union all
    select c.IdCard,c.cardName,c.cardURL,3
    from @client_cards cc join @Cards c on(cc.IdCard = c.IdCard)
    join @users u on u.ClientID= cc.ClientID
    where u.IDUser = @IdUser
    )t
    insert into @FinalData (IDCard,CardName,CardURL)
    SELECT IdCard, cardName, cardURL
    FROM CTE
    WHERE Seq = 1
    select * from @FinalData;
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Help needed on the logic used to display ERP Sales order in CRM WEB UI

    Hi,
    I have a requirement where i need to trigger an activity/workflow in CRM for orders that are created through ERP Salesorder functionality. In the workflow list, we need to give the order description and provide an hyperlink to the order number. on selection of order number, it should display the ERP sales order. To achive this in workflow, i am trying to understand the as-is standard functionality which is available in Agent Inbox search on ERP sales order.This search is getting the ERP orders and on selecting the order it is opening the ERO sales order page. I tried debugging the method GET_MAINCATAEGORY available in the component iccmp_inbox and in the view Inboxsearch.But couldnt really able to crack the logic how it is retrieving the ERP sales order from inbox search. Any pointers on how this is achieved will be of great help.
    Thanks,
    Udaya

    Hi Denis,
    very good idea. I thougt myself about that workaround, but it is not really that for what I searched.
    I mean the "SAP Query" is a really good standard tool, that are used by many customers. That is why think there must be a standard way to display the SAP Query in the Web UI without using Transaction Launcher.
    But it seems that there is no way, except of the transaction launcher or by using an additional analyse system like SAP BI.
    By the way do you know a Web UI compoment which enable the user to start reports like SE38?
    Regards
    Fabian

  • Help needed in Mapping of T4s and T4As

    Hi
    My name is Krishna ,I was involved in year end support of US and successfully completed it ,but now i am put in canadian year end stuff also (T4s and T4As) and i dont have much experience with Mapping and Testing of T4s and T4As using tax reporter of SAP .can any body help me  How to map different wagetypes on different boxes on T4s and T4As ?please if  you have any screenshots,please send me .your timely help is greatly appreciated
    Regards
    Krishna

    Hi Krishna,
    What is T4 and T4A'S? Do they spcify the Tax form groups or Tax form fields?
    I think it must be like Box 12 of W-2 wherein you have 12A, 12B, 12C.
    Try to apply to the same logic for the T4's and T4A's.
    Let me know.
    Arti

  • Help Needed in Date Logic

    Hi I am working in sqlserver 2008 R2 and below is my sample research query
    i am trying to get previous 6 months data.
    WITH CutomMonths
    AS (
    SELECT UPPER(convert(VARCHAR(3), datename(month, DATEADD(MM, DATEDIFF(MM, 0, GETDATE()) - N, 0)))) Month
    ,DATEADD(MM, DATEDIFF(MM, 0, GETDATE()) - N, 0) startdate
    ,DATEADD(MM, DATEDIFF(MM, 0, GETDATE()) - N + 1, 0) enddate
    FROM (
    VALUES (1)
    ,(2)
    ,(3)
    ,(4)
    ,(5)
    ,(6)
    ) x(N)
    WHERE N <= 6
    SELECT month
    ,SUM(isnull(perks.amount,0)) AS PerkAmount
    FROM CutomMonths
    LEFT JOIN (
    select 10.00 as amount,'2014-04-03' as StartDate,'2015-04-03' as EndDate union all
    select 10.00 as amount,'2014-04-03' as StartDate,'2015-04-03' as EndDate
    ) perks ON
    CutomMonths.startdate >= perks.StartDate
    AND CutomMonths.startdate < perks.EndDate
    GROUP BY CutomMonths.Month
    ,CutomMonths.startdate
    ORDER BY CutomMonths.startdate ASC
    current output what i am getting:
    Expected Output:
    I found why the April month i din't get the $20 because the startdate of my perks CTE '2014-04-03'. If it is '2014-04-01' then i will get the expected output.
    But i should not change the the date on perks. How to neglect this date issue and consider the month instead to get the expected output. please help me on this as i am struggling on my logic 
    loving dotnet

    I'm just going to focus on the JOIN criteria in this reply since my answer above and your 2nd response are essentially the same except for the JOIN.
    What your are describing and what you are doing in code is conflicting. 
    You are saying this:
    "I just need to check whether the perks start date falls in between month start date and month end date"
    ..., which translated directly to code would be this:
     ON perks.StartDate >= CustomMonths.StartDate
    AND perks.StartDate <= CustomMonths.EndDate
    What I believe you are getting after is this:
    "I just need to check whether the dates within the perks start and end date range fall in between month start date and month end date"
    ..., which translated directly to code would be this, which is also my answer proposed above:
    ON CustomMonths.StartDate >= DATEADD(DAY, -(DAY(perks.StartDate) - 1), perks.StartDate)
    AND CustomMonths.StartDate <= perks.EndDate
    However, if you really want to use the code solution you proposed, then you would actually be saying this:
    "I just need to check whether the dates within the perks start and end date range fall in between month start date and month end date, but if perk end date happens to be the first day of the month, then ignore it and use the previous day."
    ..., in which case then your code, as follows, would be the solution:
     ON CutomMonths.startdate >= DATEADD(mm, DATEDIFF(mm, 0, perks.StartDate), 0)AND CutomMonths.startdate < DATE
    ADD(mm, DATEDIFF(mm, 0, perks.EndDate), 0)
    NOTE: The alternate JOIN I had commented out in my proposed answer above will do the exact same thing as your latest proposed solution
     ON CustomMonths.StartDate >= DATEADD(DAY, -(DAY(perks.StartDate) - 1), perks.StartDate)
    AND CustomMonths.StartDate < perks.EndDate
    BTW, I see how you are getting to the first day of the month by subtracting all the months from the given date to 01/01/1901, and then turning around and adding them all back to 01/01/1901.  While that is one way to get to the first day of the month, it
    seems excessive from a calculation stand point, although I haven't performed any performance tests to know for certain.
    SELECT DATEADD(mm, DATEDIFF(mm, 0, '2014-04-03'), 0)
    I prefer simply subtracting one less than the current day number from the given date to get to the same first day of the month value.
    SELECT DATEADD(DAY, -(DAY('2014-04-03') - 1), '2014-04-03')

  • Help needed in mapping BI query output to use as input for BAPI

    Hi,
    After wrestling with it for quite some time I choose to ask yet another question here. I want to use the output of a BI query I use as input for a BAPI. I just can not get the mapping correctly:
    The query delivers: 104908BA092F7501F5E1008000829000AC
    I need: 104908BA092F7501F5E1008000829000AC
    How can I lose the two first digits? Thanks in advance!
    Best regards,
    Jan

    Nevermind. I found out myself. I am now using the statement MID(@GUID,2,32) in the connection.

  • Help needed in business logic implmentation in oracle sql.

    I got a requirement from customer that i need to generated numbers based on first value which is entered by users but not second values..
    for example:
    c1 c2
    1 1
    2 1
    3 1
    4 1
    1 2
    2 2
    3 2
    4 2
    1 3
    2 3
    3 3
    4 3
    1 4
    2 4
    3 4
    4 4
    1 5
    2 5
    3 5
    4 5
    unlimited..
    the user input only first column values which comes from UI and i need to provide second column values when records are getting inserted into db table.
    user always enter only 1-4 values in first column but never input second values in second column of table.. both columns are numerical.
    the second values should be provided automatically or programmatically when records are getting inserted into table and automatically... how this can be done?
    Can any one help me out to get this done either using sql,plsql concept?
    thanks a lot in advance.

    Hi,
    Demonstration
    SQL> DROP TABLE t1;
    Table supprimée.
    SQL> CREATE TABLE t1 (c1 NUMBER, c2 NUMBER);
    Table créée.
    SQL>
    SQL> insert into t1 (c1) values(1);
    1 ligne créée.
    SQL> insert into t1  (c1) values(2);
    1 ligne créée.
    SQL> insert into t1 (c1) values(3);
    1 ligne créée.
    SQL> insert into t1 (c1) values(4);
    1 ligne créée.
    SQL> insert into t1 (c1) values(1);
    1 ligne créée.
    SQL> insert into t1 (c1) values(2);
    1 ligne créée.
    SQL> insert into t1 (c1) values(3);
    1 ligne créée.
    SQL> insert into t1 (c1) values(4);
    1 ligne créée.
    SQL> insert into t1 (c1) values(1);
    1 ligne créée.
    SQL> insert into t1 (c1) values(2);
    1 ligne créée.
    SQL> commit;
    Validation effectuée.
    SQL>
    SQL> CREATE OR REPLACE VIEW view_t1
      2  AS
      3     SELECT c1, ROW_NUMBER () OVER (PARTITION BY c1 ORDER BY c1) c2
      4       FROM t1;
    Vue créée.
    SQL>
    SQL>
    SQL> SELECT   c1,c2
      2      FROM view_t1
      3  ORDER BY c2, c1;
            C1         C2
             1          1
             2          1
             3          1
             4          1
             1          2
             2          2
             3          2
             4          2
             1          3
             2          3
    10 ligne(s) sélectionnée(s).
    SQL>

  • Help needed in Mapping servlet in web.xml file

    Hi Can anyone please tell me what am doing wrong here. I can't see this servlet in my url. Please help.
    <servlet>
    <servlet-name>HelloWorld</servlet-name>
         <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>/com/jci/fi/application/eems/HelloWorld/*</url-pattern>
    </servlet-mapping>
    package com.jci.fi.application.eems;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorld extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<body>");
    out.println("<head>");
    out.println("<title>Naveen Wants to goto TollyWood......!</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Hello World!</h1>");
    out.println("</body>");
    out.println("</html>");

    your web.xml shoould be something like this...
    <servlet>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>com.jci.fi.application.eems.HelloWorld</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>HelloWorld</url-pattern>
    </servlet-mapping>
    Hope this helps..
    CK

  • Help needed - Field Mapping

    Hi,
    Detail:
    ========
    I have a class called CustomerSpecificField extending another class
    NameValueTimestamp which contains 3 attibutes name, value, timestamp.
    In my package.jdo file when i tried to map my fields, I got the following
    exception. the attibutes in the parent class are not at all recognized for
    mapping.
    JDO Info
    ========
    <class name="CustomerSpecificField">
    <extension vendor-name="kodo" key="jdbc-class-map" value="base">
    <extension vendor-name="kodo" key="table" value="ADB.UP_CUST_SPEC_FIELD"/>
    <extension vendor-name="kodo" key="pk-column" value="ID"/>
    </extension>
    <field name="name">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="NAME"/>
    </extension>
    </field>
    <field name="timestamp">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="TIMESTAMP"/>
    </extension>
    </field>
    </class>
    Error:
    =======
    Exception in thread "main" kodo.util.FatalException: java.io.IOException:
    org.xml.sax.SAXException:
    file:/C:/kodo-jdo-3.1.3/bin/com/bo/package.jdo [Location: Line: 65, C:
    37]: Field "timestamp
    " is not declared in "CustomerSpecificField".
    [java.lang.NoSuchFieldException]
    NestedThrowables:
    java.io.IOException: org.xml.sax.SAXException:
    file:/C:/kodo-jdo-3.1.3/bin/com/bo/package.jd
    o [Location: Line: 65, C: 37]: Field "timestamp" is not declared in
    "CustomerSpecificField". [java.l
    ang.NoSuchFieldException]

    I have a class called CustomerSpecificField extending another class
    NameValueTimestamp which contains 3 attibutes name, value, timestamp.In JDO, each class can only persist fields that it declares. So you
    need to make your superclas a persistent class and map it, and reference
    it with the persistence-capable-superclass attribute from your subclass.

  • Help needed to "map" HRMS fields for reporting

    Hi all,
    I have been asked to map for reporting purposes all the fields in the HRMS person and assignment forms, plus vacany requisition and absence.
    For example, on the people form in HRMS the "last Name" field would translate into sql as "per_people_F.last_name".
    I have found all the person/assignment/absence and vacancy fields but cannot find any of the following:
    Bank account/ pay method information.
    Salary previous/ salary proposal form information
    Anything from the element entries screen or the tax information fields.
    Anyone have any ideas which tables would hold this information for querying using developer or toad??

    Hi Michel, Vijaya, Praksh
    Thanks for all the replies. I will be a bit more detailed in my Query and Vijaya if u cud explain me the same way then it wud be helpful...
    Idoc Structure:
    GLMAST01
    IDOC
      BEGIN
    --EDI_DC40
         SEGEMENT
        TABNAM
    --E1SKA1M
         SEGMENT
        MSGFN
        KTOPl
        SAKNR
      --E1SKATM
         SEGMENT
         MSGFN
      --E1SKB1M
         SEGMENT
         MSGFN
    The Message type is
    FCC_MSGTYPE
    -MOVEMENT
      -Row
        MANDT
        KTOPL
        SAKNR
    I am not sure whether to Map the MOVEMENT part. Tell me what I should do. The requirement is to populate the R/3 with the MANDT, KTOPL, SAKNR etc which all occur in the E1SKA1M segemnt and the nothing to the subsegments under it.
    Please tell me how to do that.
    Thanking all in anticipation.
    Best Regards
    Chakra and Somnath

  • Help needed in Count Logic

    Hi Following are my table structure and data . i have two column( No.of.Fields , Text)
    No.of.Fields | Text
    8 | YYYYYYYY
    6 | YYYYYY
    4 | NNNN
    3 | NNN
    2 | YYYYY
    i want a sample query to validate the no.field count and Text char count matches. if that doesn't match i want to get the particular record details.
    In the above sameple no.of field 2 has exceeds char count. actual text shoulod be "YY".
    so please help me to identify the rows which has non matached. i have more than 500 records in the table. please help me on this by providing the sample.

    Hi.
    >
    Don't forget about NULLs:
    >
    Thanks you're right, it depends on how he want to deal with nulls, e.g. if we assume that nulls have a length of 0
    Here's one way:
    WITH data AS
         SELECT 8 n,'YYYYYYYY' string FROM DUAL UNION ALL
         SELECT 6 n,'YYYYYY' string FROM DUAL UNION ALL
         SELECT 4 n,'NNNN' string FROM DUAL UNION ALL
         SELECT 3 n,'NNN' string FROM DUAL UNION ALL
         SELECT 2 n,'YYYYY' string FROM DUAL UNION ALL
         SELECT 8 n,'YYYYYYY' string FROM DUAL UNION ALL
         SELECT 6 n,'YYYYY' string FROM DUAL UNION ALL
         SELECT 4 n,'NNN' string FROM DUAL UNION ALL
         SELECT 3 n,'NN' string FROM DUAL UNION ALL
         SELECT 2 n,'YYYY' string FROM DUAL UNION ALL
         SELECT 0 n,null string FROM DUAL UNION ALL
         SELECT 1 n,null string FROM DUAL
    SELECT
         n,
         string,
         NVL(LENGTH(string),0) ls
    FROM data
    WHERE n != NVL(LENGTH(string),0);
    N     STRING     LS
    2     YYYYY     5
    8     YYYYYYY     7
    6     YYYYY     5
    4     NNN     3
    3     NN     2
    2     YYYY     4
    1     (null)     0Best regards.

  • Help needed in the logic

    i hav select query like this:-
    SELECT COUNT(*) INTO NO_OF_WORKERS FROM PA0000
    WHERE ENDDA = '99991231' AND STAT2 = '3'.
    with this select query , i can get the no. of workers .
    How can i get the no. of workers in the recording period <u><b>excluding</b></u> those persons who were absent from work on paid/unpaid leave for the entire period?

    Hi Hari,
    I got the solution for you.use the following sql query.
    SELECT COUNT(*) INTO NO_OF_WORKERS
    FROM PA0000 AS a inner join PA2001 as b on apernr = bpernr
    WHERE aENDDA = '99991231' AND aSTAT2 = '3'
    and ( bawart = '0100' or bawart = '0727' ).
    Now onething, in my comapany, in PA2001, field awart = '0100' means paid leave and 0727 means unpaid leave.
    this things r configured in SPRO. so must replace the values of awart in sql qurey as per the values of paid/unpaid leave in your company.
    you can do one thing, go to infotype pa30..then put 2001 in the infotype field in that screen, put cursor in STy field , hit F4 , it will show you the value for paid unpaid leave.
    Note the value , modify the value of awart field inthe sql query, thats it.
    cheers, and hey dont forget to give reward points.

Maybe you are looking for

  • How do I filter files in a requester?

      I know how to open a file requester (say, for reading CSV files) and I know how to filter the filenames listed in a folder, but I am having problems doing both at the same time.   My application analyzes the contents of a CSV file (saved with a ".

  • IOS update and icloud

    I have just uploaded the revised IOS software onto my 4s; cloud now has no photos apart from last week; preceding photos nowhere to be seen. any suggestions?

  • Faulting module name: AcroPDF.dll_unloaded

    One of my application ImageNOW crashes with the logs in the event viewer: Faulting application name: ImageNow.exe, version: 6.7.0.3100, time stamp: 0x519b899d Faulting module name: AcroPDF.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c9aa790 Except

  • Vista 64 - X-fi Xtreme Audio and Fatal1ty headset problem

    Hi All, I bought a Xtreme Audio soundcard today, and found a problem. When I connect my headset with the front connection on my PC -> no problem when I connect my microphone with the front connection on my PC -> no problem, mic is working. When I con

  • Apple Configurator failing to activate iPad(3)

    Hi all I'm having a problem with Apple Configurator and Preparing devices - Specifically an iPad 3rd Gen. Apple Configurator sees the iPad fine but when I start the Preparation phase it fails at 'Activation failed'. When I hover over the yellow warni