Dynamically creating properties

Hi,
I'm migrating my application from NW 7.0 to NW 7.11 CE.
Previously I dynamically created properties from my application and they were automatically created as onlinemodifiable = true.
When I migrated my project the properties were no longer created as modifiable.
Can anybody point me to documentation or suggest a way to solve this issue?
Here's my code creating the dynamic property:
          Configuration cfg = null;
          try {
               cfg =
                    _cfgHandler.openSubConfiguration(
                         "application.global.properties",
                         ConfigurationHandler.WRITE_ACCESS);
          } catch (NameNotFoundException e) {
               e.printStackTrace();
          } catch (ConfigurationLockedException e) {
               e.printStackTrace();
          } catch (ConfigurationException e) {
               e.printStackTrace();
          // get the property sheet
          PropertySheet ps = cfg.getPropertySheetInterface();
          // Create the property
          ps.createSecurePropertyEntry(propertyName, "", "");
          // commit the changes
          _cfgHandler.commit();
          cfg.close();
Best Regards,
Ran

Hi,
Probably this configuration can be done through NWA [check this|http://help.sap.com/saphelp_nwesrce/helpdata/en/18/5157425e060d53e10000000a155106/content.htm]
Best Regards
Satish Kumar

Similar Messages

  • Dynamically Create Repeater Element in ActionScript

    Hi,
    I'm trying to dynamically create a repeater control with an
    image and a label control. I can do it directly in the MXML file
    but when I try and covert it into ActionScript it's not working.
    Can anyone see what the problem is with my code?
    public function GetPalettes():void{
    removeChild(document.FrontPage);
    Palettes.method = "GET";
    params = {"method": "GetPalettes", "BodyPartNo":
    document.PalettesMenu.selectedItem.@partNo};
    Palettes.cancel();
    Palettes.send(params);
    var VerticalBox:VBox = new VBox();
    VerticalBox.x = 10;
    VerticalBox.y = 10;
    VerticalBox.id = "VerticalBox";
    var PaletteRepeater:Repeater = new Repeater();
    PaletteRepeater.dataProvider =
    "{Palettes.lastResult.Palette}";
    PaletteRepeater.startingIndex = 0;
    PaletteRepeater.id = "PaletteRepeater";
    var PaletteImage:Image = new Image();
    PaletteImage.setStyle("HorizontalAlign", "left");
    PaletteImage.source = "
    http://localhost/Flex/Personalised%20Palettes-debug/{PaletteRepeater.currentItem.@PictureS rc}Med.png";
    PaletteImage.useHandCursor = true;
    PaletteImage.buttonMode = true;
    PaletteImage.mouseChildren = false;
    PaletteImage.id = "PaletteImage";
    var PaletteDescription:Label = new Label();
    PaletteDescription.text =
    "{PaletteRepeater.currentItem.@Description}";
    PaletteDescription.id = "PaletteDescription";
    document.MainPage.addChild(VerticalBox);
    VerticalBox.addChild(PaletteRepeater);
    PaletteRepeater.addChild(PaletteImage);
    PaletteRepeater.addChild(PaletteDescription);
    Thanks

    "katychapman85" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hey Amy,
    >
    > I've put a thread up about this but thought I'd ask you
    as well as you've
    > been
    > a great help to me so far.
    >
    > I have this function:
    > public function GetOptions(Menu:int):void{
    > document.MenuOptions.url =
    > "
    http://localhost/Flex/Personalised%20Palettes-debug/MenuOptions.php?Menu=";
    > document.MenuOptions.url += Menu;
    > document.MenuOptions.send();
    > }
    >
    > What I'm trying to do is when a user clicks on a Radio
    button this
    > function is
    > called and the number of the Menu required is sent to
    the function.
    >
    > I've added this Event Listener to my Radio Button:
    >
    >
    document.RadioButtons2.addEventListener(MouseEvent.CLICK,
    > function():void{GetOptions(2);});
    >
    > However, it's not working. Everything I've read suggests
    using an
    > anonymous
    > function in the Event Listener to pass the menu
    parameter but for some
    > reason
    > it's not working.
    What version of Flex are you using? The Help for Flex 3 has
    this to say:
    http://www.adobe.com/livedocs/flex/3/html/help.html?content=events_05.html
    Defining event listeners inline
    The simplest method of defining event handlers in Flex
    applications is to
    point to a handler function in the component's MXML tag. To
    do this, you add
    any of the component's events as a tag attribute followed by
    an ActionScript
    statement or function call.
    You add an event handler inline using the following syntax:
    <mx:tag_name event_name="handler_function"/>
    For example, to listen for a Button control's click event,
    you add a
    statement in the <mx:Button> tag's click attribute. If
    you add a function,
    you define that function in an ActionScript block. The
    following example
    defines the submitForm() function as the handler for the
    Button control's
    click event:
    <mx:Script><![CDATA[
    function submitForm():void {
    // Do something.
    ]]></mx:Script>
    <mx:Button label="Submit" click="submitForm();"/>
    Event handlers can include any valid ActionScript code,
    including code that
    calls global functions or sets a component property to the
    return value. The
    following example calls the trace() global function:
    <mx:Button label="Get Ver" click="trace('The button was
    clicked');"/>
    There is one special parameter that you can pass in an inline
    event handler
    definition: the event parameter. If you add the event keyword
    as a
    parameter, Flex passes the Event object and inside the
    handler function, you
    can then access all the properties of the Event object.
    The following example passes the Event object to the
    submitForm() handler
    function and specifies it as type MouseEvent:
    <?xml version="1.0"?>
    <!-- events/MouseEventHandler.mxml -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
    import mx.controls.Alert;
    private function myEventHandler(event:MouseEvent):void {
    // Do something with the MouseEvent object.
    Alert.show("An event of type '" + event.type + "'
    occurred.");
    ]]></mx:Script>
    <mx:Button id="b1" label="Click Me"
    click="myEventHandler(event)"/>
    </mx:Application>
    It is best practice to include the event keyword when you
    define all inline
    event listeners and to specify the most stringent Event
    object type in the
    resulting listener function (for example, specify MouseEvent
    instead of
    Event).
    You can use the Event object to access a reference to the
    target object (the
    object that dispatched the event), the type of event (for
    example, click),
    or other relevant properties, such as the row number and
    value in a
    list-based control. You can also use the Event object to
    access methods and
    properties of the target component, or the component that
    dispatched the
    event.
    Although you will most often pass the entire Event object to
    an event
    listener, you can just pass individual properties, as the
    following example
    shows:
    <?xml version="1.0"?>
    <!-- events/PropertyHandler.mxml -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
    import mx.controls.Alert;
    private function myEventHandler(s:String):void {
    Alert.show("Current Target: " + s);
    ]]></mx:Script>
    <mx:Button id="b1" label="Click Me"
    click="myEventHandler(event.currentTarget.id)"/>
    </mx:Application>
    Registering an event listener inline provides less
    flexibility than using
    the addEventListener() method to register event listeners.
    The drawbacks are
    that you cannot set the useCapture or priority properties on
    the Event
    object and that you cannot remove the listener once you add
    it.
    don't see anything in there about anonymous functions...?

  • Is it possible to dynamically create psp variables?

    I'd like to be able to dynamically create psp variables on the fly.  Without getting into details; using straight shared variables defined in a library is too constraining for my application.  I've found that I can create PSP variables dynamically using DataSocket VIs in the System directory (psp://localhost/system/), though I can't seem to do it with the LV Shared Variable VIs.  I was just curious if there was any way to programmatically create psp variables without using DataSocket VIs.

    In the client yes,
    Dynamically Creating Shared Variables
    The SVE will automatically create the target variable with default properties when a client attempts to connect to a URL with the following format.
    psp://computer/System/shared_variable, where shared_variable is the named tag for the data."
    On the server you create them. I believe, if my memory is correct, if you have DSC option there is code to dynamically create them on server side.

  • Help needed when dynamically creating new stage sprites

    Morning folks,
    I'm feeling very rusty when asking this question! It feels
    like I should
    know the answer but simply unable to comprehend where I'm
    going wrong at the
    moment!!
    I'm in the process of creating a Director piece that involves
    the user
    having to drag "shapes" onto a pre-defined grid [drag and
    drop style] --
    there are currently three different types of shape that can
    be dragged of
    which many of the shapes can be of the same type. So I need
    to display the
    three shape types on one side of the screen and allow the
    user to drag and
    drop as many as they wish to the girded area.
    I've written the drag and drop routine but now having
    difficulty in
    producing the dynamic creation of a new draggable shape; so
    far I've managed
    to create a new "shape" sprite from my cast library and
    placed it in the
    correct location. Then I create and add a new instance of my
    "Drag and Drop"
    behaviour onto the newly created sprite, but this is where it
    goes wrong --
    although I can drag the dynamically created sprite, once
    dropped Director
    complains of not knowing what its local properties are, for
    example I'm
    unable to reference the locH and locV of the newly created
    sprite!
    I'm really at a loss on this one and would appreciate any
    kind of guidance!
    Many thanks in advance, Mark ;-)

    Hi Saravanan,
    >>>><b>First column - Welcome message , below Date , time and place</b>
       It is possible to add date, time and location in the welcome area. Jus add a table to the <td> of the welcome area container. Like this.
    <% Date d= new Date(); %>
    <TD nowrap class="prtlHdrWelcome" ti="0" tabIndex="0" id="welcome_message"><%=StringUtils.escapeToHTML(GetWelcomeMsg(componentRequest, welcomeClauseStr))%><table width="100"><tr><td nowrap><%=d%></td><td>INDIA</td></tr></table></TD>
    Hope it helps.
    Regards,
    Saravanan
    P.S: Hope you remember the thread
    <a href="http://">https://www.sdn.sap.com/irj/sdn/thread?threadID=152135&messageID=1703666</a>

  • Dynamically creating Runtime users

    Hi,
    I am trying to create a workflow that would connect to a remote Unix Box with credentials & host details provided by user from New Scale as input parameters.
    The problem that I am facing is how to dynamically create runtime users as well as Targets & associate the user with that Target.
    Following inputs I will expect from New Scale - Host Name, user+pwd to connect to that Host.
    Regards,
    Abhi

    As per Michael's reponse you need to access the WSDL for both Target and Runtime User.
    Make sure you have enabled the TEO NBWS first(under file->server properties->web service in the master UI). Port 61527 for http, 61526 for HTTPS (both defaults)
    For Unix connections I have done the exact thing you describe and I used the telnet target type as I find it easiest to work with.
    I do a 3 step process... create runtime user, extract the GUID of that Runtime User from the output of the web services call, and then create the SSH connection and pass the GUID of the Runtime User into the SSH connection web service call.
    Here is a screenshot of the create runtime user:
    I extract the guid by using a match regular expression on ".*" and then doing a substring on that result.
    Here is a screenshot fo the create SSH connection:

  • Creating a Function logic for dynamically created XML buttons

    Hi!
    It's me...... again! Now I've dynamically created some buttons using XML. They're spread around the stage and I've modified a tooltip script to give each button a tooltip on Mouse_Over. But to se the logic and make it work using AS3 is hard (for me). I want a function that accept to parameters: Tooltip text and  Object to tooltip.
    In my code I get this error msg when initiating the function on dynamically created buttons:
    1118: Implicit coercion of a value with static type flash.display:Sprite to a possibly unrelated type flash.display:MovieClip.
    I beleive there are more than one thing here needing a fix.
    Can someone have a look and give me a pointer?
    Thanks
    function contentTooltip(ttt:String, ttclip:MovieClip):void {
        ttclip.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
        function mouseOverHandler(e:MouseEvent):void {
            ttip.descr.text=ttt;
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
            ttclip.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
            ttip.visible = true;
        function mouseOutHandler(e:MouseEvent):void {
            ttip.visible = false;
            ttclip.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
        function mouseMoveHandler(e:MouseEvent):void {
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
    contentTooltip("Scale button",scale_btn);
    contentTooltip("Hide button",hide_btn);

    I totally agree with what Ned says and suggests. Nevertheless, I would like to support your thinking process.
    From the way you wrote the tooltip functionality it is apparent to me that you conceptualize as a programmer. Again, as Ned said, nested functions are evil. BUT, in a way, what classes accomplish is encapsulation/nesting of properties and functions under the same umbrella. It actually feels that what timeline does in general is nesting named functions within a single function we have no access to.
    How you wrote the code is actually a blueprint for a class that could handle the functionality. You, perhaps, are very ready to start coding with classes - not on the timeline.
    With that said, for the sake of theory, here is how your functionality can be rewritten on timeline:
    scale_btn.toolTip = "Scale button";
    test_btn.toolTip = "Test button";
    hide_btn.toolTip = "Hide button";
    scale_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    test_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    hide_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    var overTarget:MovieClip;
    function mouseOverHandler(e:MouseEvent):void {
         overTarget = e.currentTarget;
         ttip.descr.text = overTarget.toolTip;
         ttip.x = stage.mouseX;
         ttip.y = stage.mouseY - 15;
         overTarget.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
         setChildIndex(ttip, numChildren - 1);
         ttip.visible = true;
    function mouseOutHandler(e:MouseEvent):void {
         ttip.visible = false;
         overTarget.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 
    function mouseMoveHandler(e:MouseEvent):void {
         TweenMax.to(ttip, .5, { x:stage.mouseX, ease:Quart.easeOut } );
         TweenMax.to(ttip, .5, { y:stage.mouseY - ttclip.height / 2, ease:Quart.easeOut } );
         //ttip.x=stage.mouseX;
         //ttip.y=stage.mouseY-ttclip.height/2;

  • Accessing dynamically created movieclips

    I have an application that I am adding movieclips to a
    container movieclip through a for loop and repeatedly calling
    myClip.addChild(theNewClip). Now I have a dozen clips in my
    container and it seems like the only way to access the clip is to
    use the getChildByName() method and cast it into a temporary clip
    so I can get at the its properties.
    Is this the best and/or only way to do this? Does the old AS2
    myContainer["theName"].property not work with dynamically created
    movieclips? It doesn't seem to work for me anymore.
    Anyway I am getting the clips now, but I was hoping someone
    could show me a better way to access a dynamically created movie
    clip.

    In AS3, this is probably not much better, but you can
    generically loop through all movie clips:

  • This[id] doesn't see dynamically created objects????

    Hey all!
    If i have
    <mx:Canvas id="TopCanvas" initialize="Init()">
    <mx:Canvas id="VisibleCanvas" >
    </mx:Canvas>
    </mx:Canvas>
    <fx:Script>
    function Init(){
    var NewO = new Canvas();
    NewO.id="InvisibleCanvas";
    TopCanvas.addChild(NewO);
    if (this["VisibleCanvas"]){
    //We can see non-dynamically created canvas
    if (this["InvisibleCanvas"]){
    //ERROR we cannot see the new one!
    Help please! How to access dynamically created Canvases via their id? I know i can save linkage to them in array, but i need to do it through id.
    Cheers!

    If you set the id property on a dynamically created instance, you can check
    the id of an instance later if it happens to be a target of an event, for
    example.  But it will not be assigned to a variable in the document.
    By default, MXML generates a non-dynamic class so you can't add properties
    to it at runtime.  You can set the name property and search the immediate
    parent by calling getChildByName, but if the parent is not the document, you
    still can't search the document.

  • Problem with embeding the same view in dynamically created view container

    Hello Experts,
                  I am getiing a dump when i try to embed the same view inside the dynamically created view container of
    dynamically created tabs of a tabstrip
    The requirement go like this, i have 2 views in which i have have to embed the 2nd view to view1 where i have an empty
    tabstrip without tabs. During runtime i create tabs as well as view containers accordingly and then try to embed view2 in tabs.
    I have put the below mentioned code in HANDLEIN,
      DATA: lref_vcntlr  TYPE REF TO if_wd_view_controller,
            lref_comp    TYPE REF TO if_wd_component_usage,
            lv_embed_pos TYPE string.
      lref_vcntlr = wd_this->wd_get_api( ).
      lv_embed_pos = 'FILE_PERS_EDIT/VC_GENERAL'.
      TRY.
          CALL METHOD lref_vcntlr->do_dynamic_navigation
            EXPORTING
              source_window_name        = 'FILE_PERSISTENCE_WND'          " Window
              source_vusage_name        = 'FILE_PERS_EDIT_USAGE_1'       " Source View usage
              source_plug_name          = 'TO_EDIT_LAYOUT'                       " Outbound plug
              target_view_name          = 'PERS_EDIT_LAYOUT'                  " Second view to be embedded
              target_plug_name          = 'IN'                                                  " Second view inboun plug
              target_embedding_position = lv_embed_pos
            RECEIVING
              component_usage           = lref_comp.
        CATCH cx_wd_runtime_repository .
      ENDTRY.
      wd_this->fire_to_edit_layout_plg( ).
    This works fine for the first time.
    However onaction tab select i change the embeding position( 'FILE_PERS_EDIT/view container name of different tab') of the view2 an try to embed view2 in a different tab.
    At this point i get a dump stating View2 already present in the window 'FILE_PERSISTENCE_WND' of component.
    I think, the view2 embediing has to be removed before i add the view2 in a different tab
    Kindly let me know how to remove view2 embedding from tab1 before i add a view2 to a different tab or is there any other
    means to handle this problem?
    Thanks & Best Regards,
    Srini.

    Hello Srini,
    I found a solution to your problem, because I had a similar task.
    In WDDOINIT I changed the method do_dynamic_navigation to if_wd_navigation_services_new~prepare_dynamic_navigation:
    DATA:
        l_view_controller_api TYPE REF TO if_wd_view_controller.
      l_view_controller_api = wd_this->wd_get_api( ).
      TRY.
          CALL METHOD l_view_controller_api->if_wd_navigation_services_new~prepare_dynamic_navigation
            EXPORTING
              source_window_name        = 'WDW_MAIN'
              source_vusage_name        = 'VW_SUB_USAGE_1'
              source_plug_name          = 'TO_VW_CONTENT'
              target_component_name     = 'ZTEST_DYNAMIC'
              target_view_name          = 'VW_CONTENT'
              target_plug_name          = 'DEFAULT'
              target_embedding_position = 'VW_MAIN/VC_TAB.VW_SUB/TAB1_VC'
            RECEIVING
              repository_handle         = wd_this->g_rep_handle.
        CATCH cx_wd_runtime_repository .
      ENDTRY.
      wd_this->fire_to_vw_content_plg( param1 = 'TAB1' ).
    In the action I first deleted the navigation targets, then navigated to the empty-view and last I called my target view:
      DATA:
        lv_position           TYPE string,
        l_view_controller_api TYPE REF TO if_wd_view_controller,
        lr_view_usage         TYPE REF TO if_wd_rr_view_usage,
        lr_view_***_t         TYPE wdrr_vca_objects,
        lr_view_***           LIKE LINE OF lr_view_***_t.
      l_view_controller_api = wd_this->wd_get_api( ).
      lr_view_usage = wd_this->g_view->get_view_usage( ).
      lr_view_usage->delete_all_navigation_targets( plug_name = 'TO_VW_CONTENT' ).
      CLEAR lv_position.
      CONCATENATE 'VW_MAIN/VC_TAB.VW_SUB/' old_tab '_VC' INTO lv_position.
      TRY.
          l_view_controller_api->if_wd_navigation_services_new~do_dynamic_navigation(
          source_window_name = 'WDW_MAIN'
          source_vusage_name = 'VW_SUB_USAGE_1'
          source_plug_name   = 'TO_EMPTYVIEW'
          target_component_name = 'ZTEST_DYNAMIC'
          target_view_name   = 'EMPTYVIEW'
          target_plug_name   = 'DEFAULT'
          target_embedding_position = lv_position ).
        CATCH cx_wd_runtime_repository.
      ENDTRY.
      CLEAR lv_position.
      CONCATENATE 'VW_MAIN/VC_TAB.VW_SUB/' tab '_VC' INTO lv_position.
      TRY.
          wd_this->g_rep_handle = l_view_controller_api->if_wd_navigation_services_new~prepare_dynamic_navigation(
            source_window_name = 'WDW_MAIN'
            source_vusage_name = 'VW_SUB_USAGE_1'
            source_plug_name   = 'TO_VW_CONTENT'
            target_component_name = 'ZTEST_DYNAMIC'
            target_view_name   = 'VW_CONTENT'
            target_plug_name   = 'DEFAULT'
            target_embedding_position = lv_position ).
        CATCH cx_wd_runtime_repository.
      ENDTRY.
      wd_this->fire_to_vw_content_plg( param1 = tab ).
    Ann.: I my example, I had 3 views: VW_MAIN which embedds VW_SUB. VW_SUB has the tabs in it and VW_SUB embedds VW_CONTENT.
    BR,
    Roland

  • Is there a way to use a statically defined appearance stream in a dynamically created annotation?

    Hello,
    I want to create a document with cascading 'popups'.  Not the built-in text-only popup, but an annotation containing an appearance stream that defines text and images.  I'm currently using widget annotations based on a pushbutton field.
    Each page in my document has many citations that refer to other pages in the document.  When a user hovers over the citation, I want a 'popup' to appear containing a depiction of the destination.  However, as the destination will itself have citations, I also want the 'popup' to contain citations that the user can hover over, triggering another popup, etc.  In this way, a user could navigate throughout the document without leaving the page or even clicking the mouse.
    Obviously, with even a modest number of citations per page, pre-calculating and statically defining all of these widgets causes a combinatorial explosion, making the document sluggish and very large.
    Instead, I'd like to statically define appearance streams once per document, and then dynamically create annotations and assign the appropriate appearance stream using JS as the user navigates.
    So far I've created a named AP in the names dictionary, but I haven't been able to use it to dynamically set an appearance stream of a dynamically created widget annotation.
    Also, I've called Doc.getIcon(), passing in the named AP, which returns an Icon object.  However, after field.buttonSetIcon() and passing in the named AP, the button does not display the icon.
    Is there a way to use a statically defined appearance stream in a dynamically created annotation?
    Thank you,
    Dave

    Hi George, I've gotten named APs to work, and I expect hidden buttons will follow.  Thank you very much!
    Quick follow-up - I will have many documents embedded within the same pdf file, and some of these documents will contain identical popups.  However, I don't want to store identical icons in each document on account of file size.
    Instead, I'd like to store one instance of each icon for all documents in the file.
    Can I store all of the icons in a single document, and then access them by calling <DocName>.getField().getIcon() from any document in the file?
    Thank you again,
    Dave

  • How to get the co-ordinates of a dynamically created input field

    Hello Frn's
    i have created a dynamic text view . but this text view is not appearing at proper position . I want palce it infront of a dynamically created input field . how can i do this ?
    as i am thinking ...i should first of all  get info about the co-ordinates of   dynamaclly creatd input field . and with respect to these co-ordinates ...set the position of  text View .
    Please suggest  your thoughts .
    Thanks and Regards
    Priyank Dixit

    Hi,
    There is no provision in WD for getting screen coordinates and then placing the UI element.
    You to add the UI element to layout editor and based on the layout type it will add the UI element to respective position.
    I would advice not to create dynamic UI elements( instead you can create them statically and then play with visibility status through context binding ). This will be more effective way and less error prone. This is also recommended practice.
    still,For dynamic creation you can refer to following wiki:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application
    regards
    Manas Dua

  • How dynamically create connection pool and Datasource

    Hi
    How I can dynamically create a connection pool and Data source in Oracle 10g Application server. In our J2EE application the user will be login with db user name, password and database name. I want to create connection pool and data source on the fly while login the user with database name. I our application we have access approximate 80 Databases. so my approach is given bellow
    1) Planning to create 80 connection pools and 80 Data sources so when user logs in while selecting the db name i will call the appropriate data source and create the DB connection. Is there any limitation to create number of data sources in oracle app server?
    2) Create DB connection with out using connection pool and data source. But i am not prefer this approach coz we need to handle some transaction in our application.
    Kindly throw some light on managing connection pool programmatically or in application run time.
    I would really appreciate if any one can provide any links or any inormation on this issue.
    Thanks in advance.

    Kindly let me know is there any drawbacks to create 80 Data Sources to connect 80 database in Oracle 10G App server and each data sources should have one connection pool. so i need to create 80 connection pool. Please let me know is this right approach or any work around to create Data source on fly for each request for corresponding database.

  • Assigning a 'dynamically created sequence' value to a variable

    in my procedure i am creating a sequence on the fly, i am preparing the name with some passed parameters like below
    v_seq_name := 'seq_'||loadid||v_table_name;
    execute immediate 'CREATE SEQUENCE '||v_seq_name||' MINVALUE 1 MAXVALUE 999999999999999999999999999 START WITH 1 increment by 1 cache 20';
    and now after doing some operations i need to assign the current value of sequence to a number variable i tried following but not working
    1) v_curr_value : = v_seq_name.currval ;
    2) select v_seq_name||'.nextval' into v_curr_value from dual;
    can you please suggest me how i can get the value in plsql block.

    DIVI wrote:
    in my procedure i am creating a sequence on the fly, i am preparing the name with some passed parameters like below
    v_seq_name := 'seq_'||loadid||v_table_name;
    execute immediate 'CREATE SEQUENCE '||v_seq_name||' MINVALUE 1 MAXVALUE 999999999999999999999999999 START WITH 1 increment by 1 cache 20';
    and now after doing some operations i need to assign the current value of sequence to a number variable i tried following but not working
    1) v_curr_value : = v_seq_name.currval ;
    2) select v_seq_name||'.nextval' into v_curr_value from dual;
    can you please suggest me how i can get the value in plsql block.Well, you haven't given the error you are getting but I guess the procedure isn't compiling? You need to execute immediate any reference to the sequence.
    Having said that, your architecture is probably wrong if you are dynamically creating things in a procedure.
    Why do you need to create them dynamically?

  • Dynamically creating a Record Group based on Previously entered Record Grou

    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Hi,
    I know how to dynamically create a record group based on a query and putting the code in When new form instance.
    My query is. I have a form which has multiple Record Groups and the user wants to dynamically create subsequent groups based on previous groups.
    For example
    I have a record group with selects a Location,
    when the user selects the Location from a list of values
    the 2nd record group called 'Cost Centres' will have to filter out only those with the locations selected above.
    How can I populate the 2nd record group at run-time when I do not know what site the user will select?
    If I simply populate in when new form instance as in location and just select everything, the list of values populates.
    CC field is a LIST ITEM and the list style is a POP LIST, it is not required.
    I have put the code in the Location field in the when-list-changed trigger.
    I am getting this error:
    frm-41337: cannot populate the list from the record group
    here is the code:
    DECLARE
    v_recsql Varchar2(1000); -- The SQL for creating the Record Group.
    v_recgrp RecordGroup; -- Record Group
    v_status Number; -- Return Value of Populate_Group function.
    c_where VARCHAR2(1000);
    BEGIN
         IF :location = '1' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''02'')';
         ELSIF :location  = '2' THEN
              c_where := ' substr(cost_centre,1,2) in (''02'',''03'')';
         ELSIF :location   = '3' THEN
              c_where := ' substr(cost_centre,1,2) in (''01'',''11'',''07'')';
                   ELSE
              c_where :=  ' 1=1'; --EVERYTHING
         END IF;
    v_recsql := 'SELECT cost_centre, description  FROM   cost_centres  where '||c_where;
    -- Create the Record Group
    v_recgrp := CREATE_GROUP_FROM_QUERY('v_recgrp', v_recsql);
    IF NOT ID_NULL(v_recgrp)
    THEN -- No Error, record group has been successfully created.
    -- Populate Record Group
    v_status := POPULATE_GROUP('v_recgrp');
    IF v_status = 0
    THEN -- No Error. Record Group has been Populated.
    POPULATE_LIST('block.CC', 'v_recgrp');
    END IF; -- IF v_status = 0
    -- Delete the Record Group as it is no longer needed.
    DELETE_GROUP('v_recgrp');
    END IF; -- IF NOT ID_NULL(v_recgrp)
    END;thanks for your assistance.

    Hi,
    Once record status gets change for block you can not populate/repopulate the list item. Keep those list items as non-database item with different names and create different items as database orignal items. Than assign the values in WHEN-LIST-CHANGE trigger to the actual database items.
    -Ammad

  • Uploading data from excel file to a dynamically created internal table

    Hi,
    I have a requirement where i have to upload data from an excel file into a database table. I would be able to determine the structure of the table only at runtime based on the user input.. so i have created an internal table dynamically.
    Could you please tell me if its possible to upload data from an excel file to the dynamically created internal table using any function modules?
    I thought of doing this by declaring a generic internal table of one field and then uploading the *.csv file into it and then splitting it based on "," and then assigning it to the field symbol referencing the internal table.. but my file length exceeds 132 characters and i'm only able to get data of lenght 132 char's in my internal table ( generic one).
    Could anyone please show me a way around this.
    Thanks in advance,
    Harsha

    Sure, check this out.
    report zrich_0002.
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: it_fldcat type lvc_t_fcat,
          wa_it_fldcat type lvc_s_fcat.
    type-pools : abap.
    data: new_table type ref to data,
          new_line  type ref to data.
    data: iflat type table of string.
    data: xflat type string.
      data: irec type table of string with header line.
      data: tabix type sy-tabix.
    data: file type string.
    selection-screen begin of block b1 with frame title text .
    parameters: p_file type  rlgrap-filename default 'c:Test.csv'.
    parameters: p_flds type i.
    selection-screen end of block b1.
    start-of-selection.
    * Add X number of fields to the dynamic itab cataelog
      do p_flds times.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = sy-index.
        wa_it_fldcat-datatype = 'C'.
        wa_it_fldcat-inttype = 'C'.
        wa_it_fldcat-intlen = 10.
        append wa_it_fldcat to it_fldcat .
      enddo.
    * 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>.
      file = p_file.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = file
        changing
          data_tab                = iflat
        exceptions
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          others                  = 17.
      loop at iflat into xflat.
        clear irec. refresh irec.
        split xflat at ',' into table irec.
        loop at irec.
          tabix = sy-tabix.
          assign component tabix of structure <dyn_wa> to <dyn_field>.
          <dyn_field> = irec.
        endloop.
        append <dyn_wa> to <dyn_table>.
      endloop.
    * Write out data from table.
      loop at <dyn_table> into <dyn_wa>.
        do.
          assign component  sy-index  of structure <dyn_wa> to <dyn_field>.
          if sy-subrc <> 0.
            exit.
          endif.
          if sy-index = 1.
            write:/ <dyn_field>.
          else.
            write: <dyn_field>.
          endif.
        enddo.
      endloop.
    Regards,
    Rich Heilman

Maybe you are looking for