Upload Flatfile to application server
Hi All,
I am uploading Flatfile to Application server using FM ARCHIVFILE_CLIENT_TO_SERVER. I am entering right path for src file and dest folder but I am getting an error that
Error in Opening file d:\ab\sap
cd for writting (Permissions denied).
I spoke with basis person but they are not able to figure out what is the problem. Kindly reply with what are the possibilities of this error.
Also, Let me know if there is any other way to upload file to the application server.
just go through these
Note 484704 - ARCHIV_INSERT_CONNECTION_BATCH cannot be updated
Note 604286 - ArchiveLink: File storage from the front end
Note 350511 - Corruption of document size
Note 655045 - ARCHIVFILE_CLIENT_* function modules
Hope it helps
Regards
Bala
Similar Messages
-
How to Upload Smartforms from Application Server
Hi Guys,
I have to upload the SMARTFORMS in to the System.That can be done as follows:
1- Tcode - Smartforms
2- Utilities -> Upload form
3- Give form Name
4- Give path of Form on presentation server and upload.
But I have to give the path of Form from the Application Server. As i have all the forms to be uploaed in New system on the Application Server.
I will be writing the program to program to read XML file(smartform) from application server to internal table and then upload it in the System.
Please let me know if it is possible to upload Smartforms from Application Server?
Regards
SandeepVinod,
Thanks for the reply.
But Actually I want to Automate this process of Uploading the Smartforms.
So I want to directly upload it from Application server.
As it is not possible to upload the Smartforms from Presentation Server Automatically.
In this human Intervention will be required. -
How to upload logo from application server
Hi all,
Plz show me the way how to upload logo from application server into sap script.
What is NGT.
Thanks in advance
VenkatHi
You have to import your logo in SAP by SE78 before using it in a SAPSCRIPT.
So have you done it?
If yes, it depends on how you have imported the logo:
- As std text:
INCLUDE <LOGO TEXT> OBJECT TEXT ID ST LANGUAGE <LANGUAGE>
- As graphic:
BITMAP <LOGO GRAPHIC> OBJECT GRAPHICS ID BMAP TYPE BCOL
Max -
How to upload file from Application Server?
Dear Friends,
How to upload file from Application Server?
Plz. with example...
Regards,
Dharmeshhi,
check the code for upload from application server.
tables: kna1.
types: begin of s_file,
customer type kna1-kunnr,
country type kna1-land1,
name type kna1-name1,
region type kna1-regio,
end of s_file.
*--Internal tables
data: it_file type s_file occurs 0 with header line.
*-- Selection screen
selection-screen: begin of block b1 with frame title text-001.
parameter: p_file type rlgrap-filename default 'C:/customer.txt'
obligatory.
selection-screen: end of block b1.
*-- At selection screen
at selection-screen on value-request for p_file.
perform file_help using p_file.
*-- Process File
start-of-selection.
perform upload_file using p_file.
*-- write File data to o/p
end-of-selection.
perform write_data.
*& Form file_help
form file_help using p_p_file.
data: l_filepath type ibipparms-path.
call function 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
importing
file_name = l_filepath
p_p_file = l_filepath.
endform. " file_help
*& Form upload_file
form upload_file using p_p_file.
call function 'WS_UPLOAD'
exporting
filename = p_p_file
filetype = 'DAT'
IMPORTING
FILELENGTH =
tables
data_tab = it_file
exceptions
conversion_error = 1
file_open_error = 2
file_read_error = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
no_authority = 10
others = 11
if sy-subrc <> 0.
message i001.
endif.
endform. " upload_file
*& Form write_data
form write_data .
loop at it_file.
write:/ it_file-customer, it_file-country, it_file-name,
it_file-region.
endloop.
endform.
regards,
keerthi. -
Problem loading Flatfile from application server to DSO
Hello,
I've a little problem while loading a Flatfile (csv) from the application server to a DSO. The Flatfile has only one data record and a header.
But in the DSO are always two data records, the right one and one empty record.
If I use the same Data Source and the same DTP and switch it to upload from the workstation there is just one data record. (What would be right).
I'm using the upload without PSA in Full-Update-Mode.
I tried to create a new Data Source, but same effect.
Thanks in advance,
TG
System: SAP EHP 1 for SAP NetWeaver 7.0Not sure about it, and in absence of sufficient information I can only guess.
But somehow it looks like the well-known problem of files being changed in transfer between Unix (your application server I guess ) and Windows (your workstation I guess ).
Try to find out correct transfer method, asc or bin, or whatever you call it.
I hope this helps.
And in case my advice is nonsense: Don't blame me. -
Problem in uploading file from Application Server
Hi everyone,
i got a problem in uplaoding a file from application server.i am having two folder (one folder name is current and another one is processed)in application server. In current folder i am having N no of files.I want to upload all the files names into one internal table and i want to process one by one file.After processing each file the file should be moved to processed folder and the files should not exist in current folder.All these process must be done everyday.Please rectify my problem asap.Ramesh,
Take authorization from basis guy.
Use the below code to get the list of files from require directory
*& Report ZDIRFILES *
REPORT ZDIRFILES .
PARAMETER: p_fdir type pfeflnamel DEFAULT '/usr/sap/tmp'.
data: begin of it_filedir occurs 10.
include structure salfldir.
data: end of it_filedir.
*START-OF-SELECTION
START-OF-SELECTION.
Get Current Directory Listing for OUT Dir
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_fdir
tables
file_tbl = it_filedir.
Now in internal table "it_filedir" will have all your files.
For moving and deleting
report zrich_0001.
Parameters: d1 type localfile default '/usr/sap/TST/SYS/fld1/Data1.txt',
d2 type localfile default '/usr/sap/TST/SYS/fld2/Data1.txt'.
data: begin of itab occurs 0,
rec(20) type c,
end of itab.
data: wa(20) type c.
start-of-selection.
open dataset d1 for input in text mode.
if sy-subrc = 0.
do.
read dataset d1 into wa.
if sy-subrc <> 0.
exit.
endif.
itab-rec = wa.
append itab.
enddo.
endif.
close dataset d1.
open dataset d2 for output in text mode.
loop at itab.
transfer itab to d2.
endloop.
close dataset d2.
delete dataset d1.
Check below FM if required
To move the file to archive directoryuse FMs 'PFL_COPY_OS_FILE'
To Delete 'EPS_DELETE_FILE'.
Don't forgot to reward if useful -
How to upload file on Application Server with Forms 6i?
Please, I need to upload .csv file from local to Application Server, I think to use .jsp application, but I don't know where I had to put it...Apache can't read .jsp file without Tomcat? If I launch my .jsp file from Apache/htdocs directory can't view .jsp code (Method Not Allowed)...method is POST...any idea? Thanks in advance!
Hi,
You could write a java bean to get the file from the client and to upload to App Server. And, you simply use it in Forms 6i.
Also, you could use d2kwutil (not tried though. you could search this forum and get an idea of that).
Of course, For your information, You could use WebUtil (in Forms 10g / 10.1.2) which has the functionality.
HTH.
Regards,
Arun -
How to upload data from application server
Hi,
please help me out in uploading the data from application server which is a tab delemited file into an internal table.
Thanks
kumarhi,
Use this sample code as an example.
table declaration
tables: mara.
*data declaration
data: begin of it_lfa1 occurs 0,
vendor like lfa1-lifnr,
land1 like lfa1-land1,
name1 like lfa1-name1,
ort01 like lfa1-ort01,
end of it_lfa1.
selection screen
selection-screen: begin of block b1 with frame.
parameters: p_file type rlgrap-filename obligatory.
selection-screen: end of block b1.
at selection screen
at selection-screen on value-request for p_file.
*& start-of-selection
start-of-selection.
perform transfer_file using p_file.
perform write.
*& Form transfer_file
text
-->P_P_FILE text
form transfer_file using p_p_file.
data: l_message(30) type c.
***opening dataset for reading
open dataset p_p_file for input in text mode encoding default message
l_message.
if sy-subrc ne 0.
message i001(zerr2) with p_p_file.
endif.
*******transferring data from file to app server.
do.
read dataset p_p_file into it_lfa1.
if sy-subrc = 0.
append it_lfa1.
clear it_lfa1.
else.
exit.
endif.
enddo.
*******closing dataset
close dataset p_p_file.
endform. " transfer_file
*& Form write
text
--> p1 text
<-- p2 text
form write .
loop at it_lfa1.
write:/ it_lfa1-vendor,
it_lfa1-land1,
it_lfa1-name1,
it_lfa1-ort01.
endloop.
endform. " write
Thanks
Aneesh. -
Problem while uploading file from application server to internal tab in BG
Hi all,
When i see the file in application server.data is like this
#################00\);_(#####}#-#}###############################00\);_(#####}#-#}###############################00\);_(*#####}#-#}#########
###################}###}#############A#############???#00\);_(*#################;_(@_) ########???# ########???# ########???###
#######???#########}###}#############)##############}##00\);_(*#################;_(@_) ############ ############ ##############
###################}#A#}#############:##############}##00\);_(#################;_(@_) }###}##############################00\);_(*##########
#######???#########}#-#}#############F#################00\);_(#####}###}#############@#################00\);_(#################;_(@_) #####
###################}#-#}#############3#################00\);_(#####}#U#}#############E#################00\);_(#################;_(@_) #####
Because the csv which is uploaded has dropdowns and some formattings.
when download from tcode cg3y i am getting correct file
When try to use open(binary mode) and read dataset i getting data as it is (junk).
i need to process in background.
Any help.
Rhea.upload file to string format
begin of ty_tab,
string type char200,
end of ty_tab.
loop at ty_tab into string
use statement replace string into tab deliminated fromat(particular occurance in string)
now call class to break string at tab into fields
endloop.
DATA : BEGIN OF i_data OCCURS 0,
data(200) TYPE c, "To hold Upload file data
END OF i_data.
OPEN DATASET v_str FOR INPUT
IN TEXT MODE
ENCODING DEFAULT IGNORING CONVERSION ERRORS.
IF sy-subrc EQ 0.
DO.
*Read a line from input file
READ DATASET v_str INTO i_data-data.
IF sy-subrc NE 0.
EXIT.
ENDIF.
*Append record to an internal table
APPEND i_data.
CLEAR: i_data.
ENDDO.
*Close the file
CLOSE DATASET v_str.
*---Start of inserti
LOOP AT i_data.
REPLACE ALL OCCURRENCES OF '"' IN i_data WITH '#'.
SPLIT i_data AT cl_abap_char_utilities=>horizontal_tab
INTO i_doc-pvaudt
i_doc-pvpate
i_doc-vecatc
i_doc-vhvend
i_doc-vhidt8
i_doc-vhinvn
i_doc-vhhexp
i_doc-vhiref. -
To Delete the uploaded file in Application Server
Hi Friends,
I developed an BSP Application displaying the results from ITAB though Iterator, for which , each row there is feature to upload a particular file in the Application Server, where I stored the file path into a database table field. .When I delete the the row, I am successfully get rid of the entire row including the file path.
My Question.
1. How to delete the uploaded file of the Application Server ?
Please mail me in this regard.
Regards
CSM ReddyHi,
you have the keyword and you have the documentation. What is your problem?
Search in the forums with keyword "delete dataset", there are lots of threads about this.
Example
Deletion of dataset in applicaiton server
deleting file from AL11 Tcode
Best regards
Renald -
Program for uploading file on application server...
Hi,
I have created a program to upload a file from presentation server (local desktop) to application server. But in this program I have to specify the file length. What should I do in given program so that I can upload file of any length on application server ?
*& Report Z_FILE_DOWNLOAD_TO_APP_SERVER *
* This Program can be used to move flat files to application server from presentation server.
REPORT Z_FILE_DOWNLOAD_TO_APP_SERVER.
PARAMETERS: P_FILE LIKE IBIPPARMS-PATH,
P_FILE1(20000) default 'E:CONVERSIONFLAT' lower case.
DATA: WS_FILE TYPE STRING.
DATA: BEGIN OF T_DATA OCCURS 0,
RECORD(20000),
END OF T_DATA.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = ' '
IMPORTING
FILE_NAME = P_FILE
START-OF-SELECTION.
WS_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = WS_FILE
FILETYPE = 'ASC'
TABLES
DATA_TAB = T_DATA
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Creating the file at Appl server............................
OPEN DATASET P_FILE1 FOR OUTPUT IN TEXT MODE encoding utf-8.
if sy-subrc ne 0.
message e000(--) with 'Error in opening file'.
endif.
* Trasfer the records to file.............
loop at t_data.
transfer t_data to p_file1.
endloop.
close dataset p_file1.
if sy-subrc eq 0.
write: / 'Written the files at ', p_file1.
write:/ 'Goto AL11 Transaction and then click on SAP Directory DIR_SAPUSERS to look for the file'.
endif.
Please advice.
Regards,
RajeshTry declaring it as TYPE STRING. Not sure though.
There are two predefined types in ABAP with variable length:
STRING for character strings
XSTRING for byte strings
Thanks,
SKJ -
Uploading file to Application Server using Tcode: CG3Z
Hi Friends,
I am facing a weird problem when uploading a file(PIPE delimited format) to application server
using the transaction CG3Z. The data is getting truncated at the end of each row and the file size
doesn't match with the one i had uploaded.
Can anyone resolve this issue.
Thanks in advance.
MurthyHi Friends
I wrote the custom program to upload the file on application server.
Thanks for your time.
Murthy -
Upload data to application server
Hi All,
Is there any SAP standard program to upload data from a flat file to application server.I dont have authorization to write a program in quality system so i need a standard program
Thanks,
Rakesh.Transaction CG3Z for uploading and CG3Y for downloading
Regards
Arun -
Uploading data to application server
Hi,
I am working on a report,where in I have to upload the data to application server.Here data is getting uploaded to application server ,but everything is getting clubbed.There is no space between each field.Can anyone send an example for this?
Regards,
HemaHi Hema,
To upload into application server with space, you have to store into another internal table from base inernal table.
suppose you have int_table is the table from where u are currently uploading data, then move into another internal table.
the new internal table will be with one field of length more than total lenght of all fields of base table.
move the data from base table to another internal table.
loop at int_table into wa_table
move wa_table to wa_table1 separated by space
append wa_table1 to int_table1
endloop
now upload from int_table1.
Hope it will work fine.
Regards
krishnendu -
Uploading file in application server to a transaction
Hi All,
I have a requirment where in i want to upload the transaction FF_5 using the file in the application server. Is there any way to do this. I dont want to download the file to presentation server and then upload the file in FF_5 transaction. According to the requirement i have to directly upload the application server file in the tcode FF_5. Pls let me know how to do this.
Thanks,
RajuHi,
You cannot upload the data from the applcation server. You have to upload from the presentation server.
If you have data on the application server then you need to save it to presentation server and upload to FF_5.
Maybe you are looking for
-
Regarding excel sheet as an attachment to mail
hi am using the follwing code, it works finely upto sending excel as attachment. But the problem came in data of excel sheet. the data in excel sheet is appearing like this one. Butxt data is occupying all columns BUKRS BUTXT 01 New York
-
Hello, I am trying to build a report to ' determine the volume of calls with a specific call type that have a specific wrap up code associated with it' using IBM Cognos. However I couldn't able to find SQL query in CUIC and schema document. Can any
-
Photoshop and Lightroom Bundle
I just updated my Adobe Flash player and got a message stating I could pay $9.99 per month for Photoshop and Lightroom. Does anyone know how long this rate is valid? I searched all of the info about it and couldn't find anything related to how long
-
Airport utility "not supported on this architecture"
i have the original airport express, using macbook pro with 10.5.4. i've used the ax to extend the range of my current network, stream music, and share a printer. i moved and need to use airport utility to set up the network but it won't launch sayin
-
Hi guys. I want to create a tree display based on the following SAP standard program SAPSIMPLE_TREE_CONTROL_DEMO. Instead of "ROOT" i would like to display all company codes. While clicking the Company Code it should display all the plants under that