Creating a folder in application server in background.
Hi experts,
Is it possible to Creating a folder in application server in background.?
My requirement is like this , every time a PO is created it has to be saved locally.
When atlast i manged to do this, i get stuck again by this CR ,
The PO has to be saved in a folder with the same name as PO number,
I do not know if it is possible.
So as always I am looking for inputs/suggestions or knowledge if you had come across scenario like this one.
Thanks and Regards,
K
Hi,
You could create a system command in SM69 to create a directory and then use the function module SXPG_CALL_SYSTEM to invoke the command and pass in the directory name as a parameter at run time.
Darren
Similar Messages
-
To create folder in Application server
hi,
How to create folder in application server from presentation server??
how is the program it??
reply me soon...
thx,
s.suresh.hi Suresh
Hope u r having nice day
here i am sending a sample report which can upload the file to Application Server which inturn automatically create folder .
REPORT ZSHR_UPLOAD_TO_APPLICATION .
DATA : BEGIN OF IT_MAT OCCURS 0,
MBRSH LIKE MARA-MBRSH,
MTART LIKE MARA-MTART,
MAKTX LIKE MAKT-MAKTX,
MEINS LIKE MARA-MEINS,
END OF IT_MAT.
DATA : W_DIR(40).
MOVE 'D:\usr\sap\DEV\DVEBMGS00\work\SHR' TO W_DIR.
"SHR" IS A FOLDER NAME TO BE CREATED
START-OF-SELECTION.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\MAT.TXT'
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = IT_MAT
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.
OPEN DATASET W_DIR FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
IF SY-SUBRC EQ 0.
LOOP AT IT_MAT.
TRANSFER IT_MAT TO W_DIR.
ENDLOOP.
ENDIF.
CLOSE DATASET W_DIR.
IF USEFUL AWARD POINTS.
REGARDS
HEMASEKHARA REDDY S -
Authorization for the user to write/read/create a file in application serve
Hi experts.
I am uploading some data to a file in a folder in application server, created in AL11 tcode.
In my program i need to restrict the unauthorized users to create/write/read a file in app server.
I dont know how to do this.
Kindly give me the code, please it wil be helpfull for you all.
I dont know how to use the auth object or function module, to do this.
Is the basis/security people need to do something.
Kindly revert me back ASAP.
KKOr use AUTHORITY_CHECK_DATASET function module before the open data set
This function module allow you to check the user's authorization to access files (with the key words OPEN DATASET, READ DATASET, TRANSFER and DELETE DATASET). A check should be performed before opening a file.
The authorization check is performed uwing the authorization object S_DATASET.
Description of function parameters:
PROGRAM: Name of the ABAP/4 program that contains the file access. If no program name is specified, the system assumes the current program.
ACTIVITY: Access type. The possible values are:
READ: Read file
WRITE: Change file
READ_WITH_FILTER: Read file with filter function
WRITE_WITH_FILTER: Change file with filter function
DELETE: Delete file
FILENAME: Name of accessed file
Example
Notes
The values to be passed as the ACTIVITY are defined as constants in the TYPE-POOL SABC. -
How to create clustering on oracle application server on windows
hi,
i want to know how can i create clustering on oracle application server on windows machine.
regardsI think that you need to configure Web cache for this as a frontend, and two or more servers behind it.
Try to read :
Metalink DOC ID 312834.1
http://www.oracle.com/technetwork/developer-tools/forms/documentation/advancedformsconf-128186.pdf
Edited by: Marcos_Pawloski on 15/12/2010 00:02 -
How to create the folder in presentation server through pop-up(
Hi Experts,
Can u give me the solution , how to create the folder in presentation server through pop-up(means dynamically, after executing the program , pop-up has to come to create the folderand path)
regards
ram.Use the methods -> DIRECTORY_BROWSE & DIRECTORY_CREATE of the class CL_GUI_FRONTEND_SERVICES
DATA: path TYPE string,
rc TYPE i,
dir_name TYPE string value 'HI'.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_BROWSE
CHANGING
SELECTED_FOLDER = path
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
concatenate path '\' dir_name into path.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_CREATE
EXPORTING
DIRECTORY = path
CHANGING
RC = rc
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Edited by: Kartik Tarla on Sep 23, 2009 5:54 PM -
How to zip the folder in application server?
how to zip the folder in application server?
You can use
open dataset with filter
link:[http://help.sap.com/abapdocu_70/en/ABAPOPEN_DATASET_OS_ADDITION.htm#!ABAP_ADDITION_2@2@] -
Is there any way to create a folder in presentation server - webdynpro abap
Hello,
My requirement is to create a folder in presentation server using webdynpro abap..
I tried on this CL_GUI_FRONTEND_SERVICRES classes ..but its getting an short dump.
Is there any way to create folder using classes / FM..
Regards,
Praveen kumar reddy s.Hi PRaveen,
Check this.. WD_TEST_APPL_ACFEXECUTE
Check Thamos article..
http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/109b9b52-bc00-2c10-8786-e4c5e96d7e04
go for help..
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/b91539878a2d67e10000000a42189c/content.htm
Cheers,
Kris.
Edited by: kissnas on May 10, 2011 2:24 PM -
Unable to create a file in Application Server using OPEN DATASET stattement.
I am unable to create a file in Application Server using the following statement.
OPEN DATASET filename FOR OUTPUT
IN TEXT MODE ENCODING DEFAULT
MESSAGE msg.
The message I'm getting is "Permission Denied". I have checked authorisation using SU53 which says "The last authorization check was successful". Please help.You can use following code to capture the error.
TRY.
OPEN DATASET filename FOR OUTPUT IN BINARY MODE MESSAGE V_MSG.
CATCH CX_ROOT
INTO EXCEPTION.
CALL METHOD O_EXCEPTION ->IF_MESSAGE~GET_TEXT
RECEIVING
RESULT = V_MSG.
MESSAGE v_msg
TYPE 'E'.
ENDTRY.
You can capture error in v_msg.
Following are the exceptions for the same:
Exceptions
Catchable Exceptions
CX_SY_FILE_OPEN
Cause: The file is already open.
Runtime Error: DATASET_REOPEN
CX_SY_CODEPAGE_CONVERTER_INIT
Cause: The desired conversion is not supported. (Due to specification of invalid code page or of language not supported in the conversion, with SET LOCALE LANGUAGE.)
Runtime Error: CONVT_CODEPAGE_INIT
CX_SY_CONVERSION_CODEPAGE
Cause: Internal error in the conversion.
Runtime Error: CONVT_CODEPAGE
CX_SY_FILE_AUTHORITY
Cause: No authorization for access to file
Runtime Error: OPEN_DATASET_NO_AUTHORITY
Cause: Authorization for access to this file is missing in OPEN DATASET with addition FILTER.
Runtime Error: OPEN_PIPE_NO_AUTHORITY
CX_SY_PIPES_NOT_SUPPORTED
Cause: The operating system does not support pipes.
Runtime Error: DATASET_NO_PIPE
CX_SY_TOO_MANY_FILES
Cause: Maximum number of open files exceeded.
Runtime Error: DATASET_TOO_MANY_FILES Non-Catchable Exceptions
Cause: An attempt was made to open a pipe that is already open.
Runtime Error: DATASET_PIPE_POSITION
Hope that will help you.
Please reward if useful. -
Upload and download of excel file in the application server in background
Hi all,
i want to download the excel file from application server into internal table and after processing i have to upload to excel file in the application server in the background mode..
i mean i'll schedule the program in background.
im using FM ALSM_EXCEL_TO_INTERNAL_TABLE its working fine in fore ground but not in back ground.
what method i have to follow ?Hi Ankit,
I think this is not possible to open a Excel-File from the application server because the Excel format before Office 2007 where a binary format (Suffix: .xls). The newer Office file format (Suffix: xlsx) is a zipped XML Format. To read the binary Excel-Format you need an OLE Connection between SAP GUI and Office. But at the application server in background you doesn't have this OLE Connection.
In my opinion you have two possibilities:
1. Convert all files in the CSV format. This file format can be read with open dataset.
2. Upload the files from the presentation server in forground. There are some funktion modules in the standard which can read the xls format. But they have some limits regarding the length of cells content.
My recommendation is solution no. 1. If you know an VBA expert, he can write an Excel-macro which converts all Excel Files in the CSV-Fomat.
Regards
Dirk -
How to create a directory in application server
Hi all,
How to create a directory in application server through Progaram??
eg:\tmp - is already existing
I want to create \tmp\fi
Within \tmp\fi - i should able to store my file,,,
Kindly help me urgent...Hello San,
Either contact Basis guys at ur end for the same or u can do it dynamically via a piece of ABAP code, i hope it wll help u.
call function 'GUI_CREATE_DIRECTORY'
exporting
dirname = '//<ip_address>/qfilesvr400/<host>/usr/sap/TST/SYS/Folder1'
exceptions
failed = 1
others = 2.
Reward If Helpful.
Regards
Sasidhar Reddy Matli. -
All files in folder of Application server.
Hi Frnds,
how to get the all files from a folder of application server. I have to get the all files in internal table when i selecting only folder?
thanks in advance.
regards,
BaluHere is an example program, which acts like an application server file browser.
report zrich_0001 .
data: begin of itab occurs 0,
rec(1000) type c,
end of itab.
data: wa(1000) type c.
data: p_file type localfile.
data: ifile type table of salfldir with header line.
parameters: p_path type salfile-longname
default '/usr/sap/TST/DVEBMGS01/data/'.
call function 'RZL_READ_DIR_LOCAL'
exporting
name = p_path
tables
file_tbl = ifile
exceptions
argument_error = 1
not_found = 2
others = 3.
loop at ifile.
format hotspot on.
write:/ ifile-name.
hide ifile-name.
format hotspot off.
endloop.
at line-selection.
concatenate p_path ifile-name into p_file.
clear itab. refresh itab.
open dataset p_file for input in text mode.
if sy-subrc = 0.
do.
read dataset p_file into wa.
if sy-subrc <> 0.
exit.
endif.
itab-rec = wa.
append itab.
enddo.
endif.
close dataset p_file.
loop at itab.
write:/ itab.
endloop.
Regards,
Rich Heilman -
How to read list of all files in folder on application server?
How to read list of all files in folder on application server?
Hi,
First get the files in application server using the following function module.
CALL FUNCTION 'RZL_READ_DIR_LOCAL'
EXPORTING
name = loc_fdir
TABLES
file_tbl = int_filedir.
Here loc_fdir contains the application server path.
int_filedir contains all the file names in that particular path.
Now loop at int_filedir.
OPEN DATASET int_filedir-name FOR INPUT IN TEXT MODE ENCODING DEFAULT MESSAGE wf_mess.
MESSAGE wf_mess.
IF sy-subrc = 0.
DO.
READ DATASET pa_sfile INTO wf_string.
IF sy-subrc <> 0.
EXIT.
endif.
close datset int_filedir-name.
endloop. -
Create Excel file in application server but the field value is incorrect
Hi Experts,
i am facing a problem when create excel file in application server using OPEN DATASET command.
the internal table have 4 field and one of those field contains 19 digit number --> ICCID.
the code running well, successfully create EXCELfile in application server but the problem is SAP only copy exactly first 15 digit numeric only and the rest became zero 0
Example :
the field value in internal table is 8962118800000447654 but when i opened in the excel file the value became 8962118800000440000.
and if i add alphabet like a8962118800000447654 then it is correct.
is there is anything wrong with my code?
here is my code
CONSTANTS: c_tab TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab. "Tab Char
Data : begin of lt_zdsdmmdt00005 occurs 0,
SERNR (18) type c,
MSISDNl(20) type c,
BOX1 (20) type c,
ICCID(30) type c,
end of lt_zdsdmmdt00005.
data : ld_temp(100) type c.
i_file = '/usr/sap/DM/test_excel.xls'.
open dataset i_file for output in legacy text mode.
loop at lt_zdsdmmdt00005.
move lt_zdsdmmdt00005-ICCID to ld_iccid .
concatenate lt_zdsdmmdt00005-sernr lt_zdsdmmdt00005-MSISDN lt_zdsdmmdt00005-BOX1 ld_iccid
into ld_temp separated by c_tab.
transfer ld_temp to i_file.
endloop.
close dataset i_file.
Best Regard,
Akbar.Hi Naveen,
thanks for your reply,
i already tried and the result still the same. any idea?
Best Regard,
Akbar. -
Download DMS attachment into an application server in background mode?
Is it possible to download DMS attachment into an application server in background mode?
Currently I am using the following code but does not work in background mode
CALL FUNCTION 'CVAPI_DOC_GETDETAIL'
EXPORTING
pf_dokar = 'Z06'
pf_doknr = gs_drad-doknr
pf_dokvr = gs_drad-dokvr
pf_doktl = gs_drad-doktl
pf_read_kpro = 'X'
TABLES
pt_files = lt_file
EXCEPTIONS
not_found = 1
no_auth = 2
error = 3
OTHERS = 4.
*Copy Attachment from DMS to PC File
CALL FUNCTION 'CVAPI_DOC_VIEW'
EXPORTING
pf_dokar = 'Z06'
pf_doknr = gs_drad-doknr
pf_dokvr = gs_drad-dokvr
pf_doktl = gs_drad-doktl
pf_appl_start = ' '
pf_apptp = '1'
pf_filename = 'C:\TEMP\ZLINK.BMP'
ps_file = ls_file
IMPORTING
pfx_file = l_pfx_file
EXCEPTIONS
OTHERS = 0.
*Load BMP into SE78
PERFORM import_bitmap_bds
IN PROGRAM saplstxbitmaps
USING l_filename "Local File for Upload/Download
l_bmpnam "Name
'GRAPHICS' "Application Object
'BMAP' "ID
'BCOL' "Color
'BMP' "Extension
'ZLINK PICTURE' "Title
space "Resides in Printer Memory in Print Request
'X' "Reserve Height of Graphic Automatically
space "Graphic Storage: Compressed Bitmaps
CHANGING l_docid
l_wf_res. "Graphic Resolution
ThanksHi!
You didn't find answer for this, because it is not possible. If you run your program in background, it is running on the server, and does not have any connection to your local machine. That's why you can't upload/download in background mode.
You might try to address somehow your local PC, with its IP or MAC address, but I don't think does this task worth so much time.
Run your program in online mode, or if you want to run it in background, then upload your file into the SAP server.
Regards
Tamá -
Steps to create a new Oracle Application server
I am in unfamiliar territory and need to create a new Oracle Application Server. I would appreciate any direction or direction to documentation that explains the steps required to establish a new server. Thanks.
William,
Have you looked at the Portal section on OTN? We recently added a whole bunch of information under the documentation section.
It can be found by clicking on Internet Servers under the Products heading on the left hand navigation bar. That page will have a section for Oracle9i Application Server and under that you will see Related Features & Products where there is a link to Portal.
Rich
Maybe you are looking for
-
Help needed for Production daatabase Error
Hi All I got the Errors below of One of my Production database in alert.log file. Please let me know ASAP. ORA-12012 : error in auto execute of job 1262 ORA-06512 : at " MERILL.ORDERACCEPT" line 136 ORA-06510 :PL/SQL unhandled user defined exception
-
How do you create albums in photos on iphone
how do you create albums in the photos folder on an iphone?
-
Where to find tennrich s awm 20624 80c vw strip
where to find tennrich s awm 20624 80c vw strip
-
Contacts and Ipod Touch HELP!!
I have recently left school and the school deleted my itunes and basically reset my computer (toshiba windows XP) ! i have and ipod touch (running version 3.1.2 bit old haven't been able to sync) which was synced with that computer. On that ipod touc
-
How do you download the reset/reload factory setting on the apple website?
My ipod nano has had a flashing apple icon every time i try to turn it on. i have read another post that explains how to fix this problem but i do not understand one of the steps that says to download the reset/reload factory setting.