Issue with uploading flat file from App Server
Hi,
Im loading a flat file to an ODS.
When I try to load in from my Local Workstation, it works fine.
All data is loaded green.
However, when I try to load the file after i copied it to my App Server, it cannot load.
The error is get is:
Error 2 while splitting CSV data: see long text
Message no. RSDS_ACCESS011
Diagnosis
Error 2 occurred while splitting the CSV data string.
1 = Could not find a closing escape character
2 = Invalid escape character
3 = Conversion error
4 = OTHERS
The thing is that it worked fine (exact same file no changes) when I loaded from my Desktop.
Appreciate any help or input.
Rgds,
Gary.
Gary,
You can load it from the App server. Just check the file name whther you are giving it correctly and also check the readio button from App Server.
Go to AL11 (Tcode) and cross check whther your file is there. See in which directory your file is there. Mention the same path in the extraction tab in IP.
Thanks...
Shambhu
Similar Messages
-
Issue with uploading XML file from application server into internal table
i Need to fetch the XML file from the application server and place into internal table and i am getting error message while using the functional module SMUM_XML_PARSE and the error message is "line 1 col 1-unexpected symbol; expected '<', '</', entity reference, character data, CDATA section, processing instruction or comment" and could you please let me know how to resolve this issue?
TYPES: BEGIN OF T_XML,
raw(2000) TYPE C,
END OF T_XML.
DATA:GW_XML_TAB TYPE T_XML.
DATA: GI_XML_TAB TYPE TABLE OF T_XML INITIAL SIZE 0.
DATA:GI_STR TYPE STRING.
data: GV_XML_STRING TYPE XSTRING.
DATA: GI_XML_DATA TYPE TABLE OF SMUM_XMLTB INITIAL SIZE 0.
data:GI_RETURN TYPE STANDARD TABLE OF BAPIRET2.
OPEN DATASET LV_FILE1 FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC NE 0.
MESSAGE 'File does not exist' TYPE 'E'.
ELSE.
DO.
* Transfer the contents from the file to the work area of the internal table
READ DATASET LV_FILE1 INTO GW_XML_TAB.
IF SY-SUBRC EQ 0.
CONDENSE GW_XML_TAB.
* Append the contents of the work area to the internal table
APPEND GW_XML_TAB TO GI_XML_TAB.
ELSE.
EXIT.
ENDIF.
ENDDO.
ENDIF.
* Close the file after reading the data
CLOSE DATASET LV_FILE1.
IF NOT GI_XML_TAB IS INITIAL.
CONCATENATE LINES OF GI_XML_TAB INTO GI_STR SEPARATED BY SPACE.
ENDIF.
* The function module is used to convert string to xstring
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = GI_STR
IMPORTING
BUFFER = GV_XML_STRING
EXCEPTIONS
FAILED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE 'Error in the XML file' TYPE 'E'.
ENDIF.
ENDIF.
IF GV_SUBRC = 0.
* Convert XML to internal table
CALL FUNCTION 'SMUM_XML_PARSE'
EXPORTING
XML_INPUT = GV_XML_STRING
TABLES
XML_TABLE = GI_XML_DATA
RETURN = GI_RETURN.
ENDIF.
READ TABLE GI_RETURN TRANSPORTING NO FIELDS WITH KEY TYPE = 'E'.
IF SY-SUBRC EQ 0.
MESSAGE 'Error converting the input XML file' TYPE 'E'.
ELSE.
DELETE GI_XML_DATA WHERE TYPE <> 'V'.
REFRESH GI_RETURN.
ENDIF.Could you please tel me why the first 8 lines were removed, till <Soap:Body and also added the line <?xml version="1.0" encoding="UTF-8"?> in the beggining .
Becuase there will be lot of XML files will be coming from the Vendor daily and that should be uploaded in the application server and should update in the SAP tables based on the data in the XML file.
what information i need to give to vendor that do not add the first 8 lines in the XML file and add the line in the beggining <?xml version="1.0" encoding="UTF-8"?> ??????
Is there any other way we can do with out removing the lines? -
Load Flat File from App Server
HI, all.
I want load flat file from appliation server. I created CSV file and loaded it on app. server with FM ARCHIVEFILE_CLIENT_TO_SERVER. After I created datasource and tried load data in the infocube. In this procedure I encountered with two problem
1. When I look file in AL11, I doesn't see cyrillic symbols, instead this symbols I see #.
2. When I try load data with data source, I get exception RS_EXCEPTION 000 "File don't open"
Anybody can help me resolve this problem?
wbr, Fanil.Hi, kodanda pani KV.
2. File is was closed.
1. Can me you clearly explain what you meen?
wbr, Fanil -
Upload xml file from aplication server using read dataset, parser error.
Hi,
I would like to upload xml file from app. server but parser failed. If I upload this xml file from workstation (using ws_upload) it is correct. For uploading xml file from app. server I use open dataset... read dataset. In loop section I remove '#' char. How do You upload xml file from app server? What Could be incorrect.
I try to open dataset in binary mode, text mode...
TYPES: BEGIN OF xml_line,
data(255) TYPE c,
END OF xml_line.
DATA: gt_xml_table TYPE TABLE OF xml_line,
gs_xml_structure TYPE xml_line,
gv_xml_table_size TYPE i.
OPEN DATASET s FOR INPUT IN BINARY MODE.
IF sy-subrc <> 0.
MESSAGE e001(zet) WITH '....'.
ENDIF.
DO.
READ DATASET s INTO gs_xml_structure.
IF sy-subrc <> 0.
EXIT.
ELSE.
len = STRLEN( gs_xml_structure ).
len = len - 1.
check len > 0.
WRITE gs_xml_structure(len) TO gs_xml_structure.
APPEND gs_xml_structure TO gt_xml_table.
ENDIF.
ENDDO.You Can do this too
parameters: p_file like rlgrap-filename.
data: subrc like sy-subrc.
create object me.
REFRESH t_data.
* Open XML File
CALL METHOD me->CREATE_WITH_FILE
EXPORTING
filename = p_file
RECEIVING
retcode = subrc.
* Saves Data in an itab from XML File.
CALL METHOD me->get_data
IMPORTING
retcode = subrc
CHANGING
dataobject = t_data[].
Regards,
Claudio. -
Hi All,
Is there any way to upload Tariff Code (with multiple XML files) from application server?. Its urgent.
Regards,
JatinHi Jatin,
Yes, of course you can upload multiple files for tariff codes.
This can be done by the below path:-
SAP GTS Cockpit(tcode-/sapsll/menu_legal)-->Customs Management-->Classification-->Classification Master Data-->Upload Tariff Code Numbers from XML file(tocde- /SAPSLL/LLNS_UPL101).
In the above area after browsing and choosing the first file, please select multiple check box to choose more files as well. Then you can further select your application server and upload all those files in one go.
PS:- Although, we have an option to upload multiple such files but actually we should avoid multiple file uploads due to various reasons. Hence, please take utmost care during such procedure.
Regards,
Aman -
System exception while deleting the file from app server in background job
Hi All,
I have a issue while the deleting the file from application server.
I am using the statement DELETE DATASET in my program to delete the file from app server.
I am able to delete the file from the app server when i run the program from app server.
When i run the same report from background job i am getting the message called System exception.
Is there any secuirity which i need to get the issue.
Thank You,
TaraginiHi All,
I get all the authorization sto delete the file from application serever.
Thing is i am able to run the program sucessfully in foreground but not in the background .
It i snot giving any short dump also just JOB is cancelled with the exception 'Job cancelled after system exception ERROR_MESSAGE'.
Can anybody please give me suggestion
Thanks,
Taragini -
Problem in downloading file from app server using CG3Y in to .XLS fomat
hi All,
I have uploaded file in to application server through a program using open data set with the separater as "|" ( pipe ) . Now the user should be able to download the file from apps server to presenataion server in .XLS format using txn CG3Y. but when we download, the format appears wierd and the data is not consistent across columns in excel. i.e the data which is supposed to be in one column in the excel is in the other column. what precautaions should i take before moving data to apps server so that it will be downloaded in a good format.
Appreciate your help...
Regards,
Sreekanth.Separate each values with TAB space present in the application server .
Currently u r using | pipe character. Instead of that use CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB as delimiter.
Each value will displayed in separate cells in excel sheet when u download it frm app.server
Regards,
Lakshman. -
Transfer a file from App Server to a FTP site.
Hi, Abapers.
I need your help. Probably, this topic has already been posted in a similar way, but we need an answer to solve our problem.
We have to sent a PDF file from a directory of our app server (AIX) to a FTP directory... which would the FM sequence we should use to goal it?
Best Regards.Hi Santiago,
create fm to send file from APP server to FTP site.
if you want to Post file from desktop to Appl use Transaction - CG3Y
if you want to Post file from Appl to Desktop use Transaction - CG3Z
copy the code below....
* Author: Prabhudas Date: 02/21/2006 *
* Name: Z_FTP_FILE_TO_SERVER *
* Title: FTP File on R/3 Application Server to External Server *
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(DEST_HOST) TYPE C
*" REFERENCE(DEST_USER) TYPE C
*" REFERENCE(DEST_PASSWORD) TYPE C
*" REFERENCE(DEST_PATH) TYPE C
*" REFERENCE(SOURCE_PATH) TYPE C
*" REFERENCE(FILE) TYPE C
*" REFERENCE(BINARY) TYPE CHAR1 OPTIONAL
*" REFERENCE(REMOVE_FILE) TYPE CHAR1 OPTIONAL
*" TABLES
*" FTP_SESSION STRUCTURE ZMSG_TEXT OPTIONAL
*" EXCEPTIONS
*" CANNOT_CONNECT
*" SOURCE_PATH_UNKNOWN
*" DEST_PATH_UNKNOWN
*" TRANSFER_FAILED
*" COMMAND_FAILED
DATA: w_password TYPE zftppassword,
w_length TYPE i,
w_key TYPE i VALUE 26101957,
w_handle TYPE i,
w_command(500) TYPE c.
REFRESH ftp_session.
* Scramble password (new Unicode-compliant routine)
w_length = STRLEN( dest_password ).
CALL FUNCTION 'HTTP_SCRAMBLE'
EXPORTING
SOURCE = dest_password
sourcelen = w_length
key = w_key
IMPORTING
destination = w_password.
* Connect to FTP destination (DEST_HOST)
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = dest_user
password = w_password
host = dest_host
rfc_destination = 'SAPFTPA'
IMPORTING
handle = w_handle
EXCEPTIONS
not_connected = 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
RAISING cannot_connect.
ENDIF.
* Optionally, specify binary file transfer
IF binary = 'X'.
w_command = 'bin'.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING command_failed.
ENDIF.
ENDIF.
* Navigate to source directory
CONCATENATE 'lcd' source_path INTO w_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING source_path_unknown.
ENDIF.
* Navigate to destination directory
CONCATENATE 'cd' dest_path INTO w_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING dest_path_unknown.
ENDIF.
* Transfer file
CONCATENATE 'put' file INTO w_command SEPARATED BY space.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = w_handle
command = w_command
TABLES
data = ftp_session
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc <> 0.
CONCATENATE 'FTP command failed:' w_command
INTO w_command SEPARATED BY space.
MESSAGE ID 'ZW' TYPE 'E' NUMBER '042'
WITH w_command
RAISING transfer_failed.
ENDIF.
* Disconnect from destination host
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = w_handle.
* Optionally, remove file from source directory
IF remove_file = 'X'.
CONCATENATE source_path '/' file INTO w_command.
CONCATENATE 'rm' w_command INTO w_command SEPARATED BY space.
OPEN DATASET '/dev/null' FOR OUTPUT FILTER w_command.
CLOSE DATASET '/dev/null'.
ENDIF.
Regards,
Prabhudas -
Download PDF file from APP server!
Hi!
Has anyone tried uplaoding and downloding a PDF table from app server as I tried from a normal method by Open dataset, Transfer but it wont work.
Please provide any inputs.
Thanks.Hi park,
1. Using open data set, transfer , close etc,
also it will work.
( it will download / upload any kind of file from app server)
2. Just make sure the
FULL PATHNAME and the FILENAME
are mentioned in EXACT CASE
(small/CAPITAL).
3. U can check thru transaction AL11, to see the file and path.
regards,
amit m. -
Error when loading a flat file from Application server.
Hi,
I am trying to load a flatfile from the application server, and I am getting the message
Error while accessing the application server file
Message no. RSDS_ACCESS002
I checked for notes and found only one:
Note 1033978 - Correction: Loading Unicode files from application server
but we have 19 SP level, and the note says it needs 13 SP level, so I think it would not be of any help.
does anybodie know what to do??
thanks for the help.
MauricioError in accessing while application server file..
when i am trying load the data to psa
when i am taking the file name: text-type file from app server
plz reslove me for this problem??
another question
when i am saving the file with using * in the filename in .CSV file its not saving,
whats the reason????
ASHOK -
How to upload XML file from Application server.
Hi,
How to upload XML file from Application server.Please tell me as early as possible.
Regards,
Sagar.Hi,
parameters : p_file type ibipparms-path obligatory.
***DOWNLOAD---->SAP INTO EXCEL
filename1 = p_file.
call function 'GUI_DOWNLOAD'
exporting
BIN_FILESIZE =
filename = filename1
filetype = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
tables
data_tab = it_stock
FIELDNAMES =
exceptions
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
others = 22
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Regards,
Deepthi. -
Error while uploading the file from Allpcation server in LSMW-7th step
Hi Experts,
what should be the specific CODE PAGE should be maintained while uploading the file from application server in LSMW-7th Step
Thanks in advance,
KSRHi
I mean that there is any seperate CODE PAGE which comes at the bottom of screen while uploading the file from the application server in 7th step.
Is there any specific CODE PAGE to be maintained...
Thanks in advance
Oarsk -
Upload XL file from FTP server
Hi All,
Can anybady help me, how to upload Excel file from FTP server.
Thanks
Sri
Edited by: srikanthn on Apr 14, 2010 6:31 PMHello
How about using SAPFTP?
I hope SAP note 130106 will guide you on this.
Thanks
koju -
Logical path for getting a Flat file from application server
Hi All,
We have loaded some .csv files to application server, what is the logical path we have to mention in the infopackage scheduler screen? please guide me how to give the path for getting a flat file from application server.
Thanks,
Sairam.Hi Sairam,
I hope you know which location you have saved in the Application server.
Now if you go to the Infopackage and click on the "External Data" tab, there you will see Radio Buttons for
1) Client Workstation
2) Application Server
Choose the second radio button, then in the Field "Name of the File" you will be able to use the F4 help and browse AL11 transaction through this option. You can then choose the File.
Hope this helps
Regards,
Praveen. -
Problem with READ DATASET when reading file from app server
Hi,
wondering if anyone can help, I'm using the following code to read from a file on app server, the file is of type .rtf
OPEN DATASET file_rtf FOR INPUT IN TEXT MODE
ENCODING DEFAULT
WITH SMART LINEFEED.
DO.
READ DATASET file_rtf INTO string.
IF SY-SUBRC = 0.
EXIT.
ENDIF.
ENDDO.
the open dataset part works sy-subrc = 0, but the read returns sy-subrc = 8 and no data is passed to string.
Any ideas as to what is causing this problem appreciated, <removed>
Thanks
Edited by: Thomas Zloch on Mar 17, 2010 3:57 PM - please don't offer p...Hi Adam,
The source code in the below link has details about how to read/write to application server.
[Application server file operartions|http://www.divulgesap.com/blog.php?p=NDk=]
Please let us know if you have any issues.
Regards,
Ravi
Maybe you are looking for
-
How to display records of int. table in list tree?
friends, i want to display a list tree using fm RS_TREE_CONSTRUCT and RS_LIST_DISPLAY. this is the data that i have to display Matnr doc no. Stock qty. Age 1 45601236 100 55 1 45601237 10
-
Magic Mouse no longer works on mousepad?
Don't know why, don't know if it was an update, or the fact that i just went to Lion, but now my mouse only works on my hard table surface, and barely moves (pointer just chunks along) if i try moving the mouse on the mouse pad, which it works fine o
-
Hi Friends, I am too muchconfused about an sql query. I've created a html page where I select one radio button . The value of this radio button is passed to the query.Now the out put of the query is used in developing the output. For illustration I s
-
Flash9B.ocx error problem
I run Norton System Doctor regularly as well as RegistryBooster2. Just recently (this week) WinDoctor gives me the unfixable message: "CLSID\{1171A62F-05D2-11D1-83FC-00A0C9089C5A}\InprocServer32," refers to a missing file, "C:\WINDOWS\system32\Macrom
-
Classification check of an internal order at run time, in KO01 KO02
Hi All, i need to check if some Classification fields of an internarl order are been valued when i save yhe order in transaction KO01 and KO02. In debugging mode I've found an interesting internal table: P100. If P100-W <> 0 it means that the corrisp