cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a second event a the return of a previous one?

Former Member
0 Kudos

Hi,

On my form I Have a Button that open the "HRRCF_C_POSITION" webdynpro popup. When I select a position, it populates POSITION_ID and POSITION_TEXT on my form and everything is fine.

I've created a second button that fire a Z Backend that takes the POSITION_ID as an input and then populates several others fields on the form. Then again, everything is fine.

So I just wonder how to automatically fire my Z Backend after the POSITION_ID is changed on the form (avoiding the user to click a second button).

Is there a way to achieve that?

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Well, we have the same thing in another form.  After the selection of the Position in the webdynpro popup, it returns the position AND all the infos about this position, like if the USER_EVENT_POPUP also triggers a Round-Trip...

I have to check this closely...

konchada_saikrishna
Active Participant
0 Kudos

Hi,

What ever the button it is when you need to talk to backend that should be a submit event right.

Below is the code for executing a submit event.

<Absolute path for submit button>.execEvent ("click");

For example: lets say you have the Product_ID populated from an earlier event.

now using this as a input parameter you want to trigger the 2nd event.

Have the 2nd submit button but hidden.

when you have the 1st trigger sucessful with product_id just call the 2nd submit event. Doing so you can still leave the other logic of using the Product_ID as input and respective business logic as it was when the 2nd submit button was designed to be clicked.

Hope this helps you,

Cheers,

Sai

Former Member
0 Kudos

Thanks for your reply!

My first button opens a Webdynpro popup, so where can I trigger the return back to the form and the moment when the POSITION_ID get automatically populated?

My first reflex was to fire my 2nd backend in the "change" event of POSITION_ID, but because it's the system who update it, this event does'nt seem to be trigged.

Any idea?

Former Member
0 Kudos

Hi Emanuel,

I guess you are customizing process HR_MSSRCF_REQUISITION.

I tried to implemented the same thing sometime ago, but could not find a way for this.

If i remembered correctly, after you have select position from pop up, it will not trigger any round trip,example user event "USER_EVENT_CHECK", for you to do some validation on position id selected.

mousedown event

//Set ISR_EVENT for BAdI processing in backend

$record.CONTROL_PARAM.ISR_EVENT = "USER_EVENT_POPUP"

$record.HRASR_FORM_WINDOW.DATA[*].FIELD.value = "HRRCF_C_POSITION"

I would suggest:

- Customise HRRCF_C_POSITION to do validation at WDP level.

- Add a "Check" or "Validate" (any name you like) button on the form, to trigger user event "USER_EVENT_CHECK", if user want to validate the form without click before "check and send".

Hope this helps.

regards,

Xiang Li