cancel
Showing results for 
Search instead for 
Did you mean: 

HCM forms and Processes - Adobe

aakash_neelaperumal2
Active Participant
0 Kudos

Hi,

I am working on HCM forms and processes( not QISRs ). I want to populate a drop down list based on the selection of another dropdown list, how can we acheive this in Adobe forms. Should I go about configuring some back end generic service? if so how will the backend service get triggered based on my selection.. Any idea on this is highly appreciated

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

1.populate first Dropdown with values and when drop down value is changed write a adobe script on chnage method on dropdown element such that it will call back end system( custome generic service .check adode help 2 line of standard code for round trip ).

2.in custome generic service BADI , Fill the second dropdown vlaues by read and passing first dropdown selected value as key value while hitting the table.

3. so every round trip all the " get help vlaues" method will call so second drop down values will fill/fillter automatically based on u r first dropdown selection.

Regards

Malli

aakash_neelaperumal2
Active Participant
0 Kudos

Thanks Mallikarjun,,,, do u have a sample code as to how do I capture value from first dropdown in the generic service and how to populate the fields of second drop down in the generic service.

aakash_neelaperumal2
Active Participant
0 Kudos

Kevin.. Pls help..

Former Member
0 Kudos

Hi

example:- let assunes we having two dropdowns names DD1 and DD2.. these two dropdown values are comming from a one generic service( we need write code under get_ help_ values method as it is a more than one value .)

for better clarity split code into 2 private methods same as input and out parameter as get_help_values method.

so 2 private methods names F4_DD1 and F4_DD2.

method1:- F4_DD1

write the normal logic to fill DD1 value.

method2:- F4_DD2

read DD1 value through service data sets

if DD1 value not initialize

write the code to fill DD2 values based on DD1 selected value as key

else

exit.

call these two private methods in get_value_ help method.

so when first time form load will call F4_DD1 and F4_DD2 but only DD1 values shown because in DD2 dropdown values depend on DD1 selection, so first time no selection on DD1, if condition fails in method F4_DD2 .

when round trip happen( selected one value from DD1) this time F4_DD1 and F4_DD2 will execute and DD2 value fill because u made a selection on DD1, in F4_DD2 method if condition pass DD2 values fill.

Regards

Malli

Edited by: mallikarjuna pasupulati on Jan 31, 2009 6:52 AM

aakash_neelaperumal2
Active Participant
0 Kudos

Hi,

I have a button in the form, when I click the button it has to read the effective date on the form and get the vacant positions under the manager.. I have declared a backend service and declared an operation in that by name GET_VACANT_POSITIONS, should I write the script code like what is shown below. Please clarify

//Set ISR_EVENT for BAdI processing in backend

//$record.CONTROL_PARAM.ISR_EVENT = "CUSTOM_EVENT"

$record.CONTROL_PARAM.ISR_EVENT = "GET_VACANT_POSITIONS"

-


data.#subform[0].DE.DEContent.ISR_FormEventButton::click - (JavaScript, client) -


//Trigger call to backend for BAdI user command processing

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

//Do not allow any further click event until server roundtrip is completed

Former Member
0 Kudos

Hi

For round trip refer below link.

http://help.sap.com/erp2005_ehp_04/helpdata/EN/43/7a667df4ad6fc9e10000000a1553f6/frameset.htm

Regards

Malli

Edited by: mallikarjuna pasupulati on Feb 2, 2009 9:45 AM

aakash_neelaperumal2
Active Participant
0 Kudos

Mallikarjun.. I have seen that.. but how do I link my operation in the back end and "USER_EVENT_CHECK", hope u understood my question.

xfa.record.CONTROL_PARAM.ISR_EVENT.value = "USER_EVENT_CHECK";

Former Member
0 Kudos

Hi

To archive above functionality we can use below simple method, if u r expectig same functionality through operations and custom event give me some time i need to recall some functioality(At present i am unable to acces MY SAP)

Let my BADI name is Z_Positions .

Letu2019s define two attributes in my BADI like E_DATE and DD1.

For to understand better create one methods as same as input and out parameters of Get_Help_Values method.

So my methods is F4_Vac_Pos

Method:- F4_Vac_Pos

Read the entered value of the Effective date (by reading service datasets with passing key as filename =E_Date)

Once if we able to read the Effective date, cheek is initialize are not(value is there or not).

If it is not initialize go ahead else return.

If it is not initialize fill all vacant positions in DD1 based on by passing key as readied

Effective date.

Call this methods in get_help_values method.

From Configuration side:-

Created Effective_date and F4_DD1attributes.

Add your custom generic service to form (let assume service no is 200 ).

Go to the assignment of custom generic service; map the F4_DD1 form attributes to the BADI attribute DD1 and cheek default value and value help.

