Creating multiple mailboxes using Powershell for users who already exist in AD

Hi there,
Wondering if anyone can help, I am wanting to use Powershell to run a command which references a CSV file to create a mailbox for a user who already exists in AD.
It needs to reference the username, to ensure the correct user has a mailbox created (as mentioned they exist already in the domain), place them on a specific database (e.g DB1) and assign them an email address as well as possibly an alias email address
too.
Can anyone provide me the headings of the CSV file which would be needed as well as the powershell command to run. It would be great too if I could also set the quota sizes for the user at the same time of creating the mailbox, but if not possible or complicated
I can run a script afterwards to do this. I would only want to warn them when their mailbox is 1.5GB in size and stop them sending when it reaches 2GB. 
Thanks

So create a csv file with the following headers and data
UserID, Alias
UserID should be the user SamAccountName, and the Alias is the Mailbox Alias that you want to set. Supposing that the csv file is named users.csv and located under C:\ , open the Exchange Management Console and run:
$users = Import-Csv c:\users.csv
Foreach ($user in $users) {
Enable-Mailbox -Identity $user.UserID -alias $user.alias -database 'DB1'
Set-Mailbox -Identity $user.UserID -IssueWarningQuota 1.5gb -ProhibitSendQuota 2gb 
Please Mark As Answer if this helps
ammarhasayen

Similar Messages

  • Setting Up Mobile Accounts to For Users Who Already Exist

    Hi there,
    I work for a company with about 10 Macs, all laptops, all are on 10.5.
    They have never had a server and have asked me to set one up for them. I am in the process of setting up a server here with a new copy of OS X Server 10.5. Here's my question.
    The people here are half-wits and any kind of backup which involves them, you know, actually doing anything is never going to happen.
    My thought was to set up Mobile accounts for all of them s this provides seamless syncing and no issues if they leave their office, The problem seems to be to set up a mobile account seems to require a new user where all the people here already have home folders/stuff on their personal laptops (we don't share computers). The user I create on Open Directory seem, even if i give them the same details of the current user on their laptops, to be different. Is there a way to make this work or should I just make them all Time Machine backups to the server instead?
    Thanks,
    Ben

    So create a csv file with the following headers and data
    UserID, Alias
    UserID should be the user SamAccountName, and the Alias is the Mailbox Alias that you want to set. Supposing that the csv file is named users.csv and located under C:\ , open the Exchange Management Console and run:
    $users = Import-Csv c:\users.csv
    Foreach ($user in $users) {
    Enable-Mailbox -Identity $user.UserID -alias $user.alias -database 'DB1'
    Set-Mailbox -Identity $user.UserID -IssueWarningQuota 1.5gb -ProhibitSendQuota 2gb 
    Please Mark As Answer if this helps
    ammarhasayen

  • Set storage quota on multiple mailboxes using PowerShell?

    I need to set storage quota limits on multiple mailboxes using PowerShell. I understand I can create a .csv file with aliases and pipe that into a cmdlet, eg.,
    Import-CSV "C:\temp\alias.csv" | % {Set-Mailbox -identity $_.alias -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false
    Is there any other way of doing this with a much more robust script?
    Any help would be much appreciated.

A: Set storage quota on multiple mailboxes using PowerShell?

Hi,
Is there any special attribute for these multiple mailboxes? such as they are from a specific OU or a distribution group etc.
If there is, we can direct use the filter to pick out these mailboxes instead of create .csv file for them. The following example can set storage quota for mailboxes in a distrobution group Group1:
Get-DistributionGroupMember -Identity Group1 | ForEach{ Set-Mailbox -identity $_.Name -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false}
The following example is used to set storage quota for mailboxes from Exchange Department:
Get-Recipient | Where-Object {$_.Department -eq 'Exchange'} | ForEach{ Set-Mailbox -identity $_.Name -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false}
Regards,
Winnie Liang
TechNet Community Support

Hi,
Is there any special attribute for these multiple mailboxes? such as they are from a specific OU or a distribution group etc.
If there is, we can direct use the filter to pick out these mailboxes instead of create .csv file for them. The following example can set storage quota for mailboxes in a distrobution group Group1:
Get-DistributionGroupMember -Identity Group1 | ForEach{ Set-Mailbox -identity $_.Name -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false}
The following example is used to set storage quota for mailboxes from Exchange Department:
Get-Recipient | Where-Object {$_.Department -eq 'Exchange'} | ForEach{ Set-Mailbox -identity $_.Name -IssueWarningQuota 900mb -ProhibitSendQuota 950mb -ProhibitSendReceiveQuota 1gb -UseDatabaseQuotaDefaults $false}
Regards,
Winnie Liang
TechNet Community Support

  • Create multiple VIs using a for loop

    Hi,
    I'm still pretty new to LabVIEW, so this question might be easy for you guys here..
    I'll simplify what I'm trying to do.
    I've got two numeric controllers that act as the rows and columns of a matrix.
    I'd like to take those numbers from these two controllers and use them to create a matrix of a certain picture.
    Example:
    The rows controller is given 3, and the columns controller is given 4.
    Using these numbers I would like the end result to show a certain image (let's say, a cube) multiplied on a 3 by 4 matrix.
    Let's say the picture is an X, then the end result should be:
    XXXX
    XXXX
    XXXX 
    I think I should be using a double for loop (one inside the other obviously), and I should also create the "position" property in order to display each picture of the cube in it's right place.
    The problem is that I don't know how to CREATE the pictures over and over again, while being able to control each one's position property.
    Any help would be GREATLY appreciated!
    Solved!
    Go to Solution.

    1) By "multiple VIs" I meant that I think that I need to create express VIs on the fly while running the for loop. I might be totally wrong here.
    2) Yes, by "numeric controllers" I meant numeric controls in the front panel.
    3) The matrix I'm referring too isn't an object nor a VI in LabVIEW but a virtual matrix that is the end result. I used the term "matrix" because the end result is actually a matrix (of rows and columns) of pictures..
    I'll try to elaborate and even simplify it more:
    Let's say I want to display one picture. That's easy, no problem there.
    Now let's say that I'd like to display n pictures on a one dimensional array. Just one row.
    What I think I need to do is to read from the numeric control in the front panel the number (n) of pictures, and then create them in a for loop, while using the "position" property to set the distance between each picture (using coordinates).
    My original question was just like the above, but for a two dimensional matrix/array. So I guess we can even simplify it even more, by saying it's only one dimensional.
    My way of action here might be totally wrong, and there might be an easier way or another way to go about this...
    Thanks for the quick answer!!  

  • Steps to deploy Lync for users who own Office 365 E1/E2 licenses, but don't have Office 365 E3, using Office Deployment tool.

    After many hours of debugging with Microsoft support the system to install the Lync Client silently can be done with a SINGLE LINE command.  The steps to take are below. It should be an easy next step to put this as GPO installation since
    it is a simple command.
    Comments appreciated. 
    side question: Why is there no Lync 2013 or Lync Office 365 forum?
    Basic steps to deploy Lync for users who own Office 365 E2 licenses, but don’t have Office 365 E3, using Office Deployment tool.
    This also applies for other Office 365 service types where the full office suite download is not included.  In April 2015 This was impossible to find online and not know by the Lync support team.
    Steps are:
    Download the Office deployment tool from
    http://www.microsoft.com/en-in/download/details.aspx?id=36778 and extract it to a folder. For this
    example we will use the \\server\sharename
    location.
    Extracting it creates a setup.exe file and it show a sample XML file.
    2. Create XML file and give it a name such as LyncEntryRetail.xml
    Note: The key is the productID that has to be the “LyncEntryRetail”. Other product IDs will download a version that needs another office 365 license. The productID “LyncRetail” needs an E3 license of Office 365.
    <Configuration>
      <Add SourcePath="\\server\sharename" OfficeClientEdition="32" >
        <Product ID="LyncEntryRetail">
          <Language ID="en-us" />
        </Product>
      </Add> 
    </Configuration>
    3. From the folder where you extracted the Office deployment tool, run the following command on the command prompt to download the source files and store them on the shared drive:
     (on single line)
    Setup.exe /download LyncEntryRetail.xml  
    (This is the name of the XML file created above)
    One can also run the same on a server share by using UNC path names such as  (on single line)
    \\servername\sharename\Setup.exe /download
    \\servername\sharename\LyncEntryRetail.xml  
    (This is the name of the XML file created above)
    4. Run the following command on the command prompt on a machine where you want to install the software: (on single line)
    \\servername\sharename\Setup.exe /configure
    \\servername\sharename\LyncEntryRetail.xml  
    (This is the name of the XML file created above)
    Once you are comfortable that it all works, you may want to edit the XML file if you want to have silent installation and add the following lines.
      <Display Level="None" AcceptEULA="TRUE" /> 
      <Property Name="AUTOACTIVATE" Value="1" /> 
    Regards
    Bart
    Bart Louwagie

    Hi Chudly,
    For the office365 issue, I also recommend you can post in dedicated forum for more efficient support:
    http://community.office365.com/en-us/f/166.aspx
    If you want to modify the powershell script, please post the current script and the issue, we will notice and continue to follow up.
    If there is anything else regarding this issue, please feel free to post back.
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • How to create sharepoint Group with read only permissions using powershell for entire site ?

    How to create sharepoint Group with read only permissions using powershell for entire site (including subsites and top level site)

    Hi
    using (SPSite site = new SPSite(url))
    using (SPWeb web = site.OpenWeb())
    SPUserCollection users = Web.AllUsers;
    SPUser owner = users[string.Format("{0}{1}", "Domain", "Owner Username")];
    SPMember member = users[string.Format("{0}{1}", "Domain", "Default Member Username")];
    SPGroupCollection groups = Web.SiteGroups;
    string GroupName = “Super Exclusive”;//your group name
    string GroupDescription = “Super exclusive group description.”;
    groups.Add(GroupName, owner, member, GroupDescription);
    SPGroup NewSPGroup = groups[GroupName];
    SPRoleDefinition role = Web.RoleDefinitions["Read"];
    SPRoleAssignment roleAssignment = new SPRoleAssignment(NewSPGroup);
    roleAssignment.RoleDefinitionBindings.Add(role);
    Web.RoleAssignments.Add(roleAssignment);
    Web.Update();
    Please 'propose
    as answer' if it helped you, also 'vote
    helpful' if you like this reply.

  • Creating multiple profiles, using unified profile types, to store multiple values for same properties

    Hi All:
    I am trying to create multiple profiles, using unified profile types, to
    store multiple values for same properties. Here my intention of using
    'unified profile types' is to create multiple profiles (to store multiple
    values for a property). All the properties are stored in the same database
    maintained by Personalization server. Also, I am trying to use the same
    'USER' ejb as profile class/home/pk/jndi.
    The scenerio is,
    define unified profile types (Business, Vacation) using Personalization
    admin tools, using com.beasys.commerce.axiom.contact.User,
    com.beasys.commerce.axiom.contact.UserHome,
    com.beasys.commerce.axiom.contact.UserPk,
    com.beasys.commerce.axiom.contact.User for Profile Class, Home, Pk class,
    JNDI name respectively.
    Define Property set 'HotelCommerce' with property
    HotelProp as single, restricted, text (valid values Single, Double)
    Now you can use the attached jsp files to login as a user and try to set the
    property value for HotelProp for each profile. As per my understanding, I
    was expecting that I can set different values for the property 'HotelProp'
    for each profiles. But unexpectedly, all the profiles get the same value.
    Question. is it the correct behavior? if yes, how can I achieve this
    functionality?
    if not, do you see any problem in my scripts?
    your answer asap is appreciated. we need to make decision on using
    Personalization server v/s developing our own Personalization server!!!:)
    thanks,
    -rajesh
    PS: I have tried 'Unified Profile Example' type too, but that did not work.
    [propsettest.jsp]
    [home.jsp]

    I am trying to create multiple profiles, using unified profile types, to
    store multiple values for same properties. Here my intention of using
    'unified profile types' is to create multiple profiles (to store multiple
    values for a property). All the properties are stored in the same database
    maintained by Personalization server. Also, I am trying to use the same
    'USER' ejb as profile class/home/pk/jndi.Hello Rajesh,
    This is not the purpose of the UUP. The UUP is used to allow existing
    database schemas to be aggregated with the existing Weblogic Personalization
    Server database schema to provide a single, customized user profile with which
    to maintain the user properties (
    http://e-docs.bea.com/wlcs/p13n/users.htm#1068901 )
    If you want to have properties that change value based on some "profile" or
    classification of a user, then you should use classifier rules to change the
    user from "OnVacation" to "AtWork" or "AtHome". You can use these classifier
    rules to select content for the user or conditionally execute logic (
    http://e-docs.bea.com/wlcs/p13n/rules.htm )
    Ture Hoefner
    BEA Systems, Inc.
    1655 Walnut Street; suite 200
    Boulder, CO 80302
    www.beasys.com

  • How to move an email from user mailbox to shared mailbox using apps for office mail app

    How can I move an email from a users main mailbox to a shared mailbox using apps for office.  I know I can do this manually but i am creating an for owa/outlook that would be a button to move the item.  I have tried using ews but can only find
    the commands to move emails inside the users mailbox
    for example : 
    '<?xml version="1.0" encoding="utf-8"?>' +
            '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
            '               xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"' +
            '               xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"' +
            '               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
            '  <soap:Header>' +
            '    <t:RequestServerVersion Version="Exchange2013" />' +
            '  </soap:Header>' +
            '  <soap:Body>' +
            '    <m:MoveItem>' +
            '      <m:ToFolderId>' +
            '        <t:DistinguishedFolderId Id="junkemail" />' +
            '      </m:ToFolderId>' +
            '      <m:ItemIds>' +
            '        <t:ItemId Id="' + id + '" ' +
            '                  ChangeKey="' + changeKey + '" />' +
            '      </m:ItemIds>' +
            '    </m:MoveItem>' +
            '  </soap:Body>' +
            '</soap:Envelope>';
    Can I create a xml that would would do this?  Is there a way to do it using the EWS service reference.  I do not want to use import/export to do this.  

    yes I was able to make it work using Microsoft.Exchange.WebServices.Data and writing it as a web API,  however i am unable to to authenticate the user if it is hosted on another server (without them retyping their password.  I assume that
    their is a matching java script version of what i am doing on the api side.  I am just stuck trying to figure it out.  the below code works as a Web Api if i could authenticate the user.    
                ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
                service.Url = new Uri("Ews url");
                service.Credentials = CredentialCache.DefaultCredentials;
                //service.UseDefaultCredentials = true;
                // Create a new folder view, and pass in the maximum number of folders to return.
                FolderView view = new FolderView(5);
                // Create an extended property definition for the PR_REPLICA_LIST property.
                ExtendedPropertyDefinition PR_REPLICA_LIST = new ExtendedPropertyDefinition(0x6698, MapiPropertyType.Binary);
                view.PropertySet = new PropertySet(BasePropertySet.IdOnly, FolderSchema.DisplayName, PR_REPLICA_LIST);
                // get to the inbox folder of spam mailbox
                Mailbox SpamMailbox = new Mailbox("Smtp of other mailbox");
                FolderId SpamInbox = new FolderId(WellKnownFolderName.Inbox, SpamMailbox);
                Folder SpamFolder = Folder.Bind(service, SpamInbox);
                FindItemsResults<Item> findItems = service.FindItems(WellKnownFolderName.JunkEmail, new ItemView(10));
                foreach (Item item in findItems)
                    item.Load();
                    ItemId ItemToMoveId = new ItemId(item.Id.UniqueId.ToString());
                    Item ItemToMove = Item.Bind(service, ItemToMoveId);
                    ItemToMove.Move(SpamFolder.Id);
                    //item.Move(SpamFolder.Id);

  • Creating multiple mailboxes on Exchange 2007 fails

    Hi All,
    We have a problem to create multiple mailboxes simultaneously on Exchange 2007 using the OIM Exchange connector. Only one of the mailboxes is created when multiple powershell scripts are launched at the same time. This problem only occurs in the production environment and not on the Exchange 2007 test server. Therefore it's likely to be an Exchange 2007 server setting causing the other powershell processes and mailboxes to fail. Has anyone else experienced this problem?
    Thanks,
    Albin

    hi.
    have you managed to solve this issue? we have a similar problem when updating some exchange mailbox variables through powershell cmds via OIM. if we run several cmds simultaneously, or right after each other, only the first one is run. tried googling it, but no luck so far.
    thanks,
    tinba

  • I would like to create a custom Logout Message for users

    I would like to create a custom Logout Message for users.
    When users click the Logout button, I would like a message appear saying have they made a backup of their data.
    I know I could use LogoutHook script but I will need some help in creating one to do the above

    Can't help with that. You might post to the AppleScript forum.

  • Creating Multiple DB using DBCA.

    I am a beginner in oracle. I completed Admin1 cert & now preparing for OCP. While testing RMAN i created a database using DBCA for RMAN Catalog. First time i am trying and database created in noarchive log. Though i was not able to successfully backup & recover, i got clarity on the concepts. (I am learning on my own- so need a do a lot of research to clarify doubts).
    Coming to the point. Since two database i can open two em consoles and do operations at same time. But in command mode when i try i am facing issues. At one point of time i am not able to fine which database is running and how to enable or disable the other.
    I logged in and execute shutdown immediate. It shutdown one database. I switched the oracle_sid and tried to shutdown second, but it did not happen. Then i did it from EM.
    Then i tried to restart the server.. I executed the following commands.
    C:\Documents and Settings\MaverickBull>set oracle_sid=ora10g
    C:\Documents and Settings\MaverickBull>sqlplus sys as sysdba/oracle123@ora10g
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 19 13:11:40 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 612368384 bytes
    Fixed Size 1250428 bytes
    Variable Size 205523844 bytes
    Database Buffers 398458880 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    Database opened.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    --- Oracle instance Ora10g started. Now i want to start the second one from cli*
    C:\Documents and Settings\MaverickBull>sqlplus sys as sysdba/oracle123@ora10grc
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 19 13:13:26 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> startup;
    ORA-01081: cannot start already-running ORACLE - shut it down first
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    But when i Checked in EM, ora10grc is shutdown only. Then i tried*
    C:\Documents and Settings\MaverickBull>set oracle_sid=ora10grc;
    C:\Documents and Settings\MaverickBull>sqlplus sys as sysdba/oracle123@ora10grc
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 19 13:15:00 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Enter password:
    ERROR:
    ORA-12560: TNS:protocol adapter error
    I am getting this error+
    I tried from EM & successfully opened.*
    Current Status shutdown
    Operation startup database in open mode
    Initialization Parameter default
    Are you sure you want to perform this operation?
    When i checked my TNS its showing both in same port.!!. My TNS looks like this.
    ORA10GRC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = renji)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ora10grc)
    ORA10G =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = renji)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ora10g)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    Please Help How can i manage both database from the cli. I mean switch between database, shutdown,startup both the database etc. Also at one point of time, how can i check which database i am working with.(say for example, i forget which ORACLE_SID i set)
    Thanks
    Ranjith

    One more clarification..
    The TNS Shows
    ORA10GRC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = renji)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ora10grc)
    ORA10G =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = renji)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = ora10g)
    Both are listening on the same port..
    From the EM Screen
    Status Open
    Host renji
    Port *1521*
    SID ora10g
    Oracle Home D:\oracle\product\10.2.0\ora10g
    Status Open
    Host renji
    Port *1521*
    SID ora10grc
    Oracle Home D:\oracle\product\10.2.0\ora10g
    Is this possible. Two db listening on the same port at the same time??.. I opened both simultaneously in multiple tabs. saying port 1521.
    Thanks
    Ranjith

  • How to create purchase order using VA01 for BAPI?

    how to create purchase order using VA01 for BAPI?

    Hi Arun,
    Please check this link
    Example Program for BAPI_PO_CREATE1
    Re: BAPI_PO_CREATE1
    Questions in BAPI_PO_CREATE1
    Problem with BAPI_PO_CREATE1
    *& Report BAPI_PO_CREATE *
    REPORT bapi_po_create.
    Input File Declaration
    TYPES: BEGIN OF ty_input_file,
    column1 TYPE char50,
    column2 TYPE char50,
    column3 TYPE char50,
    column4 TYPE char50,
    column5 TYPE char50,
    column6 TYPE char50,
    column7 TYPE char50,
    column8 TYPE char50,
    column9 TYPE char50,
    column10 TYPE char50,
    column11 TYPE char50,
    column12 TYPE char50,
    column13 TYPE char50,
    column14 TYPE char50,
    column15 TYPE char50,
    column16 TYPE char50,
    column17 TYPE char50,
    column18 TYPE char50,
    END OF ty_input_file.
    DATA: i_input_file TYPE STANDARD TABLE OF ty_input_file,
    wa_input_file TYPE ty_input_file.
    CONSTANTS: c_path TYPE char20 VALUE 'C:\',
    c_mask TYPE char9 VALUE ',.,..',
    c_mode TYPE char1 VALUE 'O',
    c_filetype TYPE char10 VALUE 'ASC',
    c_x TYPE char01 VALUE 'X'.
    PARAMETERS : p_fname LIKE rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    Browse Presentation Server
    PERFORM f4_presentation_file.
    START-OF-SELECTION..
    Read presentation server file
    PERFORM f1003_upload_file.
    IF NOT i_input_file[] IS INITIAL.
    PERFORM split_data.
    ENDIF.
    *& Form f4_presentation_file
    *& F4 Help for presentation server
    FORM f4_presentation_file .
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    def_path = c_path
    mask = c_mask
    mode = c_mode
    title = text-001
    IMPORTING
    filename = p_fname
    EXCEPTIONS
    inv_winsys = 1
    no_batch = 2
    selection_cancel = 3
    selection_error = 4
    OTHERS = 5.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " f4_presentation_file
    *& Form f1003_upload_file
    *& Upload File
    FORM f1003_upload_file .
    DATA: lcl_filename TYPE string.
    lcl_filename = p_fname.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = lcl_filename
    filetype = c_filetype
    has_field_separator = c_x
    TABLES
    data_tab = i_input_file
    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.
    IF sy-subrc 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    EXIT.
    ENDIF.
    ENDFORM. " f1003_upload_file
    *& Form split_data
    Collect data for creating Purchase Order
    FORM split_data .
    DATA: i_poitem TYPE STANDARD TABLE OF bapimepoitem,
    i_poitemx TYPE STANDARD TABLE OF bapimepoitemx,
    i_poitem_sch TYPE STANDARD TABLE OF bapimeposchedule,
    i_poitem_schx TYPE STANDARD TABLE OF bapimeposchedulx,
    i_acct_*** TYPE STANDARD TABLE OF bapimepoaccount,
    i_acct_assx TYPE STANDARD TABLE OF bapimepoaccountx,
    i_services TYPE STANDARD TABLE OF bapiesllc ,
    i_srvacc TYPE STANDARD TABLE OF bapiesklc,
    i_return TYPE STANDARD TABLE OF bapiret2,
    wa_header TYPE bapimepoheader,
    wa_headerx TYPE bapimepoheaderx,
    wa_poitem TYPE bapimepoitem,
    wa_poitemx TYPE bapimepoitemx,
    wa_poitem_sch TYPE bapimeposchedule,
    wa_poitem_schx TYPE bapimeposchedulx,
    wa_acct_*** TYPE bapimepoaccount,
    wa_acct_assx TYPE bapimepoaccountx,
    wa_services TYPE bapiesllc,
    wa_srvacc TYPE bapiesklc,
    wa_return TYPE bapiret2,
    ws_po TYPE bapimepoheader-po_number.
    break gbpra8.
    wa_services-pckg_no = 10.
    wa_services-line_no = 1.
    wa_services-outl_no = '0'.
    wa_services-outl_ind = c_x.
    wa_services-subpckg_no = 20.
    APPEND wa_services TO i_services.
    wa_srvacc-pckg_no = 10.
    wa_srvacc-line_no = 1.
    wa_srvacc-serno_line = 01.
    wa_srvacc-serial_no = 01.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    LOOP AT i_input_file INTO wa_input_file.
    IF wa_input_file-column2 EQ 'HD'.
    wa_header-doc_type = wa_input_file-column3.
    wa_header-creat_date = sy-datum.
    wa_header-created_by = sy-uname.
    wa_header-vendor = wa_input_file-column4.
    PERFORM conversion_output USING wa_header-vendor
    CHANGING wa_header-vendor.
    wa_header-comp_code = 'DE03'.
    wa_header-purch_org = 'DE03'.
    wa_header-pur_group = 'DE1'.
    wa_header-vper_start = wa_input_file-column9.
    wa_header-vper_end = wa_input_file-column10.
    wa_headerx-comp_code = c_x.
    wa_headerx-doc_type = c_x.
    wa_headerx-creat_date = c_x.
    wa_headerx-created_by = c_x.
    wa_headerx-vendor = c_x.
    wa_headerx-purch_org = c_x.
    wa_headerx-pur_group = c_x.
    wa_headerx-vper_start = c_x.
    wa_headerx-vper_end = c_x.
    ENDIF.
    IF wa_input_file-column2 EQ 'IT'.
    wa_poitem-po_item = wa_input_file-column3.
    wa_poitem-short_text = wa_input_file-column6.
    wa_poitem-plant = wa_input_file-column8.
    wa_poitem-quantity = '1'.
    wa_poitem-tax_code = 'V0'.
    wa_poitem-item_cat = 'D'.
    wa_poitem-acctasscat = 'K'.
    wa_poitem-matl_group = wa_input_file-column7.
    wa_poitem-pckg_no = '10'.
    APPEND wa_poitem TO i_poitem .
    wa_poitemx-po_item = wa_input_file-column3.
    wa_poitemx-po_itemx = c_x.
    wa_poitemx-short_text = c_x.
    wa_poitemx-plant = c_x.
    wa_poitemx-quantity = c_x.
    wa_poitemx-tax_code = c_x.
    wa_poitemx-item_cat = c_x.
    wa_poitemx-acctasscat = c_x.
    wa_poitemx-matl_group = c_x.
    wa_poitemx-pckg_no = c_x.
    APPEND wa_poitemx TO i_poitemx.
    wa_poitem_sch-po_item = wa_input_file-column3.
    wa_poitem_sch-delivery_date = sy-datum.
    APPEND wa_poitem_sch TO i_poitem_sch.
    wa_poitem_schx-po_item = wa_input_file-column3.
    wa_poitem_schx-po_itemx = c_x.
    wa_poitem_schx-delivery_date = c_x.
    APPEND wa_poitem_schx TO i_poitem_schx.
    wa_acct_***-po_item = 10.
    wa_acct_***-serial_no = 01.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_***-po_item = 10.
    wa_acct_***-serial_no = 02.
    wa_acct_***-gl_account = '0006360100'.
    wa_acct_***-co_area = '1000'.
    wa_acct_***-costcenter = 'KC010000'.
    APPEND wa_acct_*** TO i_acct_***.
    wa_acct_assx-po_item = 10.
    wa_acct_assx-serial_no = 01.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_acct_assx-po_item = 10.
    wa_acct_assx-serial_no = 02.
    wa_acct_assx-po_itemx = c_x.
    wa_acct_assx-serial_nox = c_x.
    wa_acct_assx-gl_account = c_x.
    wa_acct_assx-co_area = c_x.
    wa_acct_assx-costcenter = c_x.
    APPEND wa_acct_assx TO i_acct_assx.
    wa_services-pckg_no = 20.
    wa_services-line_no = 2.
    wa_services-service = wa_input_file-column9.
    wa_services-quantity = '100'.
    wa_services-gr_price = '100'.
    wa_services-userf1_txt = wa_input_file-column13.
    APPEND wa_services TO i_services.
    wa_srvacc-pckg_no = 20.
    wa_srvacc-line_no = 1.
    wa_srvacc-serno_line = 02.
    wa_srvacc-serial_no = 02.
    wa_srvacc-percentage = 100.
    APPEND wa_srvacc TO i_srvacc.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = wa_header
    poheaderx = wa_headerx
    POADDRVENDOR =
    TESTRUN =
    MEMORY_UNCOMPLETE =
    MEMORY_COMPLETE =
    POEXPIMPHEADER =
    POEXPIMPHEADERX =
    VERSIONS =
    NO_MESSAGING =
    NO_MESSAGE_REQ =
    NO_AUTHORITY =
    NO_PRICE_FROM_PO =
    IMPORTING
    exppurchaseorder = ws_po
    EXPHEADER =
    EXPPOEXPIMPHEADER =
    TABLES
    return = i_return
    poitem = i_poitem
    poitemx = i_poitemx
    POADDRDELIVERY =
    poschedule = i_poitem_sch
    poschedulex = i_poitem_schx
    poaccount = i_acct_***
    POACCOUNTPROFITSEGMENT =
    poaccountx = i_acct_assx
    POCONDHEADER =
    POCONDHEADERX =
    POCOND =
    POCONDX =
    POLIMITS =
    POCONTRACTLIMITS =
    poservices = i_services
    posrvaccessvalues = i_srvacc
    POSERVICESTEXT =
    EXTENSIONIN =
    EXTENSIONOUT =
    POEXPIMPITEM =
    POEXPIMPITEMX =
    POTEXTHEADER =
    POTEXTITEM =
    ALLVERSIONS =
    POPARTNER =
    break gbpra8.
    LOOP AT i_return INTO wa_return.
    ENDLOOP.
    ENDFORM. " split_data
    *& Form conversion_output
    Conversion exit input
    FORM conversion_output USING p_ip
    CHANGING p_op.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = p_ip
    IMPORTING
    output = p_op.
    ENDFORM. " conversion_output
    Best regards,
    raam

  • Is Azure File Service available for User who have MSDN subscritpion

    is  Azure File Service available for User who have MSDN subscritpion

    Hi Mohit,
    I responded to your other post as well, please see the approach there:
    https://social.msdn.microsoft.com/Forums/azure/en-US/f789cbeb-b01b-4cf8-ac97-513340ae7a5c/azure-file-services-not-available-in-preview?forum=windowsazuredata
    Thanks,

  • Impdp ORA-31684: Object type USER:"USERNAME" already exists

    Hi,
    I use expdp/impdp to duplicate one schema in a database like this:
    expdp system/manager@DB SCHEMAS=SCHEMANAME
    then I drop destination Schema like this
    drop user SCHEMANAME_NEW cascade;
    create user SCHEMANAME_NEW identified by PW default tablespace TABLESPACENAME;
    and impdp like this
    impdp system/manager@DB FULL=Y REMAP_SCHEMA=SCHEMANAME:SCHEMANAME_NEW
    and I get this error:
    Processing object type SCHEMA_EXPORT/USER
    ORA-31684: Object type USER:"SCHEMANAME_NEW" already exists
    I know that the import was successful, but this error breaks my hudson build.
    I tried to add exclude like this
    impdp system/manager@DB FULL=Y REMAP_SCHEMA=SCHEMANAME:SCHEMANAME_NEW exclude=USER:\"=\'SCHEMANAME_NEW\'\"
    I need to get rid of this error.
    Thx

    You get this error because you precreated the user. All you need to do is add
    exclude=user
    to either your expdp or impdp command. Or let impdp create the user for you. If you need it to have a different tablespace you can just use the
    remap_tablespace=old_tbs:new_tbs
    This should take care of the default tablespace on the create user command.
    Dean

  • This user ID already exists

    Hi,
    Every time I try to create a new user account in OIM, I get the error "This User ID already exists. Enter another User ID." regardless of any user id I try. When I tried to create a new organization, I got the error "DOBJ.INSERT_FAILED. Insert failed."
    This happened after I imported oim tablespace from another environment.
    Thank you

    Yes, I copied .xldatabasekey after importing the tablespace. I can login and view all records but I can't modify or create new records. The log file contains the following errors when I try to create new organization:
    ERROR,08 Mar 2010 11:40:47,515,[XELLERATE.WEBAPP],Class/Method: tcManageOrganizationAction/createOrganization encounter some problems: Insert failed.
    Thor.API.Exceptions.tcAPIException: Insert failed.
    at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:109)
    at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:125)
    at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:517)
    at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:461)
    at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
    at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
    at com.evermind.server.ejb.StatelessSessionRemoteInvocationHandler.invoke(StatelessSessionRemoteInvocationHandler.java:43)
    at __Proxy19.createOrganization(Unknown Source)
    at Thor.API.Operations.tcOrganizationOperationsClient.createOrganization(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at Thor.API.Security.LoginHandler.oracleLoginSession.runAs(Unknown Source)
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy6.createOrganization(Unknown Source)
    at com.thortech.xl.webclient.actions.tcManageOrganizationAction.createOrganization(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
    at com.thortech.xl.webclient.actions.tcLookupDispatchAction.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcActionBase.execute(Unknown Source)
    at com.thortech.xl.webclient.actions.tcAction.execute(Unknown Source)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
    at com.thortech.xl.webclient.security.SecurityFilter.doFilter(Unknown Source)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:623)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
    at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    It also contains the error:
    ERROR,08 Mar 2010 11:21:28,363,[XELLERATE.SERVER],Class/Method: tcDataObj/save Error :Insertion of dataobject into database failed
    ERROR,08 Mar 2010 11:21:28,365,[XELLERATE.DATABASE],Class/Method: tcDataBase/rollbackTransaction encounter some problems: Rollback Executed From
    java.lang.Exception: Rollback Executed From
    at com.thortech.xl.dataaccess.tcDataBase.rollbackTransaction(Unknown Source)
    and,
    ERROR,08 Mar 2010 11:25:24,759,[XELLERATE.SERVER],Class/Method: QuartzWrapper/insertTaskHistory encounter some problems: ORA-00001: unique constraint (XLADM.TSH_PK) violated
    java.sql.SQLException: ORA-00001: unique constraint (XLADM.TSH_PK) violated
    Thanks for your help

  • Maybe you are looking for

    • Copying 2 drives to 1 for the same project

      I'm copying an external drive and have a 2nd for the same project I want to also copy (to the same external drive) and am wondering if I'll have any issues with media becoming unlinked? Anyone have any ideas? .

    • Why no manual gc?

      It seems to me that the one feature missing from Java's memory management model is the ability to demand that a specific object be garbage collected immediately if you know it's not going to be used anymore. What I mean is something like C++ "delete"

    • Number Formats in Reports

      How can I dispaly Numbers (amount) in Words in Reports ?

    • CUP 5.3 (SP5): Error after creating mitigations and approving

      After creating a request, and mitigating the risks in the request, I receive the error: Mitigation control <MC ID> could not be saved for user <USER ID> - Exception from the service : Mitigation record doesn't exist However, the roles get autoprovisi

    • Apple Works 6.2.9

      I have the english(american) version of apple works 6.2.9. Can I get from somewhere in the Internet german translations for the english text (I don't mean the german version of 6.2.9,but only translations into german)