Read "last changed" data from AL11 into BSP page
Hi all,
I'm looking for a way to read the following information from the application server
Last change Creator Name
17.07.2006 09:19:58 cbdadm file1.csv
27.05.2003 10:53:11 cbdadm file2.csv
13.07.2006 17:01:30 cbdadm file3.csv
I want to see for a number of filenames, when it was last changed, but I don't know where to get this data? Is it stored in a table? And how should I read this data?
I see that a program named RSWATCH0 is generating the required output for transaction AL11...maybe this is helpful?
The following code works in ABAP, but I need to use this in BSP... is this possible somehow?
REPORT ZUPLOAD_TIME .
TABLES epsf.
PARAMETERS dir LIKE epsf-epsdirnam.
PARAMETERS file LIKE epsf-epsfilnam.
DATA mtime TYPE p DECIMALS 0.
DATA time(10).
DATA date LIKE sy-datum.
CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
EXPORTING
file_name = 'TESTFILE.CSV'
dir_name = '/usr/sap/data/'
IMPORTING
file_size = epsf-epsfilsiz
file_owner = epsf-epsfilown
file_mode = epsf-epsfilmod
file_type = epsf-epsfiltyp
file_mtime = mtime
EXCEPTIONS
read_directory_failed = 1
read_attributes_failed = 2
OTHERS = 3.
PERFORM p6_to_date_time_tz(rstr0400) USING mtime
time
date.
WRITE: / mtime,
/ date, time.
thanks in advance! points will be rewarded for usefull answers
Message was edited by: Joris Hens
Message was edited by: Joris Hens
In the TYPES Definition tab :
types: BEGIN OF t_file,
date TYPE d,
time(10) TYPE c.
INCLUDE TYPE epsf.
TYPES: END OF t_file.
types: tt_files type table of t_file.
In the Page attributes tab :
ta_files TYPE tt_files
In the OnInitialization Event Handler :
* event handler for data retrieval
DATA: epsf TYPE epsf.
DATA: mtime TYPE p DECIMALS 0.
DATA: time(10) TYPE c.
DATA: date TYPE sy-datum.
CALL FUNCTION 'EPS_GET_FILE_ATTRIBUTES'
EXPORTING
file_name = 'myfile.csv'
dir_name = '/usr/sap/data'
IMPORTING
file_size = epsf-epsfilsiz
file_owner = epsf-epsfilown
file_mode = epsf-epsfilmod
file_type = epsf-epsfiltyp
file_mtime = mtime
EXCEPTIONS
read_directory_failed = 1
read_attributes_failed = 2
OTHERS = 3.
PERFORM p6_to_date_time_tz IN PROGRAM rstr0400 USING mtime
time
date.
FIELD-SYMBOLS: <fs_file> LIKE LINE OF ta_files.
APPEND INITIAL LINE TO ta_files ASSIGNING <fs_file>.
MOVE-CORRESPONDING epsf TO <fs_file>.
<fs_file>-time = time.
<fs_file>-date = date.
In the Layout :
<%@page language="abap"%>
<%@extension name="htmlb" prefix="htmlb"%>
<htmlb:content design="design2003">
<htmlb:page title = "List files on application server ">
<htmlb:form>
<htmlb:tableView id = "tvx"
table = "<%= ta_files %>" />
</htmlb:form>
</htmlb:page>
</htmlb:content>
Then, you still have some minor modificaions to perform on the tableView thanks to an Iterator, for instance.
Best regards,
Guillaume
Message was edited by: Guillaume Garcia
Similar Messages
-
How to pass internal table data from model to BSP page.
Hi Experts,
I have requirement where I have got data from deep structure in Model.
The structure has two fields > 1. normal data tyoe + the other one is of table type.
Thanks and Regards,if you have defined the attribute then you can ABAP coding to use it in BSP.
for eg, here i am looping the intenal table and passing the data to list item box.
<%
LOOP AT lt_dyn_uom INTO wa_dyn_uom.
%>
<htmlb:listBoxItem key = "<%= wa_dyn_uom-name %>"
value = "<%= wa_dyn_uom-value %>" />
<%
ENDLOOP.
%>
Thanks,
Chandra -
How to provide a button in bsp that downloads data from SAP into powerpoint
hi,
how to provide a button in bsp that downloads data from SAP into powerpoint
this absurd requirement is needed by my client.
thanks
saadHi,
Look at tools like the things mentioned above or things like
http://www.investintech.com/products/developer/creatorsdk/creatorsdkmain/
http://command-line-image-converter.qarchive.org/
You need to look for tools that can run via the command line and thsu be executed as external command (http://help.sap.com/saphelp_nw2004s/helpdata/en/fa/0971d4543b11d1898e0000e8322d00/frameset.htm)
Eddy
PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself! -
Reading data from socket into buffer
Hi all,
I'm reading packets of data from a socket, and i want to store it into a buffer array.
I don't know the packet length, which means i can't really specify the buffer length.
Is there anyway to get around this?
Thanks,
HughHave a look at BufferedOutputStreamHTH.
Yu SONG -
Hi,
How to get the data from AL11? in AL11 there is a directory. so, how to get the data from this directory into internal table?
SAP Directory location is : /usr/sap/trans/
thanks in advacne.
regards,
baluhi
try this
data : dsn(100) type c value '/tmp/test.txt'.
data : wa(100) type c.
data : d1(100) type c.
OPEN DATASET DSN FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. --> Creates a file in AL11
TRANSFER DSN TO WA. --> Transfer data from presentation to application system
CLOSE DATASET DSN.
OPEN DATASET DSN FOR INPUT IN TEXT MODE ENCODING DEFAULT.
READ DATASET DSN INTO D1. -- > Read the data from the file in the application server again to presentation.
CLOSE DATASET DSN.
Regards -
Need FM to get Last change date of Objects in package
Hi All,
Is there any Function module to get Last changed date of all Objects in a package .
How to get the last change date of class,methods,function module.....
I can get last change date of programs from TRDIR....UDAT....Similarly how can I get for Function Module and Class Methods.
With Thanks,
Dina.
Message was edited by: Dinamol SasidharanGo/double click on the affected cubes you want to see the time stamp.
click the Extras(tab on the upper of part of SAP) or simply 'Ctrl + F5'.
Box will appear.
Click on Logs for Save/Activate so you will see the linfo for the users who used this cube.
Then put time restriction for From and To(always the current day and time).
Then execute, all of the users who changed then saved/activated that cube will appear on that timeframe you view.
Hope this help. -
Upload data from excel into database through pl/sql
Hi All,
I have excel which contains data lets say employee details,
I have one upload button ,which is used to upload excel and then i want to map the cell of excel to the database column and through plsql code i want to upload the excel data into database.
In short ,i want to upload the data from excel into database using plsql code,
or suggest me any other way to do this.(except the data load method present in apex)
Thanks,
Jitendraif you use APEX 4 you can define you own table
the code below is for APEX 3
PROCEDURE pro_carga_planilla_prosp( p_archivo VARCHAR2) IS
v_blob_data BLOB;
v_blob_len NUMBER;
v_position NUMBER;
v_raw_chunk RAW(10000);
v_char CHAR(1);
c_chunk_len number := 1;
v_line VARCHAR2 (32767) := NULL;
v_data_array wwv_flow_global.vc_arr2;
v_rows number;
v_sr_no number := 1;
v_ok boolean := true;
v_local_ok BOOLEAN := TRUE;
v_reg_ok NUMBER := 0;
v_reg_ko NUMBER := 0;
v_localidad_id NUMBER;
v_departamento_id NUMBER;
v_cargo_id NUMBER;
v_prospecto_id NUMBER;
v_asesor_id NUMBER;
V_REG prospectos%rowtype;
BEGIN
-- Read data from wwv_flow_files</span>
select blob_content into v_blob_data
from wwv_flow_files
where name= p_archivo;
v_blob_len := dbms_lob.getlength(v_blob_data);
v_position := 1;
-- Read and convert binary to char</span>
WHILE ( v_position <= v_blob_len ) LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_line := v_line || v_char;
-- pro_log('linea '||v_line);
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved </span>
IF v_char = CHR(10) THEN
-- Convert comma to : to use wwv_flow_utilities </span>
v_line := replace(REPLACE (v_line, ',', ':'), ';',':');
v_line := replace(replace(v_line, chr(10)),chr(13));
if substr(v_line,1,1)= ':' then
v_line := '0'||v_line;
end if;
if instr(v_line,':',1,21) = 0 then
if instr(v_line,':',1,20) = 0 then
v_line:=v_line||':';
end if;
v_line:=v_line||':';
end if;
-- pro_log(v_line);
-- Convert each column separated by : into array of data </span>
v_data_array := wwv_flow_utilities.string_to_table (v_line);
-- Insert data into target table </span>
IF v_data_array(1) IS NOT NULL AND
v_sr_no <> 1 THEN
V_REG.NOMBRE:=ltrim(rtrim(v_data_array(2)));
V_REG.RAZON_SOCIAL:=v_data_array(3);
V_REG.DIRECCION := v_data_array(4)||' '||v_data_array(5);
-- PRO_LOG('PROSP 1 ' ||v_sr_no);
v_localidad_id := pack_empresas.get_localidad(v_data_array(6));
-- PRO_LOG('PROSP 1.1 '||v_sr_no);
V_REG.LOCALIDAD_ID:=v_localidad_id;
-- PRO_LOG('PROSP 1.2 '||v_sr_no);
V_REG.CODIGO_POSTAL:=LTRIM(RTRIM(v_data_array(7)) );
-- PRO_LOG('PROSP 1.3 '||v_sr_no);
-- PRO_LOG('PROSP 1.1 '||v_sr_no);
v_departamento_id := pack_empresas.get_departamento(v_data_array(8));
-- PRO_LOG('PROSP 1.4 '||v_sr_no);
V_REG.DEPARTAMENTO_ID:=v_departamento_id;
-- PRO_LOG('PROSP 1.5 '||v_sr_no);
V_REG.TELEFONO:=v_data_array(9);
--PRO_LOG('PROSP 1.6 '||v_sr_no);
V_REG.TELEFONO2:=v_data_array(10);
-- PRO_LOG('PROSP 1.7 '||v_sr_no);
V_REG.RUBRO:=v_data_array(11);
-- PRO_LOG('PROSP 1.8 '||v_sr_no);
V_REG.RUC:=ltrim(rtrim(v_data_array(12)));
-- PRO_LOG('PROSP 1.9 '||v_sr_no);
-- pro_log(v_data_array(1));
-- pro_log(v_data_array(2));
V_REG.CANTIDAD_EMPLEADOS:=RTRIM(LTRIM(v_data_array(13)));
-- PRO_LOG('PROSP 1.10 '||v_sr_no);
-- pro_log(v_data_array(14));
V_REG.CANTIDAD_BENEFICIARIOS:=RTRIM(LTRIM(v_data_array(14)));
--PRO_LOG('PROSP 1.11 '||v_sr_no);
V_REG.MAIL:=v_data_array(19);
-- pro_log(V_REG.MAIL);
-- PRO_LOG('PROSP 1.12 '||v_sr_no);
-- v_data_array(20):= replace(replace(v_data_array(20),chr(10)),chr(13));
if not v_data_array.exists(20) then
-- pro_log('existe');
-- pro_log(ltrim(rtrim(replace(replace(v_data_array(20),chr(10)),chr(13)))));
V_REG.Proveedor:= ltrim(rtrim(replace(replace(v_data_array(20),chr(10)),chr(13))));
else
v_data_array(20):=null;
end if;
-- V_REG.PROVEEDOR:=v_data_array(20);
-- PRO_LOG('PROSP 1.13 '||v_sr_no);
if not v_data_array.exists(21) then
V_REG.OBSERVACIONES:=v_data_array(21);
else
v_data_array(21):=null;
end if;
-- PRO_LOG('PROSP 1.14 '||v_sr_no);
-- PRO_LOG('PROSP 1.2 '||v_sr_no);
insert into prospectos (nombre,razon_social, direccion,localidad_id,codigo_postal,
departamento_id, telefono, telefono2, rubro,ruc,cantidad_empleados,
cantidad_beneficiarios,mail,proveedor,observaciones)
values (nvl(ltrim(rtrim(v_data_array(2))),v_data_array(3)), v_data_array(3),
v_data_array(4)||' '||v_data_array(5),
v_localidad_id, LTRIM(RTRIM(v_data_array(7))),v_departamento_id, v_data_array(9),
v_data_array(10),v_data_array(11), ltrim(rtrim(v_data_array(12))), RTRIM(LTRIM(v_data_array(13))),
RTRIM(LTRIM(v_data_array(14))),v_data_array(19),v_data_array(20), v_data_array(21))
returning prospecto_id INTO v_prospecto_id;
-- PRO_LOG('PROSP 2');
v_cargo_id := pack_empresas.get_cargo(v_data_array(17));
-- PRO_LOG('PROSP 3');
insert into prospecto_contactos (prospecto_id,nombre,apellido,cargo_id,
telefono,mail)
values (v_prospecto_id, nvl(v_data_array(15),'S/N'), nvl(v_data_array(16),'S/A'),
v_cargo_id, v_data_array(18), v_data_array(19));
-- PRO_LOG('PROSP 4');
v_asesor_id := pack_empresas.get_asesor(v_data_array(1));
-- PRO_LOG('PROSP 5');
insert into asignaciones (prospecto_id,asesor_id,fecha_asignacion)
values (v_prospecto_id, v_asesor_id, trunc(sysdate));
-- PRO_LOG('PROSP 6');
END IF;
-- Clear out
v_line := NULL;
v_sr_no := v_sr_no + 1;
END IF;
END LOOP;
delete wwv_flow_files
where name= p_archivo;
END pro_carga_planilla_prosp;
function hex_to_decimal
--this function is based on one by Connor McDonald
--http://www.jlcomp.demon.co.uk/faq/base_convert.html
( p_hex_str in varchar2 ) return number
is
v_dec number;
v_hex varchar2(16) := '0123456789ABCDEF';
begin
v_dec := 0;
for indx in 1 .. length(p_hex_str)
loop
v_dec := v_dec * 16 + instr(v_hex,upper(substr(p_hex_str,indx,1)))-1;
end loop;
return v_dec;
end hex_to_decimal; -
Upload data from Excel into SAP CRM using webservices
Hi,
I want to upload the data from EXCEL into SAP CRM using a web service, can anyone say me the process and also how to map the excel and the source code structures.
Thanks,
Sanju.Try the following :
Class: CL_GUI_FRONTEND_SERVICES
Method: GUI_UPLOAD
Thanks
<b>Allot points if this helps!</b> -
How to populate data from table into datagrid in form
hi there. may i know how to populate data from a table into a datagrid? i have created a datagrid in a form using OLE's microsoft datagrid. i'm having problem to populate data from table into the grid. can i know how to do that? thanks
Not exactly. I want to enter input from form and the user can have all options to choose i.e. HIGH, MEDIUM or so on.
Suppose, you have option to select HIGH, MEDIUM or LOW and you can see all these options together. You select LOW and when you save, it is saves in the table as a value. So when you view the table again, it will show LOW as active and HIGH and MEDIUM are null. -
How to load the data from informatica into bw & how to report the data
Hi friends,
how to load the data from informatica into bw & how to report the data
using cognos.(i.e how to access the data in sap bw using cognos 8 BI suite).
Thanks,
madhu.Inorder to report BW data into Cognos you can extract data from using Open Hub to the DB table from which Cognos reads.
For BW informatic integration refer following docs:
http://www.aman.co.il/aman/pfd/DataInteg_BR.q103cd.pdf.pdf
http://h71028.www7.hp.com/enterprise/cache/3889-0-0-225-121.html
http://devnet.informatica.com/learning/ePresentations.asp
http://72.14.203.104/search?q=cache:C741L86Q19oJ:devnet.informatica.com/showcase/resources/Essbase_DataSheet.pdfinformaticapowerconnect(BI)&hl=en&gl=in&ct=clnk&cd=3
http://www.informatica.com/customers/utilities_energy/fpl_group.htm
http://www.informatica.com/solutions/resource_center/technote_sapbw_65241004.pdf#search=%22Informatica%20to%20Bw%22 -
How to read and write data from Excel to TestStand without using LabVIEW VIs
Hi,
How can I read in columns of data from Excel into a TestStand array and write columns of data to Excel from TestStand without using LabVIEW VIs?
I don't think the Property Loader custom step type in TestStand will work because the data I would like to read in from Excel is in a column that is thousands of rows long and the data has to be in the proper format to use the Property Loader to load in an array from Excel.
Thanks for your help.That example does not use LabVIEW and it does about 40% of what you need to do by calling Excel through ActiveX. If you don't know how to use Excel through ActiveX then you'll need to brush up on that.
http://www.microsoft.com/en-us/download/details.aspx?id=16250
http://support.microsoft.com/kb/141759
http://support.microsoft.com/kb/302084
CTA, CLA, MTFBWY -
How do I get the last changed date & time of a file in app server?
Hi Experts,
How do I get the last changed date & time of a file in app server?
Thanks!
- Anthony -Hi,
that's what I use...
CALL 'C_DIR_READ_FINISH'. " just to be sure
CALL 'C_DIR_READ_START' ID 'DIR' FIELD p_path.
IF sy-subrc <> 0.
EXIT. "Error
ENDIF.
DO.
CLEAR l_srvfil.
CALL 'C_DIR_READ_NEXT'
ID 'TYPE' FIELD l_srvfil-type
ID 'NAME' FIELD l_srvfil-file
ID 'LEN' FIELD l_srvfil-size
ID 'OWNER' FIELD l_srvfil-owner
ID 'MTIME' FIELD l_mtime
ID 'MODE' FIELD l_srvfil-attri.
* l_srvfil-dir = p_path .
IF sy-subrc = 1.
EXIT.
ENDIF." sy-subrc <> 0.
PERFORM p_to_date_time_tz
USING l_mtime
CHANGING l_srvfil-mod_time
l_srvfil-mod_date.
TRANSLATE l_srvfil-type TO UPPER CASE. "#EC TRANSLANG
PERFORM translate_attribute CHANGING l_srvfil-attri.
CHECK:
NOT l_srvfil-file = '.',
l_srvfil-type = 'D' OR
l_srvfil-type = 'F' .
APPEND l_srvfil TO lt_srvfil.
ENDDO.
CHECK NOT lt_srvfil IS INITIAL.
pt_srvfil = lt_srvfil.
FORM p_to_date_time_tz USING p_ptime TYPE p
CHANGING p_time TYPE syuzeit
p_date TYPE sydatum.
DATA:
l_abaptstamp TYPE timestamp,
l_time TYPE int4,
l_opcode TYPE x VALUE 3,
l_abstamp TYPE abstamp.
l_time = p_ptime.
CALL 'RstrDateConv'
ID 'OPCODE' FIELD l_opcode
ID 'TIMESTAMP' FIELD l_time
ID 'ABAPSTAMP' FIELD l_abstamp.
l_abaptstamp = l_abstamp.
CONVERT TIME STAMP l_abaptstamp TIME ZONE sy-zonlo INTO DATE p_date
TIME p_time.
ENDFORM. " p_to_date_time_tz
Regards,
Clemens -
Import data from mySQL into flash?
I am new t this and therefore do not know if it can be done, but I want to import certain data from mySQL into a flash project. I know how to do this in PHP but not in action script. Help Please!
You can use the data -> connect to php in FlashBuilder and generate a php sample file from your mysql db and use that as the service in your flex project.
Check out http://sujitreddyg.wordpress.com/2009/06/01/building-flex-application-for-a-php-class-usin g-flash-builder-4/ -
What is the best way to get data from SAP into BPC?What about getting data from BPC (like a template) into back into SAP?
Hi Sam,
Please find here the steps you should do
Step#1: In SAP With the help of ABAP program update data into a table.
Step#2: In regular interval pull data from SAP table to BPC staging tables in SQL server.
Step#3: Run import data manager package to update FACT tables from BPC staging tables on demand.
This is the best way and best approach to pull data from SAP to BPC.
Thanks and Regards,
Rajesh Muppala. -
Pulling data from oracle into sql server 2005
hi,
these days i am working on sql server 2005 on windows server 2008 64 bit.
and oracle 10g on 32 bit unix.
my problem is that when i am pulling data from oracle into sql server it shows me about *500-700 entries less*.
why this is happening? is it because 32 bit to 64bit? or is it because of different os?Akki,
are you using snapshot or replication from MSSQL? I am doing the same thing, hope to share your experience.
I am using import/export from MGT studio and pull some data from Oracle database, I am working on how to update the changes on these tables pulled from Oracle.
Thanks,
-hank
Maybe you are looking for
-
System setting does not allow changes to be made to object
Hi experts, I implelemt ST-PI/A today and apply note 1300023. There is a information(???) message keep warning "System setting does not allow changes to be made to object NOTE 0001300023". I think I should SE06 to modify system change option, but I
-
Get row number of record in Interactive Report
I am using an interactive report and want to be able to modify a field and if the value already exists in the database change it back to what it was originally. I am selecting data using the select statement below and I'm calling the javascript Check
-
Strange effects in using f:convertNumber and h:inputText
Hi everybody, I'm having really strange results with the following <h:inputText> and <f:convertNumber> tags in one JSF page: <h:inputText id="total" value="#{myBean.total}" required="true" size="10" ><f:convertNumber minFractionDigits="2" maxFraction
-
Import existing forum content in Portal Forums
Hi, Is there a way to import content from an existing forum application into Portal Forums? Edmond
-
Hi All, I installed netweaver 7.1 sneak preview successfully. To deploy the application i have to give the server name(LocalHost and Port) in the preferences but i am unable to find out the location. Can any one guide me to configure the server in pr