Dynamic screen generation

Hello everybody. I have to generate new screen and fields on it at runtime. Does anybody know how to do this?

I had implemented similar thing 6 months back.
I am giving some guideline to fulfill your requirements.
1. There will be include in your main program, say ZMAIN which will be filled by another program, say ZCONTROL.
2. You will fill include (which will contain dynamic code for your selection screen) in ZCONTROL and submit ZMAIN from ZCONTROL
REPORT ZMAIN.
include zdyn_screen. (include it in your main program)
Report ZCONTROL.
data : gt_code TYPE TABLE OF string,
wa_code type string,
c_prog type sy-repid.
wa_code = 'Parameters : test type matnr.'.
append wa_code to gt_code.
c_prog = 'ZDYN_SCREEN'.
insert report c_prog from gt_code.
commit work.
SUBMIT ZMAIN AND RETURN.
* Clear up the screen as you exit.
REFRESH GT_CODE.
READ REPORT C_PROG INTO GT_CODE.
* You may insert some check if your want OR you can omit the step of reading report
refresh gt_code.
insert report c_prog from gt_code.
Remember, you may need much more logic to handle various scenarios.
To get the text from your dictionary field for your selection screen parameters / select-options you can also use code
INSERT TEXTPOOL
To check syntax before inserting code into your include, you can try SYNTAX-CHECK or use FM EDITOR_SYTAX_CHECK.
Regards,
Mohaiyuddin

