How to Fill Sorted Data with model Driven Development

Hello
I am using model driven development. I am using getAll in the Fill method. But the results are not returned sorted by some field that I am interested in. How do I tell the Fill to sort it by some field. Is there some annotation that I can provided in the model...
thanks
RK

You should be able to achieve what you want with an explicit criteria filter on your entity.
In the Modeler Design view, select your entity and add a filter. You'll see that there is a an "Order By" field in the Properties view.
Enter the value you want there and then save and redeploy your model. When you don't enter anything in the "Criteria" field, you create a getAll fill.
Here's an example of an entity created with this type of filter; it is sorted by price in ascending order:
<entity name="Product" persistent="true">
  <annotation name="ServerProperties" ServerType="LCDS"/>
  <annotation name="DMS" Table="PRODUCT"/>
  <annotation name="RDS" introspectedColumns="PRODUCTID,DESCRIPTION,PRICE,PRODUCTNAME"/>
  <annotation name="VisualModeler" width="115" height="110" x="364" y="203"/>
  <id name="productid" type="integer">
  <annotation name="DMS" ColumnName="PRODUCTID"/>
  </id>
  <property name="description" type="string" length="255">
  <annotation name="DMS" ColumnName="DESCRIPTION"/>
  </property>
  <property name="price" type="float">
  <annotation name="DMS" ColumnName="PRICE"/>
  </property>
  <property name="productname" type="string" length="255">
  <annotation name="DMS" ColumnName="PRODUCTNAME"/>
  </property>
  <filter name="MyFill" order="price ASC"/>
  </entity>

