cancel
Showing results for 
Search instead for 
Did you mean: 

HCM Forms: Unable to read pernr in custom generic service in the initialize method.

Former Member
0 Kudos

I am try to initialize certain fields in the HCM form(using the hcm forms and process) framework, while i am able to intialize the fields in the IF_HRASR00GEN_SERVICE~INITIALIZE, I am unable to read the pernr number( I need to initialize them based on pernr). I have set pernr as special field in the method IF_HRASR00GEN_SERVICE~GET_SPECIAL_FIELDS. How ever no value is populated when I access the pernr field in intiailze method. However pernr value is available in the method IF_HRASR00GEN_SERVICE~DO_OPERATIONS in the table SERVICE_DATASETS

, but I need to initiaize some fields before the user clicks on anything(to trigger do_operations).

I followed all the steps exactly as described in the blog post . And i tried everything for 4 hours yesterday to no avail, HR forms what a pain!

Hoping someone can throw some light into this, Christopher Solomon you might be able to help me out!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member206394
Active Participant
0 Kudos

Dear Rajesh,

If i understand correctly, you want to set the value to the field.

<code>

READ TABLE service_datasets INTO wa_service_datasets WITH KEY fieldname =<fieldname>.

IF sy-subrc EQ 0.
--set ur new value to wa_service_datasets-fieldvalue--

wa_service_datasets-fieldvalue = <new value>

MODIFY service_datasets INDEX sy-tabix FROM wa_service_datasets TRANSPORTING fieldvalue..
ENDIF.


</code>


Let me know, if this is not you are looking for.  Be more clear on your requirement.


Regards,

Shankar.

Former Member
0 Kudos

Hello Rajesh,

I guess Problem is solved since Long.

But anyway faced the same Problem today and was very easy to solve:

1. ) HRASR_DT

Put PERNR to the fields of the Backend-Service

2.) It doesn't Need to be inserted within GET_FIELD_INFO of the Backend-Service

3.) Within INITIALIZE just Loop
over SERVICE_FIELD_VALUES

There you get it.

Greetings

Gereon