Download all metada + document names to a text-file

Hallo,
we want to to download all the names of all documents and the values of the document-metadata from a special folder or repository into a text-file. I think we can realize /develop this by using existing apis . Is there any documentation or sample-code available?
Thanks
Andreas

Hi,
   Yes you can develop it. Use this link:
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/knowledge management and collaboration developers guide.html
Patricio.

Similar Messages

  • Returning strings of the same name in a text file from an array

    Hi,
    Another quick question. I have a text file with lines consisting of one integer, and four strings. Currently, I am able to search through this file and find any of the variables listed within. However, if any of the variables are listed more than once, and I search for that particular varable name, it only prints out the first line containing that particular variable name.
    Basically, how do I modify the following code so that the search method returns all the instances of a particular variable name in the text file?
    My current code is as follows,
    1. Search method,
    public Title lookUpDirector(String requiredDetails) {
            boolean found = false;
            int next = 0;
            while (!found && (next<TitleCount))
                if ( TitleArray[next].getDirector().equals(requiredDetails))
                    found = true;
                else next++;
            if (found) return TitleArray[next];
            else return null;
        }2. Test main class
    import simplejava.*;
    public class SearchTitleDirector
        public static void main(String[] args) {
            String titleDetails;
            SimpleReader keyboard = new SimpleReader();
            SimpleWriter screen = new SimpleWriter();
            SimpleReader inFile = new SimpleReader("title_test.txt");
            TitleList title = new TitleList(inFile);
            TitleList[] sortedArray = new TitleList[]{title};
            titleDetails=keyboard.readLine("Director?");
            Title search = title.lookUpDirector(titleDetails);
            if (search == null)
                screen.println("Not found");
            else screen.println(search);
    }Any help or advice appreciated!

    Thanks for the reply and advice.
    I have tried implementing the lookUpDirector method as follows,
    public TitleList lookUpDirector(String requiredDetails) {
            boolean found = false;
            int next = 0;
            TitleList list = new TitleList();
                while (!found && next<titleCount) {
                    if ( titleArray[next].getDirector().equals(requiredDetails)) {
                        list.add(titleArray[next]);
                        next++;
              if (found) return list;
              else return null;
            }When I use this method with the previous test main class, it compiles and runs, but after the user inputs the name of the director to search for, the input window freezes indefinitely and no result is achieved. The output pane in NetBeans is as follows,
    init:
    deps-jar:
    compile-single:
    run-single:
    Director?The only way to stop the process is to terminate it in the Runtime section of NetBeans.
    I have no idea why this is happening. Any advice?

  • Is there any way to export all of my parameters to a text file at once?

    I need my parameter for another report and i don't wan tot create same parameter again, i can export and import the parameters one by one but there are many parameter and i don't want to do this procedure for each of my parameter separately!
    My question is, is there any way to export all of my parameters to a text file at once?
    Thank you

    hi, Jamie Wiseman
    I think my question wasn't clear.
    what i am asking for i want to copy parameters itself as parameter to another report , not just parameter field name.
    I put some picture about where i want please check attached.
    As you see there is export function inside of export but i dont want to do this procedure of each of my parameters , i want to export them at once.
    SO do you have any idea for this

  • Reading String (Name-Value) from text file into XML

    Hi,
    I have a requirement for reading a text file and converting each entry of that text file into XML format. I have not came across such thing yet so looking for some ideas. I am using SQL Server 2005 and here is a sample entry from my source text file,
    Jun 4 14:31:00 zzzz64x02 fff:
    INPUT(ty=XYZ,Prefix=15063,dn=78787878787878,sgk=100.139.201.48,xxn=87878,ani=656565656565,ogrp=F7ZX05,ogtxt=NNNNN,ogx=NNNNN,oci=0xe00ac,ogi={NOA=INT,BC=1,SIG-TYPE=ZIP});
    PROCESS(ty=0x100000,cu=32880,Name=XOXOXOX,pc=88017,pd=24,dd=880175,pk=880175,rd=115472,ca=BGD,reg=RW,cdp=1,ai=245359,grp=2648,sl=9);
    OUTPUT(ty=XXXX,ret=0,rl=
    {i=1,su=99999,rizID=61084,skid=06,truckgp=1084,dd=8801,dn=78787878787878}
    I will get multiple entries like this in my source text file which I have to convert into XML (using TSQL).
    Any help will be useful.
    Regards.
    'In Persuit of Happiness' and ..... learning SQL.

    And I'm telling you that this is a bad option. You would use the vaccum cleaner to wash the dishes, would you?
    If you for some reason would do this task in SQL Server, you would implement it as a CLR stored procedure, but from what you have said I don't understand why you would do this server-side at all.
    What's wrong with the current C# solution?
    Erland Sommarskog, SQL Server MVP, [email protected]
    Got it.  I was just looking for the available options, nothing wrong with my C# solution. And yes, I don't use vacuum cleaner to wash dishes.
    'In Persuit of Happiness' and ..... learning SQL.

  • Can't open a document saved as a text file

    I recently saved a document as a text file because I wanted to send it to some Windows users. Now, a few days latter when I try to open the document it is in code/ASCII thereby unreadalbe. I had one of the people I sent it to send it back to me, which he did with a .doc extension. I cannot open it either. I don't have Word. Is there anyway I can open this document. And . . what am I doing wrong so I don't do this again.
    Also if this topic has already been address please excuse me. My search didn't bring up anything. Thanks.

    Welcome to Apple Discussions
    You shouldn't have a problem opening a text file, but there are a couple of things that could be causing a problem. First, make sure the AppleWorks 6 application is in the AppleWorks 6 folder in Applications and that the folder also contains the AppleWorks Essentials folder. In the AppleWorks Essentials folder is a folder named Translators. I the application & the translators are not in the same AppleWorks 6 folder, they won't be able to "make a connection." This may also let you open a .doc file, but I can't guarantee it as Microsoft has made significant changes in the last couple of years causing AppleWorks' .doc translator to fail.
    Also, try adding .txt to end of the file name. This will let OS X identify the file as text &, if nothing else, will allow TextEdit to open it.

  • DOWNLOADING A REPORT PROGRAM CODE IN TO TEXT FILE

    I HAVE ONE SIMPLE REPORT PROGRAM SAY,
    *& Report  ZTEST25
    REPORT  ZTEST25.
    DATA : A(8) TYPE C.
    A = 'ANDHRA'.
    WRITE  A.
    THE ABOVE MENTIONED REPORT PROGRAM SHOULD BE DOWNLOADED TO A TEXT FILE USING ANOTHER REPORT PROGRAM BY USING PARAMETER.
    THE OUTPUT IN THE FLAT FILE SHOULD BE:
    REPORT  ZTEST25.
    DATA : A(8) TYPE C.
    A = 'ANDHRA'.
    WRITE  A.

    here is complete code for  that
    report  z11dpk_assign1
            no standard page heading
            message-id z11dpk
            line-size  200                 "page width
            line-count 65(0).              "page length.
    T  A  B  L  E S  D  E  C  L  A  R  A  T  I  O  N                  *
    tables:  trdir,     " System Table TRDIR
             trdirt.    " Title texts for programs in
    D  A  T  A  D  E  C  L  A  R  A  T  I  O  N                       *
    Types
    Structure declaration for system table
    types: begin of struct_sys,
           name(40) type c,       " ABAP program name
           clas(4)  type c,       " Program class
           subc(1)  type c,       " Program type
           cnam(12) type c,       " Author
           cdat     type dats,    " Created on
           rstat(1) type c,       " status
           text     type repti,   " Report title
           c_box(1) type c,       " for check box
           end of struct_sys.
    Structure for internal table for report data
    types: begin of struct_report,
           line(500),
           end of struct_report.
    C  O  N  S  T  A  N  T  S  D  E  C  L  A  R  A  T  I  O  N  S
    data     : c_name(50)        type c,               " Program Name
               c_filename        like ibipparms-path,  " File name
               c_filename1       type string,          " File name
               c_ext(5)          value '.TXT',         " File extension
               c_textline(150)   type c,               " downloading status
               c_count           type c,               " no of pgm downlded
               c_count_text(100) type c.               " Text pgm downlded
    The CONSTANTS statement defines global and local constants.
    By using constants, you can read statically declared data objects,
    constants: c_const(8)        value 'UNTITLED'.
    I  N  T  E  R  N  A  L  T  A  B  L  E  D  E  C  L  A  R  A  T  I  O N
    data: it_sys    type standard table of struct_sys, " Itab for sys data
          it_report type standard table of struct_report with
          non-unique default key initial size 1000.    " Itab for rep data
    W  O  R  K  A  R  E  D  E  C  L  A  R  A  T  I  O  N  S
    data: wa_sys    type struct_sys,          " Work area for sys data
          wa_report type struct_report.       " Work area for report data
    I  N  I  T  I  A  L  I  Z  T  I  O  N
    initialization.
      clear  : wa_sys.
      refresh: it_sys,
               it_report.
      c_count = 0.
    S  E  L  E  C  T  I  O  N  -  S  C  R  E  E  N
      selection-screen  : begin of block blk3 with frame title text-015.
      selection-screen  : begin of block blk1 with frame title text-001.
      select-options    : s_name for trdir-name.              " Program name
      selection-screen  : end of block blk1.
      selection-screen  : begin of block blk2 with frame title text-002.
      parameters        : p_file type rlgrap-filename. " Path for loc folder
      selection-screen  : end of block blk2.
      selection-screen  : end of block blk3.
    A  T  S  E  L  E  C  T  I  O  N  -  S  C  R  E  E  N
    *The possible entries pushbutton for F4 appears beside the appropriate
    *fld (p_file) When the user activates this pushbutton or presses F4 for
    *the fld, the event is executed You can thus implement a self-programmed
    *possible entries routine for the input/output fields of the selection
    *screen
    at selection-screen on value-request for p_file.
    Value of Local file for upload/download is obtained by using this FM
      call function 'F4_FILENAME'
        importing
          file_name = p_file.
    S  T  A  R  T  -  O  F  -  S  E  L  E  C  T  I  O  N
    start-of-selection.
    CONCATENATE p_name '%' INTO z_name.
      select name
             clas
             subc
             cnam
             cdat
             rstat into table it_sys
                   from trdir
    *Sorts the selected records in ascending order by the specified column
    *references f1 ... fn (name)
                  where name in s_name order by name.
                  WHERE name LIKE 'Z11%'.
      if sy-subrc = 0.
        sort it_sys by name.
        clear wa_sys.
        loop at it_sys into wa_sys.
          select single text
                 into wa_sys-text
                 from trdirt
                 where name  = wa_sys-name and
                       sprsl = sy-langu.
          modify it_sys from wa_sys index sy-tabix.
          clear wa_sys.
        endloop.
      endif.
      set pf-status 'MENU_ASSIGN1'.
      uline.
      write:/    sy-vline ,
             8   sy-vline,  text-009 color 4,         " Name of the Program
             55  sy-vline,  text-003 color 4,         " Class
             62  sy-vline,  text-004 color 4,         " Type
             68  sy-vline,  text-005 color 4,         " Created By
             80  sy-vline,  text-006 color 4,         " Created On
             92  sy-vline,  text-007 color 4,         " Status
             100 sy-vline,  text-008 color 4,         " Program text
             180 sy-vline.
      clear wa_sys.
      loop at it_sys into wa_sys.
        uline.
        write:/ sy-vline,
               5   wa_sys-c_box as checkbox,
               8   sy-vline,  wa_sys-name,
               55  sy-vline,  wa_sys-clas,
               62  sy-vline,  wa_sys-subc,
               68  sy-vline,  wa_sys-cnam,
               80  sy-vline,  wa_sys-cdat,
               92  sy-vline,  wa_sys-rstat,
               100 sy-vline,  wa_sys-text,
               180 sy-vline.
      endloop.
    at user-command.
      case sy-ucomm.
        when 'BACK'.
          leave screen.
        when 'EXIT'.
          leave program.
        when 'DOWN'.
          clear wa_sys.
          do.
            clear wa_sys.
            read line sy-index field value wa_sys-c_box wa_sys-name.
            if sy-subrc <> 0.
              exit.
            endif.
    *if check box is selected.....
            if wa_sys-c_box = 'X'.
              clear c_textline.
    *Assigns the contents of the source field to the target field as a new
    *value
              write text-010    to c_textline.         " Downloading
              write wa_sys-name to c_textline+12.
              write text-011    to c_textline+53.      "to
              write c_filename1 to c_textline+56.      " file name
    FM returns the Text to be displayed on screen
              call function 'SAPGUI_PROGRESS_INDICATOR'
                exporting
                  text = c_textline.
              c_count = c_count + 1.
    Reads the program prog from the database into the internal table itab.
    The line length of table itab should be at least 72 characters
              read report wa_sys-name into it_report.
              if sy-subrc <> 0.
                exit.
              endif.
    *p_file contains the character string untitiled
    This comparison is not case sensitive
              if p_file cs c_const.        " Untitled
    the string ''(space) replaces the untitled occurrence of the search
    ignore case is used as this search is case sensitive
                replace c_const in p_file with '' ignoring case.
              endif.
    Places the fields f1 to fn (n >= 2) after g (target field).
              concatenate p_file wa_sys-name  c_ext into c_filename1.
    *Data transmission of an internal table from the server to a file on the
    PC is done by this FM.
              call function 'GUI_DOWNLOAD'
                exporting
                  filename = c_filename1
                  filetype = 'ASC'
                tables
                  data_tab = it_report.
              if sy-subrc <> 0.
                message id sy-msgid type sy-msgty number sy-msgno
                        with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              endif.
            endif.
          enddo.
          clear c_count_text.
          write c_count  to c_count_text+1.
          write text-030 to c_count_text+4.
    Nos Of Pgms downlded successfully
          message i205 with c_count_text.
      endcase.
    T  O  P -  O  F  -  P  A  G  E
    top-of-page.
      uline.
      write:/   sy-vline,
             10 text-020 color 2,  " Fujitsu India Limited
             70 text-021 color 2.  " List of ABAP Programs
      write:/   sy-vline,
             10 text-022 color 3, sy-datum color 3,    " Date
             70 text-023 color 3, sy-pagno color 3.    " Page No
    plz reward if helpful
    vivek

  • Search for a word and return all the  lines (row) from the text file..

    Hi all,
    I need a help on how to search a string from the text file and returns all the lines (rows) where the searched string are found. I have included the code, it finds the indexof the string but it does not return the entire line. I would appreciate your any help.
    public class SearchWord
         public static void main(String[] args){
         //Search String
         String searchText = "man";
         //File to search (in same directory as .class file)
         String fileName = "C:\\Workspace\\MyFile.txt";
         //StringBuilder allows to create a string by concatinating
         //multiple strings efficiently.
         StringBuilder sb =
         new StringBuilder();
         try {
         //Create the buffered input stream, which reads
         //from a file input stream
         BufferedInputStream bIn =
         new BufferedInputStream(
         new FileInputStream(fileName));
         //Holds the position of the last byte we have read
         int pos = 0;
         //Holds #of available bytes in our stream
         //(which is the file)
         int avl = bIn.available();
         //Read as long as we have something
         while ( avl != 0 ) {
         //Holds the bytes which we read
         byte[] buffer = new byte[avl];
         //Read from the file to the buffer
         // starting from <pos>, <avl> bytes.
         bIn.read(buffer, pos, avl);
         //Update the last read byte position
         pos += avl;
         //Create a new string from byte[] we read
         String strTemp =
         new String(buffer);
         //Append the string to the string builder
         sb.append(strTemp);
         //Get the next available set of bytes
         avl = bIn.available();
         catch(IOException ex) {
         ex.printStackTrace();
         //Get the concatinated string from string builder
         String fileText = sb.toString();
         int indexVal = fileText.indexOf(searchText);
         //Displays the index location in the file for a given text.
         // -1 if not found
         if (indexVal == -1)
              System.out.println("No values found");
         else
              System.out.println("Search for: " + searchText);     }
    }

    Hi, you can use servlet class and use this method to get the whole line of searched string. You can override the HttpServlet to treat that class as servlet.
    public class ReportAction extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    //write your whole logic.
    BufferedReader br = new BufferedReader(new FileReader("your file name"));
    String line = "";
    while(line = br.readLine() != null) {
        if(line.contains("your search string")) {
            System.out.println("The whole line, row is :"+line);
    }

  • Sorting Names in a text file using java program

    h1. Deleting numbers in a text file, sorting the names  and writing in to a new file
    h2. Sample data
    =================
    71234 RAJA
    89763 KING
    89877 QUEEN
    ==================
    h2. Java Program
    import java.io.BufferedReader;
    import java.io.BufferedWriter;
    import java.io.DataInputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileWriter;
    import java.io.InputStreamReader;
    import java.io.Writer;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.Iterator;
    class Sortnames { 
    public static void main(String args[]) { 
    try { 
    ArrayList storeWordList = new ArrayList();
    ArrayList storeWordList2 = new ArrayList();
                   int i;
    char c;
                   String inputfile = "names_konda.txt";
                   String tempfile = "newdatafile.txt";
                   String outputfile = "sortedoutput.txt";
                   StringBuffer strBuff=null;
    Writer output = null;
    File file =null;
                   Writer sortedoutput = null;
    boolean select =false;
                   //*********************************************** Reading data from Input file     
    FileInputStream fstream = new FileInputStream(inputfile);
    // Get the object of DataInputStream
    DataInputStream in = new DataInputStream(fstream);
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    String strLine;
    //Read File Line By Line
    while ((strLine = br.readLine()) != null) { 
    storeWordList.add(strLine);
    //Close the input stream
    in.close();
                   //*********************************************** Adding only alphabets to buffer and writing to file
                   file= new File(tempfile);
                   output = new BufferedWriter(new FileWriter(file));
    strBuff = new StringBuffer();
    for (Iterator iter = storeWordList.iterator(); iter.hasNext();) { 
         String s = (String) iter.next();
                        //System.out.println("String "+s);
         for (i = 0; i < s.length() ; i++)
    c = s.charAt(i);
    if (Character.isLetter(c)) {
    strBuff.append(c);
                        strBuff.append("\n");
    String myout = strBuff.toString();                
         output.write(myout);
         output.close();
         //============================================== Reading the created file,Sorting and placing in Collections
                   FileInputStream fstream2 = new FileInputStream(tempfile);
    // Get the object of DataInputStream
    DataInputStream in2 = new DataInputStream(fstream2);
    BufferedReader br2 = new BufferedReader(new InputStreamReader(in2));
    String strLine2;
    //Read File Line By Line
    while ((strLine2 = br2.readLine()) != null) {                 
    storeWordList2.add(strLine2);
    Collections.sort(storeWordList2);
                   //===================================================
    File sortedfile = new File(outputfile);
    sortedoutput = new BufferedWriter(new FileWriter(sortedfile));
    for(int m=0; m<storeWordList2.size(); m++)
         if (storeWordList2.get(m).toString().trim().length() > 0)
              sortedoutput.write(storeWordList2.get(m).toString());
                        sortedoutput.write("\n");     
    sortedoutput.close();
    System.out.println("Names Sorted SUCCESFULLY");
    br.close();
    br2.close();
    in.close();
    fstream.close();
    fstream2.close();
                   ///==========================================
                   File f1 = new File(tempfile);
                   boolean success = f1.delete();
                   if (!success){
                        System.out.println("failed deletion ");
                        System.exit(0);
                        }else{
                        System.out.println("deleted");
                   // ==========================================
    } catch (Exception e) {//Catch exception if any 
    System.out.println("Error: " + e);
    h2. Thanks and regards
    h1. BalaNagaRaju.M
    h1. [email protected]

    Do you have a question? Also see the sticky welcome post on how to post formatted code.

  • Adding own name in Receiver Text file in receiver FCC

    hi,
    In my receiver file CC(using file content conversion)
    I want to add some names on the receiver text file name automatically.
    sender is R3 that is IDOC as MI.
    In that field called CURCY on one segment and country one segment.
    ex.
    Now the receiver file name in FTP server (example)
    Result_report_20070721-104810-765.txt
    i want to get CURCY, COUNTRY field value on receiver file name in FTP server (it varies)
    example:
    Result_report_USD_USA_20070721-104810-765.txt
    Result_report_EURO_DE_20070721-104810-765.txt
    Result_report_EURO_FR_20070721-104810-765.txt
    Thanks

    hi,
    I am getting error in my message monitoring like message are in HOLDING bec of mistake which i made in Receiver FILE CC
    as i said:
    I followed my help.sap.com link to do this req.
    In my receiver file CC(using file content conversion)
    I want to add some names on the receiver text file name automatically.
    sender is R3 that is IDOC as MI.
    In that field called CURCY on one segment and country one segment.
    ex.
    Now the receiver file name in FTP server (example)
    Result_report_20070721-104810-765.txt
    i want to get CURCY, COUNTRY field value on receiver file name in FTP server (it varies)
    example:
    Result_report_USD_USA_20070721-104810-765.txt
    Result_report_EURO_DE_20070721-104810-765.txt
    Result_report_EURO_FR_20070721-104810-765.txt
    My message mapping is
    Source is IDOC occurence is 1
    Receiver File adapter: 0 to unbounded
    My message type on receiver is
    MT_Receiver
    DT_Receiversub1 (under MT_receiver)
    COUNTRY (third value under DT_DT_Receiversub1)
    I have mentioned in receiver FILE CC advanced variable substitution like this:
    variable Name :    var1
    Reference:    payload:DT_Receiversub1,3
    I am not receiving my file in Receiver FTP server.
    The mesage are on HOLDING in message monitoring
    Thanks

  • OMB Plus : how to get all the generated messages into a text file ?

    Hello,
    I wrote an OMB TCL script and I would like to know how to get all the messages generated during the exécution into a text file.
    I tried this, but it works only for a puts command :
    set DesProjet ACT_1
    set filename [ open "c:\\temp\\INFDE_010_IMPORT_REPOSITORY_$DesProjet.log" w]
    puts "test"
    Thank you for your help

    Hello Alain, you should try the OMBLOG variable. If you set it inside OMBPlus:
    set OMBLOG c:/temp/mylog.txtthen all the OWB specific commands are logged with their output. By OWB specific I mean all those that start with OMB.
    This is more than what you see in the interface, because:
    - messages inside procedures are logged; you wouldn't see them on std.output when you call a proc
    - variables are resolved, so if you issue the command
    set my_var VERY_IMPORTANT_TABLE
    OMBDROP TABLE '$v_myvar'the log will show:
    OMBDROP TABLE 'VERY_IMPORTANT_TABLE'
    Table dropped
    and you know something is wrong... so OMBLOG is very useful to intercept all manipulations on you repository.
    If what you want instead is a dump of the screen output when you execute a script, I suggest you redirect standard output from the operating system command line. Unfortunately OMBPlus doesn't support all advanced redirection and tracing features of the TCL language.
    Hope this helps, Antonio

  • How can I create a Document object from a text file (myFile.txt)

    Hi everybody:
    Thank you for reading this message.
    I am trying to find a method to convert a text file ( I have it in a File object) to a Document object.
    I read the Java API but it is strange, I do not know if I have to create an AbstractDocument, it is really strange for me.
    Any comment is welcome,
    Regards,
    JB

    Document is an interface, and AbstractDocument is abstract, so you
    can't create either of those directly. Assuming you are dealing with a
    a plain text file, you could do something like
    // Not catching any exceptions that get thrown
    File file = /* file you already have */
    String eol = System.getProperty( "line.separator" );
    int eolLen = eol.length();
    FileReader reader = new FileReader( file );
    BufferedReader buffer = new BufferedReader( reader );
    PlainDocument doc = new PlainDocument();
    for ( String line = buffer.readLine() ; line != null ; line = buffer.readLine() ) {
        int len = doc.getLength();
        if ( len > 0 ) {
            doc.insertString( len, eol, null );
            len += eolLen;
        doc.insertString( len, line, null );
    }and now you have a document.
    : jay

  • I tried to download but my mac keeps giving me .text file

    okay, i tried to download http://www.the-n.com/ntv/shows/downloads.php?id=531
    the screensaver for mac version. but after i download it, the computer keeps giving me
    the .text file. i dont get it. could anybody help me??

    Control-Click on the file and save it to your downloads folder. It should be in there as a ,jpg.
    -Bmer
    Mac Owners Support Group - Join us @ MacOSG.com
      Mac611 Mobile Mac Support - about.Mac611.com
       iTunes:MacOSG Podcast | YouTube.MacOSG.com
                       An Apple User Group 
    Have an iPhone or iPod touch? Enter Mac611.com in Safari on it for 'mobile Mac support.'

  • Download data entered via web to a text file.

    Hello,
    I'm developing a very simple BSP aplication in which the user enters via web some data in some fields. This data is store in an internal table. This table is an attribute in the application class. In this class there is a method to save the data to a file in presentation server. I've tried using WS_DOWNLOAD and GUI_DOWNLOAD but these function modules don't work. I would like to know if there some function modules or methods to download data to a file and that can be used in a BSP aplication.
    Thank you very much,
    Carlos
    Details:
    1-Layout
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    Carga ficheros
      generar_fichero
          exporting nombre_fichero = fichero.
    3- Method generar_fichero
    method GENERAR_FICHERO .
    ***Opción 1: emplear una instancia de una clase y llamar a su método
    data: file type ref to CL_GUI_FRONTEND_SERVICES.
    create object file.
    data l_filelength type i.
    call method file->gui_download
       exporting  filename = nombre_fichero
       importing filelength = l_filelength
       changing   data_tab = m_tabladatos
       exceptions
          FILE_WRITE_ERROR                = 1
          NO_BATCH                        = 2
          GUI_REFUSE_FILETRANSFER         = 3
          INVALID_TYPE                    = 4
          NO_AUTHORITY                    = 5
          UNKNOWN_ERROR                   = 6
          HEADER_NOT_ALLOWED              = 7
          SEPARATOR_NOT_ALLOWED           = 8
          FILESIZE_NOT_ALLOWED            = 9
          HEADER_TOO_LONG                 = 10
          DP_ERROR_CREATE                 = 11
          DP_ERROR_SEND                   = 12
          DP_ERROR_WRITE                  = 13
          UNKNOWN_DP_ERROR                = 14
          ACCESS_DENIED                   = 15
          DP_OUT_OF_MEMORY                = 16
          DISK_FULL                       = 17
          DP_TIMEOUT                      = 18
          FILE_NOT_FOUND                  = 19
          DATAPROVIDER_EXCEPTION          = 20
          CONTROL_FLUSH_ERROR             = 21
          OTHERS                          = 22
    *if sy-subrc ne 0.
    raise error_fichero.
    *else.
    **borrar cookie
    *endif.
    ***Opción 2: llamada directa a la función ws_download_wan "FALLA:
    ***********************************************"no deja rastro del fallo
    data l_filename(128).
    write nombre_fichero to l_filename.
    *CALL FUNCTION 'WS_DOWNLOAD_WAN'
    EXPORTING
      BIN_FILESIZE              = ' '
      CODEPAGE                  = ' '
      FILENAME                  = l_filename
      FILETYPE                  = 'ASC'
      MODE                      = 'A'
      WK1_N_FORMAT              = ' '
      WK1_N_SIZE                = ' '
      WK1_T_FORMAT              = ' '
      WK1_T_SIZE                = ' '
    IMPORTING
      FILELENGTH                =
    TABLES
       DATA_TAB                  = m_tabladatos
    EXCEPTIONS
      FILE_OPEN_ERROR           = 1
      FILE_WRITE_ERROR          = 2
      INVALID_FILESIZE          = 3
      INVALID_TABLE_WIDTH       = 4
      INVALID_TYPE              = 5
      NO_BATCH                  = 6
      UNKNOWN_ERROR             = 7
      OTHERS                    = 8
    *IF SY-SUBRC <> 0.
    raise error_fichero.
    *else.

    Hallo Carlos,
    Welcome to the forum. As with all things new in life, one does not know where to start immediately. I would like to recommend the <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">Getting Help</a> guide as first interesting article to read.
    Specifically you are interested in the section for searching this forum. Use keywords such as download or GUI_DOWNLOAD. Also consider to look at keyword Excel. Although not exactly on topic, the Excel discussions does address this partly. All of this has been discussed many time before.
    Finally, consider to read <a href="/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents">BSP Programming: Handling Of Non-HTML Documents</a>. This will really show you some different techniques to download files onto the computer.
    brian

  • What is the name for a text file on an iPod?

    This may not be quite where to post this question, but dumb as it is...it's been a question of mine for a while...I think what I am looking for is like 3 letters long or something...bear with my stupidity please...I just really want to know!
      Windows XP  

    Hmmm...maybe...I was thinking it might be SML or ACC or AAC...do any of those have to do with iPod file names? (sorry I am so stupid about this)

  • Insert Document name in Pages

    Is there a way to insert the document name as automatic text at the bottom of the first page in Pages? This was a simple "automatic text" script that Word has had for years. All of our documents are saved with names relating to what the document is and where it gets filed. Our paper filing/folder structure is pretty much identical to the folder structure of our file server. It is very convenient to have the name of the document printed at the bottom of the first page so that when it comes time to filing our hard copies, one knows exactly where to file it.
    There must be a way to script this. Any help would be much appreciated. Thanks.

    Automator isn't really the best solution to this. It's possible to do it with AppleScript, and granted, anything you can do in AppleScript can be put into an Automator workflow.
    There seems to be three possible ways to mark the bottom of the document:
    1) Insert carriage returns to position the very last paragraph (the name of the document) at the bottom. Drawback: if your document takes up all of the final page, then you'd have to create a blank page to accomodate the name. Also, determining the exact number of returns to insert isn't very easy.
    2) Put the name in the footer. Drawback: footers appear on every page, not just the last. You could create a separate trailing section, but that has a blank-page issue similar to #1.
    3) Create a text box at the bottom of the last page. Here's a little script that will do that.
    As for triggering the script, the simplest way is probably to use the AppleScript utility to enable the system AppleScript menu, and put the script in the Pages scripts folder. Then it'll be available whenever you're running Pages.
    <PRE>
    -- Assumptions:
    -- - units are inches
    -- - pages are 8.5 x 11
    property pageHeight : 11.0
    property pageWidth : 8.5
    tell document 1 of application "Pages"
    set bottomMargin to bottom margin
    set leftMargin to left margin
    set theBottom to pageHeight - bottomMargin
    -- Apparently, the new text box will be created on the page which is visible
    reveal page (page count)
    if path exists then
    -- if you prefer Unix-style pathnames, then use
    -- set docName to path
    set docName to path as POSIX file as text
    else
    -- Might want to prompt user to save here.
    -- otherwise, fall back on the document name, typically "untitled"
    set docName to name
    end if
    make text box with properties {object text:docName ¬
    , vertical position:theBottom, horizontal position:leftMargin ¬
    , height:bottomMargin, width:(pageWidth - left margin - right margin)}
    tell result
    -- Some optional formatting
    set alignment of object text to center
    set italic of object text to true
    set font size of object text to 18
    set font name of object text to "Palatino"
    end tell
    end tell
    </PRE>
    Titanium PowerBook   Mac OS X (10.4.4)  

Maybe you are looking for

  • Acrobat won't install on my iMac

    I bought a Fujitsu S1500 snanner bundled with set up software and Adobe acrobat 9 Standard which I installed on my pc. I have now changed the pc to an iMac and the Acrobat software will not install. I find it very strange that the software supplied d

  • Is it possible to link two or more accounts without merging?

         Is it possible to link two or more accounts without merging? For example: give access for apple id [email protected] (obviously fake and is used by John) to apple id [email protected] (also obviously fake and is used by Rose). This would only al

  • Why aren't some classes (like Point2D) Serializable

    Why aren't Serializable so many of the classes of Java2D ? (I've seen some other users are complaining about this too). In 1.4 the situation remains the same. If there is a reason I wouldn't mind but I don't know it. Is this a mistake or is there a g

  • This small and simple file doesn't compile .......please help

    Iam trying to complie this file but it gives error while compiling ....please help I wanted to generate this error message in my log file and wanted to see how the error message looks like ....that is why iam forcefully throwing en exception .....but

  • RDBMS Authenticator and Portal Admin

    In WLP 8.1, I created a RDBMS Auth and I can see the list of users/groups in the Weblogic Console. The Portal Admin's user/group page does not show any users except those authenticated by DefaultAuthenticator. Why is Portal Admin not showing the user