I need advise on how better to populate af:table

I have af:table and VO: select a, b, c, d from table1
But I need the fifth column: select count (table2.e) from table2, table1 where a=table1.a
What is the best way?

Simply add it to the query of the view object, it will be added as calculated field.
like this:
select a, b, c, d, (select count (table2.e) from table2 where a=table1.a) from table1

Similar Messages

  • How does data populates in Tables

    Hi,
    Can anyone provide me information how do we get these tables populated?
    VBAK (eg. when we post data in VA01 we get data in this table)
    VBAP
    VBEP
    VBUK
    VBUP
    LIKP
    LIPS
    EKKO
    EKPO
    EKET
    AFKO
    AFPO
    AFRU
    Regards
    Edited by: Shalini Arya on Jul 27, 2009 4:38 PM

    Hi,
    Here are the Txn Codes:
    VBAK : VA01/VA02/VA11/VA12/VA21/VA22
    VBAP : VA01/VA02
    VBEP :  VA31/VA32
    VBUK : Flag Header Table, Gets updated by Any SD Doc Creation/Updation VA01/VA02/VL01n/VL02n/VF01/VF02
    VBUP : Flag Item Table, Gets updated by Any SD Doc Creation/Updation VA01/VA02/VL01n/VL02n/VF01/VF02
    LIKP   : VL01N/VL02N
    LIPS   : VL01N/VL02N
    EKKO : ME21N/ME22N
    EKPO : ME21N/ME22N
    EKET  : ME38
    AFKO : CO01/CO02
    AFPO : CO01/CO02
    AFRU : CO11

  • File to IDOC ( need advise on how to map file fields )

    Hello friends,
    I spent quite some time reading all the helpful blogs and threads regarding File to Idoc scenario. However I had a very basic question ( maybe its trivial as I am just new to XI).
    In my scenario I have Bank Master data (in a CSV file) and it does not correspond exactly to Bank Master IDOC structure BANK_CREATE01.
    I understand that I will need to use File adapter to get this file into XI and then use an IDOC adapter to send it to R/3. (Pl correct me if I am wrong)
    Now when I use file adapter, how will I do the data mapping. I mean do I need to create a structure which corresponds to file fields and then XI will automatically load my file fields into this structure and then I can use this structure to map fields to IDOC.
    My only issue seems to be how will I see the FLAT FILE data in XML FORM in XI.
    To explain it further my CSV file looks like
    "GB,123456,11223344,GBP, London,.."
    where
    GB corresponds to country,
    123456 corresponds to Bank key,
    112233445566 corresponds to Bank account,
    GBP is currency and so on
    So should I create a data type maintaining same sequence of fields above without using any hierarchy like in the IDOC.
    If this is not possible then will I need to transform my input file exactly into IDOC structure and then use it.
    Hope I have manged to explain it.
    Appreciate your help on same.
    Thanks
    Shirin

    Hello Shrini,
    First of all The CSV file has to be changed in to an XML file , To achieve this File Content Conversion has to be done.Once this is done, please make the following changes in R/3 and PI to push Idoc in to PI.
    Configuration required at Xi side:
    Go to IDX1: configure the port.
    Go to IDX2: load the DOC metadata.
    Go to SM59: Create RFC destination which points to R3 system this is require in the case where your IDOC is sent to R 3 system,
    Configiration required at R3 side:
    Maintain Logical System for PI (SALE transaction):
    Maintain Partner Profile for XI system(WE20):
    Thanks,
    Kiran.

  • Need advise on how to model this rule

    Hi,
    I got stuck in modelling some rule. I will try to paint the picture using some example:
    Assume the following entities (and relations)
    the child (the children)
         the toy (the childs toys)
    the cupboard (the cupboards)
    I would like to construct a boolean saying that all children can store their most favorite toy in the best cupboard
    What I have tried so far:
    I have inferred a relation for the best cupboard.
    I also inferred a relation for the most favorite toy of a child.
    Now I get stuck. What should be the way to do this? Is it possible? I have the feeling I am missing something. It might be versy simple, but I am relative new to OPA.
    Any help is very much appreciated.
    Cheers,
    Han Joosten

    Hi Han,
    When I first had a go at this, I had several inferred relationships and it got complicated, so I tried to simplify it down to minimal inferred relationships. Here's what I did...
    Entities and Relationships
    Containment Relationships
    Global --> one-to-many --> the child (relationship text: the children)
    the child --> one-to-many --> the child's toy (relationship text: the child's toys; reverse text: the toy of the child)
    Global --> one-to-many --> the cupboard (relationship text: the cupboards)
    Inferred Relationships
    the cupboard --> many-to-many --> the child's toy (relationship text: the cupboard's toys)
    Note: Before you can write rules associating two different entities, you need to set up a relationship between them in the Properties file.
    Rules
    Determine the best cupboard...
    I made up a number attribute 'the cupboard's priority'. The best cupboard is the one with the lowest priority number, i.e. the cupboard with priority 1 beats the cupboard with priority 2.
    the cupboard is the best cupboard if
    the cupboard's priority = the priority number of the top cupboard
    the priority number of the top cupboard = InstanceMinimum(the cupboards, the cupboard's priority)
    If you wanted to reverse the priority logic so that the highest number is the 'best', use InstanceMaximum instead.
    Determine the favourite toy...
    Similar approach with the toys:
    the child's toy is the favourite toy if
    the child's toy's priority = the priority number of the child's top toy
    the priority number of the child's top toy = InstanceMinimum(the child's toys, the child's toy's priority)
    Put the favourite toy of each child in the best cupboard...
    Write a membership rule to associate the child's toys and the cupboards:
    the child's toy is a member of the cupboard's toys if
    the cupboard is the best cupboard and
    ForScope(the toy of the child)
    the child's toy is the favourite toy
    Procedural rules to tie it all together...
    The rules above do all the tricky logic work. If you want a Global level rule which ties it all together, you could add procedural rules, e.g.
    the appropriate cupboard has been determined for all the favourite toys if
    ForAll(the children, the child's favourite toy has been determined) and
    ForAll(the cupboards, it is known whether or not the cupboard is the best cupboard)
    the child's favourite toy has been determined if
    ForAll(the child's toys, it is known whether or not the child's toy is the favourite toy)
    Test case
    I tried the following test scenario, which worked as expected.
    Inputs
    Child: Bart
    Toys: Krusty Doll (priority 1), Television (priority 2)
    Child: Lisa
    Toys: Saxophone (priority 1), Malibu Stacy (priority 2)
    Cupboard: Cupboard A (priority 1)
    Cupboard: Cupboard B (priority 2)
    Results
    Cupboard A is the best cupboard
    Instances of 'the child's toy' associated with Cupboard A: Krusty Doll, Saxophone
    Cupboard B is not the best cupboard
    No instances of 'the child's toy' associated with Cupboard B.
    Further comments
    If each child can have multiple 'favourite' toys (all of which can go in the best cupboard), then make 'the child's toy is the favourite toy' a base level attribute. Any toy where 'the child's toy is the favourite toy'=true will be associated with the best cupboard, i.e. Cupboard A in the scenario above.
    Depending on what else you need to do, it may be worth creating an inferred relationship for 'the child's favourite toys', e.g.
    the child's toy is a member of the child's favourite toys if
    IsMemberOf(the child's toy, the child's toys) and
    the child's toy is the favourite toy
    Cheers,
    Jasmine

  • How to create / populate new table in MaxDB?

    Dear All,
    I'm a newbies in using MaxDB and still learning on it.
    I've installed MaxDB Database Manager 7.6
    I need help from all the experts here on the following "dumb" questions from me.
    1) I can't create, modify or delete any table / data with Database Manager, am I right?
    2) Should I start creating / populating tables with sqlcli or dbmcli? I was informed that I should use sqlcli instead or dbmcli.
    3) What is the syntax for me to create new table, as well as add, modify and delete data within it?
    Please assist to provide some guidance or at least point me to the right direction interm of documentation available.
    THANK YOU VERY MUCH!!!
    Much appreciated,
    -Deric-

    > I've installed MaxDB Database Manager 7.6
    >
    > I need help from all the experts here on the following "dumb" questions from me.
    >
    > 1) I can't create, modify or delete any table / data with Database Manager, am I right?
    Nope - the Database Manager is not able to to "sql-stuff".
    You would want to use the Database Studio or the SQL Studio for that.
    But as you're starting to learn anyhow, just go for the more modern Database Studio.
    It combines the features of Database Manager and SQL Studio into one tool.
    > 2) Should I start creating / populating tables with sqlcli or dbmcli? I was informed that I should use sqlcli instead or dbmcli.
    Why would you want to learn SQL by working with command line tools?
    Really, go for the Database Studio instead.
    For simple SQL stuff via command line you may use sqlcli.
    > 3) What is the syntax for me to create new table, as well as add, modify and delete data within it?
    > Please assist to provide some guidance or at least point me to the right direction interm of documentation available.
    You definitively need
    a) read the tutorial in the [documentation|http://maxdb.sap.com/doc/7_7/d0/3e345709c044d4a954e3a8d0be0867/content.htm]
    and
    b) get a SQL learning book to really understand the concepts behind relational databases and the query language.
    Learning SQL is not about knowing how to type the commands.
    Most users learn the commands rather quickly.
    But fully understanding the set-approach of relational databases and how to create and use those databases correctly is often not learned.
    So make sure not to fall into this trap!
    regards,
    Lars

  • How can I populate a table based block without it being the current block

    Any ideas??

    Ok, here are the key components:
    •     Tab Form
    •     ActiveX Control
    •     VSFlexGrid
    •     Additional Window / Canvas With Mirrored items
    The problem Is not that I can’t navigate to the block then execute a query, rather it is what takes place when it’s done that way.
    When I attempt to do it the conventional way what takes place is visually un-appealing to the user. What triggers the need to populate the block in question is when the user selects a value in the VSFlexGrid. When done the conventional way what takes place when the value is selected is... we do a go_block, since the block is on a different tab the form then brings up that tab, and then execute_query populates the block, then go_block to return to the block/tab containing the VSFlexGrid. Then I would have to come up with a way to interface with the VSFlexGrid and return the cursor focus to the previously selected item in the VSFlexGrid. What needs to happen is when the user selects a value in the VSFlexGrid, behind the scenes the block gets populated then when the user navigate to the block/tab in question the data is already there. To further complicate matters this data comes from two different tables and the data from the parent can only be updated where the data from the child can be inserted or updated. Now if the user wants to bring up the additional sub-window the tab which has the mirrored items is removed. While this window is open the user then returns to the VSFlexGrid navigates through the grid and depending on the item selected the values in the sub-window need to be repopulated.
    I guess if the block in question was on the same canvas / tab the conventional methods would be acceptable.
    Now that I have painted the picture if you have any ideas my ears are open.
    BTW… It looks like I have that last 10%. I am testing now and so far things are working as desired. When testing is SAT I will post the solution I have developed, maybe this will help Tony G. come up with a solution for his situation.

  • SD Process Design for Plantation industry - need advise

    Hi all experts,
    I am implementing for a crude palm oil plantation company, in which the general flow of the sales process from Estate to the Milling Plant is as below:
    Sales Order --> Delivery Order* --> PGI --> Billing*
    Sales Order: The fresh fruit bunches (FFB) is harvested and then the amount required by the Buyer is fulfilled via creation of a sales order.
    Delivery Order: At this stage, it will interface with the Weighbridge system to carry out the recording of delivery quantity. Truck without the FFB is weighed once at entrance of the estate, and truck with FFB is weighed at exit at estate.
    PGI: Goods Issue is carried out with the recording of the actual quantity from the weighbridge interface back to SAP.
    Billing: The billing doc is created based on PGI quantity done.
    This looks pretty straightforward, but there are few concerns from the above process as highlighted in the asterisk (*) section:
    Issues:
    1. During the Delivery portion, data of the Driver, name, person loading and weight loaded need to be recorded at the same time to carry out the incentive payment to the drivers (both internal and external drivers) with incentives calculated on per tonnage basis.
    2. Secondly, during Billing process, the amount payable would be calculated based on the grading of the FFB + the which year the FFB is planted (i.e. different year would have different pricing per ton).
    Need advise on how to make the above two issues work smoothly along with the process above.
    Opinion, comments and feedbacks is much appreciated.
    Thanks.

    The loader and driver data is integrated to PP and the HR master module is leveraged to maintain driver/loader data master and payment is made to driver via customized program with customised calculation of salary.
    The FFB is handled using PP module for Production and material posted via MIGO in MM and increases stock take manually.
    SD to handle sales of finished goods instead..

  • Populate a table reading the data from a TXT file

    how can I populate a table reading the data from a TXT file?
    thanks

    Hey Kevin!
    Using FORMS.TEXT_IO to bulk load data from a file strikes me as re-inventing the wheel. It is just about justifiable in a self-service environment, but I regard the EXTERNAL TABLE is a better solution for that situation as well.
    The same applies to UTL_FILE. I think the ability to read text with UTL_FILE is primarily intended for read file-based configuration or file manipulation/processing rather than data loading.
    Re-writing a text file into SQL statements is too much like hard work (even with an editor that supports macro definition and regular expressions) for no real benefit. You lose all the bulk load peformance you would get from SQL*Loader. But for QAD I'd probably let you off with it.
    You missed out one obvious alternative: using Java to turn the contents of an XML file into a CLOB and inserting it into a table which is read by a PL/SQL procedure that parses the XML records and insert the retrieved data into a table.
    Stay lucky, APC

  • UIX: How to add linked view table columns to the Read-only table

    Hi
    I have two tables
    T1: ID, STAFF_ID, NOTE
    T2: STAFF_ID, USERNAME
    I have created corresponding entity objects (E1, E2), views (V1, V2), association A(E1->E2 as *..1 using STAFF_ID) and viewlink VL(V1->V2 as *..1 using association A).
    My model in AppModule looks like
    V1
    ----V2 via VL
    Now I have single UIX page in which I drop V1 as Read-only table. The table displays columns correctly: ID, STAFF_ID, NOTE
    What I want is to add a column STAFF_ID from the V2 into this table. I have tried to drop it into the table but when the page is run it does not display anything in that column. It has to do something with binding.
    I have done similar test with dropping V1 as read-only FORM and then added STAFF_ID from V2 as messageTextInput and everything is rendered correctly.
    Anyone knows how to do the same thing but with table?

    Yes that is true but I would like to give another example where this may not apply.
    Say I have 3 tables
    CLIENT(INDIVIDUAL_ID,...)
    ADDRESS(ADDRESS_ID,...)
    ADDRESS_HISTORY(ADDRESS_ID, INDIVIDUAL_ID,BEST_ADDRESS)
    where ADDRESS_HISTORY is intersection table in CLIENT to ADDRESS many to many relationship.
    Suppose I have VO2 that consists of ADDRESS and ADDRESS_HISTORY entities (corresponding association exists) and user needs to add new address for the selected customer in VO1 (made from CLIENT entity). There are several issues here:
    1) An input form made out of VO2 must contain an entry for BEST_ADDRESS flag but since it will be read-only, seems that this approach may not work. However, I found a post re:Updating view objects with multiple entities that provides workaround this.
    2) In that case assume that I use DBSequence to automatically add ADDRESS_ID when user inputs new record in this input form. I am using DB Trigger on ADDRESS table and have selected ADDRESS_ID in ADDRESS entity as DBSequence. Now observe that VO2 would contain another ADDRESS_ID from ADDRESS_HISTORY entity which has to be automatically populated with the same value. How?
    In a nutshell my question relates to the problem how to automatically populate intersection table when new record is added to the detail. But the trick is that some attributes of the intersection table must be inserted by the user in the form..
    Please advise

  • How can I create a Table View in Cocoa Applescript?

    This is my last resort. I've searched for days and only found tutorials for iPhone and Cocoa, and I have no idea where to start. I'm looking for a way to create a Table View, and fill it with a few cells that call a handler when clicked. I've looked through the Xcode help, the Apple documentation, and countless tutorials, and I don't know what to do. I'm sure what I'm asking is possible, because usually what is possible in Cocoa is possible in Cocoa-Applescript.
    Perhaps something like:
    myTableView's addCell_OfType_WithHandler("This is a text cell", text, "myHandler:")
    I would appretiate any responses and brief descriptions on the matter.

    You did not answer my first question, which was not an idle question. I'll answer here, but if cross-chatter appears in a different thread I'll ignore it. You'll have to keep track of the mess yourself.
    Apple_For_The_Win wrote:
    At this point, I've dragged a Table View onto my window, in Xcode. I've connected it to the value "myTableView", and that's where I need help. I'm specifically trying to add cells into the table view.
    I'll assume that 'connected it to the value "myTableView"' means that you've control-dragged in XCode from the table view in Main Menu.xib to a property in your applescript app delegate called myTableView. If that's not the case, please correct me.
    I prefer to use an array controller for this, so please drag an array controller object into main menu.nib. once you've done that, do the following:
    open the applescript app delegate and add a new property called "tableController"
    select the table view in the object list (you may need to open some disclosure triangles to reach it). and add appropriate (an) column name(s). you can hide column titles later if you like, but having named columns makes life easier.
    select the array controller in the object list
    rename the array controller "table data"
    open the attributes inspector, and then add the column name(s) as key(s) in the object controller area
    open the bindings inspector, and where it says "controller content", open the disclosure arrow and bind the content to the App Delegate object on the model key path self.tableController
    select the table view in the object list again, then go down a level and select each column in turn
    for each column, open the bindings inspector, and where it says "value", open the disclosure arrow and bind the content to the Table Data object with the controller key arrangedObjects model key path being the name of the column (which is the name of the key in the controller as well)
    back in the applescript app delegate, add code like the following:
      -- create a list of records, where each record represents a row and the column name is the record key
      set myData to {{column_1_name:"hello"}}
      -- convert it to an NSArray and add it to the controller content. don't forget the *my* keyword, or it won't work
      set my tableController to NSArray's arrayWithArray:myData
      -- may or may not be needed
      myTableView's reloadData()
    That should populate the table with simple text. if you want something more complicated (like buttons or links) then create the more complicated elements separately and add them to the data.

  • Firefox hangs on opening requiring force quit I have snow leopard mac It hangs when I try safe mode. I need to know how to remove all traces of firefox on my mac so I can reinstall. I have tried terminal as advised on firefox webpage. Please advise m

    Firefox hangs on opening requiring force quit I have snow leopard Mac It even hangs when I try safe mode. I need to know how to remove all traces of firefox on my mac so I can reinstall. I have tried terminal as advised on firefox webpage. Please advise me
    == This happened ==
    Every time Firefox opened
    == I tried to update firefox add-ons ==
    == User Agent ==
    Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7

    Try a new profile. See [[Recovering important data from an old profile]]

  • Lightroom crashes at start up with the error message "Lightroom encountered an error when reading from its preview cache and needs to quit".  Please advise on how to fix this error.  Thanks

    Lightroom crashes at start up with the error message "Lightroom encountered an error when reading from its preview cache and needs to quit".  Please advise on how to fix this error.  Thanks

    You probably need to delete your preview cache.  See here  
    Why And How To Clear Your Lightroom Cache - Lightroom Fanatic
    Preference and other file locations in Lightroom 5

  • Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe acco

    Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe account.

    Can you please show a screenshot of what exactly you want to replace where?

  • I need to clarify how I can use adobe as a host for my site for free. I see where business catalyst is supposed to be temporary as well as it is recommended to use as the better alternative to launch my muse site. But then I have to use the long

    I need to clarify how I can use adobe as a host for my site for free. I see where business catalyst is supposed to be temporary as well as it is recommended to use as the better alternative to launch my muse site. But then I have to use the long extension of "businesscatalyst" in addition to the domain name I'd prefer. How exactly can I take it live? do I have to use a third party hosting?

    Hi,
    Once you are done with your sitet, Click on Publish in Muse, select New Site from the drop down, It will ask you a name for your site, which will be used for  site url, you will get a url like mysite.businesscatalyst.com, then go to the browser and login to the admin panel, mysite.businesscatalyst.com/admin and on Dashboard, click Launch site. This will push your site live, and you can then add your custom domain.
    Also make sure that you have completed all these actions mentioned here
    User manual
    Do let me know if you have any question.

  • Ust purchase an iphone 4s and need to know how could i transfer all files including (contacts, pictures, music, notes and ect.... from sd card or any external card to iphone 4s, please advise thx

    ust purchase an iphone 4s and need to know how could i transfer all files including (contacts, pictures, music, notes and ect.... from sd card or any external card to iphone 4s, please advise thx.

    You need to put all of your info on your computer and then sync it to iphone.

Maybe you are looking for

  • HP Smart Web Printing and IE8

    Hi, I am trying to help some friends who have recently bought a new HP desktop and HP printer. We have set up both and can print from programs installed, thats no problem. When we try to print a page from IE8 nothing at all happens. We have the HP Sm

  • RAW issues in Lightroom 5.4

    Hello! I'm having issued with my Lightroom. When RAW photos import they seem to be fine then after previews are rendered there is an error message on some of them (just a couple and different ones every time) that says "There was an error working wit

  • PIR with account assignment

    I added a MTO account assignment E and the sales order line for the planned independent requirements in the additional data of MD61. But I could not find the requirements in MD04. Can anyone tell me how to maintain a PIR for MTO? I expect the PIR can

  • How to make definitive a midi drum mapped track

    It escapes me the way to make definitive a midi drum mapped track. In other words I'd want to transform all mapped notes in real notes.

  • I have the PLS-00323 but ..I am getting it

    Ok here is the declaration in the the package header.. FUNCTION fn_populate_rgns_from_national(fv_sales_force_no IN tsales_force.sales_force_no%TYPE ,fv_budget_no IN tbudget_plan.budget_no%TYPE) RETURN VARCHAR2; ....now here is the package body ... F