Creating a directory & subdirectory on Application Server

I want to create a directory on Application Server which may contain many subdirectories where in i will upload my files from my ABAP Program.
I need to know if dynamic creation of a directory on Application Server is possible though ABAP.
I donot want to create it manually but dynamically depending on the type of file to be put in the directory.

If you use the complete path, this actually works.  I have tested it in my system.  It may not work in background though.  I'm on an AS400, so the path is a little different
call function 'GUI_CREATE_DIRECTORY'
     exporting
dirname = '//<ip_address>/qfilesvr400/<host>/usr/sap/TST/SYS/Folder1'
     exceptions
          failed  = 1
          others  = 2.
Regards,
Rich Heilman

Similar Messages

  • API for creating a directory in the application server

    Hello,
    Does anyone knows a way to create a directory in the application server? Something similar to
    CL_GUI_FRONTEND_SERVICES but for managing files in the application server?
    Thanks in advance
    Diz IsMi

    Actually, CL_GUI_FRONTEND_SERVICES=>Directory_Create works really good for me. 
    REPORT ZRICH_0001 .
    data: path type string.
    data: rc type sy-subrc.
    path = '\172.52.72.651qfilesvr400S109XXXXusrsapTSTSYStest'.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
      EXPORTING
        DIRECTORY                = path
      CHANGING
        RC                       = rc
      EXCEPTIONS
        DIRECTORY_CREATE_FAILED  = 1
        CNTL_ERROR               = 2
        ERROR_NO_GUI             = 3
        PATH_NOT_FOUND           = 4
        DIRECTORY_ACCESS_DENIED  = 5
        DIRECTORY_ALREADY_EXISTS = 6
        UNKNOWN_ERROR            = 7
        others                   = 8
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Rich Heilman

  • How Create Virtual Directory On Oracle Application Server 10g on RHEL 5

    Dear Sir
    i have deployed my application on OAS 10g on RHEL 5 ,,now since my application is calling some pro*c programs and then they generate some text based reports on fixed folder named
    /treas/temp
    now i simply have to open these text based reports on web browser
    WEB.SHOW_DOCUMENT('/forms/pcreport/'||v_filename);
    but for that i need to create virtual directory name : " /pcreport " without code
    kindlly help as its working on my developer suit 10g i created a virtual directory in my application server by making following entry in "orion-web.xml" file
    <virtual-directory virtual-path="/pcreport" real-path="/u/treas/temp" />
    kindlly help

    (My paths shown, yours will be different)
    In a text editor :
    /u01/app/oracle/product/midtier/Apache/Apache/conf/httpd.conf
    Add
    Alias /pcreport/ "/u01/app/oracle/product/midtier/forms/pcreport/"
    <Directory "/u01/app/oracle/product/midtier/forms/pcreport/">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    Create the pcreport directory.
    Add a simple test page
    vi /u01/app/oracle/product/midtier/forms/pcreport/test.html
    <html>
    <head>
    <title>Simple test page </title>
    <style type="text/css">
    body {
    margin-left: 20%;;
    margin-right: 20%;
    border: 1px dotted gray;
    padding: 10px 10px 10px 10px;
    </style>
    </head>
    <body>
    <p>test!</p>
    </body>
    </html>
    Test
    http://yourserver.com:7777/pcreport/test.html
    Best Regards
    mseberg

  • How to create the user on Internet Application Server(IAS) control console

    Hi All,
    My Client is asking me for How to create the user on Internet Application Server(IAS) control console 10.1.2( 10g release 2).
    If anyone have the document for How to Create the User on Internet Application Server (IAS) console 10g release 2 , then please send me the document and help me out from this Concern.
    Regards,
    Yadav@intelli.
    Edited by: 851080 on Apr 8, 2011 6:31 PM

    Are you using OID? Can you provide more details about your iAS environment?

  • To create a new file in application server and transfer data to ti

    i am doing the following where i have to create a new file in application server and transfer data to tht file from an internal table.but its saying file cant be opened.the path i am giving to parameter p_prefil is /tmp/prachi.txt.
    wats the prob..can anyone help.
    DATA:L_WA_FINAL TYPE TY_FINAL,
         l_wa_string type string.
    OPEN DATASET P_PREFIL FOR OUTPUT IN text mode encoding default.
    if sy-subrc <> 0.
    write: ' file cannot be opened'.
    stop.
    endif.
    LOOP AT P_I_FINAL INTO L_WA_FINAL.
    move l_wa_final to l_wa_string.
    TRANSFER l_wa_string TO P_PREFIL.
    if sy-subrc <> 0.
    write: 'file can not be written'.
    stop.
    endif.
    clear l_wa_final.
    ENDLOOP.
    CLOSE DATASET P_PREFIL.
    if sy-subrc <> 0.
    write: ' file cannot be closed'.
    stop.
    endif.

    DATA:L_WA_FINAL TYPE TY_FINAL,
    l_wa_string type string.
    OPEN DATASET P_PREFIL FOR OUTPUT IN text mode encoding default.
    if sy-subrc ne 0.
    write: ' file cannot be opened'.
    stop.
    endif.
    LOOP AT P_I_FINAL INTO L_WA_FINAL.
    move l_wa_final to l_wa_string.
    TRANSFER l_wa_string TO P_PREFIL.
    write: 'file can not be written'.
    clear l_wa_final.
    ENDLOOP.
    CLOSE DATASET P_PREFIL.
    if sy-subrc ne  0.
    write: ' file cannot be closed'.
    stop.
    endif.

  • Directory browsing in Application Server

    Hi Gurus,
    I need Directory browsing facility for my application server . i.e facility to select any directory on my application server. Can any body help me.
    Regards,
    Srinivas

    Hi Srinivas,
    Try using function module F4_DXFILENAME_TOPRECURSION or /SAPDMC/LSM_F4_SERVER_FILE (this gives the help in tree structure)
    A sample on how to use F4_DXFILENAME_TOPRECURSION
    DATA
         : O_PATH     TYPE DXFIELDS-LONGPATH.
    PARAMETERS
         : P_FILE     TYPE RLGRAP-FILENAME
    START-OF-SELECTION.
      WRITE : 'Selected file',
               P_FILE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
        EXPORTING
          I_LOCATION_FLAG = 'A'
          I_SERVER        = ' '
          I_PATH          = ' '
          FILEOPERATION   = 'R'
        IMPORTING
          O_PATH          = O_PATH
        EXCEPTIONS
          RFC_ERROR       = 1
          ERROR_WITH_GUI  = 2
          OTHERS          = 3.
      P_FILE = O_PATH.
    Regards'
    Rajvansh
    Edited by: Rajvansh Ravi on Jul 24, 2011 2:36 PM

  • Create directory on SAP application server with blanks

    Hi,
    is it possible and if so how to create within ABAP a directory on a Linux based SAP application server that contains blanks.
    We've tested with SXPG_COMMAND_EXECUTE but didn't succeeded.
    A working code snippet would be great.
    Thanks and kind regards
    Florian

    Hi
    Try with Tcodes SM49/SM69.
    Thanks,
    Sreeram

  • Creating a directory on a different server

    Hi! Is it possible that for example I have an application in server A then I want that applicaiton to create a directory or upload a file in server B?
    Thanks in Advance!

    Obviously it an open facility of that sort were
    supplied it would be very insecure. However you can
    certainly write servlets that accept data from client
    systems and store it as files (using POST or PUT
    transactions).ah I see so I suppose my idea would be undoable since java did not supply facility of that sort...

  • "Invalid Oracle Home directory" error in Application Server Connection

    I have Jdeveloper 10g on Windows XP and want to create an Application Server Connection.
    After specifying required i get Test failed (-2). Invalid Oracle Home directory whenever I go for testing it.
    My Application Server in Linux

    You are in the wrong forum for that question.

  • Create database on top of application server

    Hi, I have Oracle Application Server 10g installed, now can I create database directly on top of that? I tried to use the provided DBCA to create a 10g database. During the creation process, I got "ORA-01304: Oracle not available". Is there anybody know what is wrong with this? Or should I install 10g database independenttly?
    Any input will be appreciated.

    Hi,
    "can I create database directly on top of that" ...
    1. If you are installing in the same "ORACLE_HOME" directory no.
    2. If you are installing in a different directory, and have sufficient memory, cpu, diskspace (a significant issue)... then Yes
    "should I install 10g database independently"
    1. perhaps, see above, if Yes to (2) then is this a development platform for yourself or an organizational / company platform. It is common practice for the apps server and db to be installed on different servers for performance reasons.

  • Creating a new file in application server

    hai,
      please rectify this, how to create a file in application server ?
       can any one forward a sample code for creating a file in application server.
                           hazam

    Hi Hazam,
      Please check the below code.
    Data :   P_UFILE(60)                   " Unix File name
             TYPE C
             value '/emn_R3/hr/ben_age25_dep'.
        CLEAR GD_SUBRC.
        <b>OPEN DATASET</b> GD_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
        IF SY-SUBRC <> 0.
          GD_SUBRC = SY-SUBRC.
          gs_error-pernr = gs_0021-pernr.
          gs_error-ename = gd_ename.
          gs_error-mess
               = 'Can not open File:'(017) + gd_file.
          append gs_error to gt_error.
          clear gs_error.
    *      CLEAR GD_MSG1.
    *      CONCATENATE 'Can not open File:'(017)
    *                   GD_FILE
    *        INTO GD_MSG1.
    *      WRITE : / GD_MSG1.
        ELSE.
          LOOP AT GT_BODY INTO GS_BODY.
            <b>TRANSFER</b> GS_BODY TO GD_FILE.
          ENDLOOP.
          <b>CLOSE DATASET</b> GD_FILE.
        ENDIF.
    Hope this will help you.
    Thanks&Regards,
    Siri.
    Message was edited by: Srilatha T

  • Validate whether a file path or directory exists on application server

    hi,
    I need to validate if a directory or file path exist on application server. How do we do that?
    thanks.

    DATA:
        ltp_bom                  TYPE sychar01,
        ltp_encoding             TYPE sychar01,
        ltp_codepage             TYPE cpcodepage.
    Processing --------------------------------------------------------- *
      TRY.
          CALL METHOD cl_abap_file_utilities=>check_utf8
            EXPORTING
              file_name         = itp_filename
              max_kb            = -1
              all_if_7bit_ascii = abap_true
            IMPORTING
              bom               = ltp_bom
              encoding          = ltp_encoding.
        CATCH cx_sy_file_open .
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                  RAISING file_open_error.
        CATCH cx_sy_file_authority .
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                  RAISING file_authority_error.
        CATCH cx_sy_file_io .
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                  RAISING file_io_error.
      ENDTRY.

  • Creating connection pool on Sun Application Server 8.1

    Hi All,
    I am trying to create a connection pool for my MySql database on Sun Application Server(Version 8.1) using 'asadmin'. I am also able to create the connection pool successfully but when i am trying to ping the connection pool, it is giving me the java.net.UnknownHostException. The command I am using for creating the connection pool is as follows:
    create-jdbc-connection-pool user admin password adminadmin host localhost port 4849 datasourceclassname com.mysql.jdbc.jdbc2.optional.MySqlConnectionPoolDataSource restype javax.sql.XADatasource --property User=root:Password=admin:SelectMethod=Cursor:DatabaseName=testdb:serverName=\"localhost\":portNumber=3306 MyConnectionPool
    My database and the application server are running on the same machine.
    Has anyone come across such a problem? Any help would be highly appriciated.
    Thanks in Advance,
    Anurag.

    hi Anurag,
    Check the properties in the jdbc-connection-pool tag and make sure that the values are populated correctly. You can also try specifying the actual hostname or IP address of the machine instead of localhost and see if that works.
    Cheers,
    Vasanth

  • Creating an SMF service for application server

    Hi... I'm not sure this is the proper place to post this
    I installed application server 8.2 pe on Solaris 10 6/06 and I tried to create a service using asadmin create-service, but the option fo creating service does not seem to exist. Is it a matter of the version, type of app. server? any suggestions?
    Am I supposed to try this old style: http://docs.sun.com/app/docs/doc/819-4712/6n6rit5q5?a=view

    Hi Roman Dubov
    Here is the step-by-step guide of How to Create ICF Service from an Existing Service:
    Just have a look:
    http://help.sap.com/saphelp_bw30b/helpdata/en/78/9852aec06b11d4ad310000e83539c3/content.htm
    Cheers,
    Vijay Raheja

  • Temporary *.rpt file disappears from temporary directory on Websphere Application Server 6

    Hello,
    I'm having trouble after publishing to my WAS v6 environment.  The report will begin, creating the appropriate jrc_tmp_######.rpt file in my temporary directory. 
    For small reports (10 objects or less), the temporary report disappears, I am queried for my login and any parameters, then the report opens.  The temp file never comes back.  All subsequent requests for the report from *any computer* return with an I/O Error and this later in the log file:
    Caused by: java.util.zip.ZipException: ¤u2022'u2022-¦u2022@u0192-"-(tm)...¢¢u2030-u2022@"...£u02C6-
    Any reports with > 10 objects (any combination of data fields, text, images, formulas) the temporary report disappears and only the same I/O error appears.
    In my test env. on windows, using the Rational Application Developer v 7 WAS test server, the temporary report stays until the report times out...
    Has anyone else on WAS 6 had similar problems?  I've no idea how to proceed.
    Thanks!
    Terese

    Would you be able to do one test?
    Early builds of the IBM Java JRE 1.3 and 1.4 had issues with the JIT compiler that caused strange IOExceptions.
    Would you try, in the WebSphere admin console, turning off the JIT for the JRC application, to see if the problem goes away?
    If so, I recommend upgrading to the latest IBM Java JRE build for your version of the Java SDK.
    Ted Ueda

Maybe you are looking for

  • Is there a way to remove an imperfection from the video images?

    I have a 2 minute clip. My subject is sitting in front of a poster. Is there a way to mask one line of text on the poster throughout the clip?

  • How do I delete items in calendar.

    How do I delete items in calendar.

  • Have to Create a new Home Sharing account every time I want to share with Apple TV

    Every single time I want to stream media from my PC (Windows 7) to my Apple TV, I have to create a new home share account.  I litereally have to get rid of my Home Sharing in both iTunes and on my Apple TV (2nd Gen), and then create a new one, and ev

  • Can't enter iChat

    I tried to use iChat for the first time. I finished the initial setup and the iChat dialog box titled "Encrypted iChat" said "You are now ready to use iChat... *Click Done to start using iChat.*" The problem is there was no "Done" button! The button

  • Ipod is missing in itunes..HELP!!

    i've done everything...but still i cant seem to let my nano be visible for syncing in the itunes..in my computer,my ipod is visible....i tried running the diagnostics and it says that the ipod connection status is ok..since it's green...so that means