Retriving Absence data from PNP logical database
hi all,
there is an function where i can get the absence data but my client wants in the following order
But my client wants the report in following format:
YEAR--- week number--
number of absence hourse in that week
2006 -
WEEK -
HOURS
infotype is pa2001.
thx in advance.
Sunil
Sunil,
Table PTQUODED may be better suited than PA2001 because in PA2001 it is <b>very difficult to distinguish between absences that overlap between 2 or more weeks</b>.
Here is sample code that does exactly what you need:
REPORT zggar_abs.
DATA: ta_ptquoded TYPE TABLE OF ptquoded.
DATA: l_week TYPE scal-week.
DATA: BEGIN OF ta_abs OCCURS 0,
pernr TYPE pernr,
year(4) TYPE c,
week(2) TYPE c,
abs TYPE f,
END OF ta_abs.
DATA: wa_abs LIKE LINE OF ta_abs.
FIELD-SYMBOLS: <fs_ptquoded> LIKE LINE OF ta_ptquoded.
PARAMETERS : p_pernr TYPE p_pernr.
SELECT * FROM ptquoded
INTO TABLE ta_ptquoded
WHERE pernr = p_pernr.
LOOP AT ta_ptquoded ASSIGNING <fs_ptquoded>.
wa_abs-pernr = <fs_ptquoded>-pernr.
CLEAR: l_week.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = <fs_ptquoded>-datum
IMPORTING
week = l_week.
wa_abs-year = l_week+0(4).
wa_abs-week = l_week+4(2).
wa_abs-abs = <fs_ptquoded>-quode.
COLLECT wa_abs INTO ta_abs.
ENDLOOP.
SORT ta_abs BY year week.
LOOP AT ta_abs INTO wa_abs.
WRITE : wa_abs-year, wa_abs-week, wa_abs-abs.
NEW-LINE.
ENDLOOP.
Please, assign points and close the thread if solved.
Best regards,
Guillaume
Similar Messages
-
Need a function Module to retrive the weekly absence data from PNP logical
hi all,
i have generated a report for absence data according to my report when u enter the start date and end date and absence type it will give u the list of employees and starting date and end date and absence hours.
But my client wants the report in following format:
YEAR week number number of absence hourse in that week
2006 -
WEEK -
HOURS
infotype is pa2001.
thx in advance.
SunilHi Sunil,
I think you have to use zreport.
Regards,
kumar -
Selection Screen of PNP Logical database
Experts,
I am stuck up in filtering of data.
I am using PNP logical database in Adhoc Query, if I select Current Month as data selection than also it is giving all list of data..
Can anyone give Input to me.
it is urgent.
Point will revert for useful answer.
Hetal.how about if u do this step
1. Goto- Attribute.
2. Click "Change"
3. Click 'HR Report Category'
4. Click 'Create Report Category'
5. Click 'new entries' for careating Report Category
5. Select newly create report category
6. Click the folder 'Definition of Organizational Selection'.
7. Click 'New entries'.
8. Here you assign the required fields to be displayed, for eg pywerks - personal area.
9. finally assign this newly created 'report category' in the screen you will get upon clicking 'HR report Category' button in the Program attribute screen.
Hope this may help you. I am not much into hr abap. but sharing the info which i am aware. -
Issue with 900 screen of PNP logical database.
Hi Experts,
I am using 900 screen in PNP logical database and assigned the default report catagory.
But in the selection screen when I click on further selection and select any of the parameter like company code/cost center, nothing comes in to the screen.
Request to let me know any issue there?
Br/Manashi
After selecting the fields from further options are you first adding them and then saying ok or just saying ok. Please check and let me know.
If you add and then say ok these fields appear on the screen,
Santoshi -
Line item in PNP logical database
Hi All,
Can anyone tell me, what is the selection logic for PNP Logical database, suppose in one report we use PNP Logical database,
So when we put some date range, so in the output of report there are 2 fields, so during that date range 1 field occurs two time and other field 4 times, so how many line items would be displayed by that report.
Regards,
Kumarread documentation for report SAPDBPNP or SAPDBPNPCE.
-
TABLES statement in pnp logical database
I am using PNP logical database in my program.
when i check for obselete errors it is showing the statements
"TABLES: PERNR.
INFOTYPES: 0001,0002." are Obselete
But my program is logically correct and also working.
can u tell me how to resolve this error.tables sflight is exactly the same as data sflight type sflight.
The same for the infotypes statement, but then you have to reference to the pa#### table.
Kind regards, Rob Dielemans -
Access data on multi-logical database with ad hoc query
Dear all,
I would like to know if it is possible to access data in multi-logical database with ad hoc query.
I recall that I read some document stated that you can access data in multi-logical database with PNP as base.
But I find no document about how to set it up, any comment?
Regards
BillHi Bill...
PNP can be accessible..............
PNP 0000-0999, 2000 to 2999 HR Master Data & Time
PCH.... I don't think so....
Experts please do reply on this please...................
Vijay
Edited by: Vijay Shankar on Sep 13, 2011 11:32 AM -
Can we retrive the data from Maintainence view
Hi Guys,
Can we retrive the data from Maintainence view...
Thanks,
Gourisankar.Hi,
Data can be retrived only from following type of views:
Projection view
Database View -
IN HR PAYROLL REPORT USING PNP LOGICAL DATABASE
Dear abapers,
when i ab runing HR payroll report usin PNP Logical database there are some error occurs.
INCLUDE DBPNPCOM
IN UNICODE PROGRAMS, THE "-" CHARECTOR CAN NOT APPEAR IN NAME , AS IT DOES HERE IN THE NAME
PNP-SW-FOUND.
INCLUDE DBPNPCOM
IN UNICODE PROGRAMS , THE "-" THE CHARECTOR CAN NOT APPEAR IN NAMES, AS IT DOES HERE IN THE NAME
PNP-SW-IGNORELOCKEDRECORDS.
INCLUDE DBPNPCOM
IN UNICODE PROGRAMS , THE "-" THE CHARECTOR CAN NOT APPEAR IN NAMES, AS IT DOES HERE IN THE NAME
PNP-SW-ENQUEUEPERNR.
PLEASE GIVE ME SOLUTIONS .
THANK YOU SIR.Hi, please check, these might be warnings, not errors.
-
Using PNP logical database in report
Hi i'm using the PNP logical database in my report, and i want to hide all fields in the 'Period' frame.
is there any way to do it automatically or is it necessary to hide them one by one??
Thanks in advance.If you can put them all in the same screen group, you may be able to do this. But you might run into problems when you re-generate.
Rob -
APEX Application accessing data from two different databases
Hi All,
Currently as we all know that APEX Application resides in database and is connected to the schema of that database.
I want APEX Application to be running and accessing data from two different databases. Elaborating my question,
Currently, my APEX Production Application is connected with XXXX Schema of DB1 Database(Where APEX Resides). Now I want to add some pages into this APEX Application for REPORT Purpose, But I want to connect this REPORT APEX Pages to get data from Different Schema YYYY for Database DB2.
Is it possible to configure this scenario?
The reason for doing this is to avoid the REPORT related (adhoc queries) resource utilization effect on Production DB1 Database.
Thanks
Nil1. If you do the joining of two or more tables in DB1 then all data is pulled over to DB1 and then the join is executed: so more data over the databaselink and more work for DB1. Better keep the joining stuff where the data resides and just pull exactly that data over that you need.
2. Don't know about your different block sizes. Seems a nice question for one of the other forums (DBA or SQL).
3. I mean create synonyms on DB1 for reports VIEWS in DB2.
Hope all is clear! -
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; -
How can i save the data from the Oracle database to my local directory
How can i save the data from the Oracle database to my local directory instead Of saving the data file to the Directory created on the Oracle Server ?
I require to design the Procedure which will pull the data from various tables and needs to store the data in the Client's local directory.Since SQL*PLUS runs on the client, you can use SQL*PLUS to spool data to your local drive.
You could also use the database to write a a specified drive where all users have access to (mapped network drive, e.g.). I wouldn't recommend doing it that way, but it is sometimes useful when the files are created in some nightly batch run. -
base /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1i need to pass data from an Access database to Teststand by using the built in Data step types(open database /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1
When I tried the same thing on another cmputer the same thing
happend
appreiciate u"r helpbase /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1Hello Kitty -
Certainly it is unusual that you can still see the tables available in your MS Access database but cannot see the columns? I am assuming you are configuring an Open Statement step and are trying to use the ring-control to select columns from your table?
Can you tell me more about the changes you made to your file when you 'changed' it with MS Access? What version of Access are you using? What happens if you try and manually type in an 'Open Statement Dialog's SQL string such as...
"SELECT UUT_RESULT.TEST_SOCKET_INDEX, UUT_RESULT.UUT_STATUS, UUT_RESULT.START_DATE_TIME FROM UUT_RESULT"
Is it able to find the columns even if it can't display them? I am worried that maybe you are using a version of MS Access that is too new for the version of TestSt
and you are running. Has anything else changed aside from the file you are editing?
Regards,
-Elaine R.
National Instruments
http://www.ni.com/ask -
Error while loading the data from excel to database.
Hi,
I am using PL/SQL developer to load the data from excel to database. I will set the data source in the control panel and will proceed through ODBC importer in pl/sql developer to import the data.
What exactly the error is when i click the filename to view the result preview it shows an error as:
The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
Kindly help with solution.
Thanks/Regards
Sakthivarman J.Hello;
That error message comes from Microsoft, so something in you Excel sheet is the cause.
Its a pain but I would check properties of each column in case Excel decided to add something, a comma for example.
Do you have a column over 255 characters? Look there first. If any length is greater than 255 it will crash and burn.
Or convert it to a CSV and create an external table.
Best Regards
mseberg
Might also throw an 3163 as an error where you cannot see it.
Edited by: mseberg on Sep 9, 2011 7:34 AM
Maybe you are looking for
-
Error Group- RFC_ERROR_SYSTEM_FAILURE in BEx
Hi All, When i run a query in BEx i get an error message which says that an exception that could not be caught occured. the Error Group- RFC_ERROR_SYSTEM_FAILURE in BEx. Godhuli
-
Howdy, About to explode from frustration. Oh please can somebody tell me where to drag the itunes folder to in order to copy it to my external hard drive? Thanks in advance.
-
Verizon installed a month ago and my land line phone won't work
Had Verizon installed in December. My old internet/phone/cable provider raised their rates so I shopped around and went with Verizon. Soon after, my cordless phone would stop working. No dial tone and if someone tried to phone me, they would get a bu
-
Unable to search for first record using the Preview tree
Post Author: TheBig1980s CA Forum: General Hello: Users are unable to search for the first record in the Preview tab's tree. The reason for this is because the first record is within the first page header of the report. My guess is that, by design,
-
Web Service Response Customization
Hi There ! I wonder if it is possible to manipulate the pattern of response of the operations exposed by the OSM Web service . For example by invoking the operation CreateOrder which responded me <xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"