‎2008 Mar 13 7:19 AM
Hi guys,
I'm very new to this but i hope i can explain it correctly.
Lets say right now l have some pdf stored in SAP(Service Contract for example) and we're reading them as binary image files right?
Is it possible to retrieve such binary image and display them in an existing smartform?
I hope i'm explaining the right way...this has something to do with DMS ??
Below are some codes to further help in my questions.
ALL FUNCTION 'SCMS_UPLOAD'
EXPORTING
filename = '/usr/sap/XXXX/XXXXXX/test.pdf'
binary = 'X'
frontend = ' '
* MIMETYPE =
IMPORTING
filesize = size
TABLES
data = file_data
* EXCEPTIONS
* ERROR = 1
* OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA: BEGIN OF content_bin OCCURS 1,
line TYPE SDOK_SDATX,
END OF content_bin.
DATA: BEGIN OF content_txt OCCURS 1,
line TYPE sdokcntasc,
END OF content_txt.
CALL FUNCTION 'SCMS_DOC_READ'
EXPORTING
mandt = sy-mandt
stor_cat = ' '
crep_id = crep_id
doc_id = doc_id
TABLES
* ACCESS_INFO =
content_txt = content_txt
content_bin = content_bin
* EXCEPTIONS
* BAD_STORAGE_TYPE = 1
* BAD_REQUEST = 2
* UNAUTHORIZED = 3
* COMP_NOT_FOUND = 4
* NOT_FOUND = 5
* FORBIDDEN = 6
* CONFLICT = 7
* INTERNAL_SERVER_ERROR = 8
* ERROR_HTTP = 9
* ERROR_SIGNATURE = 10
* ERROR_CONFIG = 11
* ERROR_FORMAT = 12
* ERROR_PARAMETER = 13
* ERROR = 14
* OTHERS = 15
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2008 Mar 14 1:57 AM
Anyone? Please its kinda urgent.
Basically, If I understand correctly, what I have now is are converted binary data from the PDF document?
Is there a way to take these data and displaying it meaningfully(may be through some other processes like conversion again) in a smartform? Is this possible?
‎2008 Mar 14 9:21 AM
Hi everyone,
So its not possible to "read" a pdf file uploaded and putting it in a smartform?
‎2008 Mar 17 9:25 AM