Reading Several Employees Infotypes
Hi everyone,
I was wondering if anyone knows a function to read several employees infotypes.
Something equivalent to "RHOM_READ_INFTY_BUFFERED", that allows to read all entries of HRP's infotypes from one or more objects.
Thanks a lot, I regard with points!!!!!!
Regards,
Fifo Chávez
Apparentely there's no answer
Edited by: Fiorella Chavez Valdivia on Sep 21, 2009 3:57 PM
Can't recall much but did you try defining INFOTYPES in your program, as below, and using GET statement?:
*& infotype declaration
INFOTYPES: 0000, " Actions
0001, " Organizational assignments
0002, " Personnel Data
0007, " Planned working Time
0008, " Basic Pay
2001 MODE n, " Absences
2002 MODE n, " Attendance
2003 MODE n, " Substitution
2004 MODE n, " On-Call Duty
2005 MODE n. " Overtime
DATA: report_begda LIKE pn-begda.
*& start of selection
START-OF-SELECTION.
* selection-begda might change
report_begda = pn-begda.
GET pernr.
regards,
Aabhas
I noticed I have replied to a failry old post
Edited by: Aabhas K Vishnoi on Sep 22, 2009 1:35 PM
Similar Messages
-
Looping through several employee numbers
My program calculates salary for a given period for an employer and prints the result in a word doc using the function MS_WORD_OLE_FORMLETTER. This works fine when I have only one employer. When I enter several employee numbers the information is collected correctly in a table but only the first record is printed. I have an impression that the program executes as many times as there are employee numbers instead of executing once by looping through the employee numbers before printing the result. How can I print all the information for several employers?
The shorter version of the code is as foolows:
Loop at i_result into w_rt "loop through payroll results for given period
case w_rt-lgart
"do some calulations for this employee for
FIELD-SYMBOLS: <fsd>, <fsl> type any.
CONCATENATE 'MF' w_rt-lgart INTO keyA_Merge.
assign component keya_merge of structure T_MergeData to <fsd>.
if sy-subrc = 0.
<fsd> = <fsd> + w_rt-betrg.
endif.
end case
endloop
append t_mergedata to Fdata
"Now create mail merge for all employees using Fdata
call function 'MS_WORD_OLE_FORMLETTER'
exporting
WORD_DOCUMENT = FILEFORM
HIDDEN = 0
WORD_PASSWORD =
PASSWORD_OPTION = 1
FILE_NAME = FILEDATA
NEW_DOCUMENT =
DOWNLOAD_PATH = FILEPATH
PRINT = PFPRINT
tables
DATA_TAB = FDATA
FIELDNAMES = pFIELDS
My problem is that the loop executes for one Employee and then goes on to the end of the program to do the mail merge. the program then "restarts" for the necxt employee. However through each program run/cylce the table t_mergedata is appended with the correct information. I would like to first collect all this info before executing the FM for all the records in t_mergedata. -
How to read several text files at a time
Dear all
Read and write one text file is not a problem, but what confusies me is how to read several text files at one time, in the meanwhile,
is it possible to display the name of the text file?
For example, assuming I want to load file" cha 1, cha 2 , cha 3, " at one time and show their names, how to hadle with it
I have reviewed some files and it is not helpfulEither with a 'for' loop like in the lib you have attached, or like this attached VI
that's it
Message Edited by devchander on 05-30-2006 05:11 AM
Attachments:
MULTIPLE READ.vi 44 KB -
How can I read several avi files in single DVD with FRONT ROW?
Hi!
Is it possible to make Front Row read several movie files in a single DVD?
I burned 6/7 avi files in each DVD, but Front Row can't even read the DVD itself!
Thanks!Hi Imcaet
It sounds as though you have made a Data DVD rather than a Movie DVD. Front Row can only read Movie DVDs. All Data must be in iTunes, or in on of the directories it looks in, such as "Movies" in your home directory.
If you need to combine the movies, you will need something like QuickTime Pro 7, which can be purchased from the Apple website. You need to Select All the movie you wish to Append, Copy, go to the End of the movie you wish to Append to, and Paste. You can then save/export the movie in full. -
after downloading i-clouds I keep receiving a no service message and phone could not be activated because the activation server is temporarily unavailable.
I have read several questions on this but dont see a solution.Activation requires a SIM, assuming the SIM is functional it should simply activate.
The vast majority of activation issues are the result of devices that have been hacked or jailbroken. If that is the case, no support can be provided here. -
I have been trying to download adobe reader several times I have tried to click run and save the adobe reader installer box pops up with a blank black screen. I have browser IE 11
Try using the offline installer from http://get.adobe.com/reader/enterprise/
[topic moved to Adobe Reader forum] -
Hi,
How can we read texts from the Infotype. There is this function module HR_ECM_READ_TEXT_INFOTYPE, but we need the Employee Number, Begin date and End Date as inputs.
I just want to check if a field with a particular value exists or not.
just like this works to check whether the field DAT35 with value 99991231 exits or not.
SELECT PERNR FROM PA0035 INTO V_PERNR WHERE DAT35 = '99991231'.
IF SY-SUBRC = 0.
ENDIF.
the same way for a text, but this text actually gets stored in a structure thats why we cannot use a select for infotype
Thanks in advance.Hi,
What i am getting from ur explanation is that u are having a probelm in accessing a text field from the infotype, i.e: the value field in included in the infotype table (PA0035) but its text is in another table.
If this is the problem, u should first use select statement on PA0035 to get the required infotype record. Then use F1 help on the required text field on the infotype screen to get the table and field name. Then u can use select statement on that table by specifying the relavant value field from the previous select in the where clause.
Hope this hepls -
After purchasing extended warranty as well, I now find myself with a very non portable computer in a country in South America that has no backup tech support for my new unit. I would not have purchased this model had I not venn told by serveral salesmen and one teacher that there was an official Apple Reseller in Ecuador so I had back up for technical or repair issues.
Now that I am already in Ecuador, returning or exchanging the unit is impossibe, and I have no technical back up. I am furious, and need to know who at Apple will take responsibility for the misleading info given to me be several Apple experts at the company Apple Store ibn MiamiThere are a number of authorized Apple resellers and service centers in Ecuador:
http://www.apple.com/la/buy/locator/index.php?ctry=EC
So there appears to have been no misleading information given to you.
Regards. -
Read several lvm files into VI
Hello all,
I have a question about how to load several files into a VI. I have done a long measerement with a high samplerate so LabVIEW has made approximatelly 900 lvm files. I want to do two things. The first thing that I want to do, is to see chart/graph of the data with a scroll bar so I can look trough the data. The second thing that I want to do is write the same data (approximatelly 900 files) to lets say 20 files. So the samplerate is from 100 Hz to 0.2 Hz. Is that possible?
In the attachment I have put the VI that I currently have + one of the 900 files that I want to load.
Thanks in advance.
Attachments:
VI + LVM file.zip 556 KBHello Mark,
I'm a bit confused about the situation:
- Although you're talking about 900 files I only see 1 file in your attachment (as you also mentioned in the post).
Do they all have the same format/sample rate (and amount of samples) in each column?
If not, then please provide the necessary examples, because I don't see your variation of 0.2 Hz to 100 Hz sample rate based on this file.
That left aside, merging files should always be possible (up to a certain point)
- Can you also provide the code you used to generate the lvm-files?
This will give some background information.
Especially beccause I don't see any metadata available in your lvm-files.
- Graph/Chart choice:
If you only want to see all data at once, then a graph would be the solution seeing that you are not interested in the data sets while they're loading and only in the full set of data. Please do also keep in mind the size of the data set you're loading.
If you want to plot all colums in the same graphg with different sample rates per channel/column, then a good idea would be a multiplot XY Graph.
However, here you will also have to keep the data set size in mind.
Kind Regards,
Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
CLD, CTA
If someone helped you, let them know. Mark as solved and/or give a kudo. -
We're running a script using several employee API's which is failing..
Hello.
Hopefully, one of you gurus will have xome across this before...
Our script has been created to take both NEW & CHANGED employee details into ORACLE Financials via a temporary table directly loaded in from our HR system. It has been working thus far for any new employees but is now failing now that we're trying to incorporate existing employees.
The error message given is:
ORACLE error occurred processing record.. ORA-20001: PAY_7599_SYS_SUP_DT_OUTDAT
The official description behind the error is:
ORA-20001: Supervisor is not valid for the duration of the assignment
Metalink states “Using UPDATE_EMP_ASG API to update the supervisor on a person's assignment when the supervisor is hired after the Employee”. To get around this the DATETRACK mode needs to be set to UPDATE. However Shared HR users are only allowed to use the mode of CORRECTION for this API. We are, unfortunately, a Shared HR User.
Basically, as I understand it, it is because we're trying to load in employees who have a start date BEFORE that of the Supervisor that we’re attaching it to.
Please could you suggest/supply a workaround for users in this type of situation.
/* Formatted on 2009/04/29 11:52 (Formatter Plus v4.8.7) */
SET serveroutput ON SIZE 1000000 FORMAT WRAPPED
SET verify OFF
SET feedback OFF
DECLARE
-- Debugging/error handling
-- Work variables
location_code_errors exception;
-- emp_status_errors1 exception;
-- emp_status_errors2 exception;
v_emp_no number;
l_employ_start_date DATE:= TO_DATE ('01-APR-1999', 'DD-MON-YYYY');
v_ora_loc_code number := 0;
p_emp_number VARCHAR2 (14);
v_rec_cnt NUMBER := 0;
insert_flag VARCHAR2 (8);
err_num NUMBER;
err_msg VARCHAR2 (150);
err_line VARCHAR2 (350);
err_seq NUMBER := 0;
l_validate BOOLEAN DEFAULT FALSE;
l_std_business_group_id NUMBER := '0';
l_default_code_comb_id NUMBER := '218048';
l_organization_id NUMBER := '0';
l_set_of_books_id NUMBER := '1';
l_job_id NUMBER := '10';
l_obj NUMBER;
l_datetrack_update_mode VARCHAR2 (30) := 'CORRECTION';
l_assignment_sequence NUMBER;
l_name_combination_warning BOOLEAN := FALSE;
l_assign_payroll_warning BOOLEAN := FALSE;
l_org_now_no_manager_warning BOOLEAN;
l_other_manager_warning BOOLEAN;
l_spp_delete_warning BOOLEAN;
l_entries_changed_warning VARCHAR2 (30);
l_tax_district_changed_warning BOOLEAN;
l_person_id NUMBER;
l_assignment_id NUMBER;
l_assignment_id2 NUMBER; -- := '28262';
l_special_ceiling_step_id NUMBER;
l_per_effective_end_date DATE:= TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
l_people_group_id NUMBER;
l_group_name VARCHAR2 (30);
l_assignment_number VARCHAR2 (35);
l_effective_end_date DATE := TO_DATE ('11-Jul-2049', 'DD-MON-YYYY');
l_date DATE := SYSDATE;
ip_p_address_id per_addresses.address_id%TYPE;
ip_p_object_version_number NUMBER;
ip_p_party_id per_addresses.party_id%TYPE;
l_per_object_version_number NUMBER;
l_asg_object_version_number NUMBER;
l_full_name VARCHAR2 (240);
l_per_comment_id NUMBER;
l_per_effective_start_date DATE;
l_concatenated_segments VARCHAR2 (240);
l_soft_coding_keyflex_id NUMBER;
l_comment_id NUMBER;
l_no_managers_warning BOOLEAN;
-- Get employee details info from work table
CURSOR get_employee_details
IS
SELECT std_hire_date, std_last_name, std_sex, std_date_of_birth,
std_email_address, std_emp_status,
LPAD (std_employee_number, 8, '0') std_employee_number,
std_first_name, std_marital_status, std_middle_names,
std_nationality, std_title, std_national_identifier,
std_address_line1, std_address_line2, std_address_line3,
std_address_line4, std_post_code, std_telephone_1, std_country, --std_region,
std_location_id, --std_organization_id,
lpad(std_supervisor_id,8,'0') std_supervisor_id
--, std_person_id, std_position_id
FROM SU_TEMPLOYEE_DETAILS
WHERE std_employee_number IS NOT NULL AND std_national_identifier IS NOT NULL;
-- checks employee details info from PER_ALL_PEOPLE_F table
CURSOR c_check_employee (p_emp_number VARCHAR2, p_NI_number Varchar2)
IS
SELECT per.person_id, per.business_group_id, per.last_name,
per.start_date, per.date_of_birth, per.email_address,
per.employee_number, per.first_name, per.marital_status,
per.middle_names, per.nationality, per.national_identifier,
per.sex, per.title, padd.address_id, padd.primary_flag,
padd.address_line1, padd.address_line2, padd.address_line3,
padd.town_or_city, padd.postal_code, padd.telephone_number_1, paas.assignment_id,
paas.assignment_number, paas.object_version_number, paas.EFFECTIVE_START_DATE,
paas.job_id, paas.position_id, paas.location_id, paas.organization_id, paas.assignment_type, paas.supervisor_id,
paas.default_code_comb_id, paas.set_of_books_id, paas.period_of_service_id
FROM per_all_people_f per,
per_all_assignments_f paas,
per_addresses padd
WHERE padd.person_id = per.person_id
AND paas.person_id(+) = per.person_id
AND per.employee_number = p_emp_number
AND per.national_identifier = p_NI_number;
emp_rec c_check_employee%ROWTYPE;
-- Cursor retrieves latest Object Version Number from per_assignments_f table..
-- CURSOR csr_ovn (cp_person_id IN per_all_people_f.person_id%TYPE)
CURSOR csr_ovn (cp_person_emp_no IN per_all_people_f.EMPLOYEE_NUMBER%TYPE)
IS
SELECT MAX (paas.object_version_number)
FROM per_assignments_f paas, per_all_people_f per
WHERE paas.person_id = per.person_id
AND per.employee_number = paas.assignment_number
-- AND per.person_id = cp_person_id;
AND employee_number = cp_person_emp_no;
-- Cursor to get Oracle_Loc_Code from SU CHRIS vs ORACLE Locations Table into a variable..
CURSOR csr_ora_loc_code (cp_location_id IN SU_TEMPLOYEE_DETAILS.std_location_id%TYPE)
IS
SELECT sil.ORACLE_LOC_CODE
FROM SU_TEMPLOYEE_DETAILS std, SU_IEXP_LOCATIONS sil
WHERE std.STD_LOCATION_ID = sil.CHRIS_LOC_code
AND std.STD_LOCATION_ID = cp_location_id;
BEGIN
-- Process each record in the work table
FOR v_emp IN get_employee_details
LOOP
-- Obtain the most recent Object Version Number..
OPEN csr_ovn (v_emp.std_employee_number);
FETCH csr_ovn
INTO l_obj;
IF csr_ovn%NOTFOUND THEN RAISE NO_DATA_FOUND; END IF;
CLOSE csr_ovn;
-- determine whether customer already exists
OPEN c_check_employee (v_emp.std_employee_number, v_emp.std_national_identifier);
FETCH c_check_employee
INTO emp_rec;
v_emp_no := LPAD (v_emp.std_employee_number, 8, '0');
l_assignment_id2 := emp_rec.assignment_id;
IF v_emp.std_emp_status = 'N' and c_check_employee%NOTFOUND
THEN
insert_flag := 'I';
DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number);
DBMS_OUTPUT.PUT (CHR (10));
END IF;
--If Chris21 status is New but Employee exists in Finance make it a changed record
IF v_emp.std_emp_status = 'N' and c_check_employee%FOUND
THEN
insert_flag := 'C';
DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number);
DBMS_OUTPUT.PUT (CHR (10));
END IF;
IF v_emp.std_emp_status = 'C' and c_check_employee%NOTFOUND
THEN
insert_flag := 'I';
DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number || ' doesnt exist but theyre goin in anyway.. ');
DBMS_OUTPUT.PUT (CHR (10));
END IF;
IF v_emp.std_emp_status = 'C' and c_check_employee%FOUND
THEN
insert_flag := 'C';
END IF;
--==================================================
--===== Left this out as this was predominantly for testing purposes.. ======
--==================================================
-- IF l_assignment_id2 is null then raise emp_status_errors1; END IF;
-- IF l_obj is null then raise emp_status_errors2; END IF;
-- IF l_job_id is null AND v_emp.std_emp_status = 'C' THEN l_job_id = '10';
-- END IF;
-- END IF;
CLOSE c_check_employee;
-- Open Oracle Location Code cursor
OPEN csr_ora_loc_code(v_emp.std_location_id);
FETCH csr_ora_loc_code
INTO v_ora_loc_code;
IF csr_ora_loc_code%NOTFOUND THEN RAISE location_code_errors; END IF;
CLOSE csr_ora_loc_code;
-- Create new PER_ALL_PEOPLE_F and PER_ADDRESSES record from
-- info in table record
IF insert_flag = 'I'
THEN
-- -- Importing Employee Procedure --
Hr_Employee_Api.create_gb_employee
(p_validate => l_validate,
p_hire_date => l_employ_start_date,
p_business_group_id => l_std_business_group_id,
p_date_of_birth => v_emp.std_date_of_birth,
p_email_address => v_emp.std_email_address,
p_first_name => v_emp.std_first_name,
p_middle_names => v_emp.std_middle_names,
p_last_name => v_emp.std_last_name,
p_sex => v_emp.std_sex,
p_ni_number => v_emp.std_national_identifier,
p_employee_number => v_emp.std_employee_number,
p_person_id => l_person_id,
p_title => v_emp.std_title,
p_assignment_id => l_assignment_id,
p_per_object_version_number => l_per_object_version_number,
p_asg_object_version_number => l_asg_object_version_number,
p_per_effective_start_date => l_per_effective_start_date,
p_per_effective_end_date => l_per_effective_end_date,
p_full_name => l_full_name,
p_per_comment_id => l_per_comment_id,
p_assignment_sequence => l_assignment_sequence,
p_assignment_number => l_assignment_number,
p_name_combination_warning => l_name_combination_warning,
p_assign_payroll_warning => l_assign_payroll_warning
Hr_Person_Address_Api.create_person_address
(p_validate => l_validate,
-- p_effective_date => v_emp.std_hire_date,
p_effective_date => l_employ_start_date,
p_pradd_ovlapval_override => NULL,
p_validate_county => NULL,
p_person_id => l_person_id,
p_primary_flag => 'Y',
p_style => 'GB_GLB',
p_date_from => SYSDATE,
p_date_to => NULL,
p_address_type => NULL,
p_comments => NULL,
p_address_line1 => v_emp.std_address_line1,
p_address_line2 => v_emp.std_address_line2,
p_address_line3 => v_emp.std_address_line3,
p_town_or_city => v_emp.std_address_line4,
p_region_1 => NULL,
p_region_2 => NULL,
p_region_3 => NULL,
p_postal_code => v_emp.std_post_code,
p_country => v_emp.std_nationality,
p_telephone_number_1 => NULL,
p_telephone_number_2 => NULL,
p_telephone_number_3 => NULL,
p_party_id => ip_p_party_id,
p_address_id => ip_p_address_id,
p_object_version_number => l_obj
Hr_Assignment_Api.update_emp_asg
(p_validate => l_validate,
p_effective_date => SYSDATE, -- l_date,
p_datetrack_update_mode => l_datetrack_update_mode,
p_assignment_id => l_assignment_id,
p_object_version_number => l_obj,
p_supervisor_id => v_emp.std_supervisor_id,
p_default_code_comb_id => l_default_code_comb_id,
p_set_of_books_id => l_set_of_books_id,
p_concatenated_segments => l_concatenated_segments,
--IN/OUT
p_soft_coding_keyflex_id => l_soft_coding_keyflex_id,
--IN/OUT
p_comment_id => l_comment_id,
--IN/OUT
p_effective_start_date => l_date, --IN/OUT
p_effective_end_date => l_effective_end_date,
--IN/OUT
p_no_managers_warning => l_no_managers_warning,
--IN/OUT
p_other_manager_warning => l_other_manager_warning
--IN/OUT
Hr_Assignment_Api.update_emp_asg_criteria
(p_validate => l_validate,
p_effective_date => SYSDATE, -- l_date,
p_datetrack_update_mode => l_datetrack_update_mode,
p_assignment_id => l_assignment_id,
p_object_version_number => l_obj,
p_organization_id => l_organization_id,
p_location_id => v_ora_loc_code,
p_job_id => l_job_id,
-- p_position_id => v_emp.std_position_id,
p_special_ceiling_step_id => l_special_ceiling_step_id,
p_effective_start_date => l_date,
--per_effective_start_date,
p_effective_end_date => l_effective_end_date,
--IN/OUT
p_people_group_id => l_people_group_id,
--IN/OUT
p_group_name => l_group_name, --IN/OUT
p_org_now_no_manager_warning => l_org_now_no_manager_warning,
--IN/OUT
p_other_manager_warning => l_other_manager_warning,
--IN/OUT
p_spp_delete_warning => l_spp_delete_warning,
--IN/OUT
p_entries_changed_warning => l_entries_changed_warning,
--IN/OUT
p_tax_district_changed_warning => l_tax_district_changed_warning
--IN/OUT
v_rec_cnt := v_rec_cnt + 1;
DBMS_OUTPUT.PUT (CHR (10));
DBMS_OUTPUT.PUT_LINE ( 'There were '
|| v_rec_cnt
|| ' records read in..'
-- Updating PER_ALL_PEOPLE_F and PER_ADDRESSES record from
-- info in table record
ELSE IF insert_flag = 'C'
THEN
DBMS_OUTPUT.PUT (CHR (10));
DBMS_OUTPUT.PUT_LINE ('Employee No: ' || v_emp.std_employee_number || ' is about to be updated.. ' );
DBMS_OUTPUT.PUT (CHR (10));
-- ===================================================
-- these next 6 lines is for the initial mass update of existing employee records only
-- ===================================================
/*IF emp_rec.default_code_comb_id is NULL THEN
l_default_code_comb_id = 218048;
END IF;
IF emp_rec.job_id is NULL THEN
l_job_id = 10;
END IF; */
-- =========
-- Section end
-- =========
Hr_Assignment_Api.update_emp_asg
(p_validate => l_validate,
p_effective_date => emp_rec.EFFECTIVE_START_DATE, --SYSDATE,
p_datetrack_update_mode => l_datetrack_update_mode,
p_assignment_id => l_assignment_id2,
p_object_version_number => l_obj,
p_supervisor_id => v_emp.std_supervisor_id,
p_default_code_comb_id => l_default_code_comb_id,
-- p_default_code_comb_id => emp_rec.default_code_comb_id,
p_set_of_books_id => emp_rec.set_of_books_id,
p_concatenated_segments => l_concatenated_segments,
--IN/OUT
p_soft_coding_keyflex_id => l_soft_coding_keyflex_id,
--IN/OUT
p_comment_id => l_comment_id,
--IN/OUT
p_effective_start_date => l_date, --IN/OUT
p_effective_end_date => l_effective_end_date,
--IN/OUT
p_no_managers_warning => l_no_managers_warning,
--IN/OUT
p_other_manager_warning => l_other_manager_warning
--IN/OUT
Hr_Assignment_Api.update_emp_asg_criteria
(p_validate => l_validate,
p_effective_date => emp_rec.EFFECTIVE_START_DATE,
--p_effective_date => SYSDATE,
p_datetrack_update_mode => l_datetrack_update_mode,
p_assignment_id => l_assignment_id2,
p_object_version_number => l_obj,
-- p_organization_id => emp_rec.organization_id,
p_organization_id => l_organization_id,
p_location_id => v_ora_loc_code,
p_job_id => emp_rec.job_id,
-- p_position_id => emp_rec.position_id,
p_special_ceiling_step_id => l_special_ceiling_step_id,
p_effective_start_date => emp_rec.EFFECTIVE_START_DATE,
p_effective_end_date => l_effective_end_date,
--IN/OUT
p_people_group_id => l_people_group_id,
--IN/OUT
p_group_name => l_group_name, --IN/OUT
p_org_now_no_manager_warning => l_org_now_no_manager_warning,
--IN/OUT
p_other_manager_warning => l_other_manager_warning,
--IN/OUT
p_spp_delete_warning => l_spp_delete_warning,
--IN/OUT
p_entries_changed_warning => l_entries_changed_warning,
--IN/OUT
p_tax_district_changed_warning => l_tax_district_changed_warning
--IN/OUT
v_rec_cnt := v_rec_cnt + 1;
DBMS_OUTPUT.PUT (CHR (10));
DBMS_OUTPUT.PUT_LINE ( 'There were '
|| v_rec_cnt
|| ' records read in..'
DBMS_OUTPUT.PUT (CHR (10));
-- End of customer related details
END IF;
END IF;
-- END IF;
END LOOP;
COMMIT;
EXCEPTION
WHEN location_code_errors THEN ROLLBACK;
dbms_output.put_line ('Location ID unknown or not found, please check..');
/* WHEN emp_status_errors1 THEN ROLLBACK;
dbms_output.put_line ( 'Employee No: ' || v_emp_no || ' has been found but has no assignment id2!') ;
WHEN emp_status_errors2 THEN ROLLBACK;
dbms_output.put_line ( 'Employee No: ' || v_emp_no || ' Assgnmnt Obj Vers No is not being passed!');
WHEN NO_DATA_FOUND THEN ROLLBACK;
err_num := TO_CHAR (SQLCODE);
err_msg := SUBSTR (SQLERRM, 1, 150);
err_line := 'ORACLE error occurred processing record.. ' || err_msg;
DBMS_OUTPUT.PUT_LINE (err_line);
INSERT INTO SU_ERROR_LOG VALUES (err_msg, 'TEMPLOYEE_DTLS.sql', SYSTIMESTAMP);
WHEN OTHERS THEN ROLLBACK;
err_num := TO_CHAR (SQLCODE);
err_msg := SUBSTR (SQLERRM, 1, 150);
err_line := 'ORACLE error occurred processing record.. ' || err_msg;
DBMS_OUTPUT.PUT_LINE (err_line);
INSERT INTO SU_ERROR_LOG VALUES (err_msg, 'TEMPLOYEE_DTLS.sql', SYSTIMESTAMP);
END;
EXIT;Many thanks..
Stevenmany thanks for your help user11181328 but because its just a SQL script I thought an alternative was to create 2 cursors in the same script to get the date..:
1st cursor to -- 1. First get the assignment id of the subordinate. (emp_rec.assignment_id)
..and then 2nd to: get the start date of the supervisor's record (v_emp.std_supervisor_id)
-- Cursor to get Oracle_Loc_Code from SU CHRIS vs ORACLE Locations Table into a variable..
CURSOR csr_ora_loc_code (cp_location_id IN SU_TEMPLOYEE_DETAILS.std_location_id%TYPE)
IS
SELECT sil.ORACLE_LOC_CODE
FROM SU_TEMPLOYEE_DETAILS std, SU_IEXP_LOCATIONS sil
WHERE std.STD_LOCATION_ID = sil.CHRIS_LOC_code
AND std.STD_LOCATION_ID = cp_location_id;
-- Cursor to get the start date of the supervisor's record based
-- on the assignment id of the subordinate (employee)
-- 1. First get the assignment id of the subordinate. (emp_rec.assignment_id)
CURSOR c_sprvsrid_ofemp (p_emp_number VARCHAR2)
IS
SELECT paas.assignment_id -- per.EMPLOYEE_NUMBER
FROM per_all_people_f per, per_assignments_f paas
WHERE
paas.person_id = per.person_id
AND per.employee_number = p_emp_number;
sprvsr_rec c_sprvsrid_ofemp%ROWTYPE;
-- 2. from this get the start date of the supervisor's record (v_emp.std_supervisor_id)
CURSOR c_sprvsr_strt_dte (p_emp_number VARCHAR2)
IS
SELECT paas.effective_start_date
FROM per_all_people_f per, per_assignments_f paas
WHERE
paas.person_id = per.person_id
AND per.employee_number = paas.assignment_number
--AND paas.assignment_id = sprvsr_rec.SUPERVISOR_ID;
AND paas.assignment_id = sprvsr_rec.assignment_id;
ssdate_rec c_sprvsr_strt_dte%ROWTYPE;
-- 3. then take this start date in [2] and give it to the start date of the assignment for the subordinate....then in the main section..
-- Get that bloody Supervisors start date!!
OPEN c_sprvsrid_ofemp (emp_rec.employee_number);
FETCH c_sprvsrid_ofemp INTO sprvsrid_ofemp;
-- IF c_sprvsrid_ofemp%NOTFOUND THEN RAISE NO_DATA_FOUND; END IF;
CLOSE c_sprvsrid_ofemp;
OPEN c_sprvsr_strt_dte (emp_rec.employee_number);
FETCH c_sprvsr_strt_dte INTO v_sprvsr_strt_dte;
-- IF c_sprvsr_strt_dte%NOTFOUND THEN RAISE NO_DATA_FOUND; END IF;
CLOSE c_sprvsr_strt_dte;Alas, although it seemed written out to work, the same error message was generated when ran. I have honestly no idea how to get around this. Metalink acknowledge its a problem but have placed it as an 'Enhancement Request', meaning of course, don't wait up for a fix anytime this year..
Steven -
Reading dates from infotype 41
I need to obtaint a subtype of date from infotype 41 but the problem is that infotype 41 has many fields like
dar01 - dat01, dar02 - dat02, darN - datN the subtype that I need is the '01' but I don't know how to get it becuase sometimes is in the dar01, or in the dar02, or darN, is there any function module that can help me?
Thanx in advanceHi ,
This exactly what you are trying to do
*--Decleare internal table
TYPES : BEGIN OF ty_pa0041,
pernr TYPE pa0041-pernr,
dar01 TYPE pa0041-dar01,
dat01 TYPE pa0041-dat01,
dar02 TYPE pa0041-dar02,
dat02 TYPE pa0041-dat02,
dar03 TYPE pa0041-dar03,
dat03 TYPE pa0041-dat03,
dar04 TYPE pa0041-dar04,
dat04 TYPE pa0041-dat04,
END OF ty_pa0041.
DATA : lt_pa0041 TYPE STANDARD TABLE OF ty_pa0041,
ls_pa0041 TYPE ty_pa0041.
*--Read Secondment end date ( For my case it's RG)
SELECT pernr
dar01 dat01 dar02 dat02 dar03 dat03 dar04 dat04
INTO TABLE lt_pa0041
FROM pa0041
WHERE pernr = gs_final-pernr AND
endda = '99991231'.
*--Find out corrosponding date according to 'RG'
LOOP AT lt_pa0041 INTO ls_pa0041.
IF ls_pa0041-dar01 = 'RG'.
lv_date1 = ls_pa0041-dat01.
ELSEIF ls_pa0041-dar02 = 'RG'.
lv_date1 = ls_pa0041-dat02.
ELSEIF ls_pa0041-dar03 = 'RG'.
lv_date1 = ls_pa0041-dat03.
ELSEIF ls_pa0041-dar04 = 'RG'.
lv_date1 = ls_pa0041-dat04.
ENDIF.
ENDLOOP.
I hope it fits your requirement -
Read several 2D Arrays out of lvm file
Hello,
for my data aquisition, I join three 1-D Arrays to a 2D array. I then save several of these 2D Arrays to a lvm file, until it exceeds 500kb. Here I ues the "write to measurement" express VI. When I'm trying to read the data I encounter a problem:
the "read from measurement file" express vi, seems to only give out the first 2D Array, that is in the file! Each 2D Array holds 75 values for every channel. I checked the content by dragging and dropping the file to Excel and the notepad. I can then see all the arrays, I saved in the file, and not only the first one. I tried to adjust the options in the "read from measurement file" VI as well, but nothing seems to help.
I attached an example lvm file and my reading VI.
It would be very nice if somebody could help
Simon
Solved!
Go to Solution.
Attachments:
Datenauswertung.vi 52 KB
example file.zip 68 KBHi
I'm not really sure which way you want to read out the data.
Do the different 2D Array all belong together, meaning that the 2nd array is just a continuation of the first?
If this is the case, you could select "Segment Headers">"No Headers" in the "Write to measurement file" VI.
Then, in the "Read from measurement file" select: Read generic text file, and set the parameters accordingly.
Use the "Read File now" function to test the set parameters.
Further you may have to change the indices for the Index Array in your VI.
However, this method has the obvious drawback of loosing the header information.
Alternatively, you can save the data in a tdms file, instead of a lvm file. Here the headers are handled better.
Select "One header only" in the write to measurement file. When your then read out the data, it automatically will read out all data.
And you keep the information of at least the first header.
If each 2D Array should be read out separately, you should use a different approach. Please let me know, if this is the case and I will explain further.
Kind regards,
Corinne Doppmann
Applications Engineer
National Instruments -
Function to read wagetypes from infotype 589
Dear Experts,
Is there any function to get all wagetypes along with respective amounts from infotype 0589.
Right now am using function 'HR_READ_INFOTYPE'
and read statement to get wagetypes.because it is stored various fields like lga01,lga02..
and bet01,bet02..
plz let me is there any alternative..
Thanks in advance.
Regards
sivaHi,
Through Transaction SE16 you can download records of IT0589
Table is PA0589
Regards,
Devojit -
Reading Qfield for infotype 208
Hi Experts..
i need to read the Qfield for infotype 0208 ... please suggest how to do this..
Thanks & Regards
Ashu SInghProblem is solved..
-
HR userexit for changes to employee infotype
I would like to add a function module to a few infotypes to invoke a bapi on the save to that info type. Which user exits should I put my function mod in when say infotypes pa0001,0002,0006,0105 are changed.
Example code from ZXPADU01/02 for ECC6.0
when '0001'.
if i0001-begda ge '20060401'.
MOVE innnn TO i0001.
call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
exporting
prelp = innnn
importing
pnnnn = i0001.
do what ever you want to here.........
case P0001-BUKRS.
when 10.
do condition 10
when 20
do condition 20
when others.
endcase
MOVE i0001 TO innnn.
call method cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
exporting
pnnnn = i0001
importing
prelp = innnn.
Maybe you are looking for
-
Hi , We are working on BO on top of BW pilot version and finding different issues with different tools. 1) Used existing BW queries/created universe.When we run the report using Web Intelligence, not able to get the way Hierachies displays in BEx.(Tr
-
Matrix Option in Crystal Reports?
Hi I used to work with Crystal for a long time before using Microsoft Reporting Services at my next job. I have now started another job that uses Crystal Reports 2010. I am having a problem trying to do something that is very easy to do in Reporting
-
Running ldifmigrator/ldapadd from remote machine
Hi, I installed Infra with OID on machine-1. I am now trying to run ldifmigrator on machine-2 while doing a lookup on the oid on the first machine. Is there some problem with this ? The command works fine when I run it locally on machine-1. The comma
-
My safari will not open and it is stating that it has quit unexpectedly help!!!
-
T440p 20AWS02A00 and (Arch)Linux compatibility
I will buy the T440p. I really want to use Arch on it. But I am not sure if the harware compomponents are well supported. Has anybody ever used Arch on a machine like that? I am not an expert in linux' driver support stuff. So it would be pretty nice