Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

I solved this error today, was looking in the web for this solution and could not find, I just found a lot of people with the same issue, after upload the PDF and try to open in the server or attached the file or sending the file we got an error saying that the file has a error and could not be fixed, the reason is the file size, the open dataset is getting the sy-subrc <> to 0 at the last record and the record is not getting into the table. At the moment to exit we have to append the last row in the table.

I hope this help anyone.

TYPES: BEGIN OF hex_record,

        field(1024)  TYPE x,

       END OF hex_record.

lt_tab_ex2       TYPE STANDARD TABLE OF hex_record WITH HEADER LINE,

OPEN DATASET lv_fname FOR INPUT IN BINARY MODE.

      IF SY-subrc EQ 0.

        DO.

          READ DATASET lv_fname INTO lt_tab_ex2-field.

          IF SY-subrc EQ 0.

            append lt_tab_ex2.

          ELSE.

            append lt_tab_ex2.

            EXIT.

          ENDIF.

        ENDDO.

        CLOSE DATASET lv_fname.

1 Comment