on 02-11-2009 3:50 PM
Dear All,
I have a requirement to download the smartform to unix server.
As per the requirement i am converting smartform to pdf and saving the file to unix server.
its working fine when we are downloading it to local desktop.
but when the user is opening the file in unix they are getting decoding error.
step 1: conversion to pdf.
step 2: by using open dataset we are writing that file in to unix.
Please let me know if any solution is there.
Regards,
Prathima.
Hi,
Check with below code.
<< Cut and paste without attribution from http://saplab.blogspot.com/2007/10/sample-abap-program-to-execute-unix.html removed. >>
<< Points unassigned >>
Thanks,
Neelima.
Edited by: Rob Burbank on Feb 13, 2009 10:12 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Please see the following code. i am not able to write it in the text mode as given in the sample by you . Please let me know what the error is.
DATA : w_time_nm TYPE syuzeit.
DATA : w_date_nm TYPE sydatum.
DATA : w_path_unix_ch TYPE string.
DATA : w_path_unix_temp_ch TYPE string.
DATA : w_stime_ch TYPE string.
DATA : w_sdate_ch TYPE string.
DATA : w_bcode_txt TYPE ztecfg-itvnm.
DATA : w_dsn_ch(100) ,
w_length1_nm LIKE sy-tabix,
w_lengthn1_nm LIKE sy-tabix.
TYPES: BEGIN OF w_itab_ty ,
field(256),
END OF w_itab_ty.
DATA : w_itab_ds TYPE w_itab_ty.
DATA : w_file_name_ch TYPE fileextern.
w_time_nm = sy-uzeit.
w_date_nm = sy-datum.
w_stime_ch = w_time_nm.
w_sdate_ch = w_date_nm.
CONCATENATE c_path p_qmnum c_formname w_sdate_ch w_stime_ch INTO
w_path_unix_temp_ch
SEPARATED BY c_un.
CONCATENATE w_path_unix_temp_ch
c_pdf INTO
w_path_unix_ch.
w_dsn_ch = w_path_unix_ch.
w_dsn_ch = w_path_unix_ch.
w_file_name_ch = w_path_unix_ch.
CALL FUNCTION 'AUTHORITY_CHECK_DATASET'
EXPORTING
activity = c_write
filename = w_file_name_ch
EXCEPTIONS
NO_AUTHORITY = 1 .
IF sy-subrc EQ 0.
OPEN DATASET w_dsn_ch FOR OUTPUT IN BINARY MODE.
LOOP AT t_gs_pdfdata INTO w_gs_pdfdata_ds.
TRANSFER w_gs_pdfdata_ds-tdline TO w_dsn_ch.
ENDLOOP.
CLOSE DATASET w_dsn_ch.
ENDIF.
Regards,
Prathima
Hi Karthik,
path is correct only.. i have checked it in debugging mode..
earlier it was working fine , when i developed it and demonstrated to client.
Now the OTF data itself is getting corrupted and the data is showing as all # characters and all.
Please suggest if any solution is there.
Regards,
Prathima....
Hi
Check the open dataset when your writing to the unix server.
Refer this sample code:
[ABAP progrm to unix command|http://saplab.blogspot.com/2007/10/sample-abap-program-to-execute-unix.html]
Regards,
Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try to open any normal pdf file in the unix system so u wud know whetehr odf files are being correctly read or not.
can u show the code u have written using open dataset.
Edited by: kartik tarla on Feb 12, 2009 11:48 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.