Similar Messages

  • How to restrict the generated constraint name with Model Driven Development

    Hello
    I have a database that has tables INSTRUMENT and EXCHANGE. There has to be a foreign key field called primaryExchange inside INSTRUMENT table that points to the ID of EXCHANGE table. In my fml file, my tables are called Instrument and Exchange. When I create this relation between the two tables in the model and deploy it to LCDS, it tries to create a FK constraint by the name of "FK_Instrument_primaryExchange_TO_Exchage" which fails with ORA-00972 -  Identifier is too long. Obviously the generated FK name is more than 30 chars and hence the oracle erorr. The only way to resolve this is to reduce the name of the table/field in the fml file while keeping the database table/field name intact. So the FK might be called FK_Instr_primExch_TO_Exch and which will work but the problem is that in the fml model file, I am loosing the meaningful names of the tables and thus the data services that are generated have truncated names. For this particular example, the truncated name might still be okay but in a large database, it is causing much grief. I would really prefer decent descriptive names for table like MarketOrder instead of MO. Pls advise how I can customize the generated constraint name while keeping the tables names still informative.
    Now I edit my DB tables to have a field called ID which is unique to that table but while deploying I get hibernate and fiber exceptions :-
    2011-03-10 16:30:44,042 INFO  [STDOUT] (http-0.0.0.0-8180-1) [UlltraWebServer]Exception trying to build hibernate's session factory: org.hibernate.MappingException: Repeated column in mapping for entity: UlltraWebServer.package4.Client column: ID (should be mapped with insert="false" update="false")
    2011-03-10 16:30:44,116 INFO  [STDOUT] (http-0.0.0.0-8180-1) [UlltraWebServer]Error instantiating application scoped instance of type 'fiber.data.assemblers.FiberAssembler' for destination 'UlltraWebServer.Holiday'.
    org.hibernate.MappingException: Repeated column in mapping for entity: UlltraWebServer.package4.Client column: ID (should be mapped with insert="false" update="false")
    2011-03-10 16:30:44,229 INFO  [STDOUT] (http-0.0.0.0-8180-1) [UlltraWebServer]Exception trying to build hibernate's session factory: org.hibernate.MappingException: Repeated column in mapping for entity: UlltraWebServer.package4.Client column: ID (should be mapped with insert="false" update="false")
    The above suggests that it does not like the same name for the fields in multiple tables, they all have to be unique like Holiday.holidayID, Client.clientID etc which causes the above constraint length violation issue..
    thanks

    You should be able to achieve what you want with an explicit criteria filter on your entity.
    In the Modeler Design view, select your entity and add a filter. You'll see that there is a an "Order By" field in the Properties view.
    Enter the value you want there and then save and redeploy your model. When you don't enter anything in the "Criteria" field, you create a getAll fill.
    Here's an example of an entity created with this type of filter; it is sorted by price in ascending order:
    <entity name="Product" persistent="true">
      <annotation name="ServerProperties" ServerType="LCDS"/>
      <annotation name="DMS" Table="PRODUCT"/>
      <annotation name="RDS" introspectedColumns="PRODUCTID,DESCRIPTION,PRICE,PRODUCTNAME"/>
      <annotation name="VisualModeler" width="115" height="110" x="364" y="203"/>
      <id name="productid" type="integer">
      <annotation name="DMS" ColumnName="PRODUCTID"/>
      </id>
      <property name="description" type="string" length="255">
      <annotation name="DMS" ColumnName="DESCRIPTION"/>
      </property>
      <property name="price" type="float">
      <annotation name="DMS" ColumnName="PRICE"/>
      </property>
      <property name="productname" type="string" length="255">
      <annotation name="DMS" ColumnName="PRODUCTNAME"/>
      </property>
      <filter name="MyFill" order="price ASC"/>
      </entity>

  • Comparing ABAP development process with Model Driven Architecture concept

    My Background
    I am a postgraduate student writing a Masters Degree Dissertation titled “An Investigation into how compatible ERP Development Process is with Model Driven Development Philosophy: A SAP R/3 Case Study”.
    The aim of this project is to compare ERP system development process with Model Driven Development (MDD) and to identify whether and how they can be used together. Model Driven Architecture (MDA) is Object Management Group’s (OMG) flavour of the MDD philosophy and is the paradigm that will be used here.
    I have chosen SAP R/3 as my case study in order to narrow the research and want to explore the development processes/cycle involved in using ABAP/4 to reconfigure/customize SAP R/3 system during implementation.
    An overview of the MDA concept according to OMG is given below. Following this, I’ve provided some questions that are open to discussions.
    Overview of the MDA Concept
    The Model Driven Architecture (MDA) is an approach to software systems development that separates the specification of system functionality from the specification of the implementation of the functionality on a specific technology platform. The MDA concept provides an open, vendor-neutral approach to system interoperability.
    A recent study by the Middleware Company summarizes MDA paradigm as a development process that makes use of the following steps:
    1.     Secure business requirements for an application.
    2.     Develop UML diagrams for the domain model, independent of any particular technology (J2EE, Microsoft .NET, CORBA, etc). This UML model represents the core business services and components. This UML model is called Platform Independent Model (PIM) because it is completely technology-independent and will be the same regardless of whether you decided to use J2EE or .NET. You develop this UML model using UML modelling capabilities of an MDA-specific modelling tool.
    3.     Build UML diagrams for the application, specific to a particular technology (J2EE, for example). This UML model will have design patterns. This UML model is called Platform Specific Model (PSM). You can build this manually, or you can generate much of it using an MDA tool and hand-tune only pieces of it that require customisation.
    4.     Finally, generate the application code using an MDA tool. That is to say, instead of writing the application by hand based on the UML model, you generate the majority of it from the UML diagrams.
    To develop an application using MDA, it is necessary to first build a PIM of the application, then transform this, using a standardised mapping into a PSM, and, finally, map the latter into the application code.
    A mapping is a set of rules and techniques used to modify one model in order to get another model. In MDA, mappings are used for transforming:
    1)     PIM to PIM. This transformation is used when models are enhanced, filtered or specialized during the development lifecycle without needing any platform dependent information. One of the most obvious mappings is the analysis to design models transformation. PIM to PIM mappings, are generally related to model refinement.
    2)     PIM to PSM. This transformation is used when the PIM is sufficiently refined to be projected to the execution infrastructure. The projection is based on the platform characteristics. Describing these characteristics should be done using UML description. Going from a logical component model to a commercial existing component model is a kind of PIM to PSM mapping.
    3)     PSM to PSM. This transformation is needed for component realization and deployment. PSM to PSM mapping are generally related to platform dependent model refinement.
    4)     PSM to PIM. This transformation is required for abstracting models of existing implementations in a particular technology into a platform-independent model. This procedure often resembles a “mining” process that is hard to be fully automated. It may be supported by tools, though. Ideally, the result of this mapping will match the corresponding PIM to PSM mapping.
    Questions/Discussions
    1.     What specific stages are involved in development using ABAP/4? (e.g., requirements gathering, analysis, design, coding, etc)
    2.     Do these stages fit into any traditional software development lifecycle? (e.g. waterfall model, v-model, etc)
    3.     Which of the stages in (1) above best describes the Platform Independent Model (PIM) of the MDA concept above?
    4.     Which of the stages in (1) above best describes the Platform Specific Model (PSM) of the MDA concept above?
    5.     How does the Accelerated SAP roadmap relate to the MDA concept above?
    6.     Assuming there’s a change in business requirements of a company that could lead to reconfiguring/customizing the R/3 system, how is this achieved? For instance, if a model has earlier been developed for that particular process, how does the change in the model affect coding/modification?
    7.     How is coding achieved with respect to the reconfiguration of the business models or reference models?
    8.     Are all coding manually done or are there tools in the ABAP Workbench that enable codes to be generated automatically from the models of the system?
    9.     How much time is spent in coding compared to developing business models like EPC models?

    I've also read about the SAP Composite Application Framework (CAF).
    But it seems that it's only for Java development....

  • How do I sort data in columns using Pages

    How do I sort data in columns (alphabetically) using Pages?

    If you are referring to text or numbers in a column (not table), then get the free Service plug-in WordService, from Devon Technologies. Put it in the
    /Users/yourlogin/Library/Services folder location.
    Select your data to be sorted. From the Pages menu > Services > Sort Ascending will do the trick. This will work with Pages ’09 and Pages v5.2 or later, as well as Apple Mail, TextEdit, etc.
    The WordService files include a PDF (Read Me) that describes the services included with the package.
    The Service items will only appear in the Services submenu when you have selected your data prior to sort. If these WordService items do not appear in the Services menu as they should per the preceding sentence, then you will need to enable them.
    System Preferences > Keyboard > Shortcuts > Services. Scroll through the right hand list of services until you encounter Sort Ascending and ensure that it is selected.
    If you were referring to sorting a column of data in a table:
    Pages ’09
    Select all cells containing your unordered data. In the Table Inspector, under Edit Rows & Columns, choose Sort Ascending.
    Pages v5.2
    Select cells as before. In the Table heading (A, B, C, etc.) when you roll over the letter, a down-arrow appears. Click, and choose Sort Ascending from the drop down menu.

  • How to fill internal table with selection screen field.

    Hi all,
    i am new to sap . pls tell me how to fill internal table with selection screen field.

    Hi,
    Please see the example below:-
    I have used both select-options and parameter on the selection-screen.
    Understand the same.
    * type declaration
    TYPES: BEGIN OF t_matnr,
            matnr TYPE matnr,
           END OF t_matnr,
           BEGIN OF t_vbeln,
             vbeln TYPE vbeln,
           END OF t_vbeln.
    * internal table declaration
    DATA : it_mara  TYPE STANDARD TABLE OF t_matnr,
           it_vbeln TYPE STANDARD TABLE OF t_vbeln.
    * workarea declaration
    DATA : wa_mara  TYPE t_matnr,
           wa_vbeln TYPE t_vbeln.
    * selection-screen field
    SELECTION-SCREEN: BEGIN OF BLOCK b1.
    PARAMETERS : p_matnr TYPE matnr.
    SELECT-OPTIONS : s_vbeln FOR wa_vbeln-vbeln.
    SELECTION-SCREEN: END OF BLOCK b1.
    START-OF-SELECTION.
    * I am adding parameter value to my internal table
      wa_mara-matnr = p_matnr.
      APPEND wa_mara TO it_mara.
    * I am adding select-options value to an internal table
      LOOP AT s_vbeln.
        wa_vbeln-vbeln =  s_vbeln-low.
        APPEND  wa_vbeln TO  it_vbeln.
      ENDLOOP.
    Regards,
    Ankur Parab

  • How to validate a date with time

    Hi All,
    How can I validate date with time?
    Here is my code:
    var tempDate:Date = new Date();
    if (tempDate < '09/18/2012 7:30:00 AM'){
         doSomething
    Thanks in advanced

    I think i got it to work.
    var tempDate:Date = new Date();
    var oldDate:Date = new Date('09/18/2012 7:30:00 AM');
    if ( Number(tempDate) < Number(oldDate) ){
         doSomething
    Best,

  • How to fill a symbol with color

    How to fill a symbol with color?

    Good day!
    What do you mean by »symbol« in this case?
    Is this on a Layer of its own or is it part of a photograph?
    Could you please post a screenshot with the Layers Panel visible?
    Regards,
    Pfaffenbichler

  • I HOW I FILL PDF FORM WITH HEBROW ON CHROME ?

    I HOW I FILL PDF FORM WITH HEBROW ON CHROME ?

    Chrome uses its own (incompatible) PDF viewer.
    Download the PDF to your local disk, then fill it from there with Adobe Reader.  Or use a browser that uses the Adobe PDF plugin.

  • How can I sort date?

    hi,
    How do I sort date? Its in the following format 11 Mar 2002. The date is written using the calendar class in java.util.* package.
    Please help me out.
    Regards
    Deepa Datar

    long[] longArray = new long[dateArray.length];
    for(int i=0;i<dateArray.length;i++) {
       longArray[i] = dateArray.getTimeInMillis();
    Arrays.sort(longArray);
    Now you can format the sorted longArray into appropriate date format.

  • How to seperate the data with comma seperator ??

    Hi,
      How to seperate the data with comma seperator ??
    E.g i havea row like
    Userid,number of days,Total Records
    user1,10,100000
    So,i will get 10,10000 in the same field and i need to seperate 10 and 10000 so what is the abap function for that
    Praff

    like this ...
    SPLIT field AT ',' INTO
       userid
       days
       records.
    is this what you need?
    Mike

  • Need documentation about "Model Driven Development within SAP Netweaver"

    Hi All,
    in my dissertation there is a topic called "Model Driven Development within SAP Netweaver" and I am looking for documentation (literature) pointing on this.
    I'd prefer internet sources since I don't have time to order a book anymore.
    Thanks, Johannes

    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=modelDrivenDevelopment&cat=sdn_all
    Regards

  • How to fill internal table with no data in debugging mode

    Hi all,
             I modified one existing program.Now I want to test it.I am not given test data.So in the middle of my debugging, I found that one internal table with no data.My problem is how to fill that internal table with few records in that debugging mode just as we change contents in debugging mode.If I want to proceed further means that internal table must have some records.
    Please I dont know how to create test data so I am trying to create values temporarily in debugging mode only.
    Thanks,
    Balaji

    Hi,
    In the debugging do the following..
    Click the Table button..
    Double click on the internal table name..
    Then in the bottom of the screen you will get the buttons like CHANGE, INSERT, APPEND, DELETE..
    Use the APPEND button to insert records to the internal table..
    Thanks,
    Naren

  • In sm30, when save, how to fill the table with the system data in the table

    Hi all, in SM30, we have user name and time fields, when we create record, after we click the SAVE button, it will automatically fill the fields with the system data, how can we realize it?

    Hi ,
    Do like this.
    1. Go to SE11 -> give your table name and press on change button .
    2.Go to Menu->Utilities-> Table Maintainance Generator , then it will take you another screen .
    3.Assign Functin group if already have one , other wise create function group and assign
    4.Go to Menu->Environment->Modification->Events , again it will take you to another screen
    5.Click on new entries
    ->Now press F4 in T column . Select<u> "01" - Before saving the data in the database</u> and in form routinue give any name of the routinue like "SAVE_USER_DATA" and press enter then u can see an editor symbol in next column click on that it will take you ABAP editor there type this code .
    ztable-username = sy-uname.
    ztable-createtime = sy-uziet.
    check and activate the code .
    With this your job will be complete . Now while entering data just leave columns blank , they will insert corresponding username and time
    Don't forget award points if it helps you.
    Regards,
    Raghav

  • How to fill a cube with test-data ?

    Hi,
    first of all, I wanted to find a solution by my own by engaging TREX - but I think the search engine give it up. There was no result for "data" or "cube". So, I hope anyone of you can help me.
    I created an input ready query. My cube is empty. By executing the input ready query, I got the message "No data found" - and no form to fill in any data.
    Now I would like to fill test-data into the cube. How can I do this in an easy and fast way? Just 3-4 rows - any hints on that?
    Bye and thanks in advance!

    If you have data in R3 and you're using a standard cube, you can activate Business contenda dataflow before selecting the cube.
    Else, the only way is to create an infosource for a flat file, update rule and also the flat file and load it.
    Hope it helps.
    Regards

  • How to fill selection box with clientside data?

    i want to make a html form that reads option values from the client.
    Because there are too many data, it's not reasonable for me to design a page which connects to server each time to fill the selection boxes.Instead i want to check if data resides at the clientside, if so fill selection boxes with that data, if not download it for the first time and store it on the client for later local retrieval.In addition i must be able to update that data residing on the client when i want.

    Hi,
    I can tell you some hints. Use cookies to store the information on to the client-side. You can read data from cookies using JavaScript. If you want to store huge amount of data on to the client-side, perhaps this would not be a better idea. In J2EE architecture we often use sessions to store values. You need to design your implementation in such a way that for the first time you fetch all the values from the database and put it in a session, and the next time onwards you can get the values from the session itself and thereby you can avoid going to database each and everytime. Write a Java class which has all the necessary get and set methods and store the object in the session. Using that object reference you can set and get the values from it. I hope this will help you.
    Thanks

Maybe you are looking for