How to use HR_MAINTAIN_MASTERDATA to terminate an employee
Greetings experts:
I'm working on an inbound interface that, among other things, can terminate an employee. I'm new to ABAP and so it was recommended to me early on to record PA40 for this action. That seemed to be working great until they added a new action and the index position recorded by SHDB no longer was accurate. I tried reproducing the list in PA40 using some queries but that didn't work either.
So now I've been asked to use HR_MAINTAIN_MASTERDATA. I understand the basics of how this FM works but I'm not sure how to relate what the recording was doing to this function module. The recording touched 3 infotypes: 0000, 0001 and 0378. Some of the fields were defaulted on the screen so I didn't need to provide them in the BDC code, i.e., "PSPAR-WERKS", etc. Now that I'm having to "manually" setup these infotypes I don't know what values I can omit and which absolutely must provide.
Can I use the code from the recording as a guide? In other words, if I didn't record a field because it was being defaulted will it also be defaulted if I use HR_MAINTAIN_MASTERDATA?
Many thanks and Merry Christmas to all.
Yes, Steve, HR_MAINTAIN_MASTERDATA is basically a FM that reproduces PA40. I use this FM for all the interfaces that require measures and besides some bug or two, the FM works perfectly, be it for the hiring or firing measures. Like PA40, when you fill the MASSN field, the FM will go through every infotype that is specified in that infogroup and will fill each infotype with the default values unless you pass them in the PROPOSED_VALUES table. For the values to pass, it's pretty simple as well, all you need is the name of the field (in the PA structure and not the screen name like in Batch Input) and the value you want to pass. Here is a sample code for you ...
Also, you can even use the parameter DIALOG_MODE to make the input visible so you can see if some strange error occurs, you can see exactly what it is, just use DIALOG_MODE = '2' for visible.
data: return type bapiret1.
data: w_pernr type p0001-pernr,
w_pnalt type p0032-pnalt,
w_begda type p0001-begda,
w_massg type p0000-massg,
w_retcode type sy-subrc,
w_dial type c.
clear : w_massg.
w_massg = '01'.
if NOT P_MASSG IS INITIAL.
w_massg = p_massg.
endif.
LOOP AT P_TAB.
clear : wa_proposed_values, proposed_values, t_output.
free proposed_values.
* Caso o motivo não venha do ecran de seleccao entao fica 01
* Preencher os dados para cada infotipo usando a tabela "proposed_values"
*** Dados Infotipo 0000
wa_proposed_values-infty = '0000'.
wa_proposed_values-fname = 'P0000-MASSG'.
wa_proposed_values-fval = w_massg.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0000'.
wa_proposed_values-fname = 'PSPAR-PERSG'.
wa_proposed_values-fval = P_TAB-PERSG.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0000'.
wa_proposed_values-fname = 'PSPAR-PERSK'.
wa_proposed_values-fval = P_TAB-PERSK.
append wa_proposed_values to proposed_values.
*** Dados Infotipo 0016
wa_proposed_values-infty = '0016'.
wa_proposed_values-fname = 'P0016-CTTYP'.
wa_proposed_values-fval = P_TAB-CTTYP.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0016'.
wa_proposed_values-fname = 'P0016-CTBEG'.
wa_proposed_values-fval = P_TAB-CTBEG.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0016'.
wa_proposed_values-fname = 'P0016-CTEDT'.
wa_proposed_values-fval = P_TAB-CTEDT.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0016'.
wa_proposed_values-fname = 'P0016-PRBZT'.
wa_proposed_values-fval = P_TAB-PRBZT.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0016'.
wa_proposed_values-fname = 'P0016-PRBEH'.
wa_proposed_values-fval = P_TAB-PRBEH.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0016'.
wa_proposed_values-fname = 'P0016-EINDT'.
wa_proposed_values-fval = P_TAB-EINDT.
append wa_proposed_values to proposed_values.
*** Dados Infotipo 0001
wa_proposed_values-infty = '0001'.
wa_proposed_values-fname = 'P0001-BTRTL'.
wa_proposed_values-fval = P_TAB-BTRTL.
append wa_proposed_values to proposed_values.
* wa_proposed_values-infty = '0001'.
* wa_proposed_values-fname = 'P0001-PERSG'.
* wa_proposed_values-fval = P_TAB-PERSG.
* append wa_proposed_values to proposed_values.
* wa_proposed_values-infty = '0001'.
* wa_proposed_values-fname = 'P0001-PERSK'.
* wa_proposed_values-fval = P_TAB-PERSK.
* append wa_proposed_values to proposed_values.
*** Dados Infotipo 0002
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-ANRED'.
wa_proposed_values-fval = P_TAB-ANRED.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-CNAME'.
wa_proposed_values-fval = P_TAB-CNAME.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-VORNA'.
wa_proposed_values-fval = P_TAB-VORNA.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-NACHN'.
wa_proposed_values-fval = P_TAB-NACHN.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-GBDAT'.
wa_proposed_values-fval = P_TAB-GBDAT.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-GBLND'.
wa_proposed_values-fval = P_TAB-GBLND.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-GBORT'.
wa_proposed_values-fval = P_TAB-GBORT.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0336-COUBI'.
wa_proposed_values-fval = P_TAB-COUBI.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0336-PARBI'.
wa_proposed_values-fval = P_TAB-PARBI.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-GESCH'.
wa_proposed_values-fval = P_TAB-GESCH.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-NATIO'.
wa_proposed_values-fval = P_TAB-NATIO.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-FAMST'.
wa_proposed_values-fval = P_TAB-FAMST.
append wa_proposed_values to proposed_values.
wa_proposed_values-infty = '0002'.
wa_proposed_values-fname = 'P0002-ANZKD'.
wa_proposed_values-fval = P_TAB-ANZKD.
append wa_proposed_values to proposed_values.
*** Função HR_MAINTAIN_MASTERDATA
* Perform PA40 via Maintain_masterdata
clear w_dial.
if p_modo = 'X'.
w_dial = '2'.
endif.
call function 'HR_MAINTAIN_MASTERDATA'
EXPORTING
massn = 'CD'
* massg = w_massg
actio = 'INS'
begda = P_TAB-EINDA
werks = P_TAB-WERKS
plans = P_TAB-PLANS
dialog_mode = w_dial
IMPORTING
return1 = return
TABLES
proposed_values = proposed_values.
if not return is initial.
CONCATENATE return-message_v1 return-message_v2 into t_output-mensagem.
else.
t_output-mensagem = 'Medida E1 criada com sucesso'.
endif.
ENDLOOP.
Edited by: Pedro Guarita on Dec 22, 2008 5:10 PM
Similar Messages
-
Could i use 'HR_MAINTAIN_MASTERDATA' to create new employee ?
Dears
it seems using PA40 to create new employee.
i just want to create simple person with infotype 0000, but when i using 'HR_MAINTAIN_MASTERDATA' it will automitically jump into new screen of new infotype such as 0001 without push saving button the same as i use PA40.
How could i control the screen sequence ?Hi,
You cannot create Employees using this FM HR_MAINTAIN_MASTERDATA. This FM can be used to maintain infotypes AFTER an employee/applicant has been created in SAP(pa40).
i think there are no FMs to create Employees. There are FM's to create,update,delete,delimit etc other infotypes but IT0000(actions) Need to be performed either using PA40 or thru other mass data entry precedures like LSMW etc. where Recording of a transaction is performed.
and coming to the jumping of screens u mentioned, it is initiated by Infogroups, where the sequence of infotypes to be maintained while performing an action are defined.
you can remove the infotypes you dont want to maintain by identifying the infogroup and deleting it from there.
also for this FM 'HR_MAINTAIN_MASTERDATA' the important import parameter itself is PERNR? how are u using this FM to create an employee?
any special reason why u wanna use a Function module to create an employee?
Message was edited by:
Hruser -
Not able to un lock the pernr after using HR_MAINTAIN_MASTERDATA
Hi,
We using HR_MAINTAIN_MASTERDATA to create new employee.its working fine, we need to create A008 relation then we try to unlock the employee id using HR_EMPLOYEE_DEQUEUE not able to unlock.Ii tried all the other Function modules used for unlock the employee ,but no luck, any one has faced same issue, please let me any thing can done to unlock the employee.
Thanks
GopalHI,
Got to t-code :SM12 give the your user name and click on list (icon).
Select all the enteries and click on delete..
For Master DATa.
Go to pa30 -select Infotype -0003 and click on change and Remove the Tick mark for the filed PERS.NO.Locked
All the best. -
How to know "pernr" after creation of employee with HR_MAINTAIN_MASTERDATA
Hello,
Anybody any idea how you can know the pernr of the employee you created with HR_MAINTAIN_MASTERDATA?
Problem I am facing:
I create a new employee using HR_MAINTAIN_MASTERDATA.
As I do not have all information required yet, I only update/insert IT0000.
(otherwise the program asks me to "Fill in all required fields")
Then I want to fill up the other IT with HR_INFOTYPE_OPERATION, but I don't know the number that was created.
Can anybody help me?
Thanks.Have you checked the exporting parameter from the fm call?
EXPORTING
*" VALUE(RETURN) LIKE BAPIRETURN STRUCTURE BAPIRETURN
*" VALUE(RETURN1) LIKE BAPIRETURN1 STRUCTURE BAPIRETURN1
*" VALUE(HR_RETURN) LIKE HRHRMM_MSG STRUCTURE HRHRMM_MSG
a® -
We have a corporate iPad in our auto showroom to show guests how to use features on their vehicles. Someone locked it with their account. It was not an employee. How can I get in? I did a restore of the software already?
Gather up the proof that the dealership is the original purchaser of the iPad,
and take the iPad & that proof to a physical Apple store for possible assistance.
It is highly suggested that you make a genius bar appointment to avoid delay
at the store:
Make a Genius Bar Reservation
http://www.apple.com/retail/geniusbar/
If no Apple store close by, get the information mentioned above and contact
Apple Contact Us for assistance.
Once the problem is resolved, you may wish it use Guided Access to limit
what customers can do with the iPad.
iOS: About Guided Access - Apple Support -
How to set Q0000-RFPNR using HR_MAINTAIN_MASTERDATA
Greetings all!
I am using HR_MAINTAIN_MASTERDATA to do a new benefits participant into the system. It works fine until I need to find a reference personnel number (using the SSN of the record I'm trying to setup) and set it on the IT0000 screen during the action. I'm creating a table of proposed values and using "Q0000-RFPNR" as the field name and the pernr I find as the value:
lv_proposed_value-infty = gc_infty0000_action.
lv_proposed_value-fname = 'Q0000-RFPNR'.
lv_proposed_value-fval = lv_refnr.
append lv_proposed_value to lt_proposed_values.
However, when HR_MAINTAIN_MASTERDATA executes I get an error saying that the "Social Insurance Number is already assigned to another employee". Of course I know this but I need it to create the participant anyway with that other pernr in Q0000-RFPNR.
I don't know if this matters but the field on IT0000 (Q0000-RFPNR) is a SELECT-OPTIONS type of field so I don't know if that will require filling it out differently or not.
Any suggestions?The short answer is "you can't" so I'm having to revert back to BDC.
-
How to Generate a new PERNR using HR_MAINTAIN_MASTERDATA in WD?
Hi Experts;
Can I get some sample code for creating a new PERNR using HR_MAINTAIN_MASTERDATA FM. ???!!!
I've created a some input fields in webdynpro using infotype PA0002 and depending upon those fields I want to generate a PERNR number .
Plz help me with some sample code ..
Thanks in Adv.
Buntywhat am I missing in the below code ??? is the code correct ??? Using the below code how will I get the new PERNR value ??
method ONACTIONSAVE .
DATA lo_nd_final_node TYPE REF TO if_wd_context_node.
DATA lo_el_final_node TYPE REF TO if_wd_context_element.
DATA ls_final_node TYPE wd_this->element_final_node.
DATA lv_inits LIKE ls_final_node-inits.
DATA lv_nachn LIKE ls_final_node-nachn.
DATA lv_vorna LIKE ls_final_node-vorna.
DATA lv_titel LIKE ls_final_node-titel.
DATA lv_gesch LIKE ls_final_node-gesch.
DATA lv_natio LIKE ls_final_node-natio.
DATA lv_famst LIKE ls_final_node-famst.
DATA lv_gbpas LIKE ls_final_node-gbpas.
DATA lv_stras LIKE ls_final_node-stras.
DATA lv_ort01 LIKE ls_final_node-ort01.
DATA lv_pstlz LIKE ls_final_node-pstlz.
DATA lv_telnr LIKE ls_final_node-telnr.
DATA lv_locat LIKE ls_final_node-locat.
DATA lv_usrid LIKE ls_final_node-usrid.
* navigate from <CONTEXT> to <FINAL_NODE> via lead selection
lo_nd_final_node = wd_context->get_child_node( name = wd_this->wdctx_final_node ).
* get element via lead selection
lo_el_final_node = lo_nd_final_node->get_element( ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `INITS`
IMPORTING
value = lv_inits ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `NACHN`
IMPORTING
value = lv_nachn ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `VORNA`
IMPORTING
value = lv_vorna ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `TITEL`
IMPORTING
value = lv_titel ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `GESCH`
IMPORTING
value = lv_gesch ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `NATIO`
IMPORTING
value = lv_natio ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `FAMST`
IMPORTING
value = lv_famst ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `GBPAS`
IMPORTING
value = lv_gbpas ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `STRAS`
IMPORTING
value = lv_stras ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `ORT01`
IMPORTING
value = lv_ort01 ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `PSTLZ`
IMPORTING
value = lv_pstlz ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `LAND1`
IMPORTING
value = lv_land1 ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `LOCAT`
IMPORTING
value = lv_locat ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `TELNR`
IMPORTING
value = lv_telnr ).
* get single attribute
lo_el_final_node->get_attribute(
EXPORTING
name = `USRID`
IMPORTING
value = lv_usrid ).
DATA lv_new_pernr LIKE ls_final_node-new_pernr.
* get single attribute
lo_el_final_node->SET_attribute(
EXPORTING
name = `NEW_PERNR`
IMPORTING
value = lv_new_pernr ).
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
* EXPORTING
* PERNR = '00000000'
* MASSN =
* ACTIO = 'INS'
* TCLAS = 'A'
* BEGDA = SY-DATUM
* ENDDA = '99991231'
* OBJPS =
* SEQNR =
* SPRPS =
* SUBTY =
* WERKS =
* PERSG =
* PERSK =
* PLANS =
* DIALOG_MODE = '0'
* LUW_MODE = '1'
* NO_EXISTENCE_CHECK = ' '
* NO_ENQUEUE = ' '
* IMPORTING
* RETURN =
* RETURN1 =
* HR_RETURN =
TABLES
proposed_values =
* MODIFIED_KEYS =
endmethod. -
Insert or modifying employee status in pa0000 using HR_MAINTAIN_MASTERDATA
hi abapers
i am using HR_MAINTAIN_MASTERDATA to insert or modify employee status (pa0000-stat1).
IN HR_MAINTAIN_MASTERDATA there is return statement. and i am giving BAPIRETURN1.and pass data to proposed_values table.
when i check return iIS iNITIAL or not. return is coming initial. what does it mean??
actually i am new in HR module. plz help
thanks
SachinIf you paste the code where you call the Function Module it will help. You don't pass anything to Return, this is where the system places the information after you call the Function Module. If Return-Type is ' ' or Return-Type = 'I', it should indicate that the function module did what you wanted.
-
In mdx how to get max date for all employees is it posible shall we use group by in mdx
in mdx how to get max date for all employees is it posible shall we use group by in mdx
example
empno ename date
1 hari 12-01-1982
1 hari 13-06-2000
by using above data i want to get max dataHi Hari3109,
According to your description, you want to get the max date for the employees, right?
In your scenario, do you want to get the max date for all the employees or for each employee? In MDX, we have the Max function to achieve your requirement. You can refer to Naveen's link or the link below to see the details.
http://www.sqldbpros.com/2013/08/get-the-max-date-from-a-cube-using-mdx/
If this is not what you want, please provide us more information about the structure of you cube, so that we can make further analysis.
Regards,
Charlie Liao
TechNet Community Support -
How to lock down the ipad for employee use
I would like to know if they is any app or something that I can use to lock the ipad down for small business use.
The last thing I want is my employees checking their facebook on my ipads.What's the need for a business plan thousands of people buyt touch pads and computers every day and don't know how to use them. More or less they end up being paper weights. Beside the restrictions are instented to stop misuse. And who said he didn't have a business plan. the ipads replace pen and paper and so employee enter information directly into the server. This lets the employee be mobile and still do their work. It's being done in places all around the world. Ipad is an computer for the most part.
U going to tell me he should not use computers next? Maybe he should enter track important information at all?
it's funny how one question of how do I restrict access on an ipad turns into an inquisition.
Name any major corporation that let's their employee do whatever they want on their computers? Name a College?
That's why these companies build in this security stuff any way. You are protecting your investment by taking the proper steps to make sure that the equiptment is not misused. Where do you work where your Boss let's you do whatever you want on his or her computer. Play games? Get viruses?
You seem to making some kind of special assumptions because it's a ipad.
Same this goes for printers, copying machines, and coffee machines. You never give people unlimited access to any thing unless you wan to call the service man 20 times a week. -
Help! How to use pay_element_link API
Hi all,
I am developing HRMS Interface to transfer employee element data from other system into EBS. And I want to use Pay element Link API to implement the requirement.
The requirement is:
1. Using the primary key of NATIONAL_IDENTIFIER_NUMBER (ssn) check to see if the employee exists as an active employee in Oracle.
2. Validate that the Element is a valid element and retrieve the Benefit Type from the DFF (ELEMENT_INFORMATION11). If the element is invalid or does not have a Benefit Type defined, flag the record as ‘REJECTED’ and write the error to the log file and move to next record in staging.
3. If the employee has another active element assigned for the same Benefit Type, using the API’s terminate the existing element for that Benefit Type.
4. Using the API’s add the new element to the employee with the appropriate element entries.
5. Flag the status of the record in staging to ‘PROCESSED’.
The step1 and step2 is logic adjustment. And I have finished them. Next I will finish 3,4 and 5. The fifth step is easy to approach. I can not do 3 and 4 for I do not konw how to use the pay_element_link_API. And I know the 3 wiil use PAY_ELEMENT_LINK_API.update_element_link, the 4 step will use PAY_ELEMENT_LINK_API.CREATE_ELEMENT_LINK. But the most difficult is I do not konw what to pass the parameter to update_element_link and create_element_link. I do not know the meaning of the two procedure's parameter.
When the element has many entry values, how to import these entry value into the EBS. For example, an element names 'Retirement Plan' and the element has a input value names 'Amount' and the value is 80$. So I want to know how to import the 80$ into EBS by the API. Just means, the 80$ will pass to which one parameter in the create_element_link or update_element_link.
Please give me some ideas. Thank you so muchOn troubleshooting the HR api's you can use the pyupip logging mechanism . This would allow you to pinpoint what stored procedure section is being executed when the error ocurred.
set serveroutput on
spool trace.log
begin
hr_utility.set_trace_options ('TRACE_DEST:DBMS_OUTPUT');
hr_utility.trace_on;
-- your code here
hr_utility.trace_off;
Exception
when others then
dbms_output.put_line(sqlerrm);
hr_utility.trace_off;
END;
spool off -
Please kindly help ,
how to delete infotype using HR_MAINTAIN_MASTERDATA or HR_INFOTYPE_OPERATION?
i did try to use HR_INFOTYPE_OPERATION but return code shown as :
"No data stored for 0003 in the selected period"
but when i try using HR_MAINTAIN_MASTERDATA.
Return code was zero, and infotype 0000 still exist.
regards,
Rudy.Here you go Rudy
Loopt at the your internal table. Lock the user, post or delete the record, unlock the user.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
number = t_file-pernr
IMPORTING
return = t_return
locking_user = w_uname.
IF t_return-number IS NOT INITIAL.
t_return-message_v1 = t_file-pernr.
APPEND t_return.
g_fail = g_fail + 1.
g_flag = 'X'.
ELSE.
CLEAR: t_return, personaldatakey.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '2006'
number = t_file1-pernr
subtype = t_file1-subty
validityend = t_file1-endda
validitybegin = t_file1-begda
record = p2006
operation = 'DEL'
dialog_mode = '1'
nocommit = ' '
IMPORTING
return = t_return
key = personaldatakey.
IF t_return-number IS NOT INITIAL.
t_return-message_v1 = t_file-pernr.
APPEND t_return.
g_fail = g_fail + 1.
g_flag = 'X'.
ELSE.
MOVE-CORRESPONDING t_file TO t_file1.
APPEND t_file1.
g_success = g_success + 1.
ENDIF.
"Unlock the employee
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = t_file-pernr
IMPORTING
return = t_return.
Please award points if useful.
Thanks, Raj -
How to use an if statement in javascript code
Hello,
I have a batch processing script to search for text "employee signature" on each page in a multiple page file and to then list in the console any pages that do not have the "Employee Signature" text included.
The script is not yet functional as an if statement needs to be included.
Can anyone please advise how to use an if statement in javascript code?
var numpages = this.numPages;
for (var i=0; i < numpages; i++)
search.query("Employee Signature", "ActiveDoc");
console.println('Pages that do not include an employee signature: ' + this.pageNum +' ');
Any assistance will be most appreciated.Thank you very much for your assistance try.
I have modified the code as suggested and the page numbers are now listing correctly, thank you, but....................,
The console lists every page as having an "employee signature" when there are pages in the document that do not have an employee signature.
The code (revised as follows) is not processing the "getPageNthWord part of the statement" in the console report?
Can you please advise where the code needs reworking?
var ckWords; // word pair to test
var bFound = false; // logical status of found words
// loop through pages
for (var i = 0; i < this.numPages; i++ ) {
bFound = false; // set found flag to false
numWords = this.getPageNumWords(i); // number of words on page
// loop through the words on page
for (var j = 0; j < numWords; j++) {
// get word pair to test
ckWords = this.getPageNthWord(i, j) + ' ' + this.getPageNthWord(i, j + 1); // test words
// check to see if word pair is 'Employee' string is present
if ( ckWord == "Employee") {
bFound = true; // indicate found logical value
console.println('Pages that includes an employee signature: ' + (i + 1) +' ');
break; // no need to further test for this page
} // end Employee Signature
} // end word loop
// test to see if words not found
if(bFound == false) {
console.println('Pages that do include an employee signature: ' + (i + 1) +' ');
} // end not found on page
} // end page loop
Thank you -
How to use tree tables with CRUD operation for begineers ADF 11g
This is Friday night call for help.
This is only few sample ressources on the web for tree table and only one with CRUD operation.
I used this one http://jobinesh.blogspot.com/2010/05/crud-operations-on-tree-table.html because this is the only one that address CRUD.
And it is shaky. Deletion works fine but insertion not very well. This is working using custom code provided below.
Depending if the user selection in the tree, the code insert from the master node to the children node.
Any other options because it is not working well.
Also where Oracle describes how to use the row, rowset, itorator API? This is really hard to understand like almost if we should not use it.
then if not how can I insert in tree with two nodes and insert in the parent or children depending the users selection.
Lately I 'been posting questions on this forum with no response. This hurts. I understand developers cannot spend their time on this but People from Oracle, please help. We pay licenses...
public void createChildren(RowIterator ri, Key selectedNodeKey) {
final String deptViewDefName = "model.DepartmentsView";
final String empViewDefName = "model.EmployeesView";
if (ri != null && selectedNodeKey != null) {
Row last = ri.last();
Key lastRowKey = last.getKey();
// if the select row is not the last row in the row iterator...
Row[] found = ri.findByKey(selectedNodeKey, 1);
if (found != null && found.length == 1) {
Row foundRow = found[0];
String nodeDefname =
foundRow.getStructureDef().getDefFullName();
if (nodeDefname.equals(deptViewDefName)) {
RowSet parents =
(RowSet)foundRow.getAttribute("EmployeesView");
Row childrow = parents.createRow();
parents.insertRow(childrow);
} else {
RowSet parents =
(RowSet)foundRow.getAttribute("EmployeesView");
Row childrow = parents.createRow();
childrow.setAttribute("DepartmentId",
foundRow.getAttribute("DepartmentId"));
parents.insertRow(childrow);
} else {
System.out.println("Node not Found for " + selectedNodeKey);
}I am looking for a sample that describe how to design a jsf page with a tree table.
So you have Department and employees. In the tree first comes Department and if you click the node you see the employees assigned to this department.
I need to be able to insert a new department or a new employee from the tree table by clicking on a insert button in the panel collection toolbar depending on user selection in the tree.
I got part of it working but not good enough.
By problem is the get insertion working
I have a createChildren method in my AM implementation that get in input a RowIterator and selected node key.
To goal is to create new records depending of the user selection and the input parameters get populated by the binding like this:
#{backing_treeSampleBean.selectedNodeRowIterator} #{backing_TreeSampleBean.selectedNodeRowkey} via method binding with parameters.
Is it the right approach?
First to be able to insert a parent record, I select nothing in the tree and ri and selectedNodeKey comes to null
we run this code
ViewObjectImpl vo = getSchHolidaySchedExceptionsView1();
//ViewObjectImpl vo = getDepartmentsView1();
Row foundRow = vo.first();
Row childrow = vo.createRow();
vo.insertRow(childrow);
A new blank entry appears in the parent node and we enter a value.
The the problem starts when we want to add a child to this parent.
We select the created parent and press the insert button, this code get executed
if (nodeDefname.equals(deptViewDefName))
//list of the children of the parent and create an new row
RowSet childRows = (RowSet)foundRow.getAttribute("SchHolidayExceptionDatesView");
Row childrow = childRows.createRow();
childRows.insertRow(childrow);
But the new entry does not appear, it is almost like it would be created for a different parent because this is a mandatory field that is not feel in yet and the interface complaints of a missing value. It is created somewhere just not a the right place... This is my guess.
Do you see something wrong with the code?
The full code og my create children method is there below
I am using jdeveloper 11.1.1.3.0 any issues with tree table to know about with this version?
Thanks for your help
public void createChildren(RowIterator ri, Key selectedNodeKey) {
final String deptViewDefName = "com.bcferries.app.pdfroutesched.model.SchHolidaySchedExceptionsView";
final String empViewDefName = "com.bcferries.app.pdfroutesched.model.SchHolidayExceptionDatesView";
if (ri != null && selectedNodeKey != null) {
// last row
Row last = ri.last();
Key lastRowKey = last.getKey();
// if the select row is not the last row in the row iterator...
Row[] found = ri.findByKey(selectedNodeKey, 1);
if (found != null && found.length == 1) {
// foundRow is the row selected
Row foundRow = found[0];
// The row selected can be the parent node or the child node
String nodeDefname = foundRow.getStructureDef().getDefFullName();
// if parent row
if (nodeDefname.equals(deptViewDefName))
//list of the children of the parent and create an new row
//works but we try to resolve the creation of a parent
RowSet childRows = (RowSet)foundRow.getAttribute("SchHolidayExceptionDatesView");
Row childrow = childRows.createRow();
//childrow.setAttribute("HolidayDate", new java.util.Date().getDate());
System.out.println("insert child row from master");
childRows.insertRow(childrow);
} else
//RowSet ParentRow = (RowSet)foundRow.getAttribute("SchHolidaySchedExceptionsView");
//RowSet childRows = (RowSet)ParentRow.first().getAttribute("SchHolidayExceptionDatesView");
Row childrow = ri.createRow();
System.out.println("insert child row from child ");
} else {
System.out.println("Node not Found for " + selectedNodeKey);
} else {
System.out.println(" param null try creating for first row : " +
ri + " * " + selectedNodeKey);
ViewObjectImpl vo = getSchHolidaySchedExceptionsView1();
Row foundRow = vo.first();
Row childrow = vo.createRow();
vo.insertRow(childrow);
} -
How to get Manager id automatically when Employee Id is given.
How to get Manager id automatically when Employee Id is given.
1) I created a simple BO with two elements namely
1.Employee Id
2.Manager id
How to get employee's first name and last name?
And how will i get manager id automatic when i click employee id in element field.
Anbu.Have you tried to use "APPS.FND_CONCURRENT" API?
http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE
http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE%20BODY
Thanks,
Hussein
Maybe you are looking for
-
My thunderbird is not working out properly on my new computer
I changed computers and added Thunderbird again and transferred my gmail to it so I thought, but I did lose all my folders that I had my emails I wanted to keep. Plus the fact I lost all my address book as well. Also the emails are up the creek on th
-
Urgent help needed in installation
I am trying to inatall Personal Oracle 8.1 on a Microsoft Windows ME. I get an error while i start installation saying: "There was a problem in accessing the staging area. Please make sure the specified values for 'Source' and 'Destination' are valid
-
How to send the url automatically
hello, I want to send the webdav URL of a file in a mail automatically but i don't find the way to do it. A solution?
-
Can i transport the repair Request?
hi, We have a data osurce enhance with Two fields and is tranported to Production. Now again we enhanced the same data source for the Third Field and wriitemn code for tit in Cmod. When enhanceing , it is asking a request and we have given it . Now
-
Define Primary IP on dual homed server
Hi I have a server with 2 NIC i different VLAN's, lets say: Hostname: Server1 Domain: domain.local NIC1 IP: 10.10.10.1 (Domain VLAN) NIC2 IP: 10.10.11.1 (DMZ VLAN) When I'm logged on this server and I do "ping server1.domain.local -4" the answer come