How to create Default Schema from within the application

Hi friends
I am creating users using the following within my application using this syntax
BEGIN
APEX_UTIL.CREATE_USER
(:P124_USER_ID, :P124_USER_NAME,:P124_USER_FIRST_NAME,:P124_USER_LAST_NAME,' ',:P124_USER_EMAIL_ID,'xxxx');
END;
The default workspace for the user is set as blanks. I would like to set it to be the default workspace as per the current logged in user.
Can you help me with the syntax for this
thank you in advance
Laxmi

Laxmi,
The subject of the post is "How to create Default Schema from within the application".
But your question asks how to set the "default workspace" for a newly created user.
Those are different questions and not the ones I think you need answered.
Let me answer this question "How can you set the default schema for an account when creating the account and set it to the same value used for the default schema attribute of the administrator account used to authenticate to the currently running application?".
In the apex_util.create_user call use named parameter notation and fetch the information about the currently logged-in user first, e.g.,declare
  l_workspace               varchar2(256);
  l_user_name               varchar2(256);
  l_first_name              varchar2(256);
  l_last_name               varchar2(256);
  l_web_password            varchar2(256);
  l_email_address           varchar2(256);
  l_start_date              varchar2(256);
  l_end_date                varchar2(256);
  l_employee_id             varchar2(256);
  l_allow_access_to_schemas varchar2(256);
  l_person_type             varchar2(256);
  l_default_schema          varchar2(256);
  l_groups                  varchar2(256);
  l_developer_role          varchar2(256);
  l_description             varchar2(256);
begin
apex_util.fetch_user (
  p_user_id                  => apex_util.get_current_user_id,
  p_workspace                => l_workspace,
  p_user_name                => l_user_name,
  p_first_name               => l_first_name,
  p_last_name                => l_last_name,
  p_web_password             => l_web_password,
  p_email_address            => l_email_address,
  p_start_date               => l_start_date,
  p_end_date                 => l_end_date,
  p_employee_id              => l_employee_id,
  p_allow_access_to_schemas  => l_allow_access_to_schemas,
  p_person_type              => l_person_type,
  p_default_schema           => l_default_schema,
  p_groups                   => l_groups,
  p_developer_role           => l_developer_role,
  p_description              => l_description);
apex_util.create_user(
  p_user_id        => :P124_USER_ID,
  p_user_name      => :P124_USER_NAME,
  p_first_name     => :P124_USER_FIRST_NAME,
  p_last_name      => :P124_USER_LAST_NAME,
  p_email_address  => :P124_USER_EMAIL_ID,
  p_web_password   => 'xxxx',
  p_default_schema => l_default_schema);
end;Scott

