Conditional count

Hi everyone,
I'm new in using Hyperion. I'm working with financiail reporting and need to write a forumla that counts me the number of elements in the column A, that are greater than a predefined average - that I have computed into a cell of column B, trough the formula AverageA(row[5:54]) -
How caould I procede? does it exist a conditional "count" command that does find how many cells are greater than a value?
thank you very much for the help,
em.

____________column A ______Column B
_____________Account
Row 1 _______100
Row 2 _______200
Row 3 _______400
Row 4 ______Avg([1:3])
I need a syntax formula that returns me the number of cells (between column A, rows [1 to 3] ) that have a number above the average (computed trough the formula in row 4, column A).
How do I do this? the count command only gives me the number of cells that lies on a predefined range.
Thank you for the help,
Eleonora.

Similar Messages

  • How to change pricing Conditions in Sales order in change sales order bapi

    Hi Experts,
    How to change pricing Conditions in Sales order in change sales order bapi.
    I have used the 2 function modules bapi-changesalesorder and sd salesdocument change, But it is creating the new record , instead of changing the existing one, Could please assist regarding the same
    Thanks in Advance .
    NLN

    HI NLN
      I have just tried on my system and managed to overwrite the existing price by passing the following parameters.
      <b>Import Paramters:</b>
         SALESDOCUMENT - Sales Document Number
         ORDER_HEADER_INX - UPDATEFLAG as <b>'U'</b>.
         LOGIC_SWITCH - Import Structure - Pass 'X' to LOGIC_SWITCH-COND_HANDL.
      <b>Tables:</b>
         CONDITIONS_IN - ITM_NUMBER,
                         COND_COUNT, -> Condition counter same as KONV-ZAEHK generally it is <b>'01'</b>
                         COND_TYPE,
                         COND_VALUE,
                         CURRENCY.
         CONDITIONS_INX - ITM_NUMBER,
                          COND_COUNT,
                          COND_TYPE,
                          UPDATEFLAG as <b>'U'</b>,
                          CURRENCY.
       Hope i have clarified your query.
    Kind Regards
    Eswar

  • How to fix the sequence of conditions in PO?

    Hi,
    I am using calculation schema RM0000, whose part of the condition sequence is like below:
    Step     Counter      Condition Type
    10     1     RB00
    10     2     RC00
    10     3     RA00
    10     4     RA01
    10     5     HB00
    10     6     ZB00
    10     7     ZC00
    10     8     ZA00
    10     9     ZA01
    10     10     HB01
    In my case I have to use ZA01,RA00,ZA00 in my PO. As per the schema above, the sequence should always be RA00 -> ZA00 -> ZA01. But in fact, the sequence is based on the when I enterred the condition.
    For example, if I enter ZA01 before RA00, then in PO the sequence is ZA01 -> RA00; if I delete ZA01 and enter ZA01 again, the sequence change to RA00 -> ZA01...
    How can I fix the sequence of conditions in PO? Is there anything I forgot to configure?
    BTW, it seems that header condtions always lie after item conditions in item condition tab. Is it the standard logic of SAP?
    Thanks!
    Wesley

    Hello,
    The sequence of condition types cannot be changed dynamically, it will be picked from what maintained in the pricing procedure in M/08.
    The fields, Step - Counter , decides the sequence of the condition types.
    Condition counter is Access number of the conditions within a step in the pricing procedure.
    Use
    During automatic pricing, the system takes into account the sequence specified by the counter.
    Regards
    Gregory Mathews

  • Report Builder Count Column

    How can I build a count column with a where clause based on a query defined in the report builder query screen? From what I can tell the built in count column does not allow the addition or definition of a where clause.
    Thanks

    Hi Ruth,
    Not exactly sure if this will answer your question, but here goes. It sounds like you want to count values based on certain conditions? If the where clause is already in your query, you can use the count function that's available in SQL and allow the database to perform the count for you. Otherwise you can use a formula column in combination with a placeholder column or a summary column to get the conditional count. In the formula column you can use plsql to determine if you want to increment your count or not. Depending on how you do it, you can either just return '1' or '0' from your formula column and create a summary column based on your formula column. Or you can increment a placeholder column from your formula column. If you decide to go with placeholders, I'd suggest reading the online help examples for placeholders as there are a few rules you'll have to go by.
    Hope that helps,
    Toby

  • Finding PreDefined Conditions from DesKI Reports using VB BO SDK

    Hi,
    I need to collect all objects and conditions used in DesKI Report files (.rep) and document them in a excel sheet. I am able to retrieve the Object information but I am facing promblem when i try to fetch the Predefined condtions used in the report.
    I am using the below code to find the count of conditions available in a particular report.
    dp_CurrentDP.Queries.Item(1).Conditions.Count 
    It gives me this error, "cannot read queries from dataproviders". I am not able to find the cause of the problem, I am just trying with a very simple report and I can get all details from it including the SQL used (i.e, CurrentDP.SQL).. but CurrentDP.Queries.count is giving me the above error. I have put a seperate topic on this to check if anyone faced similar problem. Please guide me if you have any suggestions. Thanks

    Post Author: HaHo
    CA Forum: Other
    hi ted.
    sorry, took me a while to answer... well, you were absolute right. i made the following failure:
    ...For Each qry In dp.Queries   For Each con In qry.Conditions       For op = 1 To con.OperandCount         ' write condition to db      Next   NextNext...
    well, a predefined condition simply has no operand.. :(stupid, in deed...better this way:
    ...For Each qry In dp.Queries   For Each con In qry.Conditions       If (con.OperandCount = 0) Then         ' write predefined condition to db      End If      For op = 1 To con.OperandCount         ' write condition to db      Next   NextNext...
    thx a lot for your help, you showed me the way ;)harald.

  • Regarding adding new pricing condition using BAPI_SALESORDER_CHANGE

    Hi All,
    I am trying to add a new pricing condition at item level using Bapi_salesorder_change, but it is not getting updated. I am also doing Bapi_transaction_commit as the next step.
    I am passing the sales order number and the Update flag in the header. Tried passing G as the logic switch-pricing and also tried with logic_switch-COND_HANDL = X.
    I am passing the data in structure CONDITIONS_IN with the value for item numebr, condition step number, condition count , condition value, currency and unit.
    Also I am passing data in CONDITIONS_INX with the required flags set and update flag as 'I'.
    The output says that order is changed and saved successfully, but the condition type is not there when i check the pricing coinditions inside the order at item level.Please help.
    Regards,
    Kaustubh B. Khasnis

    Hi,
    In the condition tab..
    Press the determination analysis button..
    There it will show the why the pricing condition type is not added..
    Thanks,
    Naren

  • Keeping the Count in detail section

    Post Author: Swapna
    CA Forum: Formula
    Hi Iam new to the crystal reports and  here are my issue's
    In my database i have 336 records and i want to keep this count in my details section and when i did the following thing its priting my count for 336 times in my details section which i do not want that i want to print the count of total records in the detail section for only once.
    Under the formula fields i have written something like this
    Count({Command.TRACKNUM}); This is working fine but only problem is its printing for 336 times
    Second question is In My database i will be having records with different statuses like completed,prepared,incompleted so i also want to count the records with the diffrent statuses and print them in the detail section
    My report should be like this
                 Total Samples            Comppleted Samples         InCompleted Samples          Prepared Samples     ///Will be in the page header section
                               336                               300                            18                                        18              //Was suppose to be in the detail section
    to have a conditional count i have written some this like this in the formula field
    ({Command.status}="Prepared"
    Count({Command.TRACKNUM});  Which does not worked
    I Appreciate your help and Thanks in Advance.

    Post Author: yangster
    CA Forum: Formula
    I think you are confused about the details.  If you put that formula in the detail section it will obviously be repeated for every single row.if what you want is a page header with the details that's fine but your summary should go into a group header/footer or the report footer.You've already got the total record count which is fine.if you want a quick and simple way to evaluate completed, incomplete, prepared samples simply create 3 simple formulas and place them in the details section (you can suppress them if you wish not to view them)@completedif status = "prepared" then 1 else 0@incompleteif statues = "incomplete" then 1 else 0@pepared_sampleif status = "prepared" then 1 else 0simply insert summary's for each of the above formulas and you will have your desired results

  • Condition Configure

    Hi All
    I want to configure with 5 kind of Vendor:
    1 - Oversea Vendor have 4 type of cost: material cost,VAT tax cost (VAT tax cost =10% {Material Cost + Import Cost}), import cost (import cost= 20% Material Cost) and freight cost.
    2 - Oversea Vendor have 4 type of cost: material cost,VAT tax cost (VAT tax cost =5% Material Cost), import cost (import cost= 50% Material Cost) and freight cost.
    3 - Oversea Vendor have 4 type of cost: material cost,VAT tax cost (VAT tax cost =10% Material Cost), import cost and freight cost determination later.
    4 - Domestic Vendor1 have 3 type of cost: Material Cost, VAT cost and Freight cost.
    5 - Domestic Vendor2 have 2 type of cost: Material Cost, VAT cost.
    Could you please tell me step by step configure in the SAP system.
    Thank and Best regards

    Hi,
    The pricing procedure consists of
    1.Access sequence.
    2.Creation of condition type
    3.Creation of trnsaction event kyes
    4.Dfining the pricing [procedre
    5.Defing schem,a groupos.
    For define all  are available in SPRo>>MM>>Purchasing>>purchase order >>Conditions>>Define pricedetermination process.
    1.First define the acceess sequence, by assigning some std tables which contains the material data.
    2.Create condition types  ,
      these are compulsory :Cond. Class                  A Discount or surcharge
                                                 Calculat.type       C  Quantity
                                                 Cond.category     Select Tax/Fright/Gross price
                                                 and take either Header or Item conditions.
    3.Defing Transaction keys
    4.Crete and assgn G/L accounts to the transaction keys , so at the time of posting the system determines to certain G/L accounts only.
    5.Define pricing procedure
       16 steps in pricing procedure
       Importnat are
    1.Step number
    Number that determines the sequence of the conditions within a procedure.
    2.Condition counter
    Access number of the conditions within a step in the pricing procedure
    3.Condition Type
    The condition type is used for different functions. In pricing, for example, the condition type lets you differentiate between different kinds of discount; in output determination, between different output types such as order confirmation or delivery note; in batch determination, between different strategy types.
    4.From Ref. Step for Percentage Conditions
    Condition step, the value of which is the basis for percentage surcharges.
    If you specify a to reference step at the same time, the condition values of the two steps specified and the conditions values of the steps in between are totalled. In this case, percentage surcharges are calculated on the basis of the total
    5.To reference step (for percentages)
    Condition step up to which the condition values of the previous steps are totalled. Percentage surcharges are calculated on the basis of the total.
    If you specify a from reference step at the same time, the condition values of the two steps specified and the condition values of the steps in between are totalled.
    6.Here check boxes , you can give as per requirement  ie the conditio type mandatory or not ,Statistical value.
    6.Define schema group
    7.Assign scheme group to pricing procedure
    8.Enter schema group in Vendor master purchasing data.
    9.Crete purchse order and check calculation is correct or not.
    10.Post GR , tha material adding and tax amount is correct or not.
    11.Post MIRO
    Regards,
    Andra.

  • Simple GUI playing mp3 files

    Hi everyone , i am building a simple GUI playing mp3 files in a certain directory.
    A bug or something wrong with the codes listed down here is very confusing me and makes me desperate. Can anyone help me please ?
    import javax.swing.*;
    import javax.media.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    class PlayMP3Thread
    extends Thread
    private URL url;
    String[] filenames ;
    File[] files ;
    boolean condition=true;
    boolean pause=false;
    int count ;
    public PlayMP3Thread() { }
    public PlayMP3Thread(File[] files)
    //try
              this.files = files;
         filenames = new String[files.length];
         count = -1;
         // this.url = mp3.toURL();
         //catch ( MalformedURLException me )
    public void run()
    try
         while (condition)
              count++;
              if (count > (filenames.length - 1)) {
                        count = 0;
              this.url = files[count].toURL();
    MediaLocator ml = new MediaLocator(url);
    final Player player = Manager.createPlayer(ml);
    /*player.addControllerListener(
    new ControllerListener()
    public void controllerUpdate(ControllerEvent event)
    if (event instanceof EndOfMediaEvent)
    player.stop();
    player.close();
    player.realize();
    player.start();
    catch (Exception e)
    e.printStackTrace();
    public void stops()
    //stop the thread
    condition=false;
    pause=false;
    public void pause()
    while(!pause)
    //pause the thread
    try
    wait();
    catch(Exception ex){}
    pause=true;
    public void resumes()
    while(pause)
    notify();
    pause=false;
    } // end of class MP3Thread
    public class mp3Play extends JFrame {
    JTextField direcText ;
    JFileChooser fc;
    static final String
    TITLE="MP3 PLAYER",
    DIRECTORY="Directory : ",
    BROWSE="Browse...",
    START="Start up",
    STOP="Stop",
    PAUSE="Pause",
    RESUME="Resume",
    EXIT="Exit";
    public static void main(String args[])
         PlayMP3Thread play = new PlayMP3Thread();
         mp3Play pl = new mp3Play();
    } // End of main()
    public mp3Play() {
    setTitle(TITLE);
         Container back = getContentPane();
         back.setLayout(new GridLayout(0,1));
         back.add(new JLabel(new ImageIcon("images/hello.gif")));
         fc = new JFileChooser();
         fc.setFileSelectionMode(fc.DIRECTORIES_ONLY);
         JPanel p1 = new JPanel();
         p1.add(new JLabel(DIRECTORY, new ImageIcon("images/directory.gif"), JLabel.CENTER));
    p1.add(direcText = new JTextField(20));
         JButton browseButton = new JButton(BROWSE, new ImageIcon("images/browse.gif"));
         browseButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    int returnVal = fc.showOpenDialog(mp3Play.this);
    if (returnVal == JFileChooser.APPROVE_OPTION) {
              direcText.setText(fc.getSelectedFile().toString());
              File[] files = (new File(direcText.getText())).listFiles(this);
         p1.add(browseButton);
         back.add(p1);
         JPanel p2 = new JPanel();
              JPanel butPanel = new JPanel();
              butPanel.setBorder(BorderFactory.createLineBorder(Color.black));
              JButton startButton = new JButton(START, new ImageIcon("images/start.gif"));
              startButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
                        PlayMP3Thread play = new PlayMP3Thread(files);
                        play.start();
         butPanel.add(startButton);
         p2.add(butPanel);
         JButton stopButton = new JButton(STOP, new ImageIcon("images/stop.gif"));
         stopButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
              play.stops();
         p2.add(stopButton);
         JButton pauseButton = new JButton(PAUSE, new ImageIcon("images/pause.gif"));
         pauseButton.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
              play.pause();
         p2.add(pausetButton);
         JButton resumeButton = new JButton(RESUME, new ImageIcon("images/resume.gif"));
              resumeButton.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
                   play.resumes();
         p2.add(resumeButton);
         back.add(p2);
    JButton exitButton = new JButton(EXIT, new ImageIcon("images/exit.gif"));
              exitButton.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
                   System.exit(0);
              p2.add(exitButton);
              back.add(p2);
              addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
         System.exit(0);
              pack();
         setVisible(true);
    }

    Actually I don't know much about fixing technical error or logical error.
    When it compiled , there are 6 errors showed up :
    can't resolve symbol : method listFiles (<anonymous java.awt.event.ActionListener>)
    location: class java.io.File
              File[] files = (new File(direcText.getText())).listFiles(this);
    can't resolve symbol: variable files
                        PlayMP3Thread play = new PlayMP3Thread(files);
    can't resolve symbol: variable play
              play.stops();
    can't resolve symbol: variable play
              play.pause();
    ^
    can't resolve symbol : variable pausetButton
    location: class mp3Play
         p2.add(pausetButton);
    ^
    can't resolve symbol: variable play
                   play.resumes();
    Any suggestions ?

  • Non-static method rff() cannot be referenced from a static context

    I get the above error when compiling my program, can anybody see what the problem is and how to fix it? its at the readstr = rff(); part after the if (i==2)
    import java.io.*;
    import java.util.Vector;
    public class PropertyRental
        public static Vector v = new Vector();
        public static String menu;
        public static String pc, hn, mr, ua, readstr;
        public static int i, ln;
        public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        public String rff()
            String line="";
            String data="";
            try
            BufferedReader br = new BufferedReader(new FileReader("properties.txt"));
            line = br.readLine();
                do// EOF condition
                System.out.println(line);
                data = data + " \n" + line;
                //line = br.readLine();
            while( (line=br.readLine()) != null);
            catch(IOException ioe)
            return data;   
        public static void main()
            try
                do
                System.out.println("Welcome to your local Property Rental Company");
                System.out.println("You now have the following options");
                System.out.println("");
                System.out.println("1. Add a Property");
                System.out.println("2. Remove a Property");
                System.out.println("3. Display all Properties");
                System.out.println("4. Exit the Program");
                System.out.println("");
                i = Double.valueOf(br.readLine()).intValue();
                System.out.println("");
                if(i == 1)
                    //BufferedWriter appends to properties.txt
                    //Our user input buffer
                    BufferedReader user = new BufferedReader(new InputStreamReader(System.in));
                    System.out.println("--- Add a Property ---");
                        //User enters address
                        System.out.println("\nEnter postcode (Must be less than 16 characters)");
                        pc = user.readLine();
                        //If the user has entered 'q' to quit, leave this loop
                        System.out.println("Enter house number");
                        hn = user.readLine();
                        System.out.println("Enter monthly rent");
                        mr = user.readLine();
                        //Write our details to file
                        v.addElement(new PropertyToLet(pc, hn, mr));
                        PrintWriter outFile;
                        try
                            outFile = new PrintWriter(new FileWriter("properties.txt" ,true));
                            PropertyToLet obj = (PropertyToLet) (v.lastElement());
                            outFile.println(obj.getpc() + "," + obj.gethn() + "," + obj.getmr());     
                            outFile.close();
                        catch(IOException IOE)
                            System.err.println(IOE + "Has occured");
                if(i == 2)
                   try
                       readstr = rff();
                       String[] splitArray = null;
                       splitArray = readstr.split(",");
                       for(int i=0;i<splitArray.length;i++)
                           if (v.size()<splitArray.length)
                                v.addElement(new PropertyToLet(splitArray[0], splitArray[1], splitArray[2]))  ; 
                       System.out.println("\nEnter the line number of the property you wish to remove");
                       int ln = Double.valueOf(br.readLine()).intValue();
                       v.removeElementAt(ln-1);                  
                       PrintWriter outFile = new PrintWriter(new FileWriter("properties.txt"));
                       for (int i=0; i<v.size(); i++)
                            PropertyToLet obj = (PropertyToLet) (v.lastElement());
                            outFile.println(obj.getpc() + "," + obj.gethn() + "," + obj.getmr());     
                       outFile.close();
                    catch(Exception ex)
                        ex.printStackTrace();
                if(i == 3)
                      String line="";
                      String data="";
                      try
                          BufferedReader br = new BufferedReader(new FileReader("properties.txt"));
                          line = br.readLine();                     
                          int counter=0;
                          do// EOF condition
                              counter++;
                              System.out.println(counter + ": " + line);
                              data = data + " \n" + line;
                              //line = br.readLine();                                 
                          while( (line=br.readLine()) != null);
                          catch(IOException ioe)
                if(i == 4)
                    //A simple instruction that tells the user how to exit the program
                    System.out.println("Press the 'x' button in the corner of the window to quit");
                System.out.println("Do you want to exit [y/n]");
                ua = br.readLine();
                }while(ua.equals ("n"));
            catch(IOException ioe)
    }Edited by: Atomika3000 on Apr 23, 2009 4:09 AM

    You must add modifier method to be static because you access the method from the main method which is a static method
    public static String rff(){
    // code
    }     I hope it helps you, good luck.

  • About the filter function in OBIEE 11g

    Hi, all.
    when i use the filter function in OBIEE 11g, it turn out a wrong result.
    The operation steps and detail are described as follow:
    1. In the Column Formula pane, I typed the Formula of the column 'count of customer' as:
    FILTER(count(distinct("customer info dimesion"."customerID")) USING ("TradeType Dimesion"."TradeType" = '001'))
    2. But the phisical SQL about this column in the NQquery file is that: "count(distinct(T11520.CUSTOMERID)) as c5, "
    which means that, the filter wasn't applied, right?
    If so, what shall I do in this situation, in other words , how can i make a Condition COUNT?
    Any Suggestion is appreciated!
    Thank you in advance~~O(∩_∩)O~

    Hi katherine,
    FILTER(count(distinct("customer info dimesion"."customerID")) USING ("TradeType Dimesion"."TradeType" = '001'))I think your formula there is mistake like many braces...instead type this in your f(x)
    =>Filter(count(distinct customer_id) USING trade type='001')
    This filter function is same like a case statement,if you filter still gives error write a case statement
    CASE WHEN TradeType Dimesion.TradeType='001' THEN count(distinct customer info dimesion.customerID) ELSE 0 END
    Will it be helpful?,follow this etiquette http://forums.oracle.com/forums/ann.jspa?annID=939
    By,
    KK

  • 0SD_O05 Multicube Issue

    Dear Guru's,
    I have a reporting requirement where i have to dispay the following data:
    Customer                                                 (0SD_C03 / 0SD_O05)  No Issue
    Sales District                                            (0SD_C03)                   Only Key Appearing but no text Appearing*
    Sales Region                                           (0SD_C03 / 0SD_O05)  No Issue
    Material                                                    (0SD_C03 / 0SD_O05)  No Issue
    Delivery Date                                            (0SD_C03)                    No Issue
    Sales Document Number                         (0SD_C03 / 0SD_O05)  No Issue
    Sales Document Item                               (0SD_C03 / 0SD_O05)  No Issue
    Sales Document type                               (0SD_C03)                     No Issue
    Order quantity                                           (0SD_C03)                     No issue
    Confirmed Quantity                                   (0SD_C03)                     No Issue
    Warehouse                                                (0SD_C03)                     No Issue
    Net value in Statistical currency                (0SD_C03)                     No Issue
    Gross Value (Condition Type ZGRO)        (0SD_O05)                    No Issue
    Discount (Condition Type ZDIS)                (0SD_O05)                    No Issue
    This is basically a report to display sales documents based on delivery date. To make this report i have designed a multi cube based on the common fields of both these infoproviders. But when i run the report, the area of 0SD_O05 shows no data or incomplete date.
    How would you recommend i design this report? If any other infoproviders can be more efficient i would like to know which ones.
    Regards,
    Shaz

    Dear gurus,
    I have made few changes and instead of making a Multi-Provider i have made a DSO with the following details:
    Field in KPI                                      CUBE DSO     Datasource                             Technical name
    Material                                      0SD_O05     2LIS_11_VAKON        MATNR
    Material                                      0SD_C03     2LIS_11_VAITM        MATNR
    Material                                      0SD_C04     2LIS_12_VCSCL        MATNR
    Shipment Date / Delivery Date      0SD_C03     2LIS_12_VCSCL        WADAT_IST
    Sales Document Type                0SD_O05     2LIS_11_VAKON        AUART
    Sales Document Type                0SD_C03     2LIS_11_VAITM        AUART
    Sales Document No                0SD_O05     2LIS_11_VAKON        VBELN
    Sales Document No                0SD_C03     2LIS_11_VAITM        VBELN
    Sales Document No                0SD_C04     2LIS_12_VCSCL        VBELN_VA
    Item                                      0SD_O05     2LIS_11_VAKON        POSNR
    Item                                      0SD_C03     2LIS_11_VAITM        POSNR
    Item                                      0SD_C04     2LIS_12_VCSCL        POSNR_VA
    Order Quantity                 0SD_O05     2LIS_11_VAKON        KWMENG
    Order Quantity                 0SD_C03     2LIS_11_VAITM        KWMENG
    Confirmed Quantity                 0SD_C03     2LIS_11_VAITM        KBMENG
    Variance in Quantity                 N/A                           N/A                              N/A
    Unit of Measure                 0SD_O05     2LIS_11_VAKON        VRKME
    Unit of Measure                 0SD_C03     2LIS_11_VAITM        VRKME
    Customer / Sold to Party                 0SD_O05     2LIS_11_VAKON        KUNNR
    Customer / Sold to Party                 0SD_C03     2LIS_11_VAITM        KUNNR
    Warehouse                                       0SD_C04     2LIS_12_VCSCL        LGNUM
    Sales District                                       0SD_O05     2LIS_11_VAKON        BZIRK
    Sales District                                       0SD_C03     2LIS_11_VAITM        BZIRK
    Sales Region                     0SD_O05     2LIS_11_VAKON        Customer master
    Sales Region                   0SD_C03     2LIS_11_VAITM        Customer Master
    Net Value                                        0SD_C03     2LIS_11_VAITM        NETWR
    Gross value                                        N/A                           N/A                              N/A
    Trade Discount                   N/A                 N/A                              N/A
    Condition Type                  0SD_O05     2LIS_11_VAKON        KSCHL
    Condition Value                  0SD_O05     2LIS_11_VAKON        KWERT
    Based on these fields i have made a DSO with Sales order and item as key fields. Since the data is being updated on the base of sales document and item the field condition type is not getting updated correctly as 1 order has 7-8 condition types. If i put another field called condition counter and put the fields condition type as key then the issue could be solved by since condition type is not part of 2 Datasources they wont be updated correctly. kindly help.
    Regards,
    Shahzad

  • Please check my code where i am wrong ,-very urgent please

    Hi ,
    i am getting all values execpt the values from table t685  , kolnr and kotabnr and i am using three selects and moving the values in it_output_report.
    this is very urgent
    REPORT zmaster_condition LINE-COUNT 80 LINE-SIZE  225.
         D A T A                                                         *
    INCLUDE zmaster_condition_top.
        S E L E C T I O N S                                              *
    SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
    SELECT-OPTIONS: s_kvewe FOR  t683s-kvewe,
                    s_kappl  FOR  t683s-kappl,
                    s_kalsm  FOR  t683s-kalsm,
                    s_kschl  FOR   t683s-kschl,
                    s_kabnr  FOR  t682i-kotabnr.
    SELECTION-SCREEN END OF BLOCK b01.
    *SELECTION-SCREEN BEGIN OF BLOCK b4 WITH FRAME TITLE text-s04.
    *PARAMETERS:      p_vari     LIKE   disvariant-variant.
    *SELECTION-SCREEN END OF BLOCK b4.
    **SELECTION-SCREEN BEGIN OF BLOCK b02 WITH FRAME TITLE text-b02.
    *SELECTION-SCREEN BEGIN OF BLOCK b02 WITH FRAME TITLE text-b02.
    PARAMETERS R1 RADIOBUTTON GROUP RADI1 DEFAULT 'X'.
    *SELECTION-SCREEN END OF BLOCK b02.
         A T   S E L E C T I O N - S C R E E N                           *
         M A I N   P R O G R A M                                         *
    START-OF-SELECTION.
    *Initializing the local tables.
      CLEAR:it_t682i,it_t683s,it_t685,it_output_report.
      REFRESH:it_t682i,it_t683s,it_t685,it_output_report.
    *Selection of data from pricing procedure tables using a join.
    *SELECT  Akvewe Akappl Akalsm Astunr A~zaehk
           Akschl  Bkolnr Bkotabnr Ckozgf
    INTO  TABLE it_output_report
    FROM  t683s as A
    JOIN  t682i  as B
    ON Akvewe eq  Bkvewe and
        Akappl  eq  Bkappl
    JOIN t685 as C
    ON Bkvewe  eq Ckvewe and
        Bkappl  eq Ckappl and
        Bkozgf  eq  Ckozgf
    WHERE  A~KVEWE = 'B' and
            A~KAPPL  = 'V1' .
            A~KALSM  IN S_KALSM  and
            A~KSCHL  IN S_KSCHL   and
            B~KOTABNR IN S_KABNR.
    *Selection of data from pricing procedure tables
    *SELECT  * FROM t683s APPENDING  CORRESPONDING FIELDS OF TABLE  it_t683s
                   WHERE kvewe = 'B'
                   and   kappl = 'V1'.
    SELECT kvewe kappl kozgf kolnr kotabnr FROM t682i
               INTO TABLE  it_t682i
               WHERE kvewe = 'B'
               AND  kappl = 'V1'.
      SELECT kvewe kappl kalsm stunr zaehk kschl  FROM t683s
           INTO   TABLE  it_t683s
           WHERE  kvewe = 'B'
           AND    kappl = 'V1'
           AND    kalsm  IN s_kalsm.
    *SELECT kvewe kappl kschl kozgf  FROM t685
            INTO TABLE it_t685
            WHERE  kvewe = 'B'
            AND    kappl = 'V1'
             and   KSCHL in S_KSCHL
              AND   KOZGF in s_kabnr.
    SELECT kvewe kappl kschl kozgf  FROM t685
             INTO TABLE it_t685
             WHERE  kvewe = 'B'
             AND    kappl = 'V1'
              and   KSCHL in S_KSCHL
               AND   KOZGF in s_kabnr.
    *clear it_t685.
    *loop at it_t685.
             it_output_report-kschl =  it_t685-kschl.
             it_output_report-kozgf =  it_t685-kozgf.
    it_output_report-kozgf = it_t682i-kozgf.
    it_output_report-kolnr = it_t682i-kolnr.
    it_output_report-kotabnr = it_t682i-kotabnr.
    *endloop.
    clear it_t683s.
    loop at it_t683s.
              it_output_report-kvewe = it_t683s-kvewe.
              it_output_report-kappl =  it_t683s-kappl.
              it_output_report-kalsm =  it_t683s-kalsm.
              it_output_report-stunr =  it_t683s-stunr.
              it_output_report-zaehk =  it_t683s-zaehk.
              it_output_report-kschl =  it_t683s-kschl.
    it_output_report-kozgf = it_t682i-kozgf.
    it_output_report-kolnr = it_t682i-kolnr.
    it_output_report-kotabnr = it_t682i-kotabnr.
    APPEND IT_OUTPUT_REPORT.
    clear it_output_report.
    *loop at it_t685.
             it_output_report-kschl =  it_t685-kschl.
            it_output_report-kozgf =  it_t685-kozgf.
    it_output_report-kozgf = it_t682i-kozgf.
    it_output_report-kolnr = it_t682i-kolnr.
    it_output_report-kotabnr = it_t682i-kotabnr.
    endloop.
    *MOVE : it_t683s-kvewe TO it_output_report-kvewe.
            E N D - O F - S E L E C T I O N
    END-OF-SELECTION.
    *Output to a list
      FORMAT COLOR 2 .
      WRITE:/2 'Usage',09 'App',17 'Proced',24 'Step',
                37 'Counter',50 'CondType',63 'Description',85 'AccSeq',
               97 'AccSeqNum',108 'ConTable'.
      WRITE:/1(225) sy-uline.
    loop at it_output_report.
      WRITE:/ it_output_report-kvewe UNDER 'Usage',
              it_output_report-kappl UNDER 'App',
              it_output_report-kalsm UNDER 'Procedure',
              it_output_report-stunr UNDER  'Step',
              it_output_report-zaehk UNDER  'Counter',
              it_output_report-kschl UNDER 'CondType',
               it_output_report- UNDER  'Description',
              it_output_report-kozgf UNDER 'AccSeq',
              it_output_report-kolnr UNDER 'AccSeqNum',
              it_output_report-kotabnr UNDER  'ConTable'.
                it_output_report- UNDER  'SalesOrg',
                it_output_report- UNDER  'DocType'.
                it_output_report- UNDER  'Customer'.
      endloop.
      INCLUDE ZMASTER_CONDITION_TOP                                      *
    *Table declaration
    Tables:T682I,
           T683S,
           T685,
           NACH,
           B005.
    *Data declaration for internal tables
    DATA:Begin of it_output_report  occurs 0,
             KVEWE   LIKE   T683S-KVEWE,      "Usage of the condtion  table
             KAPPL   LIKE   T683S-KAPPL,      "Application
             KALSM   LIKE   T683S-KALSM,      "Procedure for pricing
             STUNR   LIKE   T683S-STUNR,      "step number
             ZAEHK   LIKE   T683S-ZAEHK,      "condition counter
             KSCHL   LIKE   T683S-KSCHL,      "condition type
             KOZGF   LIKE   T685-KOZGF,       "Access sequence
             KOLNR   LIKE   T682I-kOLNR,    "Access sequence number
             KOTABNR LIKE   T682I-KOTABNR,   "Condition Table
        End of it_output_report.
    DATA: BEGIN OF IT_T683S OCCURS 10  ,
             KVEWE   LIKE   T683S-KVEWE,      "Usage of the condtion  table
             KAPPL   LIKE   T683S-KAPPL,      "Application
             KALSM   LIKE   T683S-KALSM,      "Procedure for pricing
             STUNR   LIKE   T683S-STUNR,      "step number
             ZAEHK   LIKE   T683S-ZAEHK,      "condition counter
             KSCHL   LIKE   T683S-KSCHL,
            KOZGF   LIKE   T685-KOZGF,        "condition type
           END OF IT_T683S.
    DATA: BEGIN OF IT_T685 OCCURS 10,
              kvewe  like   t685-kvewe,
              kappl  like   t685-kappl,
              KSCHL  LIKE   T685-KSCHL,
              KOZGF   LIKE   T685-KOZGF,       "Access sequence
           END OF IT_T685 .
    DATA: BEGIN  OF IT_T682I OCCURS 0,
              KVEWE  LIKE T682I-KVEWE,
              KAPPL  LIKE  T682I-KAPPL,
              KOZGF   LIKE   T682I-KOZGF,       "Access sequence
             KOLNR   LIKE   T682I-kOLNR,    "Access sequence number
             KOTABNR LIKE   T682I-KOTABNR,   "Condition Table

    Hi,
    I think may be you should check with T682I-KOZGF(Access sequence) instead of T682I-KOTABNR(Condition table).
    In select-options declare like
    s_KOZGF FOR t682i-KOZGF
    SELECT kvewe kappl kschl kozgf FROM t685
    INTO TABLE it_t685
    WHERE kvewe = 'B'
    AND kappl = 'V1'
    and KSCHL in S_KSCHL
    AND KOZGF in s_KOZGF. //change s_kabnr to s_kozgf
    Thanks,
    Veni.

  • BPM "Fork" step question

    Concerning  fork step : Here is the documentation :
    You use a fork () when you want to continue a process in branches that are independent of each other, for example, to communicate with two systems that are independent of each other. The branches of the fork join in a union operator.
    You can specify the required number of branches and then define whether the process must run through all branches, or just a particular number of branches. Furthermore, you can define an end condition for the fork (see also: Condition Editor).
    As soon as a branch reaches the union operator at runtime, the system checks the following conditions in the specified order:
    ·        The process has run through the required number of branches
    ·        The specified end condition has returned true
    The step is complete as soon as one of the conditions returns true.
    I want to use it to do 3 different send process in parrallele with 3 different receivers.
    Before Fork step I use a container to initialize varaiable count = 0
    In each branch I do my send step and then a container that does count = count + 1
    And finally I have defined my fork with following end conditions :
    End condition : count = 3
    Necessary branch : 3
    But my BPM allways executes only one branch !!!
    (Only one is in green in the graphical editor of monitoring for BPM)
    Any idea ?
    Do I use the right solution to do the following :
    "You can specify the required number of branches and then define whether the process must run through all branches, or just a particular number of branches"

    Hi Jean-Charles,
    I agree with Michal. Is it really necessary to use a fork for different send steps.
    The reason for your unexpected termination could be the condition. Each fork branch reaching the union operator checks here in this sequence:
    Process has run through required branches (here: 3)
    End condition is true (container = 3, you have the same container element for ALL branches? This should not work. You need one for each, I think.)
    Step is complete as soon as ONE of the conditions return true.
    So use three different container elements as counter and connect them in the end condition with AND.
    Regards
    Dirk
    Message was edited by:
            Dirk Meinhard

  • UPDATE termination in VA01 transaction.

    Hello Experts,
       I am stuck in one place. could you please help me for the same.
    I am uploding data in ZVA01 transaction using batch input session.
    while uploading 82-83 line items, and save it, i am getting the error. "SAPSQL_ARRAY_INSERT_DUPREC".
    i checked the error. it is from the include :LV45UF0K and this is the standard code.
    the code is given below :
    FORM KONV_BEARBEITEN.
      CHECK: FKONV_GEAENDERT NE SPACE OR
             VORGANG = CHARH.
      IF VORGANG NE 'H'.
        DELETE FROM KONV WHERE KNUMV = VBAK-KNUMV.
      ENDIF.
      LOOP AT FXKOMV.
        FXKOMV-MANDT = VBAK-MANDT.
        FXKOMV-KNUMV = VBAK-KNUMV.
        MODIFY FXKOMV.
      ENDLOOP.
      INSERT KONV FROM TABLE FXKOMV.
      IF SY-SUBRC NE 0.
        MESSAGE A100 WITH 'KONV' SY-SUBRC.
      ENDIF.
    ENDFORM.
    . error is : it is try to insert the duplicate entry in the KONV table.  i dont know why the error is comming and in which code the error is.
    i splitted the line items into 2-3 parts and then uploaded, this time it is uploading properly.
    i want to upload all line items in one time (82-83 line items).
    could you please suggest, what is the error ?.
    Thnaks in advance.
    RH

    Hi,
    the key for table KONV contains five fields:
    MANDT
    KNUMV
    KPOSN
    STUNR
    ZAEHK
    The code you included fills the first two and deletes the entries for these values first. So the problem is not in that value. The other three values are:
    KPOSN     Condition item number
    STUNR     Step number
    ZAEHK     Condition counter
    Where the last one is added just to make the whole key unique. Chances are that this field is not filled correctly in some user exit making the transaction fail at the point you indicated. Check in the dump if you can find out what the values are in this table and which ones generate the duplicate key error. Also investigate if the FXKOMV table is changed in user exits or custom pricing routines and check that code for bugs. It will be pretty hard to debug it all since you get the problem in BDC processing...
    Good luck,
    Gert.

Maybe you are looking for

  • Cannot save formsweb.cfg through OEM

    Hi All, I am using Enterprise Manager with Oracle Application Server (Forms and Reports services), and cannot save changes to the formsweb.cfg file through OEM. I can make changes to the file formsweb.cfg manually (with notepad), and the server itsel

  • Illegal Region Number

    After months of trouble free running, I'm getting "Illegal Region Number" error messages popping up with no clue as to which region or any other information. Usually (but not always) it happens when I've hit stop after recording an audio track. It do

  • IE11 icloud Calendar icon

    Hi All, I'm just setting up my main Windows PC with shortcut links to the Start Screen tiles I've added iCould into these links so I can access my iCalendar and stuff quickly - however the icon for the calendar in iCloud is messed up. I have a feelin

  • Issues with DNL_CUST_PROD1

    hello experts, We had some issues with the logical naming convention and we cleaned all the previously replicated product cat and product master from R/3. Now since fixed all the issues with the logical names and establised RFC connections, we are no

  • [Solved]-[solved:indirectly]Chain loading services on boot in Systemd

    I have what I believe is a simple issue, but am afraid that my ignorance of systemd services is preventing me from getting my desired result. I want to boot into tty1-7 automatically and have them each launch independent chains of executions.  Specif