Get the File information(data) from Directory AL11.
Hi Friends,
I want to get the file data from the given particular directory(which maintained in AL11) in the selection screen.
for listing the files from the directory, i used FM 'RZL_READ_DIR_LOCAL'. it displaying only files what ever in the given directory.
But my requirement is to display the complete data in the file ( log file contents).
please suggest me with relevant Function module or logic.
Thank you.
Regards
Ramesh M
HI,
Try using function module:
PARAMETERS: p_fname LIKE rlgrap-filename .
data l_path TYPE dxlpath .
DATA: l_true TYPE btch0000-char1.
*-- F4 functionality for filename on Application Server
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = '/usr/sap/input'
filemask = ''
IMPORTING
serverfile = l_path
EXCEPTIONS
canceled_by_user = 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.
ELSE.
p_fname = l_path. ""Here p_fname is the parameter for the user to select the file from the application server
ENDIF.
PFL_CHECK_OS_FILE_EXISTENCE
DATA: l_file TYPE tpfht-pffile.
CLEAR l_file.
l_file = p_fname. "Here p_fname is the parameter for the user to select the file from the application server
CALL FUNCTION 'PFL_CHECK_OS_FILE_EXISTENCE'
EXPORTING
fully_qualified_filename = l_file
IMPORTING
file_exists = l_true.
IF l_true = space.
MESSAGE e001(zmsg).
ENDIF.
Hope it helps
Regards
Mansi
Similar Messages
-
hi friends..
i searched many forums to get file creation date
i didnt get the solution but i found one program which execute
dos command and gets the output of that.
so using that program i developed a program to get the file creation Date & Time also
//getCreationDate.java
import java.io.*;
import java.lang.*;
public class getCreationDate {
public static void main (String args[]){
try {
// get runtime environment and execute child process
Runtime systemShell = Runtime.getRuntime();
BufferedReader br1=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter filename: ");
String fname=(String)br1.readLine();
Process output = systemShell.exec("cmd /c dir "+fname);
// open reader to get output from process
BufferedReader br = new BufferedReader (new InputStreamReader(output.getInputStream()));
String out="";
String line = null;
int step=1;
while((line = br.readLine()) != null )
if(step==6)
out=line;
step++;
} // display process output
try{
out=out.replaceAll(" ","");
System.out.println("CreationDate: "+out.substring(0,10));
System.out.println("CreationTime: "+out.substring(10,16)+"m");
catch(StringIndexOutOfBoundsException se)
System.out.println("File not found");
catch (IOException ioe){ System.err.println(ioe); }
catch (Throwable t) { t.printStackTrace();}
}Following line should be modified to make it work on all platforms:
Process output = systemShell.exec("cmd /c dir "+fname); -
How to get the files' information?
I' d want to get the files' information in the action, such
as the .avi or .flv information about their duration and the
default image,
please help, thanks.Hi,
You could use Oracle workflow builder to do thar....
Regards,
Luiz -
Get the File Name received from FTP Adapter
Hi,
How to get the File name reived through the FTP Adpater. I have created a variable with the Message type from ftpAdapterinboundheader.wsdl. from there I mapped the filename attribute to a local string variable.
But I did not receive the file name. The output in the Audit trail is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
- <Invoke_File_Process_FileProcess_InputVariable>
- <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
- <InputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/PIERS/SP_FILE_PROCESS_UPDATE/">
<AS_DIR xmlns="">I</AS_DIR>
<AS_FILE_NAME xmlns="" />
</InputParameters>
</part>
</Invoke_File_Process_FileProcess_InputVariable>
Can any one let me know how to get the recevied file name from FTP adapter.
Thanksyou have to define variable of type InboundHeader_msg. Then in receive activity click on Adapter tab and for header variable chose your newly created variable (InboundHeader_msg). Once you receive message from FTP you should see in this variable fileName.
-
I need the Last Modification Date and the File creation date of the consumed file in my message, is it possible to do that using a custom pipeline component in decode stage or any other way? The FILE namespace have File creation time that actually gives
the time the file was dropped in receive location, not the actual creation time. Also this namespace doesn't have the Last Modification Date.Yes,
As per MSDN, "File.FileCreationTime" - "Defines the time that the file was written to the folder that is monitored by the File receive
adapter."
So for File Modified DateTime, only option I can think of is create a custom file adapter (updating the File Adapter code from SDK ..\SDK\Samples\AdaptersDevelopment\File Adapter) and access the received file with the code something like the following, which
you give you the Last Modified date
string sLastModifiedDate = File.GetLastWriteTime(path).ToString();
If there are any business requirements which drives you this, then this the only way I can think of. Because you can access the file properties only in adapter, when it passes through adapter file is handled as stream and you will only have context properties
to access the file related properties.
If you're looking for implement this for any audit purpose or for your any technical purpose, then you can suggest some alternate than using File updated datetime.
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
HT5467 How does my iOs6 iPad get the location services data from my personal WiFi net?
How does Apple determine my current location of my iPad WiFi only by the location of the WiFi net (my house net)? How is the location of my private WiFi net sent to the Apple Database? Is the information obtained from the router?
The location information comes from GPS equipped devices like iPhones seeing your router and it's MAC address and sending the router location to Apple for inclusion in their database of router locations.
-
Love full screen view, but my file information and data are showing along the footer. How do I change me settings so this doesn't show?
Thanks!!!!Anne, didn't the answers Frank and I gave in the other tread work? See:
Re: How do I turn of the focus points in Aperture when viewing a photo in a non-thumbnail view? Thanks!
Or did you want to know something differently? -
Hi All,
Can anyone tell me how to get the creation date of a file in SAP Directory.
Is there any function module to do so.
Thank You.I don't believe one exists. You may need to do a JNI call to get this.
-
URGENT - how to get the checkbox selected data from datatable.
Hi
I have some dynamic data. which will be displayed as checkbox. User can select the checkboxes in jsp. after selection when I submit the page I wanted to get the list of checkbox data the user selected.
Here is the following code. when I submit the form the method which is mapped in bean (dostuff() method) is not calling. it is simply displaying the same page. Could you please tell me where I am doing wrong.
please give me suggestion what I should to get the checkbox data in bean.
My Code JSP:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<f:view>
<h:form>
<h:dataTable id="xxx" var="person" value="#{checkboxBean.beans}" >
<h:column><h:selectBooleanCheckbox value="#{person.checked}"/></h:column>
<h:column><h:outputText value="#{person.id}"/></h:column>
</h:dataTable>
<h:commandButton id="details" action="#{checkboxBean.doStuff}" value="do Stuff"></h:commandButton>
</h:form>
</f:view>
public class CheckboxBean {
private static final Logger logger = Logger.getLogger(CheckboxBean.class);
private List beans = null;
public CheckboxBean() {
logger.debug("CheckboxBean()");
public String doStuff() {
logger.debug("doStuff()");
logger.debug("Some Bean selected data :" );
return "test";
public List getBeans() {
beans = new ArrayList();
SomeBean[] someBeans = new SomeBean[3];
someBeans[0] = new SomeBean("first Person", false);
someBeans[1] = new SomeBean("2nd Person", true);
someBeans[2] = new SomeBean("third person", false);
beans.add(someBeans[0]);
beans.add(someBeans[1]);
beans.add(someBeans[2]);
logger.debug("Inside getBeans()");
return this.beans;
<managed-bean>
<description>Checkbox bean.</description>
<managed-bean-name>checkboxBean</managed-bean-name>
<managed-bean-class>com.view.bean.CheckboxBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
* Created on Mar 17, 2006
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
package com.view.bean;
public class SomeBean {
private boolean checked = false;
private String id ;
public SomeBean() {
public SomeBean(String anId, boolean bool) {
super();
this.id = anId;
this.checked = bool;
public String getId() {
return this.id;
public void setId(String id) {
this.id = id;
public boolean isChecked() {
return this.checked;
public boolean getChecked() {
return this.checked;
public void setChecked(boolean checked) {
this.checked = checked;
public String toString() {
return "Id: " + id + ", checked :" + checked;
}Hello,
If you post in ASP.NET forums, you'll get more help.
Thanks for your understanding.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to get the week start date from ISO week number
Hi,
I have a table with the following stucture
Year error Week1 week2 week3 ......week53
2012 error1 2 4 2 1
2012 error2 3 0 1 1I was hoping to get something like select year, error, week1||'Week start date which is a monday of that week' , week2||'Week start date,again monday',....week53 from table
Any suggestions please?
Thanks,
SunHi, Sun,
To see when week N started, add 7 * (N - 1) days to the beginning of the year. (By definition, the beginning of the ISO year is the start of week 1 of the ISO year.)
To see when week 22 of the current year started:
SELECT TRUNC (SYSDATE, 'IYYY') + (7 * (22 - 1))
FROM dual
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using.
See the forum FAQ {message:id=9360002} -
I need to merge my files that were transferred from my old mac to my new mac - for some reason I now have 2 separate setups on my new mac. I need everything merged to one account.
Thanks!Did you use Migration Assistant? If you set up your new Mac first, you created a user account and when you used MA later, it transferred over the old one. The only way to avoid that is to use Setup Assistant at the beginning of the setup. I used MA once and spent a long time getting rid of duplicates - you can either do that manually or start over: use recovery (Command + R or Command + Option + R keys) during startup, go to Utilities > Disk Utility, erase your disk and download/install again. While going through the setup, use Setup Assistant - it will port over your one and only user account rather than create another.
-
How to get the real-time data from a CCD camera in labview?
I am going to setup a monitor system and need to acquire the intensity of each pixel at each second from a CCD camera. Also, I need to to some simple calculations with these real-time data at every moment to get my finanl output in this monitor system.
How may I do this using Labview?
Thank you very much.
KaiWe don't have special powers, so we can't guess if you have Imaq Vision or not, if your camera comes with a LabVIEW driver, if it has an USB interface, or firewire, or a dedicated NI card, if you just want to detect a move, or a change in intensity, etc...
So, try to be more specific with your question, that will helps a lot
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
How to get the Tax information details from the Business partner window.
Hi Experts,
I want the Tin No. and the Pan No. to be displayed in the Print layout designer. How to fetch those details?
Regards,
Magesh.Hi magesh,
Select Business Partner -- > Click Accounting Tab --> Click Tax tab -->
Click button adjacent to tax information, you should maintain TIN no & PAN no,
Then only it will copied to respective documents.
Clarify me for which document you are using Print layout designer,I will tell you from
which table name TIN & PAN no shoudle be retrieved.
With regards,
A.Jeyakanthan -
Functional module to get the File from a given Directory
Hi all,
I am using a FM name 'subst_get_file_list' to get the file from a given directory but it is accepting only 40 Character length file only my requirement is to accept file name other than 40 char,
give me good sugestion
regards
paulHi Paul,
Check the Function Module Gayathri has given. ie. 'SO_SPLIT_FILE_AND_PATH'.
In the exporting parameter FULL_NAME , give the path name and in the importing parameter stripped_name , you will get the filename.
Check this code.
REPORT ZSHAIL_SPLITFILE.
data: it_tab type filetable with header line,
gd_subrc type i.
tables: rlgrap.
data: path type string,
file_name type string.
parameters file_nam type rlgrap-filename .
data: user_act type i.
at selection-screen on value-request for file_nam.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
WINDOW_TITLE = 'select a file'
DEFAULT_EXTENSION = '*.txt
DEFAULT_FILENAME = ''
FILE_FILTER = '*.txt'
INITIAL_DIRECTORY = ''
MULTISELECTION = abap_false
WITH_ENCODING =
CHANGING
file_table = it_tab[]
rc = gd_subrc
USER_ACTION = user_act
FILE_ENCODING =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
others = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
if user_act = '0'.
loop at it_tab.
file_nam = it_tab-filename.
endloop.
endif.
path = file_nam.
CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
EXPORTING
full_name = path
IMPORTING
STRIPPED_NAME = file_name
FILE_PATH =
EXCEPTIONS
X_ERROR = 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.
ENDIF.
at selection-screen.
message i001(zmess) with file_name.
Regards,
SP. -
How to get the FILE COUNT from File directory
Hello,
i have to develop a scenario like, get the file count from source file directory and validate whether the file count is 5 or not. if 5 files exist i need to process those 5 files to DB tables. if file count is not equal to 5 then i need to send a mail to customer that files are missed at source directory. (subject as files were missed at source directory and in content i need to display the file names exist at source file directory. So that missed file will be generated by the customer based on this mail).
Could you please let me know how to get the count of files from source file directory. if it is possible only with UDF please provide the Java code
Best Regards,
SARANDo these files have some fixed names?
Can you try to use the option Advanced Selection For Source File to make XI pick all 5 files in one shot?
Check this blog on the same -
/people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
If this is not a option - BPM sounds the only possible way.
Regards,
Bhavesh
Maybe you are looking for
-
CC 2014.1 AJA LHI worst performance/ sluggish
Hi there, till the CC 2014.1 Update its nearly impossible to work with my aja kona lhi card. When i enable the Breakout Card in the playback setting i get bad choppy audio and sometimes only the audio peakmeter waves and no sound reaches the speaker.
-
Hi, is there a way in HTML or DHTML or Javascript or ActionScript to implement this: in a HTML page, I have a drop-down sorted list: <SELECT NAME="Code" size="1" > <OPTION VALUE="All">All
-
Downloaded backup and my pictures are missing
I had previously restored my phone from a backup stored on the cloud, the pictures downloaded - most of them, but were very fuzzy and never cleared up. I couldn't even text these old photos to friends (or email). Today I had some downtime and decided
-
HT5246 Why, if I have not installed Java, is Flashback malware a threat on my mac?
Why, if I have not installed Java, is Flashback malware a threat on my mac?
-
Fit the ALV grid to the monitor size
Hi all, Please let me know how i can fit the ALV grid to the monitor size of the user. That is The grids should be layered and expanded to the full width of the users monitor. Thanks in advance Jey Sabith Ebron