How can i create a dynamic cavs simultor for single webservice.

im using CAVS to create simulator .
im able to created a simulator that returns a predefined response for any request.but is it possible to create a simulator that can generate response dynamically base on data in the request?.

See the following program, it builds a dynamic internal table based on the company codes from the select option. 
report zrich_0001 .
type-pools: slis.
field-symbols: <dyn_table> type standard table,
               <dyn_wa>.
data: alv_fldcat type slis_t_fieldcat_alv,
      it_fldcat type lvc_t_fcat.
data: it001 type table of t001 with header line.
selection-screen begin of block b1 with frame title text-001.
select-options: s_bukrs for it001-bukrs.
selection-screen end of block b1.
start-of-selection.
  select * into table it001 from t001
                 where bukrs in s_bukrs.
  perform build_dyn_itab.
*  Build_dyn_itab
form build_dyn_itab.
  data: index(3) type c.
  data: new_table type ref to data,
        new_line  type ref to data,
        wa_it_fldcat type lvc_s_fcat.
  clear wa_it_fldcat.
  wa_it_fldcat-fieldname = 'PERIOD' .
  wa_it_fldcat-datatype = 'CHAR'.
  wa_it_fldcat-intlen = 6.
  append wa_it_fldcat to it_fldcat .
  loop at it001.
    clear wa_it_fldcat.
    wa_it_fldcat-fieldname = it001-bukrs .
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 4.
    append wa_it_fldcat to it_fldcat .
  endloop.
* Create dynamic internal table and assign to FS
  call method cl_alv_table_create=>create_dynamic_table
               exporting
                  it_fieldcatalog = it_fldcat
               importing
                  ep_table        = new_table.
  assign new_table->* to <dyn_table>.
* Create dynamic work area and assign to FS
  create data new_line like line of <dyn_table>.
  assign new_line->* to <dyn_wa>.
endform.
Regards,
Rich Heilman