Similar Messages

  • How to create a new folder within the video folder in media

    Hi, I'm trying to figure out how to create a new folder within the video folder in media. I can easily create new folders within the pictures folder but not in videos.....Why??? Thanks in advance for your help.
    Message Edited by dany_s on 06-25-2009 03:58 PM
    Solved!
    Go to Solution.

    Hello,
    I think you can try two things : the soft reboot, and if it does not work, the hard reboot. Don't worry, you can't lose data with these two reboots.
    Soft reboot :
    1) Hit the three following keys at the same time :
    - Alt
    - Right Shift
    - Delete
    2) wait 2 minutes for the Blackberry to wake up.
    Hard reboot :
    1) your Blackberry device is on
    2) remove the battery and wait for a minute
    3) Put the battery back
    4) wait 5 minutes for the device to wake up.
    Please tell us if it works for you.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

  • I can not purchase from within the application clash of clans where necessary to answer the security questions that forgot their answers please help thank you

    I can not purchase from within the application clash of clans where necessary to answer the security questions that forgot their answers please help thank you

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you should see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps : https://discussions.apple.com/docs/DOC-4551
    e.g. you can try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
    or try ringing Apple in your country and ask to talk to the Accounts Security Team : http://support.apple.com/kb/HE57
    When they've been reset you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • How we create a flat file on the application server

    hi,
    how we create a flat file on the application servere,this file have the header data and corresponding item data also.
    i.e. how we use the AT NEW and ATEND. statement in this file creation.
    pls send me some code related to this.
    thanks,
    vipin

    Hi Grafl,
    Chk this link
    Folder creation in AL11 using ABAP program
    try this code.This works on UNIX servers
    data: unixcom like   rlgrap-filename.
    data: begin of tabl occurs 500,       
            line(400),    
          end of tabl.
    dir = unixcom = 'mkdir mydir'. "command to create dir
    "to execute the unix command 
    call 'SYSTEM' id 'COMMAND' field unixcom
                      id 'TAB' field tabl[].
    <b>Reward Points if Useful</b>
    Regards
    Gokul

  • Create fixed assets from within the transaction for creating the purchase order

    Hello All,
    I have gone through the notes on help.sap.com related to automatic creation of asset master record at the time of creating purchase order.  I am not sure how do we achieve this?
    Link to the notes on help.sap.com
    SAP Library - Asset Accounting (FI-AA)
    Any suggesstions from the expert group is appreciated.
    Thank you,
    Vinay

    Hi Vinay
    I know there is a feature whereby you assign asset classes per material group and then you create assets from within the PO. I never used it though
    Let me tell you one thing or rather ask you. Will you as a finance consultant be willing to let a MM guy create the assets??
    Or will a MM guy be willing to create it?? If you allow them, you should be ready for surprises.
    Honestly, this is a feature not worth exploring unless a FI guy is willing to create the PO. I would suggest the creation of asset masters should be with FI only
    Br. Ajay M

  • I didn't receive my purchases from within the application!

    May be purchased from within one application yesterday but I did not receive my purchases.

    If you didn't receive what you purchased in the application, you will need to contact iTunes store support.
    http://www.apple.com/lae/support/itunes/contact/
    File a ticket using the link above.
    HTH

  • How to Create XML Schema From JTree ?

    Please help me... Thank you.
    This is Code
    Tree.java ----- Run This File
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class Tree extends JPanel implements ActionListener {
        private int newNodeSuffix = 1;
        private static String ADD_COMMAND = "add";
        private static String REMOVE_COMMAND = "remove";
        private static String CLEAR_COMMAND = "clear";
        private static String OK_COMMAND = "ok";
        private DynamicTree treePanel;
        public Tree() {
            super(new BorderLayout());
            //Create the components.
            treePanel = new DynamicTree();
            //populateTree(treePanel);
            JButton addButton = new JButton("Add");
            addButton.setActionCommand(ADD_COMMAND);
            addButton.addActionListener(this);
            JButton removeButton = new JButton("Remove");
            removeButton.setActionCommand(REMOVE_COMMAND);
            removeButton.addActionListener(this);
            JButton clearButton = new JButton("Clear");
            clearButton.setActionCommand(CLEAR_COMMAND);
            clearButton.addActionListener(this);
            JButton okButton = new JButton("OK");
            okButton.setActionCommand(OK_COMMAND);
            okButton.addActionListener(this);
            //Lay everything out.
            treePanel.setPreferredSize(new Dimension(300, 150));
            add(treePanel, BorderLayout.CENTER);
            JPanel panel = new JPanel(new GridLayout(0,1));
            panel.add(addButton);
            panel.add(removeButton);
            panel.add(clearButton);
            panel.add(okButton);
            add(panel, BorderLayout.LINE_END);
        /*public void populateTree(DynamicTree treePanel) {
            String p1Name = new String("Parent 1");
            //String p2Name = new String("Parent 2");
            String c1Name = new String("Child 1");
            //String c2Name = new String("Child 2");
            DefaultMutableTreeNode p1;
            p1 = treePanel.addObject(null, p1Name);
            //p2 = treePanel.addObject(null, p2Name);
            treePanel.addObject(p1, c1Name);
            //treePanel.addObject(p1, c2Name);
            //treePanel.addObject(p2, c1Name);
            //treePanel.addObject(p2, c2Name);
        public void actionPerformed(ActionEvent e) {
            String command = e.getActionCommand();
            if (ADD_COMMAND.equals(command)) {
                //Add button clicked.
                treePanel.addObject("New Node " + newNodeSuffix++);
            } else if (REMOVE_COMMAND.equals(command)) {
                //Remove button clicked.
                treePanel.removeCurrentNode();
            } else if (CLEAR_COMMAND.equals(command)) {
                //Clear button clicked.
                treePanel.clear();
            } else if (OK_COMMAND.equals(command)) {
                 //Ok button clicked.
                 treePanel.ok();
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("Craete XML Tree");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Tree newContentPane = new Tree();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }DynamicTree.java
    import javax.swing.JOptionPane;
    import java.awt.GridLayout;
    import java.awt.Toolkit;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.MutableTreeNode;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.TreeSelectionModel;
    import javax.swing.event.TreeModelEvent;
    import javax.swing.event.TreeModelListener;
    public class DynamicTree extends JPanel {
        protected DefaultMutableTreeNode rootNode;
        protected DefaultTreeModel treeModel;
        protected JTree tree;
        private Toolkit toolkit = Toolkit.getDefaultToolkit();
        public DynamicTree() {
            super(new GridLayout(1,0));
            rootNode = new DefaultMutableTreeNode("Root Node");
            treeModel = new DefaultTreeModel(rootNode);
            treeModel.addTreeModelListener(new MyTreeModelListener());
            tree = new JTree(treeModel);
            tree.setEditable(true);
            tree.getSelectionModel().setSelectionMode
                    (TreeSelectionModel.SINGLE_TREE_SELECTION);
            tree.setShowsRootHandles(true);
            JScrollPane scrollPane = new JScrollPane(tree);
            add(scrollPane);
        /** Remove all nodes except the root node. */
        public void clear() {
            rootNode.removeAllChildren();
            treeModel.reload();
        public void ok() {
             int n = JOptionPane.showConfirmDialog(null, "Do you want to create XML Schema?", "", JOptionPane.YES_NO_OPTION);
        /** Remove the currently selected node. */
        public void removeCurrentNode() {
            TreePath currentSelection = tree.getSelectionPath();
            if (currentSelection != null) {
                DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)
                             (currentSelection.getLastPathComponent());
                MutableTreeNode parent = (MutableTreeNode)(currentNode.getParent());
                if (parent != null) {
                    treeModel.removeNodeFromParent(currentNode);
                    return;
            // Either there was no selection, or the root was selected.
            toolkit.beep();
        /** Add child to the currently selected node. */
        public DefaultMutableTreeNode addObject(Object child) {
            DefaultMutableTreeNode parentNode = null;
            TreePath parentPath = tree.getSelectionPath();
            if (parentPath == null) {
                parentNode = rootNode;
            } else {
                parentNode = (DefaultMutableTreeNode)
                             (parentPath.getLastPathComponent());
            return addObject(parentNode, child, true);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child) {
            return addObject(parent, child, false);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child,
                                                boolean shouldBeVisible) {
            DefaultMutableTreeNode childNode =
                    new DefaultMutableTreeNode(child);
            if (parent == null) {
                parent = rootNode;
            treeModel.insertNodeInto(childNode, parent,
                                     parent.getChildCount());
            //Make sure the user can see the lovely new node.
            if (shouldBeVisible) {
                tree.scrollPathToVisible(new TreePath(childNode.getPath()));
            return childNode;
        class MyTreeModelListener implements TreeModelListener {
            public void treeNodesChanged(TreeModelEvent e) {
                DefaultMutableTreeNode node;
                node = (DefaultMutableTreeNode)
                         (e.getTreePath().getLastPathComponent());
                 * If the event lists children, then the changed
                 * node is the child of the node we've already
                 * gotten.  Otherwise, the changed node and the
                 * specified node are the same.
                try {
                    int index = e.getChildIndices()[0];
                    node = (DefaultMutableTreeNode)
                           (node.getChildAt(index));
                } catch (NullPointerException exc) {}
                System.out.println("The user has finished editing the node.");
                System.out.println("New value: " + node.getUserObject());
            public void treeNodesInserted(TreeModelEvent e) {
            public void treeNodesRemoved(TreeModelEvent e) {
            public void treeStructureChanged(TreeModelEvent e) {
    }

    XML shema is basically an XML file. So u need to know how to create an XML,
    provided u know how the shema file should be.
    Creating an XML :
    http://forum.java.sun.com/thread.jspa?threadID=5181031&messageID=9705786#9705786

  • How to configure Outlook 2013 to call direct from within the application without using Lync 2013?

    I have Outlook 2013 running on Windows 7 Pro 64-Bit with Lync 2013 (Office 365 Pro). We are using a 3rd party TAPI app from FortiVoice. WE would like to be able to place calls directly from
    within Outlook either by selecting a telephone number within an email and/or via the PEOPLE (Contacts) area.
    What guidelines should we use to enable this feature and not have Lync 2013 intercepting the process i.e. let OUTLOOK handle placing calls?
    Thanks in advance for any feedback provided.

    Hi,
    There seems no solution for this issue so far.
    Here is a fix for older versions of Outlook, maybe worth a try.
    http://support.microsoft.com/kb/959625/en-us
    However, if it doesn’t work, please try Malte’s reply as the workaround in the following thread. See:
    http://social.technet.microsoft.com/Forums/office/en-US/3946f1bb-cc3d-41b6-ab9c-092d62d024d1/outlook-2013-tapi-calling-with-lync-installed?forum=officesetupdeploy
    Thanks.
    Steve Fan
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Playing videos from within the application using Phonegap.

    I am trying to get videos to play videos from within a PhoneGap app across IOS/Android/WP8 that will play videos contained within the phonegap app.  I have accomplished getting videos on Android and IOS but getting it working on WP8 has left me stumped
    as I have not been able to find anyone even attempting to getting videos to play from within a phonegap application on WP8.   So if anyone knows how to do this, or any suggestions of what direction I should look for a solution (I'm assuming it doesn't
    work as because of how IE treats videos on WP8 and will not load off the device)
    (Yes I know this is probably not the first place to look for solutions,and its not I've been looking elsewhere as well, but there is very few people supporting phone gap on WP8 elsewhere so this seems like the best place to maybe get some help/ideas)

    Hi Mwengil,
    You are asking questions about third-party library. It’s out of our support range.
    Please refer to check the API documentation.
    http://docs.phonegap.com/en/4.0.0/index.html or try to contact library official site.
    http://phonegap.com/about/contact/.
    Thank you for understanding. If you have any questions about windows phone development, you are always welcome posting here.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
    the survey.

  • Self Modifying Application (Creating ad-ons from within an application)

    Ok, it's hard to ask this right...
    In the past, I used VB and the VBScript ActiveX to allow the user to write code that my UI could use within itself, for example, to change the way a file would load or to extend the file open save mechanism...
    Is there a way to do this maybe using the jscript engine?
    Or, even better, is there a way I could compile a real java object from within my UI and create it/connect to it in my application when compiling is done?
    The user would be presented a code window where he'd type in the code. In the window, he could use all the java classes to write his code and classes.
    The UI would save and compile the code and start using it right away.
    If someone could point me the right way.
    Thanks.

    In the past, I used VB and the VBScript ActiveX to
    allow the user to write code that my UI could use
    within itself, for example, to change the way a file
    would load or to extend the file open save
    mechanism...Sounds dangerous. But I think I understand what you want to do.
    Is there a way to do this maybe using the jscript
    engine?Not sure what you mean by jscript engine.
    Or, even better, is there a way I could compile a
    real java object from within my UI and create
    it/connect to it in my application when compiling is
    done?No.
    The user would be presented a code window where he'd
    type in the code. In the window, he could use all the
    java classes to write his code and classes.
    The UI would save and compile the code and start
    using it right away.Sounds like you want an IDE inside your program?

  • Unable to open CS3 Files from within the application

    Good Afternoon
    I work as IT Support for company looking after 10 ADOBE Creative Suite 3 end-users.
    One of my colleagues is unable to open Illustrator or Photoshop files from within their respective applications, but she is able to open them from outside ok.
    I have reinstalled ADOBE CS3 and this appeared to resolve the issue, only for it to return again a day later.
    She has no other applications or processes running during her attempt to open a file from within CS3.
    She will click on Open and the 'Open File' window will flash up for a split second, then the whole application will be frozen. It is as if the 'Open File' window is there, but isnt there because we cant click on it, but the application thinks it is displaying and so she can not click on anything else. The only way to close the application is to end the process under Task Manager.
    While I am sitting here tearing what little amount of hair I have on my head, can anyone point me in the right direction?
    Is this a Windows problem or an ADOBE problem do you think?
    I look forward to any replies.
    Thank you

    Hi Bob
    Ok...
    Opened illustrator but was unable to open the 'Open File' window.
    Changed the screen resolution, it suddenly worked!
    Changed the screen resolution back to as it was before, it also worked.
    What could cause this do you think?
    By simply changing the screen resolution and back again, the 'Open File' window displayed itself.
    Very bizarre!

  • How to create PDF file from bypassing the Save as Dialogue box in Adobe XI

    I am from powerbuilder development team. I want to save the output of the datawindow to PDF file using Adobe PDF printer but should not as for saving the file. The program should save the file to location mentioned in the registry key.
    I want to know which Adobe XI registy key I need to update to mention the file name and the location.

    You need to post this question to the Acrobat SDK Forum:  Acrobat SDK

  • Creating an Order from within the Order_Save badi

    Hi Experts,
    I'm creating trying to create a sales order with in the 'order_save' badi.
    I heard that this is not a recommended practice.
    Any inputs on why this has to be avoided?
    Regards,
    Kris.

    Hi kris,
    DOnt worry about creating a transaction while saving a Document. In my previous project I used save badi not only to create new but also to Create and then attach the same to the transaction which is saved and then update the same as well with product.
    You can use the save badi but only make sure that you Dont; use the COmmit work or any Commit bapi else you will get short dumps while saving "Express document terminated"(Dump type).
    Hope this Helps.

  • ITunes Won't Upgrade from within the Application

    Today I clicked on "Help->Check for Updates" in iTunes(iTunes 10.1.1), after which iTunes displayed the message "iTunes 10.2 is available for download" . I clicked on "download itunes" and mouse pointer turned into an hourglass for about 30 seconds and then went back to an arrow. Nothing else happened. I then tried clicking on "Start->Programs->Apple Updater" .
    The updated said it was checking for updates and then displayed "all software is up to date". I clicked on ok and then updater window closed.
    I went to "Control Panel->programs and features" and then clicked the "repair" option for the Apple Updater application. That ran but the above symptoms did not change. When I tried updating again.
    Any ideas on how to fix this? I can surely go to Apple's Web site, download the latest iTunes, and then install the upgrade, but I'd also like to fix the updater so that it works.
    Thanks in advance

    Hey Jimmy, just wondering how you got on? I've exactly the same problem and don't know what to do either!

  • How to create logs in java if the application stops abruptly,

    Hi,
    I wrote a java code for handling one of my applications in built commands. Right now iam handling the logs using an arrayList and at the end of my java progem iam writing them to a file.
    If the program runs completely then my logs are generated, but my application takes almost 6hours to fully complete.. if ther is anyproblem like service of application stops or any other problem then i have to stop my java code forcefully.. in that case my code is not working ...like iam not able to see that part of my logs.
    Help me in writing the logs even if the java code stops in between. or iam stopping it.
    Thanks in adcance

    You may want to use the "Shotdown hooks" API -- http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#addShutdownHook(java.lang.Thread).

Maybe you are looking for