Skip to Content
-1

How to upload PDF/XLS on application server AL11 if not then on Network shared drive

Jun 08, 2017 at 09:59 PM

71

avatar image

Hi Experts,

I have a requirement to download file from content server GOS and upload in AL11. I am using below code but, as per GIS the file is not opening correctly. If we cannot upload PDF in AL11 so can we upload Network shared drive ?

Please help.

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }

CALL METHOD CL_BINARY_RELATION=>READ_LINKS_OF_OBJECTS
EXPORTING
IT_OBJECTS = LT_OBJECTS
IMPORTING
ET_LINKS_A = LT_LINKS_A
ET_LINKS_B = LT_LINKS_B.
CATCH CX_OBL_MODEL_ERROR .
CATCH CX_OBL_PARAMETER_ERROR .
CATCH CX_OBL_INTERNAL_ERROR .
ENDTRY.

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; }

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }

MOVE LW_LINKS-INSTID_B TO DOC_ID.

CALL FUNCTION 'SO_DOCUMENT_READ_API1'
EXPORTING
DOCUMENT_ID = doc_id
IMPORTING
DOCUMENT_DATA = DOCUMENT_DATA
TABLES
OBJECT_HEADER = lt_objectheader
OBJECT_CONTENT = lt_objectcontent
CONTENTS_HEX = lt_content_hex
EXCEPTIONS
DOCUMENT_ID_NOT_EXIST = 1
OPERATION_NO_AUTHORIZATION = 2
X_ERROR = 3
OTHERS = 4.

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }

OPEN DATASET gv_outfile FOR OUTPUT IN BINARY MODE.
IF sy-subrc NE 0.
PERFORM f_update_return_log USING c_e c_101 gv_msg.

MOVE: 'File not uploaded due to error' TO ls_itab-message,
lv_belnr TO ls_itab-belnr.
CONCATENATE lv_key '_' sy-uname '_' lv_cnt1 c_fextension_return INTO ls_itab-file .
APPEND ls_itab TO gt_itab.
CLEAR:ls_itab.
else.
LOOP AT lt_objectcontent INTO wa_objectcontent.

CLEAR : LV_LINE.
LV_LINE = wa_objectcontent-LINE.

TRANSFER LV_LINE TO gv_outfile.
ENDLOOP.
MOVE: 'File uploaded Successfully' TO ls_itab-message,
lv_belnr TO ls_itab-belnr.
CONCATENATE lv_key '_' sy-uname '_' lv_cnt1 lv_fextension INTO ls_itab-file .
APPEND ls_itab TO gt_itab.
CLEAR:ls_itab.
endif.
CLOSE DATASET gv_outfile.

10 |10000 characters needed characters left characters exceeded

What problem do you have?

1
* Please Login or Register to Answer, Follow or Comment.

1 Answer

prashant gupta Jun 09, 2017 at 03:49 PM
-2

Please guide me .....

Share
10 |10000 characters needed characters left characters exceeded