Calling unix file program stored in server directory

Hi ,
I need to run a unix batch program stored on the server directory from an ABAP program. The unix batch program is a script program that will perform encryption on the file. I'm using SAP 4.6c running on Windows NT.
I need to maintain External OS Cmd in SM69 to start this .BAT file. Does anyone know what should i fill in Operating System Command and Parameters for operating system command?
Best Regards,
Hikaruno

Hi Roberto,
Why not we try the other way round,
1) Store the PDF file from the server into SAP internal table by using GUI_UPLOAD with file type as BIN
this will upload the PDF stored in the Binary content, Now there are many FM to convert the BIN data and now store the exact data into an internal table and then convert the internal table to spool
2) Get a third party software to convert the pdf to text file, store it in SAP and convert to spool
Please revert for any further clarification or comments.
Thanks
Sri

Similar Messages

  • How to delete string or line from unix file(dataset) of application server

    Hi  All,
    After transfer workarea information or all records into dataset(unix file). When I see the file in application server automatically the last line is shown a blank line. I am not passing any blank line.
    I have tried for single record than also the file generates the last line(2nd line) also a blank line.
    When I m reading the dataset, it is not reading the last blank line but why it is showing the last blank line?
    How to delete string or line from unix file(dataset) of application server?
    Please give your comments to resolve this.
    Thanks
    Tirumula Rao Chinni

    Hi Rio,
    I faced similar kind of issue working with files on UNIX platform.
    The line is a line feed to remove it use
    DATA : lv_carr_linefd TYPE abap_cr_lf VALUE cl_abap_char_utilities=>cr_lf. 
      DATA : lv_carr_return TYPE char1,                                   
             lv_line_feed   TYPE char1.                                          
      lv_line_feed   = lv_carr_linefd(1).
      lv_carr_return = lv_carr_linefd+1(1).
    Note: IMP: The character in ' ' is not space but is a special
    character set by pressing ALT and +255 simultaneosly
      REPLACE ALL OCCURRENCES OF lv_line_feed IN l_string WITH ' '.
      REPLACE ALL OCCURRENCES OF lv_carr_return IN l_string WITH ' '.

  • File exist in application server directory

    Hi there,
    On my SAP server, i have a directory created specifically to store input files generated from other external systems.
    From my ABAP program, i need to check if any file exist on that application server directory. If yes, then i will proceed to read the input file and process it.
    If it's empty, then output message that file is not available.
    Are there any FM to do this?

    you can use this code to do this...
    Upload data from file
      DATA: lv_filename  TYPE string, "File name
            lv_line      TYPE string. "One line entry in a file
      lv_filename = iv_file_name.
      IF iv_location = gc_application.
        IF iv_record_count IS SUPPLIED.
      Open file
          IF gv_file IS INITIAL.
            OPEN DATASET lv_filename FOR INPUT IN TEXT MODE
                                     ENCODING DEFAULT
                                     IGNORING CONVERSION ERRORS.
            IF sy-subrc <> 0.
              RAISE file_open_error.
            ENDIF.
            gv_file = gc_check.
          ENDIF.
      Read data
          DO iv_record_count TIMES.
            READ DATASET lv_filename INTO lv_line.
            IF sy-subrc <> 0.
      Close file
              CLOSE DATASET lv_filename.
              IF sy-subrc NE 0.
                RAISE file_close_error.
              ENDIF.
              CLEAR gv_file.
    Exit from the loop
              EXIT.
            ENDIF.
            IF iv_separator IS NOT INITIAL.
              CALL FUNCTION 'Z_WM_SPLIT_DATA'
                EXPORTING
                  iv_data      = lv_line
                  iv_separator = iv_separator
                CHANGING
                  ct_tab_data  = ct_tab_data.
            ELSE.
              CHECK NOT lv_line IS INITIAL.
              APPEND lv_line TO ct_tab_data .
            ENDIF.
          ENDDO.
        ELSE.
      Open file
          OPEN DATASET lv_filename FOR INPUT IN TEXT MODE
                                   ENCODING DEFAULT
                                   IGNORING CONVERSION ERRORS.
          IF sy-subrc <> 0.
            RAISE file_open_error.
          ENDIF.
      Read data
          DO.
            READ DATASET lv_filename INTO lv_line.
            IF sy-subrc <> 0.
              EXIT.
            ENDIF.
            IF iv_separator IS NOT INITIAL.
              CALL FUNCTION 'Z_WM_SPLIT_DATA'
                EXPORTING
                  iv_data      = lv_line
                  iv_separator = iv_separator
                CHANGING
                  ct_tab_data  = ct_tab_data.
            ELSE.
              CHECK NOT lv_line IS INITIAL.
              APPEND lv_line TO ct_tab_data .
            ENDIF.
          ENDDO.
      Close file
          CLOSE DATASET lv_filename.
          IF sy-subrc NE 0.
            RAISE file_close_error.
          ENDIF.
        ENDIF.

  • Can we able to call .bat file from Stored procedure?

    My actual requirement is to import an csv file(where it contains a table) into oracle Database from the front end screen when the csv file location is given.
    Where in the screen (designed by dotnet) a browse option will be present and I will give the csv file location and this will be passed into stored procedure as an input parameter.
    Now I need a stored Procedure that can Import my csv file table data into Oracle database10g.
    I shoudnot use the import option present in the physical Oracle Database.
    Can any one please provide me the stored Procedure?

    NGK246 wrote:
    My actual requirement is to import an csv file(where it contains a table) into oracle Database from the front end screen when the csv file location is given.
    Where in the screen (designed by dotnet) a browse option will be present and I will give the csv file location and this will be passed into stored procedure as an input parameter.
    Now I need a stored Procedure that can Import my csv file table data into Oracle database10g.You do not seem to understand the basic concept of client-server. If you supply a file location for the server code, and that location is not on the server, how do you expect the server to access that file in that location?
    You cannot expect the server to hacks its way across the network, crack open a remote file system somewhere, and steal that file from that location.
    As the client has access to that location and file, the client needs to read that file and supply that file's content to the server. This is how the server receives a file from a client. With Oracle. With FTP. With SCP. With SFTP. With HTTP. With SMTP and file attachments to e-mails. Etc.
    This is not specific to Oracle. This is a fundamental concept. So the problem here is your ignorance of client-server and not a problem with Oracle and not a problem with PL/SQL.
    I shoudnot use the import option present in the physical Oracle Database.Not sure what this mean, but the basic statement that "+we should not use feature 123 or feature ABC of Oracle+", is invariable an utterly idiotic statement to make. Kind of like buying a car and then making the statement that groceries may not be put into the truck as the car's trunk should not be used.
    Can any one please provide me the stored Procedure?Very arrogant of you to assume that others will spend their free time writing code for you - with you copying-and-pasting that code and providing it to your employers, as your work...

  • Where lca file will stored in server ?

    Hi Experts,
    We are importing the LCA file from admin console and we are using  the services effectivily.Thats fine and cool.
    We are also installing  SA's. As part of that we are also deploying the lca files into the server.
    We searched deeply  where all lca files will store into server ?.We are using JBoss server .
    Please let us know where lca files will store in application server ?.
    We are waiting  for your valuable answers.
    Thanks
    Praveen.

    When an LCA is deployed, its contents are stored in the Repository under the 'applications' folder.  But this folder is hidden from the Workbench view of the Repository. 
    Note that during deployment, the services/processes in the lca have their runtime information persisted into the LiveCycle database tables so you shouldn't be trying to do anything directly with the Respository  contents.

  • Call unix commands from stored procedures

    My stored procedure requires to call unix commands HOW DO I DO IT?
    null

    i do not know pl sql but in java you can use:
    Runtime.getRuntime().exec("YOUR UNIX COMMAND");
    real example:
    Runtime.getRuntime().exec("ls");
    but you must be careful with using that...
    especially if you want to wait till the process finishes..
    rgds,

  • How to Call Fmx file in the Linux Server

    Hi All,
    Iam having a server when ever i receive a file through FTP to the server , server will trigger to call a fmx file in another server. so that it reads the data of the file and insert into database .
    How this can be achieved in Linux server, at present it is working in Windows
    Please any solutions appreciated.
    Gunisetty Venkatesulu

    Using Forms to insert data from a file into a table is the wrong way to do this. It would be much more efficient and appropriate to use SQL Loader to insert the file data. Another option, depending on your database version, would be to use an external table. External tables are basically an interface that uses SQL Loader to read and write to the file just like you would a table. You must have RDBMS 10g or higher to use external tables.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Calling a remote program on the server from the client

    Hi, I'm new to Java/Jdeveloper/Oracle I'm writing a small app in
    Jdeveloper 3.2 running on Windows that connects to an Oracle
    8.1.6 on a Redhat Linux. I have a few programs writen in C that
    run on the server, and would like to call them from the client
    machine with a few parameters. is there a way of doing that?
    it's just like calling "ls -la filename" from the remote
    client. BTW, I don't need to get a response from the server, I
    just need to initiate the call.
    Thanks for any help.
    John

    JDeveloper is an IDE not a platform. what sort of app are you
    writing: client server application, applet, JSP?
    APC

  • Download all files from a specific application server directory to Local pc

    Hi Experts,
    I have a requirement of downloading all the files from an application server directory to a local pc.
    I know how to download a single file from an application server at a time provided the file name is known.
    But my requirement is to download all the files in that particulary directory, because I dont know how many files were created in that directory and what are their names.
    Please kindly provide the solution.
    Thanks,
    Kalikonda.

    Nelson,
    Here is the function module that I have used to get all the application server files.
    appl_dir_name is the path of the directory  i.e. '/outbound/PD1/Applnserverfiles/'
    it_appl_srv_fls is the internal table where all the files gets stored in.
    CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
       EXPORTING
         dir_name                     = appl_dir_name
      FILE_MASK                    = ' '
    IMPORTING
      DIR_NAME                     =
      FILE_COUNTER                 =
      ERROR_COUNTER                =
       TABLES
         dir_list                     = it_appl_srv_fls
    EXCEPTIONS
      invalid_eps_subdir           = 1
      sapgparam_failed             = 2
      build_directory_failed       = 3
      no_authorization             = 4
      read_directory_failed        = 5
      too_many_read_errors         = 6
      empty_directory_list         = 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.
    hope this solves your problem.
    Thanks,
    kalikonda.

  • How to know the first placed file in Application server directory

    Hi All ,
    i want to Know the First plased file in a application server directory . i have tried with
    FM EPS_GET_FILE_ATTRIBUTES but it is giving the file size. Can anybody  give some idea to get the file lastmodify property.
    Thanks & Regards
    Prithvi.

    Hi Prithvi!
    Use the methods of class CL_GUI_FRONTEND_SERVICES (if your release is at least 620, sorry otherwise).
    Method DIRECTORY_LIST_FILES will give you all files of a directory, then you can check with method FILE_GET_ATTRIBUTES for some date info.
    But maybe you can agree about a timestamp in the filename - this has to be set by the sender, but is much easier and reliable, too.
    Regards,
    Christian

  • Calling a forms program outside of the current form directory

    My application consists of a menu that calls forms programs in 3 different directories. The three forms directories connect to 3 separate databases. The forms menu resides in forms directory1. The 3 sets of forms programs are for the most part identical with some minor changes. The 3 databases are also pretty identical with some minor changes. NOTE! I'm a newbie who did not design this but who is charged with maintaining it without having the benefit of any formal Oracle training ... So please keep that in mind. I've read the manuals and tried as many things as I can think of including setting the FORMS60_PATH prior to issuing the 'HOST' command as well as providing a fully qualified pathname when using the CALL_FORM command.
    When the menu calls a program in forms directories 2 or 3 using the 'HOST' command, the first screen is fine. When that first screen calls another forms program within it's directory (2 or 3) control is passed to the forms program in forms directory 1 (where the menu lives).
    I've been told that it can't be done and also that it can be done but that it's a real science project. One alternative is to use individual ICONS that run 3 different menues, one in each forms directory. That will work, but it's not what we're after here.
    Any help would be appreciated even if it's just suggested reading. We're running Oracle 9i and Forms v6.
    Thanks,
    Ron

    Hi Ron,
    I would like to know few things before i give u a solution.
    Have u configured the 3 directories to the FORMS60_PATH?
    Do u have the same form names in all the 3 directories or the form names are different?
    As u have mentioned u connect to different user's of the single database for the forms in different. this can be achived.
    Regards
    Natesh

  • Logic to fetch the file name from Application Server

    Hi Friends
    I have a requirement that : By giving the Directory name (eg:/tmp),I have to get the all file names stored under that Directory name.
    Can anyone please provide me the logic / function modules related to this requirement.
    Points are assured for useful answers.
    Regards,
    Sree

    Hi,
    use these:
    function module "EPS_GET_DIRECTORY_LISTING"
    FM RZL_DIR_READ instead. its easy and effective to use.
    Or
    FILE_GET_NAME_USING_PATH,
    EPS_GET_DIRECTORY_LISTING
    /SAPDMC/LSM_F4_FRONTEND_FILE
    OPEN DATASET <Path / filename> FOR INPUT IN TEXT MODE...
    if sy-subrc eq 8, then the file does not exist on the application server.
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Defining Alias for Remote server Directory / Path

    Hi All,
             In my process chain I have an open hub process after which I have an abap program which sends out the data to a file on a remote server directory. But when it executes the program, it cannot find the path mentioned although I checked whether it is correct.
    I have also seen in several instances that for the remote server directory / path, the entire path is not typed in the variant's selection screen; instead it seems like an ALIAS. For example, if the path is
    w3n2-s501\javaappserver_test_staging\m234\sapdata on remote server w3n2-s501, then the  selection screen fileds show up like this:
    Remote Server Directory/Path     P               SAPTEST
    Remote Server Name                     P                          w3n2-s501     
    Does anyone know where this SAPTEST would be defined for the remote directory path?
    Thanks!

    Hi
    http://help.sap.com/saphelp_nw04s/helpdata/en/bd/0d6c3db297ff4d8a84e656502531f0/frameset.htm
    Hope it helps

  • Run applet in browser when html file is stored in different dir.

    I have a SiteSelector.class stored in: "D:\DATA\Java Programmes\Networking\"
    and a SiteSelector.html stored in :"D:\DATA\Java Programmes\Networking\HTML files\"
    Here is a part of the code of SiteSelector.html:
    <applet code= "SiteSelector.class"
    width=500
    height=500
    codebase="D:\\DATA\\Java Programmes\\Networking\\"
    archive=""
    alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
    >
    <param name = "title0" value = "Java Home Page">
              <param name = "location0" value = "http://java.sun.com/">
    <param name = "title1" value = "Deitel">
              <param name = "location1" value = "http://www.deitel.com/">
              <param name = "title2" value = "JGuru">
    <param name = "location2" value = "http://www.jGuru.com/">
    <param name = "title3" value = "JavaWorld">
    <param name = "location3" value = "http://www.javaworld.com/">
    Your browser is ignoring the <APPLET> tag!
    </applet>
    Since html file and .class file are stored in different directories so in applet tag I specify absolute url in "codebase = ......" to indicate that the browser should look for .class file in "D:\DATA\Java Programmes\Networking\".
    But when I run the Applet in the browser, nothing happens. But when I copy the html file back to "D:\DATA\Java Programmes\Networking\" and change the codebase = "D:\\...." to codebase = "." It works well. Any one can help me to hanld this problem. I want to run the applet in the browser when the html file is stored in different directory. Thank you.
    Message was edited by:
    beckham12a18
    Message was edited by:
    beckham12a18
    Message was edited by:
    beckham12a18
    Message was edited by:
    beckham12a18

    anyone please help me!!!!

  • Reg. PDF file stored in oracle server directory

    Dear All ,
    How to stored PDF generated file in oracle server directory.
    Thanks & Regards
    shailesh

    You need a directory object in Oracle for that server directory. That directory needs to be accessible (permission/ACL wise) to the local database processes to read/write from/
    The schema that will be doing the read/write using that directory object, needs read/write privs on it.
    UTL_FILE is used by PL/SQL code to write database contents to file.

Maybe you are looking for

  • Adobe Photoshop CS6 tries to open Bridge with deleted CS4?

    After upgrading to Windows 8 on two computers with same CS6 Premium installed programs...the desktop is showing "C:\Program Files\Adobe\Adobe Photoshop CS4 (64bit)\ Photoshop.exe" when I try to move image from Bridge CS6 to Photoshop CS6 (No problems

  • Lock object using RFC

    Hi, in standard transaction I lock an object in an other system using RFC lock(enqueue function) but when I exit from transaction the object in other system is automatically unlocked without using the dequeue function. Is It the correct behaviour? Th

  • Formatting the x axis

    How can I format the x axis to show whole numbers only?  I have a simple chart that is counting incidents and if there is only one during that time period, it will list .1 increments. Here is a sample chart of what I am getting on the left, and what

  • Linked mailbox credential prompt.

    We have setup a link mailbox between to different domain all is ok.. just want to clarify if it is normal that every time i open the outlook client of the linked mailbox it will prompt for its credetials? even if the domain account login is the link

  • I've connected my zen v before setting up the software...

    i've got a big big problem: i've connected the player to the computer before setting up the software and now i just can't make it work with my pc... i've tried uninstalling everything but nothing seems work... please help me!