Skip to Content
author's profile photo Former Member
Former Member

Problem reading Binary output file from ARCHIVOBJECT_GET_TABLE

I am using ARCHIVOBJECT_GET_TABLE to read archive file and in return it gives content in internal table.

Binary table format is RAW 1024 and not able to read file contents.

I want to read XLS file's content and process further logic.

MOreover running in background so GUI_DOWNLOAD and other options are not recommended

Please suggest.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 13, 2012 at 03:18 PM

    I use this module and retrieve my archived object into a binary table described like:

    LT_BINTAB type table of tbl1024.

    Then I use one of the SCMS* Function modules to convert to text, if I need. But once you have that .XLS file retrieved from the archive, you still need to get the XLS into something that you can use in SAP. One thing I might consider is grabbing the binary table, then download it into a SAP GUI work folder with the .xls extension, then use FM 'ALSM_EXCEL_TO_INTERNAL_TABLE' to read it into a table that I can use in SAP. Your user doesn't have to know that you downloaded, since you can find the workdir with a method of CL_GUI_FRONTEND_SERVICES. There are probably other ways, but if it is actually an .XLS file, you will need a conversion to a file or internal table that you can process.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for response. I am already doing this. Downloading on to presentation and then read that excel back. But requirement is that program is supposed to run in background and hence I should read content and w/o downloading on presentation I should be able to interpret content and use them for further processing.

      Let me know if there is any way to convert Binary table into readable format.

  • author's profile photo Former Member
    Former Member
    Posted on Jun 27, 2012 at 04:54 PM
    -1

    Nothing worked out.

    Finally we decided to change XLS file into CSV and then read it.

    I can read CSV files properly. We shall ask out vendors to send CSV file instead of XLS and continue with interface.

    Closing this thread.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      condensed, tab-delimited (.txt) would be a much better choice! I would absolutely avoid .csv, due to all the work needed to remove those quotes, and if something comes in with a comma in the field without quotes, you read is fouled up, not good to have a delimiter that is very likely to appear in text fields such as names, addresses, texts, descriptions, etc. With tab-delimited you can rely upon split <input data row> at tab_character into f1....fn...it's so much simpler and cleaner to work with, IMHO.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.