Similar Messages

  • How can I create a new ring tone for my iPhone 4?

    How can I create a new ring tone for my iPhone 4? I followed the Garage Band process and ended up with the ring tone I want as a AAC audio file. It got stored in my iTunes a a song rather than a ring tone. How do I make it a ring tone vs. a song? I tried dragging it t the Ring Tone category at the bottom of the ITunes list, but it won't alloow me to move it?

    There's also an easy to use Applescript over at Doug's Applescripts for iTunes. It automates the whole thing. All you do is set the start and stop time on a file in iTuens and run the script. It will do everything else.
    Make Ringable v1.1
    http://dougscripts.com/475

  • How can I create a sub-iTunes account for a teen?

    how can I create a sub-iTunes account for a teen?
    I need to separate our music libraries but still keep it under control from the main account (mine).

    iOS 5 & iCloud Tips: Sharing an Apple ID With Your Family

  • How can I create a magazine web app for all devices?

    How can I create a magazine web app for all devices?

    magazine web app is not supported in DPS as of now. You can share the contents to preview it on web content viewer.

  • How can i create a bootable usb sata for xp

    how can i create a bootable usb sata for xp

    Installing Windows XP on a portable USB hard drive is not supported.
    Carey Frisch

  • How can I create a start up disk for a old intel core duo running 10.5.8.. Computer works fine, but can't find install disk.

    How can I create a start up disk for a old intel core duo running 10.5.8.. Computer works fine, but can't find install disk. Want to use internal disk drive or USD flash drive.

    Try calling 1-800-676-2775.  Give the serial number and thy *may* still burn you new install disks designed just for the hrdware in your system (for a fee, something like $160 per disk).  *May* is only because they may not burn disks for Leopard anymore.
    If they do not burn them for you, you can buy Leopard disks off Amazon or eBay for about $200.
    Have you considered Snow Leopard?.  Those disks only cost $19 (single user) or $29 (5-user license) through Apple by calling 1-800-MY-APPLE.

  • I have an iCloud email address on my iMac. How can I create an icloud email address for my wife on the same computer?

    I have an iCloud email address on my iMac. How can I create an icloud email address for my wife on the same computer?

    If all you want is an additional email address you can create up to three 'email aliases'  - these are additional addresses (not accounts) which deliver into the same inbox as the main account.
    You should be aware before you start that once you've created an alias you cannot turn that address into a full iCloud account, move it to another account, or reactivate it if you delete it.
    More information on aliases here:
    http://help.apple.com/icloud/#mm6b1a490a
    If you want to keep her email separate from yours she will need to create a new Apple ID, and use it to create a new iCloud account either on a separate computer or on a separate User Account on your Mac.

  • How can i create the blue "I"-Button for the Documentation in a view

    How can i create the blue "I"-Button for the documentation in a view?
    I want to prepare the button with user specified Information...
    and where must be create the documentation?
    thanks
    Edited by: DDC-TD on Apr 24, 2008 10:22 PM

    you have not mentioned where do u want the " I " information button ,
    1. If u want for a report , u can get the information button on selection-screen only .
       if u goto se38 on the mail screen u will find a radio button for documentaion ,
    when u select it and click 'create' or 'change' , an editor will open and u can document anything there ....
    2. Or specify where u want  info button .
    thanks ,
    reward points if usefull.

  • How can I create classes dynamically?

    Guys
    My requirment is I want to create classes and their instancess too dynamically. First is it possible in Java?
    If so, then my next question is how can I refer such dynamically created classes in my code to avoid compilation error.
    Thanks in advance
    Regards
    Sunil

    For other ways to generate classes on runtime you could also have a look at BCEL:
    http://jakarta.apache.org/bcel
    And dynamic proxies:
    http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html
    If so, then my next question is how can I refer such
    dynamically created classes in my code to avoid compilation
    error.Generally the classes that you load should either implement some interface or extend some abstract class you know of at compile time so that the compiler knows what methods are available for use. If that's not possible you can only use reflection.

  • How can i create datasource on apache server for ADF application?

    Hi All,
    i my use case i have created simple adf application using ADF BC and want to deploy on Apache server 6.x.
    So my question is that  how can i create Data Source i have goggling and find  two different way to do this.
    1. write following line of code on apache server conf/Context.xml file.
    <Resource name="jdbc/TestDB" auth="Container"
                  type="javax.sql.DataSource"
                   driverClassName="oracle.jdbc.OracleDriver"
                  url="jdbc:oracle:thin:@localhost:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"/>
    but when i have used this way i got following exception.
    org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection
    check link-
    https://forums.oracle.com/thread/2564233
    2. write following line of code apache conf/Server.xml file
    <GlobalNamingResources>
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users
        -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/TestDB" auth="Container"
                  type="oracle.jdbc.pool.OracleDataSource"
                  description="User database that can be updated and saved"
                  driverClassName="oracle.jdbc.driver.OracleDriver"
                  factory="oracle.jdbc.pool.OracleDataSourceFactory"
                  url="jdbc:oracle:thin:@//172.31.43.207:1521:dst"
                  username="jagrandb" password="jagrantest" maxActive="20" maxIdle="10"
                  maxWait="-1"   />
      </GlobalNamingResources>
    and add this line in context.xml file inside <context> tag
    <ResourceLink global="jdbc/TestDB" name="jdbc/TestDB" type="oracle.jdbc.pool.OracleDataSource"/>
    but when i have run application i have got following error
    log-
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: invalid arguments in call"
      at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:298)
      at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:181)
      at org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(test_jsp.java:110)
      at org.apache.jsp.test_jsp._jspService(test_jsp.java:63)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
      at java.lang.Thread.run(Thread.java:662)
    Aug 2, 2013 5:17:21 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: invalid arguments in call"
      at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:298)
      at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:181)
      at org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(test_jsp.java:110)
      at org.apache.jsp.test_jsp._jspService(test_jsp.java:63)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:857)
      at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)
      at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
      at java.lang.Thread.run(Thread.java:662)
    so what is the solution how to create datasource on apche server which suitable for adf application?
    when i test data source using  following code used 1. way as i mentioned above  its running fine bt not for second.
    <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <sql:query var="rs" dataSource="jdbc/TestDB">
    select empname from pay_emphdr where empcd='JK1306'
    </sql:query>
    <html>
      <head>
        <title>DB Test</title>
      </head>
      <body>
      <h2>Results</h2>
    <c:forEach var="row" items="${rs.rows}">
        Foo ${row.empname}<br/>
    </c:forEach>
      </body>
    </html>
    please help me. it is very urgent.
    thanks in Advance
    Manish

    Hi Lindalnci
    i have already tried  this tutorial and in my post i have defined first way to do using this procedure.
    in that case i have got following exception as i have mentioned above
    org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection

  • How can I create a folder in ios for pdf files?

    How can I create a separate folder in ios for my pdf files?

    Hi Artistdeet,
    For this you have to follow certain steps-
    1. Tap on Document tab from left pane of Adobe Reader.
    2. Tap on 'Edit' button placed at right side of top toolbar.
    3. Tap on "folder icon with plus sign", it will ask you to enter the folder name.Enter desired folder name by which you want to create the folder.
    Hope this will solve your problem.
    Thanks
    -Satyadev

  • Can i create more than one instance for single database?

    HI
    anybody can tell me how to create more than one instance for single database(without using RAC)?
    thanks
    Kalanidhi

    Anandji,
    I sometimes think differently. I also think like what this person is asking..(although I have installed and administering 5 different RAC databases)
    The main doubt of mine is that we create multiple instances accessing the same storage area.
    Anyway the controlfiles of all instances will have the same information except the instance_names and instance id's.
    Hence I always think , why can't it be possible to to create another instance in the same system and point it to a controlfile which is copied from the other instance.
    Why can't the same files be shared between the two instances in a same system ?
    I know I am thinking a little bit confusing...
    Anyway I need to test that also...
    Mahesh.

  • How can I create events dynamic for a Group/List?

    Hey,
    atm I'm programming a little application where i want to add elements to my center-pane.
    Simpyfied I got:
    - Center Pane : here shall the elements appear on right click in bottom-pane. This pane shall be used as anything like a playground where you can drag/drop and connect items from the bottom-pane
    - Bottom Pane: here I got about 180 elements which are quite equal. This is sth like a menu of items which you can use. I realised them in java classes extended from a parent class with differend calulations.
    What I want:
    I want to create an event handler for EACH of the "menu" elements dynamically. Just sth like:
        for (int i = 0; i < basic_menu_list.size(); i++)
          final Element el = hbox_bottom.getChildren().get(i);
          hbox_bottom.getChildren().get(i).setOnMouseClicked(new EventHandler<MouseEvent>()
            public void handle(MouseEvent event)
              if (event.isSecondaryButtonDown())
                playground.add(el);
                redrawPlayground();
        }But as i expected this doesnt work...
    Now my question:
    How can I solve this problem? Is there any option to listen to all elements of a group without hard-coding every single listener?
    Thanks for your help,
    Martin

    Hello User,
    Why did you expect that it wouldn't work?
    You have an example with "transition" apply on a bunch of circles in the Getting Started with JavaFx (http://download.oracle.com/javafx/2.0/get_started/jfxpub-get_started.htm)
    Here a basic example class...
    import javafx.application.Application;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.TextBox;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class HelloWorld extends Application {
        //~ ----------------------------------------------------------------------------------------------------------------
        //~ Methods
        //~ ----------------------------------------------------------------------------------------------------------------
        public static void main(String[] args) {
            // Entry point
            Application.launch(args);
        @Override
        public void start(Stage mainStage) throws Exception {
            Pane pane = new Pane();
            Scene scene = new Scene(pane, 200, 200);
            VBox vBox = new VBox();
            TextBox input1 = new TextBox();
            TextBox input2 = new TextBox();
            vBox.getChildren().addAll(input1, input2);
            for (Node input : vBox.getChildren()) {
                input.setOnMouseClicked(new EventHandler<MouseEvent>() {
                        public void handle(MouseEvent event) {
                            System.out.println("test click");
            pane.getChildren().add(vBox);
            mainStage.setScene(scene);
            mainStage.setVisible(true);
    }Niculaiu

  • How can I create a dynamic Dropdownlist

    Hi Experts,
    I am new in the adobe forms and I have this problem.
    I am working on a Dropdownlist in Adobe Interactive Form. In my case, my form will be used in Offline-ABAP system without any web dynpro application.
    I have an internal table containing some values like this (number of rows depend on what is store on the database dynamic)
    A0  Dropdownlist1
    A1    Dropdownlist2
    A2    Dropdownlist2
    B0 Dropdownlist1
    B1    Dropdownlist2
    B2    Dropdownlist2
    B3    Dropdownlist2
    B4    Dropdownlist2
    C0  Dropdownlist1
    C5    Dropdownlist2
    C6    Dropdownlist2
    C7    Dropdownlist2
    I would like to create 2 dropdownlist. to be as follows:
    The first dropdownlist must have for example the values A0, B0, C0 .
    When the user select for example B0 from the Dropdownlist1, then dropdownlist2 must have only the value B1, B2, B3 and B4.
    How can i do that as I have seen the example in the purchase order (country and state).
    My requirement is that, the value must be dynamic, that means i must select the value from the SAP-Database into internal table and bind it to my dropdownlist.
    Thanks and Regards.
    mishak

    See the following program, it builds a dynamic internal table based on the company codes from the select option. 
    report zrich_0001 .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    data: it001 type table of t001 with header line.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for it001-bukrs.
    selection-screen end of block b1.
    start-of-selection.
      select * into table it001 from t001
                     where bukrs in s_bukrs.
      perform build_dyn_itab.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = 'PERIOD' .
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
      loop at it001.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = it001-bukrs .
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 4.
        append wa_it_fldcat to it_fldcat .
      endloop.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    Regards,
    Rich Heilman

  • How can i create a dynamic structure based on my input from a select-option

    Hello,
    This is to develop a custom report in FI for G/L Balance based on company code.
    I have an input select-option for Company code.
    Based on the range of company code my output layout should be modified.
    I am not very much sure to create a dynamic internal based on the input from a select-option.
    Can any one please let me know how can i do this.
    I would appreciate for anyone who turns up quickly.
    Thank you,
    With regs,
    Anitha Joss.

    See the following program, it builds a dynamic internal table based on the company codes from the select option. 
    report zrich_0001 .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    data: it001 type table of t001 with header line.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for it001-bukrs.
    selection-screen end of block b1.
    start-of-selection.
      select * into table it001 from t001
                     where bukrs in s_bukrs.
      perform build_dyn_itab.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = 'PERIOD' .
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
      loop at it001.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = it001-bukrs .
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 4.
        append wa_it_fldcat to it_fldcat .
      endloop.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    Regards,
    Rich Heilman

Maybe you are looking for