Skip to Content
0
Former Member
Aug 01, 2008 at 07:54 AM

Table to store binary data

1048 Views

Hi friends,

I could read a file from app server into an internal table.

DATA: BEGIN OF ITAB OCCURS 0,
               FIELD(255),
           END OF ITAB.

OPEN DATASET DSN FOR INPUT IN BINARY MODE.

DO.
  READ DATASET DSN INTO ITAB-FIELD.
  IF SY-SUBRC = 0.
    APPEND ITAB.
  ELSE.
    EXIT.
  ENDIF.
ENDDO.

Now i need to store this into a database table.

Length of the binary text could be more than 350000 as i am reading a PDF file.

How should be my DB table design ideally be?

What data type i use to store such data?

My SAP Version is 4.7EE Xstring datatype not available

Fields of table:

DOCNAME (PK)

DOCTYPE

DOCCONTENT - in this field i want to store the data. how can i do that?

Any help on this is highly appreciated.

Regards,

Simha

Edited by: Simha on Aug 1, 2008 10:00 AM