Query on DSO, KF value +/- based on flag value in DSO

Hi Experts,
I have a query on DSO and it is running fine.
Current Query output :
CHAR1 | CHAR2 | KF1
1111       S            100
1111       H            100
I want to put + or - sign for KF based on value of CHAR 2 (Flag) in query output.
So
Desired Query output :
CHAR1 | CHAR2 | KF1
1111       S            -100
1111       H             100
I can Add CHAR3 in DSO and based on CHAR2 value CHAR3 will store +1 or -1. Add it can be used to get + or -Value of KF using CKF.
But without doing it (CHAR3), can I do it directly at query level ?
Regards,
Vinod

Try this:
RKF1: KF restricted on S
RKF2: KF restricted on H
CKF: (-1)*RKF1 + RKF2
This should give you what you are looking for.
Regards,
Gaurav

Similar Messages

  • How to retrive new logical column based on flag values in table.

    Hi,
    i have two tables in rpd
    1.file table contains the coulmns------->date,file_count,record_count,cldm_stg,cmsa_stg,archive_stg
    2.rejection table columns---------> are same as above
    both have same common columns.my requirement is publish a dashboard like:
    date | land_files count |alnd_recordscount| target_files count|target_records count|Rejection filecount|rejection record count
    These report ineed retrive from those two tables.based on flag values.taget countcomes when all stg values set to ='y'
    i.e(cldm_stg='y' and cmsa_stg='y'and archive_stg='y') if not then it will be in rejection file.
    Please give solution how to achive my output.
    nQSError: 14026] Unable to navigate requested expression: Target_record:[DAggr(FILE_CONTROL.Target_record by [ FILE_CONTROL.FILE_NAME, REJECTED_FILES.FILE_NAME, REJECTED_FILES.NO_OF_ROWS, File_landing.NO_OF_ROWS, File_landing.FILE_LOAD_DATE] SB FILE_CONTROL)]. Please fix the metadata consistency warnings. (HY000)
    Edited by: user8767586 on Jan 12, 2010 4:29 AM

    Tanks for ypur reply .only two tables are there named as above.i taken file_control as a fact table.
    and i create one new tablecalled target in bmm layer taking logical source as file_control(fact table). and iset the where clause for the new table.and i create a new measure called target_file and target_records.in where clause my query is like
    dwbidb."".AUDIT_PROD.FILE_CONTROL.ARCHIVE_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.CMSA_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.LND_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.SCRIPT_STATUS = 'Y' AND dwbidb."".AUDIT_PROD.FILE_CONTROL.STG_STATUS = 'Y'
    please tell me if this is right way to achive mt report. and tell me difference between fragmentation and whereclause.for my requrement i ahve to follow which method either fragmentation or whereclause.and in rpd there are no errors and warnings.but in answers i get a follwing error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 14026] Unable to navigate requested expression: TARGET_FILECOUNT:[DAggr(TARGET.TARGET_FILECOUNT by [ TARGET.FILE_NAME] SB TARGET)]. Please fix the metadata consistency warnings. (HY000)
    SQL Issued: SELECT TARGET.FILE_LOAD_DATE saw_0, TARGET.TARGET_FILECOUNT saw_1, TARGET.TARGET_FILECOUNT saw_2 FROM AUDIT_PROD ORDER BY saw_0.
    Please tell me to achive my report.
    Regards
    Edited by: user8767586 on Jan 12, 2010 5:21 AM
    Edited by: user8767586 on Jan 12, 2010 5:21 AM
    Edited by: user8767586 on Jan 12, 2010 5:24 AM

  • Flagging a variant by a feild value based on char,value.

    Hello SAP Gurus,
    I have a requirement in which I have to flag a variant based on characteristic values.
    During configuration, when you happen to select certain characteristic values in  a character, the material should flag with a character material master field, which changes the way the material is handled.
    Any feed backs...
    I am thinking of creating another character with the material master field and establishing an "object dependency" between characteristic values and character....
    Is this correct?
    Thanks
    Eshlok

    It seems that don't understand that you aren't asking to Apple employees but to end users like you.
    May you take time to download iWork Formulas and Functions User Guide (thru the Help menu) ?
    I will not spend time describing Nummbers functions one after an other one !
    I am unable to guess what you tried to achieve with your formula..
    To calculate 33% of the content of c6, use the formula
    =ROUNDUP(C6*.33,0)
    or
    =ROUNDUP(C6/3,0)
    Yvan KOENIG (VALLAURIS, France) lundi 27 juin 2011 18:14:03 iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Display Values Based on Flag

    version oracle 10g
    hi i have a template in a variable and i need to show or hide some lables based on some values.
    i have an example below .copying the output of the below example.
    i have many lables which i need to show or hide based on the label values. please let me know the solution..
    /* Formatted on 2010/07/08 20:50 (Formatter Plus v4.8.8) */
    set serveroutput on;
    DECLARE
       v_content   VARCHAR2 (4000);
       v_mflag      VARCHAR2 (1)    := 'N';
       v_cflag      VARCHAR2 (1)    := 'Y';
       v_template   varchar2(4000)   :=
                                           'Date            :mail_dt
                                            Dear            :cust_name
                                            Request Number  :vzb_track_no
                                            Order Number    :ord_no
                                            Order Activity  :ord_activity
                                            Product         :prduct
                                            Managed         :managed
                                            Cpe             :cpe_ord';
    BEGIN
       v_content := replace(replace(replace(replace(replace(replace(replace(replace(v_template,
                ':mail_dt',sysdate),
                ':cust_name','Steven'),
                ':vzb_track_no','ABC123'),
                ':ord_no','XYZLKJHGVC'),
                ':ord_activity','Assigned'),
                ':prduct','Phone'),
                ':managed',v_mflag),
                ':cpe_ord',v_cflag);
                dbms_output.put_line(substr(v_content,1,254));
                dbms_output.put_line(substr(v_content,255,499));
    END;Out put
    Date                    08-JUL-10
    Dear                    Steven
    Request Number   ABC123
    Order Number      XYZLKJHGVC
    Order Activity      Assigned
    Product              Phone
    Managed            N    -- i dont need this row
    Cpe                   Y        

    new learner wrote:
    Out put
    Date                    08-JUL-10
    Dear                    Steven
    Request Number   ABC123
    Order Number      XYZLKJHGVC
    Order Activity      Assigned
    Product              Phone
    Managed            N    -- i dont need this row
    Cpe                   Y        
    You can strip the row prior to the REPLACE statements;
    DECLARE
       v_content   VARCHAR2 (4000);
       v_mflag      VARCHAR2 (1)    := 'N';
       v_cflag      VARCHAR2 (1)    := 'Y';
       v_template   varchar2(4000)   :=
    'Date            :mail_dt
    Dear            :cust_name
    Request Number  :vzb_track_no
    Order Number    :ord_no
    Order Activity  :ord_activity
    Product         :prduct
    Managed         :managed
    Cpe             :cpe_ord';
    BEGIN
       if v_mflag = 'N' then
         v_template := regexp_replace(v_template,chr(10)||'.*:managed');
       end if;
       v_content := replace(replace(replace(replace(replace(replace(replace(replace(v_template,
                ':mail_dt',sysdate),
                ':cust_name','Steven'),
                ':vzb_track_no','ABC123'),
                ':ord_no','XYZLKJHGVC'),
                ':ord_activity','Assigned'),
                ':prduct','Phone'),
                ':managed',v_mflag),
                ':cpe_ord',v_cflag);
       dbms_output.put_line(v_content);
    END;
    Date            10-07-08
    Dear            Steven
    Request Number  ABC123
    Order Number    XYZLKJHGVC
    Order Activity  Assigned
    Product         Phone
    Cpe             Y

  • Dynamic variable value based on a value from xml

    I have a invoice template and it is for 4 different companies in my organization. Based on the organization I need to have a different value for a variable that adds blank lines to the end of the invoice. Is there anyway to assign a value to variable based on the value of a xml tag.
    Thanks

    I should have explained better before. I have one invoice template and we want to keep it one template for all companies. Each invoice is run individually, each companies footer is different, I am calling multiple headers and footers based on each company. Since the headers and footers are different I need to be able to add different amounts of lines and the end of each invoice depending on that company. I have accounted for the page break in my logic based on the amount lines the page is long. I just need a dynamic variable that I can assign different values on the fly.
    Thanks

  • How to select a different value based on $FLEX$ Value set

    Hi friends,
    am getting a column like position from positions_table....
    now based on this value set am selecting another column from the same table like for ex amount...using $FLEX$.vlaueset_name
    now if the value in the table is 0 or null I should make the field available for the user to enter something
    as of now it is not letting me enter any data as this value is based on the first value set we defined..
    is there a way to do that..
    hope am clear in specifying my requirement
    thanks

    Hi Balraj
    I want to select one list item value from yyy based on the xxx item value..Pls use the following andreas's link ( it's about it)
    http://andreas.weiden.orcl.over-blog.de/article-28957008.html
    pls study it carefully and develop.
    Hope it helps...
    Regards,
    Abdetu...

  • Select value based on a value in a 2nd column (similar to vlookup)

    Hello all,
    Is there an alternative to VLOOKUP function in BI 11g?
    Or what else I can use to return value of 3rd column based on the value in 2nd column?
    Dept Min_Expense Description of Expense
    Acct 1000 'COGS'
    Thank you.

    Hi,
    Yes this is possible by dynamic user assignment.
    Define an output parameter for CO1 and CO2 and an input parameter for the CO under action F of type string. In design time select the processor of action F as "Filled from Context Parameter" in the Roles tab and select the input parameter you have defined as mentioned in the previous step. Now group the output parameter of the CO1 and CO2 and the input parameter of action F together.
    Now at runtime fill the context parameter from CO1 and CO2 with the actual user name. The action F will get automatically assigned to that user.
    Thanks,
    Dipankar

  • Getting Value Based on Descending value of the count

    Hi,
    I have values in the list as below
    Title,Count
    title1,3
    title2,5
    title3,4
    Now i need to fetch the title column value based on descending order of the count column value.
    But writing spquery as below but not getting the exact value
    "<OrderBy><FieldRef Name='Count' Ascending='FALSE' /></OrderBy>";
    Please let me know if i am making any mistake here.
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

    Hi,
    In addition to Hemendra, there is OOB option to order items in descending order per one column value.
    You could create a view for this list, and configure in Sort section.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Getting Array value based on another value

    Hi
    Im pretty new to Powershell, havnt tried to code in almost 15 years so Im a Little rusty to say the least. Im trying to make a script where I import a csv file into an array and then use foreach on one value to output another value. An example of the csv
    file could be the following.
    Client,Email,EmailAddresse
    Company1,No,[email protected]
    Company2,Yes,[email protected]
    Company3,Yes,[email protected]
    I have tried the code below to import the csv file into an array and then output the email address where email was set to "Yes"
    $clientlist = Import-Csv E:\Script\Clients.csv
    foreach ($client in $clientlist | where {$_.Email -eq "Yes"})
         Write-host $clientlist.emailaddresse
     When I execute the code I get the following output:
    [email protected] [email protected] [email protected]
    [email protected] [email protected] [email protected]
    What I would like to get is just the one email address in each line, matching the email address from the csv where the value "email" was set to "Yes". What am I doing wrong?
    Thank in advance
    Anders Lausen

    You could just filter using Where-Object without the need for the ForEach.
    Import-Csv E:\Script\Clients.csv | Where {
    $_.Email -eq 'Yes'
    } | Select EmailAddress
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • SSRS report with tabular model - MDX query to filter parameter data based on Tuple value.

    Hello Everyone,
    I am working on SSRS report in which a tabular model is being used as a backend.
    I want to filter the report parameters which are dependent to other parameters. Like, country, state, and cities drop downs.
    All are multi-select parameters. I am using MDX queries to filter the parameters data.
    Based on selected one or more countries, the data of states needs to be filtered.
    The point is the text which is being displayed in state dropdown for each state name is combination of 3 different members.
    So, I created the following Tuple for the same and can see the expected display names in states dropdown.
    "("+
    [Location].[Code 1].CURRENTMEMBER.UNIQUENAME +","+
    [Location].[Code 2].CURRENTMEMBER.UNIQUENAME +","+
    [Location].[Descr].CURRENTMEMBER.UNIQUENAME +")"
    Now, when I would like filter the cities data based on selected one or more states, I am unable to pass the multiple Tuples (more than one selected Tuples) as parameter for cities dropdown.
    The following is my query for City parameter. It is working well when I select only one State from the dropdown.
    However, when I select multiple states, it is unable to convert the Tuple into SET in ELSE part of IIF condition specified in following query.
    Can anybody help me how to resolve the error that I am getting about STRTOSET function?
    Or
    Are there any other alternatives to achieve this requirement?
    Any help would be much appreciated.
    Query:
    WITH MEMBER [Measures].[ParameterCaption] AS [City].[City Business].CURRENTMEMBER.MEMBER_CAPTION
    MEMBER [Measures].[ParameterValue] AS [City].[City Business].CURRENTMEMBER.UNIQUENAME
    MEMBER [Measures].[ParameterLevel] AS [City].[City Business].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS ,
    [City].[City Business].Children ON ROWS
    FROM (
    SELECT ( STRTOSET(@State, CONSTRAINED) ) ON COLUMNS FROM [Model])
    WHERE ( IIF( STRTOSET(@State).Count= 1,
    STRTOTUPLE(@State, CONSTRAINED),
    STRTOSET("{
    ("+
    [Location].[Code 1].CURRENTMEMBER.UNIQUENAME +","+
    [Location].[Code 2].CURRENTMEMBER.UNIQUENAME +","+
    [Location].[Descr].CURRENTMEMBER.UNIQUENAME
    + ")
    }",CONSTRAINED )) ) CELL PROPERTIES VALUE
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hi,
    I used following dynamic query in expression of dataset of parameter and it works like a charm.
    "WITH MEMBER [Measures].[ParameterCaption] AS [City].[City Business].CURRENTMEMBER.MEMBER_CAPTION "&
    "MEMBER [Measures].[ParameterValue] AS [City].[City Business].CURRENTMEMBER.UNIQUENAME "&
    "MEMBER [Measures].[ParameterLevel] AS [City].[City Business].CURRENTMEMBER.LEVEL.ORDINAL "&
    "SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , " &
    "[City].[City Business].Children ON ROWS " &
    " FROM [Model] WHERE ({"& join(Parameters!Location.Value,",") &"}) CELL PROPERTIES VALUE"
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

  • How to populate table of values based on selected value of dropdown list

    Hi
    I have an urgent requirement.
    Whenever I select a value in Dropdownlist, Based on the selected value I need to display serveral values in tabular form.
    I have created a dynamic LOV and created the actionListener
    I have created a table by dragging the ViewObject and i have set the partialTrigger attribute value to the LOV Id.
    Now My doubt is What should I return in the actionListener method
    Thanks

    Hi,
    So get the value what i tried is ,bind the list item of the select one choice ,
    and then i used the method something like this
    UISelectItems see=getSelectItems1();
    System.out.println("Selected Value"+ see.getValue());
    but it returns me something like this
    Selected Value[javax.faces.model.SelectItem@b20090, javax.faces.model.SelectItem@431753]
    Don't know what are those ,hoe can i get the display value.Please help.
    Thanks

  • Filter looking for values based on other values

    Hi, is it possible to create a filter that returns items from the cache based on some criteria of other items in the cache.
    E.g. suppose I have a cache containing cars. I would like to create a filter that filters out all blue cars, but only if the cache also contains a red car.
    Best regards
    Jan

    Hi Jan,
    it is doable in a single pass in an aggregation, but it will not be too efficient for cases where no red cars exist.
    The problem is that in case of a partitioned cache, it is possible that there is a single red car in the cache on a separate node from the blue cars. In this case the blue cars should be returned. However it is also possible that there is no red car in the cache.
    In this example the nodes with the blue cars from the previous example won't be able to distinguish the two cases from one another based on only their own data. Therefore they have to return the blue cars, and let the client throw away all data based on whether the existence of a red car was indicated.
    If red cars are an unlikely event, it is better to first query (or aggregate for minimum traffic) for the existence of the red car, and only if it exists, then query for blue cars.
    If red cars are a probable event and having as few roundtrips to the cache as possible is more important then efficiency, then it is probably better to just (in parallel) aggregate the blue cars and indicate whether a red car exists on that node or not.
    For aggregations and particularly for parallel-aware aggregations, you can look at the following page:
    http://wiki.tangosol.com/display/COH34UG/Provide+a+Data+Grid#ProvideaDataGrid-DataGridAggregation
    Best regards,
    Robert

  • Populate a another value based on input value using abap webdynpro

    Dear All,
    I am new to WDA.I have a requirement to calculate priciple amount based on the user requested amount.Here requested amount is input field and principle amount is defined as text view.
    Now let's say user entered requested amount as 12000,dynamically priciple amount has to be generated by calculating requiredamount/120(number of months).Pls help!
    Thanks,
    Reddy.

    Thanks ,I am able to do it before watching u r answer.I searched in forum and I was able to it.
    Now i have one more question.Now I want to retrict the user not to enter any amount beyong eligible amount.Eligible amount is the field which I am getting from database table and displaying in a text view and the eligible amount is different for different users.I know this validation also has to be handled in ONENTER event.But I am not sure how to show the alert?
    I have to code in ONENTER event handler like
    if lv_requiredamount>lv_eligibleamount
    what need to be done to show some alert are popup.
    Please help.
    Thanks,
    Reddy.

  • How to filter values based on prompt values

    Hi Gurus,
    Good Afternoon to all.After long i came back with new requirement.............Its very highly important.
    I have one report in dashboard..............which is having employee head count based months.when user wants to click any month in prompt..the report should display upto previous month data..............
    example..............
    when user click september/2011.........the report should display data upto august/2011
    when user click october/2011.............the report should diaplay data upto september/2011
    could any one please give solution to resolve this issue............
    Thanks & Ragards,
    Naveen kumar

    Have a interim report having the month,previous month(calculated using case statements or addmonths function) .Make this report prompted to month. Then in your dashboard report select the month filter as 'filter based on report' and then select the calculated column of the interim report.

  • Problem in the code to update a column value based on the value of a column

    Merge into item_TMP S using items I on (S.ITL_ITEM= I.ITEM_ITEM)
    when matched then
    update set
    S.ITL_UOM = I.ITEM_UOM;
    when not matched then null;

    Try
    update Item_TMP set ITL_UOM = (select ITEM_UOM from ITEMS
                                                     where Item_TMP_TMP.ITL_ITEM = ITEMS.ITEM_ITEM
                                                      and items.ITEM_UOM is not null )
    where ITL_ITEM in   (select  ITEMS.ITEM_ITEM from ITEMS
                                                     where items.ITEM_UOM is not null )
    /Cheers, APC
    blog: http://radiofreetooting.blogspot.com

Maybe you are looking for

  • Best way for LV app to communicate with Database/Website?

    Hey all...I'm pretty experienced LabVIEW programmer but I'm in somewhat new territory here with communicating with a server/website. We are going to have an online SQL database that stores all data that we record for our application.  That database i

  • How do I create a TASK ICON ???

    Hi, I would like to put my application in the WINDOWS TASK BAR. Those nice little icons that appear beside the clock. I believe this solution will kill the portability of my code, but I am willing to pay that price. Thanks, Sergio

  • Preview Help

    Hello everyone! I would like to know if anyone knows how to fix this problem. I have multiple PDF's in a folder and I just want one PDF to open, but it seems that preview like to open all PDF's. As I recall Preview in Snow Leopard never did this. If

  • Will Adobe support CS4 under OS X 10.6 Snow Leopard?

    Is Adobe expected to support CS4 under OS X 10.6 Snow Leopard?

  • Changing the color of a JButton when it is pressed

    Hey all, What I want to do probably is fairly simple, but I just can't seem to get the job done. I want to create JButtons which have a specific color (let's say Color.blue), which is dark blue when it is not pressed and becomes lighter blue when it