Polling SAP directories
Hello,
I am hoping someone will be able to help me with my query.
I am trying to write an ABAP program which poll a SAP directory and then process the files within this directory.
I am using FM SUBST_GET_FILE_LIST to get the files from the directory but I want to use a logical path (which I have created using the FILE transaction) to specify the location).
So I am looking for another FM which will return the actual directory from the logical path name. The documentation seems to suggest FILE_GET_NAME but I am not sure whether this works with directory paths rather than file locations.
If anyone has any suggestions or some example code of this sort of thing please let me know.
Thanks,
Ruby
Hi Jonathan,
Thanks for your reply.
I have just tried this and I keep getting "Path not found" error.
I have created a logical path within the file transaction which is set to:-
d:\tmp\<FILENAME> (windows server)
The call to the FM looks like:-
CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
EXPORTING
CLIENT = SY-MANDT
LOGICAL_PATH = 'RUBYS_LOGICAL_PATH'
FILE_NAME = 'dummy.dat'
IMPORTING
FILE_NAME_WITH_PATH = file
EXCEPTIONS
PATH_NOT_FOUND = 1
MISSING_PARAMETER = 2
OPERATING_SYSTEM_NOT_FOUND = 3
FILE_SYSTEM_NOT_FOUND = 4
OTHERS = 5
Any ideas on why this is not working?
Thanks,
Ruby
Similar Messages
-
I want to upload files in sap-directories using webdynpro abap.
My requirement is i need to read the filess from the local system in a folder and save those files in the sap directories(AL11).Need help .
Thanks.Hi Dear,
U have to use File upload UI element , then read the file then follow the code for transfering into SAP directories:
check this
*Declare T_UPLOAD , W_UPLOAD itab and wa with your file heading structure
DATA:L_LINE TYPE STRING.
P_FLNAME = 'Test123'. " file name
OPEN DATASET P_FLNAME FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
CHECK SY-SUBRC = 0.
LOOP AT T_UPLOAD INTO W_UPLOAD.
CONCATENATE W_UPLOAD-Field1
W_UPLOAD-Field2
W_UPLOAD-Field3
W_UPLOAD-Field4
W_UPLOAD-Field5
INTO L_LINE
SEPARATED BY ','.
TRANSFER L_LINE TO P_FLNAME.
ENDLOOP.
CLOSE DATASET P_FLNAME.
I think it may help u a lot..
Regards
Aisurya -
File posting to SAP directories
Hi Experts,
In my scenario I have to post files to the SAP directories, in AL11. my scenario is a file to file . can you please guide me in this regard, like what adapter I should use and what are the related configurations are required.
Thanks
VinyHi,
Use file adapter at both sender and receiver with file transport protocol - NFS.
Tcode: /nsxda_tools
Object type: DXPROJECT
Test Type: Load Data
Project type: BAPI
Program: CREATE
Click on Copy
Source: Select Presentation Server---> FileName (Source file)
Target: Select Application Server--> File Type (P Physical file name) ---> File Name (Target dir of Appl Server)
Regards,
Abid -
T-code to upload mutliple files into SAP directories ?
Hi,
Is there any other transaction to upload multiple files into SAP directories ( ALL11) other than CG3Z ? Any other procedures at the operating system level ? Please advise.
Regards
ShivaI dont think so. But you can :
-- Ask your developer to create a BDC for this transaction to upload multiple files.
-- Use LSMW to record this transaction to upload multiple files.
Regards,
Jazz -
Where does the details of the files on usr/sap directories get saved?
hi,
when a (.dat) file is created by background job processing in the 'usr/sap/' directories, where does the details like last changed, last modified of these files get saved?
which table does these detiails get saved?
thanks,
swamyHi,
Transaction AL11 does exactly wat you are looking for,
it lost list of files present on the server SORTED on date and time.
and also u can use function module EPS2_GET_DIRECTORY_LISTING which contains a date/time stamp
Hope it helps u... -
Download an image from sap directories
Hi all,
is there anyway that i can download an image from sap directories into an internal table in binary mode?
than youHi all,
is there anyway that i can download an image from sap directories into an internal table in binary mode?
than you -
Are there any tables which stores the directories?
I know USER_DIR but it only shows the user made directories.
please tell me.Hi,
Checj this link..it can resolve u r problem
Re: table containing SAP directory......
Regards
Kiran -
As my understanding from installation guide , I am planning for ECC EHP4 ABAP PRD environment.
I have to decide disk directories for local and shared disks , Windows 2008 + oracle + failover HA MSCS.
Please advice if i am wrong here as i will start working accordingly with mentioned disk space.
LOCAL DISKS:
\oracle\SAPSID\102 ( oracle server software) Disk Size 10 GB
\oracle\OFS ( Failover Software) 20 GB
SHARED DISK:
RAID5 :
SAP DATA FILES \oracle\SAPSID\DATA 900 GB
RAID1:
SAP GLOBAL DIR \usr\sap... 75 GB
Online Redo Log files, set A 50 GB
Online Redo Log files Set B 50 GB
Mirrored online redo Log files Set A 50 GB
Mirrored online redo Log files Set B 50 GB
Backup of online redo logfile 50 GB
Please advice as i have give documentation tomorrow to the client.
RegardsHi,
Your sizing looks okay except for Redo logs. You dont need 50GB for redo logs. You can allocate 2 GB for each set of logs.
Regards,
SBK -
Is there a way to look SAP Directories in Java Stack?
Hi Guys,
I dont want to get into PI abap stack while using AL11 for the directories. I wanted to see those directories through Java stack.
Eg: nwa. If so, what is the path.
br
Swarnalu.You can view directories like file access using administration link -> Directory --> General Information -> File Access. IMO, using NWA, there is no such option as that of abap stack A11 to access various file directories of SAP.
-
How to create sap directories in application server by coding.
Hi Experts,
Please tell me how to create a sap directory via coding in application server.
Please tell me step by step n send the code also.I have tried alot using FM 'SXPG_COMMAND_EXECUTE' but i dont know how to use it n wht are d parameters i need to pass.
Also, i found that we need to create a external command in SM69 to pass in this FM...i dont know how to create this.
Please help me out.Hi friend,
1. Goto to Transaction SM69.
2. Click on F5.
3. Click on F6.
4. Enter a name in Command Name box ex: z_com
5. Enter a os command in Operating system command box. ex: mkdir (creating a directory)
6. Give location in application server in Parameters for operating system command box ex: /C dir
7. Click Save.
Goto SE 38 and develop a report using FM 'SXPG_COMMAND_EXECUTE' .
Ex:
REPORT zawi_demodownload .
data: g_out like BTCXPM occurs 0,
z_com type SXPGCOLIST-NAME value 'mkdir'.
CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
EXPORTING
commandname = z_com
TABLES
exec_protocol = g_out
EXCEPTIONS
NO_PERMISSION = 1
COMMAND_NOT_FOUND = 2
PARAMETERS_TOO_LONG = 3
SECURITY_RISK = 4
WRONG_CHECK_CALL_INTERFACE = 5
PROGRAM_START_ERROR = 6
PROGRAM_TERMINATION_ERROR = 7
X_ERROR = 8
PARAMETER_EXPECTED = 9
TOO_MANY_PARAMETERS = 10
ILLEGAL_COMMAND = 11
WRONG_ASYNCHRONOUS_PARAMETERS = 12
CANT_ENQ_TBTCO_ENTRY = 13
JOBCOUNT_GENERATION_ERROR = 14
OTHERS = 15.
IF sy-subrc = 0.
ENDIF.
Thanks....... -
How to set sap directories for FTP via TCode:AL11?
Hi, all
I want transfer data from a FTP server to BW. With TCode AL11 I setup SAP directory for FTP, format as following:
Z_MYDIR ftp://user:[email protected]
ftp://10.5.1.21 is the main directory in my FTP server.
but when I double click the row of the above, error occoured as the following:
Wrong order of calls <- CALL opendir(,,..)
I want to ask how to setup the ftp directory in sap al11, and why the error occoured.
Thank you very much.
Jiande Ding
Edited by: Jiande Ding on Dec 3, 2008 9:24 AM
Edited by: Jiande Ding on Dec 3, 2008 9:49 AMHi,
As i know there is no possibility if alphanumeric number range in sap.You check with any exit before updating the no in database.check this and post .
Regards,
Madhu. -
Export query result on sap directories
Hi,
I need to export daily query result on a sap directory.
I can't use open hub because the file is made of restricted key figures, and calculated key figures.
Which functionality in BI7 should i use to manage this issue? Should i use specific code?
Thanks for your help,Hey Arvind,
I'm working on a how-to guide for this. It's a work in progress, so it's not on SDN yet. Here's a draft...
https://sapmats-us.sap-ag.de/download/download.cgi?id=VZEDPDRVHQAR055E2PVICKUGO0M54DXI7D8O1X4T3G5EXBSL1J
As always, and comments are welcome. -
Flat File Extract - SAP BW System Directory
Hi,
I want to export a flat file using data manager so that it is saved in the SAP BW System Directory i.e. the /SAP/ directories.
How can I do this? When i use data manager it only gives me options to save in the SAP BPC directory structure.
Cheers,Hi Leo,
Look on the chain CPMB/EXPORT_TD_TO_APPL
Vadim -
List of SAP PI 7.0 ABAP transactions
Hi,
Can any one proivde me the list of all transactions codes , that will be used for SAP PI 7.0 ABAP system.
Do we have any blog or thread which talks about these transactions.
Thanks,
YounusHi,
Please go through the below weblog for the same:
/people/morten.wittrock/blog/2006/03/23/getting-started-with-xi-part-1-xi-30-cheat-sheet
/people/community.user/blog/2007/02/21/ready-reference-for-xi-developers
SLDCHECK Test SLD Connection
SXMB_IFR Start Integration Builder
IDX5 IDoc Adapter - Monitoring
IDX2 Meta Data Overview in IDoc Adapter
IDX1 Port Maintenance in IDoc Adapter
SM59 RFC Destinations (Display/Maintain)
SM58 Asynchronous RFC Error Log
SPROXY ABAP Proxy Generation
SALE Display ALE Customizing
WE21 Port definition
WE20 Partner Profiles
SE80 Object Navigator
RZ20 CCMS Monitoring
SXI_MONITOR XI: Message Monitoring
SXI_CACHE XI Directory Cache
SPROXY ABAP Proxy Generation
SXMB_MONI Integration Engine - Monitoring
SE16 Data Browser
SE11 ABAP Dictionary
SE37 ABAP Function Modules
SE38 ABAP Editor
SM31 Call View Maintenance Like SM30
SM30 Call View Maintenance
SE38 ABAP Editor
SMICM ICM Monitor
ST05 Performance trace
AL11 Display SAP Directories
SM12 Display and Delete Locks
SM49 Execute external OS commands
SM69 Maintain External OS Commands
SLDAPICUST SLD API Customizing
AL11 Display SAP Directories
SU01 User Maintenance
SMGW Gateway Monitor
Thnx
Chirag -
Access directory in remote server via SAP GUI
Dear experts:
My servers are with windows server 2003 OS, I want to access directories in a remote server via SAP GUI(in tcode AL11).
I have shared the directory in the remote server, and grant full control authrization to everyone. Then I map a driver to the shared diretory on SAP server,and I can open the diretory successfully. But when I add this diretory to SAP-directories(through tcode AL11), I can't open it in SAP GUI, when I doudle click on this directory, the error message occurs on the status bar:"Wrong order of calls <- CALL opendir: Not a directory(,,..)"
How can I fix this problem? Thanks!> I have shared the directory in the remote server, and grant full control authrization to everyone. Then I map a driver to the shared diretory on SAP server,and I can open the diretory successfully.
Please note:
Driver letters are user dependent. So if you map the drive as administrator or <sid>adm it's not available for user SAPService<SID> (the user running the SAP system).
So the best thing to access directory is using UNC names like
\\<servername>\<share>
not drive letters.
Markus
Maybe you are looking for
-
HTML Code query - does iweb turn my text to graphics?
Hello I'm a bit of a novice but thanks to iWeb I've been able to build myself quite a competent commercial website. As the company is growing I'm suffering from the problem of not being able to edit the code until the site is published - as I have a
-
Maven scripts for deploying WAR into Weblogic
Hello Folks, I would need some help in deploying EAR/WAR into weblogic server. I already have maven scripts for building but not for deploying. your help is appreciated. Thanks.
-
Same values for deferent address in BP
Hi Guys, How to popup the standard (current) communication address details into new communication address details. Scenario: The exited BP has one address and now he moved to another address, in that case we suppose to update or maintain his new add
-
I would also like to transfer these bookmarks to another computer. Is there a way?
-
Identifying attributes in multiprovider from different cubes?
I have added 2 infocubes and 1 infoobject (masterdata) into my multiprovider, but fields i need in my report are attributes of infoobject.All the fields are getting displayed in query output except these attributes. Please provide