cancel
Showing results for 
Search instead for 
Did you mean: 

AdobeHCM P&F-Able to fill positions dropdown,unable to display values-EP3

former_member181966
Active Contributor
0 Kudos

All,

I am able to populate the positions in drop down . I am seeing the all the positions, now when my form load I have to select one position and populate the rest of the DISPLAY values based on position. E.g. Company code, text , job key , job text . I have generic service which have all the fields . I added them on my form , but when I am choosing position from dropdown , nothing is populating .. I`ve used operation "GET_COMPANY_CODE_FOR_POSITION" . Any clue why ?

I exactly did the following , I am calling script event USER_EVENT_CHECK on CHECK .

But nothing is coming up .

Note : I donu2019t have any button , all I have is dropdown for positions

Please Advice.

Thanks,

Khan

Accepted Solutions (0)

Answers (1)

Answers (1)

ChrisSolomon
Active Contributor
0 Kudos

Ok.....there is a bit of a "trick" to this.

Since you DON'T have a button on the form to "trigger" your user event, you have to make your form "imitate" a button click.

I have done this a LOT. Basically, you can do it the easy way. Have your button on the form, BUT HIDDEN.

Then, in your event for you dropdown box (on change, for example), have that event do two things....

1. via script, it will do the button.mousedown event (this will "set" your user event)

2. via script, it will NEXT do the button.click event (so this will then "fire" the same ol' ISR script that handles the event)

It's pretty easy stuff. Don't complicate it.

former_member181966
Active Contributor
0 Kudos

Still NOT WORKING ...........!!!

Yes , it was easy and a smart way to trigger event . I always knew you are smart guy

Here is what I`ve done

1- Populate dropdown for position via standard service "S_MGRS_POSITIONS" , bind this with SAP_PA with the same name I0001_PLANS.

2- Yaaaay! I can see the position in dropdown great -- Next step

3- Based on the position selected from drop down , I have populate and display 12 fields with their text from OM side .

4- I have created a generic service "ZS_POS_ATTRIBUTES" , import all the fields with their names e.g company code,job key , org unit , cost center , etc etc .. Including "effective date" .

5 - Per you reply I have drop button from ISR library which created all code for me and I commented the script for visible & invisible on FORMREADY. ( Able to hide button )

6- Copy mouse down / click ISR code and plug that in on change EVENT of my dropdown

//Set ISR_EVENT for BAdI processing in backend

$record.CONTROL_PARAM.ISR_EVENT = "USER_EVENT_CHECK"

//Trigger call to backend for BAdI user command processing

ContainerFoundation_JS.SendMessageToContainer(event.target, "submit", "", "", "", "");

7- I have a user event called "USER_EVENT_CHECK " which have all the fields for display including Action , effective date ( thanks a lot for your blog ) help me a lot to understand USER EVENT

8 - Now When I am loading my form via MSS After picking position , it is not doing any thing ( I also put break point for my custom back end service , but it is not stopping at all )

9 - Humm, I thought , lets execute HRASR_TEST_PROCESS to make sure it is populating position F4_HELP value. Guess what , after hitting "F8" Execute , I didnu2019t see any positions F4 , but the moment I clicked "CHECK" , it not only triggers my custom backend service but also come back with positions . I choose one position out of 7 positions and it again went to debugging mode .

Why I am unable to see the values for the slected positions

Please advice .

.

former_member181966
Active Contributor
0 Kudos

Iu2019ve made it work ! Now phase 2 . I have three fields on the form from IT0002 . ( First name , Last name and middle name ) .

I have to read first letter from first name , First letter from middle name , and First letter from last name and concatenate it in IT0105-userid field with Pernr . This is a PRE-hire process and it create pernr during the process and I can see it .

Question Using generic BADI I have to concatenate (First , middle and last name ) , the only missing piece I am not able to see PERNR in generic BADI .

Please advice.

Thanks.

Khan