Similar Messages

  • Regd. Dynamic Screen Generation

    Friends,
            I hava a requiement like i will receive the input parameters from the called function, so appropriate screen has been generated along with the input parameters. How to do that ?
            Thanks.
    Hitesh Shah

    Hi,
    This FM SWY_CREATE_DYNPRO is available in 4.7 onwards.
    If you want to display the screens conditionally,
    you can create as many screens required in screen painter and then call those according to requirement.
    e.g.
    if cond1 = true
    call screen 100.
    else.
    call screen 200.
    endif.
    Regards,
    Shashank

  • UIX: how to get dynamic image generation working on ias10G?

    Hi,
    Anybody got UIX Dynamic Image Generation working on ias10G, on unix? My Images do not get generated (the page only shows the plain links)
    My env:
    - ias10G
    - AIX Version 5
    - java version: unknown, do not know what version ias10G is using
    On earlier versions (OC4J 903) we had to make sure an XServer was running and pointed our DISPLAY variable to that server. When the XServer was down, we got a nice error message in the application logs. However on ias10G I cannot figure out where to set this variable and I cannot find any error messages.
    Can anybody please help me out a bit?
    Cheers,
    Martijn

    Hi Andy,
    Thanks for your reply. However, I have not yet been able to get it working.
    I have verified that the java version is indeed (this is what the oc4j logfile shows when I supply the -showversion parameter)
    java version "1.4.1"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1)
    Classic VM (build 1.4.1, J2RE 1.4.1 IBM AIX build ca1411-20030930 (JIT enabled: jitc))The relevant fragment of the opmn.xml:
              <process-type id="oc4j_cif_mh" module-id="OC4J">
                   <module-data>
                      <category id="start-parameters">
                         <data id="java-options" value="-Djava.security.policy=/oracbd/j2ee/oc4j_cif_mh/config/java2.policy -
    Djava.awt.headless=true -Xmx75m -Xms75m -showversion"/>
                         <data id="oc4j-options" value="-properties"/>
                      </category>
                      <category id="stop-parameters">
                         <data id="java-options" value="-Djava.security.policy=/oracbd/j2ee/oc4j_cif_mh/config/java2.policy -
    Djava.awt.headless=true"/>
                      </category>
                   </module-data>
                   <start timeout="900" retry="2"/>
                   <stop timeout="120"/>
                   <restart timeout="720" retry="2"/>
                   <port id="ajp" range="3301-3400"/>
                   <port id="rmi" range="3201-3300"/>
                   <port id="jms" range="3701-3800"/>
                   <process-set id="default_island" numprocs="1"/>
                </process-type>Finally, your JSP passes the test. I can access it. But still no uix image generation. Are there any logfiles I can check for error messages on the failing image generation? May it be a web cache problem?
    Thanks in advance

  • XMLParseException during dynamic theme generation

    Hi,
    I4m having problems with SQL statements in some requests to MapViewer during dynamic theme generation.
    When I put in the WHERE clause the operator "less than" the request fails. An XMLParseException is generated.
    For example:
    <jdbc_query XXXXXXX>
    select geom from table where column < 10
    </jdbc_query>
    the following exception is generated:
    oracle.xml.parser.v2.XMLParseException: Expected name instead of .
    When I change de symbol < to &lt; (like MapViewer Users Guide recommends):
    <jdbc_query XXXXXXX>
    select geom from table where column &lt; 10
    </jdbc_query>
    the following exception is generated:
    oracle.xml.parser.v2.XMLParseException: Unexpected EOF
    If the is no WHERE clause (select geom from table) the request works.
    What can be wrong ? Can I use the less than operator in the WHERE clause ?
    Thanks in advance,
    Rodrigo     

    OK. The OC4J version is 1.0.2.2.1. I4m using Oracle8i Enterprise Edition Release 8.1.7.0.0.
    Some examples of XML requests:
    1) This works fine
    <?xml version="1.0" standalone="yes"?>
    <map_request
    title=""
    basemap="MAP1"
    datasource="DS1"
    width="1098"
    height="648"
    bgcolor="#FFFFFF"
    antialiase="false"
    format="GIF_URL">
    <center size="73063.00272634998">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates> 376875.541941716, 7810266.276712325</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <themes>
    <theme name ="PLANTIOS_MPD">
                   <jdbc_query
                   asis="true"
    spatial_column="GEOM"
                   render_style="C.PLANTIOS_MPD"
                   jdbc_host="MyServer"
                   jdbc_port="1521"
                   jdbc_sid="db01"
                   jdbc_user="scott"
                   jdbc_password="tiger"
                   jdbc_mode="thin">
                   select geom from table where column = 50
    </jdbc_query>
         </theme>
    </themes>
    </map_request>
    2) This doesn4t work ('<' replaces '=' in SQL WHERE clause)
    <?xml version="1.0" standalone="yes"?>
    <map_request
    title=""
    basemap="MAP1"
    datasource="DS1"
    width="1098"
    height="648"
    bgcolor="#FFFFFF"
    antialiase="false"
    format="GIF_URL">
    <center size="73063.00272634998">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates> 376875.541941716, 7810266.276712325</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <themes>
    <theme name ="PLANTIOS_MPD">
                   <jdbc_query
                   asis="true"
    spatial_column="GEOM"
                   render_style="C.PLANTIOS_MPD"
                   jdbc_host="MyServer"
                   jdbc_port="1521"
                   jdbc_sid="db01"
                   jdbc_user="scott"
                   jdbc_password="tiger"
                   jdbc_mode="thin">
                   select geom from table where column < 50
    </jdbc_query>
         </theme>
    </themes>
    </map_request>
    3) This also doesn4t work ('&lt;' replaces '=' in SQL WHERE clause)
    <?xml version="1.0" standalone="yes"?>
    <map_request
    title=""
    basemap="MAP1"
    datasource="DS1"
    width="1098"
    height="648"
    bgcolor="#FFFFFF"
    antialiase="false"
    format="GIF_URL">
    <center size="73063.00272634998">
    <geoFeature>
    <geometricProperty typeName="center">
    <Point>
    <coordinates> 376875.541941716, 7810266.276712325</coordinates>
    </Point>
    </geometricProperty>
    </geoFeature>
    </center>
    <themes>
    <theme name ="PLANTIOS_MPD">
                   <jdbc_query
                   asis="true"
    spatial_column="GEOM"
                   render_style="C.PLANTIOS_MPD"
                   jdbc_host="MyServer"
                   jdbc_port="1521"
                   jdbc_sid="db01"
                   jdbc_user="scott"
                   jdbc_password="tiger"
                   jdbc_mode="thin">
                   select geom from table where column &lt; 50
    </jdbc_query>
         </theme>
    </themes>
    </map_request>
    Thanks,
    Rodrigo

  • How to create dynamic screen using module pool programming

    Hi,
    Could anybody help me how to create dynamic screens?
    I am developing a screen with HR Person with assignment info. If PERNR have multiple assignments, i need to show all the details one by one. How to show the details on screen. I need to call one by one assignment information dynamically.
    Please suggest me how to do, apart from using table controls.
    Thanks,
    Kamal

    You may have the below options:
    1) Table Control
    2) Individual fields
    3) ALV
    4) pop-up screen

  • How to handle dynamic screens in bdc

    HI SIR,
    i am working on BDC for CA02 in this i have probelm that if operation 10 it doesnot contains any items it showing one  screen and if operation 10 contain some items
    and its item counter increasing automatically in this case it coming to this screen through some other screen.so.plz help me how to handle this dynamic screens in bdc ,plz help.

    hi sir,
              now i am working BDC UPLOAD with tcode CA02 in this in second screen their are some rows like in table control
    opt
    10                x
    20
    30                 x
    like above in this if row one of column contains 'x' then if i want to fill sub item then it display i one screen EX 100 else if it dsplay screen 200(ie item 10 already contains subitems it display  x in one row column(i.e selected check box) else it show unselected check box.plz tell how to know wheather check box is selected or not from screen to .plz tell.
    thanking u

  • Dynamic screen field values

    Hi,
    One quick question, I have created a screen with reference to a custome table fields and it is working fine. When I enter values for the first time, the values look ok in debug but when I change the values on the screen, the new values are not updated in the screen fields in debug. Old values are shown in the debug.
    I guess there is some kind of logic to do this. Like using the dynamic screen fields read or ....
    Can someone help me on this?
    Regards,
    Roopesh Singh

    hi there...
    when u first enter the values, they get into the work area related to the screen fields.....
    but when u change the values, they dont get changed in the workarea associated with the fields. since the data does not get updated in the fields, it wont show in the debugging mode. so chk ur code and make sure u update the data in the variables associated with the fields.
    do reward if helpful or get back with further queries.

  • Dynamic Screen Resolution

    Hello Everyone!!! I am having tough times solving query on Dynamic Screen Resolution in J2ME. How can you create an application in J2ME that automatically adjusts to the screen resolution to the phone it is being installed. That means if the resolution is small the layout automatically adjusts to the screen resolution and if its bigger then accordingly... Please help....

    If you can use a UI framework/toolkit I suggest LWUIT. If not, code using proportions. Avoid absolute values of x, y, width and height. I made a sample at http://smallandadaptive.blogspot.com/2010/12/bar-chart.html

  • Dynamic screen size in J2ME

    Hi,
    How to get dynamic screen location for all devices..........
    Without changing coordinates from source code it will suit for all devices(Nokia, Samsung, Motorola).......... How to get this...
    Help me pls............

    Use code like this:
    public class start extends Canvas {
    public static int scrW;
    public static int scrH;
    public start() {
    setFullScreenMode(true);
    scrW = getWidth();
    scrH = getHeight();
    }

  • UIX dynamic image generation problem under SUSE Linux

    Hi,
    we have developed an application with UIX 2.1.14 under Windows 2000, and everything works fine when we run the application on the local OC4J.
    But after deploying the .war file to our production system under SUSE Linux SLES-7 and 9iAS Rel.2, the dynamic image generation doesn't work correctly:
    One strange thing we noticed is that rendering works fine when we use ground colours like #00FF00, #FF0000 and so on. But not when we use colours like #3172ba. We have tried this with XVFB, VNC and with "headless" JDK 1.4 (with java option -Djava.awt.headless=true in opmn.xml).
    Any ideas? Or possible reasons why image generation works using colours like #FF0000 and why not with colours like #3172BA?
    Regards,
    Matthias Scherer

    Hi Brian,
    there are no messages telling us that there is a problem with our x-server. The only messages belonging to the graphics initialization we get are:
    Rendering page = Page[name=pages/login]
    oracle.cabo.image: Initializing image cache: /oracle/ias1/j2ee/OC4J_AIS/applications/aisintra/aisintra/cabo/images/cache/de/ ...
    oracle.cabo.image: Finished initializing image cache: /oracle/ias1/j2ee/OC4J_AIS/applications/aisintra/aisintra/cabo/images/cache/de/
    oracle.cabo.style: Initializing graphics environment...
    oracle.cabo.style: Waiting for graphics environment initialization...
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    Font specified in font.properties not found [--symbol-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]
    oracle.cabo.style: Finished initializing graphics environment.
    oracle.cabo.style: Initializing fonts...
    oracle.cabo.style: Waiting for font initialization...
    oracle.cabo.style: Finished initializing fonts.
    oracle.cabo.image: Initializing image cache: /oracle/ias1/j2ee/OC4J_AIS/applications/aisintra/aisintra/cabo/images/cache/ ...
    oracle.cabo.image: Finished initializing image cache: /oracle/ias1/j2ee/OC4J_AIS/applications/aisintra/aisintra/cabo/images/cache/
    Regards,
    Matthias

  • Dynamic Screen Paramater Generation

    Is it possible to generate parameters for a screen on the fly??
    im trying to create a generic program that can adapt selection option parameters depending on a database table.
    ie if the user asks to search for an item in a table, they will be provided with a dialog containing dynamic parameters for each field in the table.
    tried this using field symbols but the compiler will not let me.
    ie:
    for all fields in table
    parameters: <pname> type <ptype>.
    is it possible to generate code for a form and call it at runtime??

    Yes, it is.  But the statements are not released for customer use and they will not be supported by SAP.  If you would like an example program, email me at my email address on my business card.   Here is another way of doing it using a POPup.
    report zrich_0001 .
    data: ivals type table of sval with header line.
    data: x_matnr type mara-matnr,
          x_vbeln type vbak-vbeln,
          x_edatu type vbep-edatu.
    start-of-selection.
      ivals-tabname = 'MARA'.
      ivals-fieldname = 'MATNR'.
      append ivals.
      ivals-tabname = 'VBAK'.
      ivals-fieldname = 'VBELN'.
      append ivals.
      ivals-tabname = 'VBEP'.
      ivals-fieldname = 'EDATU'.
      append ivals.
      call function 'POPUP_GET_VALUES'
        exporting
    *   NO_VALUE_CHECK        = ' '
          popup_title           = 'Enter Values'
    *   START_COLUMN          = '5'
    *   START_ROW             = '5'
    * IMPORTING
    *   RETURNCODE            =
        tables
          fields                = ivals
       exceptions
         error_in_fields       = 1
         others                = 2
      read table ivals with key fieldname = 'MATNR'.
      if sy-subrc  = 0.
        x_matnr = ivals-value.
      endif.
      read table ivals with key fieldname = 'VBELN'.
      if sy-subrc  = 0.
        x_vbeln = ivals-value.
      endif.
      read table ivals with key fieldname = 'EDATU'.
      if sy-subrc  = 0.
        x_edatu = ivals-value.
      endif.
      write:/ x_matnr, x_vbeln, x_edatu.
    Regards,
    Rich Heilman

  • Dynamic  report generation

    We are migrating our client reports from crystal reports to business object reports and I need your help on how to achieve the below functionality in Business object reports.
    Requirements
    1. We need to generate and deliver around 30,000 statements to clients (mostly ftp and email) from 300 Webi report templates.
    2. This has to be a complete automated process with no user intervention.
    For example: Using Webi / Deski Report1, we need to run the report for each client account and then generate a statement and deliver it to client (only client specific data). Web1 reports are complex and some might take 30 to 60mins for generation.
    Questions
    1) Can it be done by just using BO tools with out coding ( using any .net sdk)?
    2) Can a single BO server handle the load, If not How to load balance reports generation and delivery across multiple servers?
    3) How to dynamically pass parameters to Webi report without coding?
    Thanks for reading my post. Any help/ suggestion is appreciated.

    In our current architecture, 
    1) We use crystal report templates and pass dynamic datasets at runtime to generate multiple client statements.
    2) For load balancing, we have 6 app servers with crystal runtime installed and we distribute load across the servers using custom code.
    My question is if use BO enterprise will there be any performance enhancements?

  • Dynamic UIElement Generation at Runtime

    Hi everybody,
    My problem is, that I want to create a number of elements at runtime. The number depends on the records in the database. So when I got 30 records in my database. I want to create 30 elements. So far, so good.
    The connection through the WebServices works very well.
    Now I got my problems with display the elements. I want to use the tray element.
    Now my Code looks like this:
    //... much code before! :-)
    //here you get the number of affected rows
    length = req.getResponse().getResultAsArray().length;
    //dynamically create trays, after the number of selected rows
    for (int i = 0; i < length; i++)
    IWDTransparentContainer transparent = (IWDTransparentContainer) view.createElement(IWDTransparentContainer.class, "TC."+i);
    IWDTray tray = (IWDTray) view.createElement(IWDTray.class, "tray."+i);
    //I don't want any more options at the moment ;-)
    tray.setEnabled(true);
    tray.setExpanded(false);
    transparent.addChild(textView);
    transparent.addChild(tray);
    So but nothing is shown on the screen.
    Now there exists the method setVisible(), I think this is the key to solve my problem. But this method expects a WDVisibility parameter and I don't know what I must type in.
    I tried it with com.sap.ide.webdynpro.uielemtdefinitions.Visibility, it doesn't work.
    Then I created a context attribute with this type!
    doesn't work, too.
    My you can help me?
    Kind Regards,
    Andre

    Hi,
    for (int i = 0; i < length; i++)
    <b>IWDTransparentContainer container = (IWDTransparentContainer)view.getElement("RootUIElementContainer");</b>
    IWDTransparentContainer transparent = (IWDTransparentContainer) view.createElement(IWDTransparentContainer.class, "TC."+i);
    IWDTray tray = (IWDTray) view.createElement(IWDTray.class, "tray."+i);
    //I don't want any more options at the moment
    tray.setEnabled(true);
    tray.setExpanded(false);
    transparent.addChild(textView);
    transparent.addChild(tray);
    <b>container.addChild(transparent);</b>
    Hope it helps,
    Regards,
    Nagarajan.
    Message was edited by: Nagarajan Kumarappan

  • Dynamic Columns Generation in Bex

    Hi Gurus,
    I have a requirement to create a BEX report where user will enter a starting month/fiscal period and number of months/periods on a variable screen and the Bex will generate columns dynamically. If the user does not enter anything on the variable screen, then it will generate columns for all months the current year. For example if an user enters month; 01 and number of months 6, then it should generate Aug06, Sep06, Oct06, Nov06, Dec06, Jan07 these columns and populate values(0amount) in them.
    If the user runs report on say 2/22/2007 and enters nothing on the variable screen, then it should generate Jan07, Feb07 just 2 columns for 2 months and populate values in them.
    I checked the forum and there are couple of them addressing this topic but it is not clear to me. Somebody tells to create variable in row, somebody in columns and right customer exit.
    Can some experts readdress this topic and provide a step by step guide, how to achieve this kind of report?
    Any help is really appreciated.
    Thanks.
    Sheo

    It seems like writing User Exit is the only solution.
    in User Exit, at I_STEP = 2, you check for the input user value. If, u have month entered as 01/2007 and number of months as 6, you need to calculate the lower and higher limit of fiscal/calander month you want to restrict
    So, at I_STEP = 2, you find the value of your month variable as 01/2007 and no of month variable as 6, set the low and high value of month as per your req using some sort of calculation, which will be added into columns.
    if st I_STEP = 2, entered value is NULL or " ". Set the low and high value of month starting from jan of current year (which u can set using SY-DATUM) to current month of current year.

  • Dynamic HTML generation from a Dynamic PDF/XDP

    I was wondering if LiveCycle is able to generate a dynamic HTML page from a dynamic XDP/PDF form in LiveCycle ES ?
    I have read up on the help contents regarding HTML generation from PDF forms but its not mentioned anywhere whether LiveCycle supports the creation of an HTML page that mimics the dynamic behavior of a dynamic PDF/XDP form.
    Thanks in advance

    Yes it does ....
    Paul

Maybe you are looking for