The same way map form Effective_date attribute to BADI E_date (donu2019t select value help option)

Now adobe java script:-

Write the below piece of code on click method of button

xfa.record.CONTROL_PARAM.ISR_EVENT.value = "USER_EVENT_CHECK";

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

Data Flow:-

Once the date is selected, click on the Button. As we know already for every round trip get_help_values method will call. Now it will call.

As already effective date value is mapped to one of the custom badi attribute, so we are able to read this value through service data set.

While filling DD1 values we are filtering data based on effective date. Now at badi level we are filtered vacant position based on effective date.

As this one is mapped to F4_DD1 form attribute, once round trip is completed u will see filtered vacant position based on effective date.

aakash_neelaperumal2
Active Participant
0 Kudos

Thanks Mallikarjun for taking out time for giving an elaborate reply..

My Scenario is like this

I have to populate positions in a Dropdown for which I am using a Generic Service and in that I m using an Operation GET_VACANT_POSITIONS and once the user selects the positions, it should automatically get all the wage types associated with it and display in table format(he needs option to add more wage types inaddition to the one got, I am trying to use instanceManager).

Now for getting the wage types I am using the operation GET_WAGE_TYPES in the same Generic service.

According to your reply, you said use the statement

xfa.record.CONTROL_PARAM.ISR_EVENT.value = "USER_EVENT_CHECK";

on selecting the postition.. but my question is which operation will it call in the back end service. is it

GET_VACANT_POSITIONS

or

GET_WAGE_TYPES

I thought the coding should be like

$record.CONTROL_PARAM.ISR_EVENT = "GET_VACANT_POSITIONS"

For getting vacant position and for wage types

$record.CONTROL_PARAM.ISR_EVENT = "GET_WAGE_TYPES"

Will this work? Please let me know. Thanks very much in advance

aakash_neelaperumal2
Active Participant
0 Kudos

Just to add something more

to retrieve positions in the drop down, the user enters the effective date and then clicks on the button "Retrieve Data", it calls a generic service.

But need to know how to call a specific operation in generic service as I have more than one operation in that generic service.

if I just put the below code

xfa.record.CONTROL_PARAM.ISR_EVENT.value = "USER_EVENT_CHECK";

Which opertion will it call

GET_VACANT_POSITIONS or

GET_WAGE_TYPES ?

Former Member
0 Kudos

Hi,

ISR framework supports only two event types INITIALIZE and CHECK.

CHECK event is used to call the operations in BADI. When this event is triggered all the operations attached to a BADI are called. It is not possible to call only one operation inside the BADI using Adobe form.

Only way to make sure that it always calls one Operation in BADI is write some validation checks in all the operations. If the validation check fails then comeout of the operation.

Note: CHECK event is directly attached to the script event USER_EVENT_CHECK

Regards

Malli.

Former Member
0 Kudos

dear Dir,

How about if my Area and Subarea come from info type 6 (address) , i have to implement the prev or it will come automaticly ???

thanks an advance

Not Active Contributor

ChrisSolomon
Active Contributor
0 Kudos

This is not completely correct....and misleading. The framework supports "check" and "initialize" events by default. "Initialize" happens as a form loads. "Check" happens as a user navigates from "edit" to "check and send" and again from "check and send" to "send" (yes, twice). SAP also provides you with the reserved "USER_EVENT_CHECK" and "USER_EVENT"INITIALIZE" to trigger these events again directly from within your form (most often on a button's "click" event). But you can also write/configure your own "user events" that can then fire "check" and/or "initialize" while actually still within the form "edit" mode.

Through the use of "rules" and placing "trigger"/"flag" fields on your operations, you can then somewhat control your backend services to behave as actual "events" as a programmer/developer/techy would think of them.

Understanding what "user events" are in the HCM P&F world and making them work as "events" as you might think is one of the more advanced areas of HCM P&F.

(and yes, OP, I do exactly what you are asking quite a lot....most often for example when a user picks a country from a drop-down and I repopulate a drop-down of possible states in that country based on the selection)

Former Member
0 Kudos

Please still waiting answer to my qestion??

Former Member
0 Kudos

Hi Ghadeer,

If i were you i will implement them in GS.

in IF_HRASR00GEN_SERVICE~GET_HELP_VALUES method.

implement code to populate Area drop down;

Check parameter SERVICE_FIELD_VALUES if Area is not null, populate Sub Area drop down

Hope this help.

regards,

Xiang Li

Answers (1)

Answers (1)

former_member205624
Contributor
0 Kudos

Hi Aakash,

You can achieve this through BAPI. Ask ABAP guys to write a BAPI which takes dropdown selected value as an input and return the desired output.

Regards,