cancel
Showing results for 
Search instead for 
Did you mean: 

SAP HCM P&F: List UIBB Multiple Rows

former_member424001
Participant
0 Kudos

Dear All,

I have a requirement to show multiple rows records in a table during the HCM process initialization stage to show info type 0743 records. I have used list UIBB layout for this.

For testing purpose I have hard coded the below code in method IF_HRASR00GEN_SERVICE~INITIALIZE, but only 1 Row is appearing at run time and the remain 2 Rows are not.

Then for further testing I added a standard ADD ROW button in the list UIBB, now when I press the Add Row button system displays the second row with data, so I assume that standard system has only 1 index by default and once I click on Add Row button a user event is triggered which creates 2nd index so the data is displayed. 

Any solution how can I create table indexes in INITIALIZE method to show more than one record during form initialization stage ?

ASSIGN LS_SFV TO <FS_SFV>.

   <FS_SFV>-FIELDNAME = 'YDA_ACTION_TYPE'.

   <FS_SFV>-FIELDINDEX = 1.

   <FS_SFV>-FIELDVALUE = '001'.

   APPEND <FS_SFV> TO SERVICE_FIELD_VALUES.

   <FS_SFV>-FIELDNAME = 'YDA_ACTION_TYPE'.

   <FS_SFV>-FIELDINDEX = 2.

   <FS_SFV>-FIELDVALUE = '002'.

   APPEND <FS_SFV> TO SERVICE_FIELD_VALUES.

   <FS_SFV>-FIELDNAME = 'YDA_ACTION_TYPE'.

   <FS_SFV>-FIELDINDEX = 3.

   <FS_SFV>-FIELDVALUE = '003'.

   APPEND <FS_SFV> TO SERVICE_FIELD_VALUES.


Run time result with only 1 row is:

After clicking the "Add Row" button:


Chohan

Accepted Solutions (0)

Answers (1)

Answers (1)

sahirn
Active Contributor
0 Kudos

Ensure the fields for list have record index set as * in hrasr_dt.

Regards.

former_member424001
Participant
0 Kudos

Dear Sahir,

Record Index column is only available for fields in standard service SAP_PA but not in my Z generic service fields.

Is it possible to trigger user event (USER_EVENT_ADD_INDEX_ROW )

in method IF_HRASR00GEN_SERVICE~INITIALIZE code ?

This way I might be able to display data for multiple rows during form initialization.

chohan

sahirn
Active Contributor
0 Kudos

There will be no need for set a user event on initialize for a generic service(GS) field.

If the field is configured in hrasr_dt in such a way that its default values comes from GS - then initialize from GS would be called by the framework. You can debug the same and check what values are getting returned. Ensure proper indices are maintained for all the fields that you have in the list.

Regards.