cancel
Showing results for 
Search instead for 
Did you mean: 

HCM Forms - internal table

nikhilkup
Active Participant
0 Kudos

Hi,

I am working on HCM interactive forms.

Normally we get values from info types, which we directly configure and we get the values. No coding is requried. but if the values are in some tables which are not info types, then where to write the coding for that.

Thanks,

Nikhil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Define a Generic Service and Implement the BADI for Generic Service.

For More details:

1.Goto the SPRO Settings -> Personal Management ->HR Administrative Services->Configuration of Forms/Processes->Configuration of Forms->Cross-Form Settings->Define Generic Services.

and also, Refer this link, [http://help.sap.com/saphelp_erp2005/helpdata/en/42/f273461e5132c3e10000000a1553f6/frameset.htm]

nikhilkup
Active Participant
0 Kudos

hi Parthasarathi,

that was very useful, but can you give me an e.g. of how to create an internal table and display it, using these badi's.

I would really appreciate, if you could help me.

Thanks,

Nikhil

Answers (1)

Answers (1)

ChrisSolomon
Active Contributor
0 Kudos

For a generic service, you will not really have a "table" so to speak. You will pass the service your form fields that are needed. You will notice in services that the fields that come in (service_dataset) have the structure:

-fieldgroup

-fieldname

-fieldindex

-fieldvalue

So when you pass your fields over to make up your "table", you are actually passing EACH field with it's index set such that all fields with the same index represent a "row" in your table. So in effect, it would be kind of like....

field1(0) field2(0) field3(0)

field1(1) field2(1) field3(1)

field1(2) field2(2) field3(2)

It sounds limited I know, but the idea of the "generic" services is they don't "know" the types of fields you are passing in. This is "described" in your field info method by binding them to a data type (data element).

When working with one of the standard services, like SAP_PA, you will use a "line" type structure...then it knows you have multiple "rows" of data and handles it as such (much like you have to do yourself as described above for a generic service).

Hope this helps. Maybe if I have time, I will write a longer "how to" blog about this....but I have several others in "draft" versions now to finish. haha

nikhilkup
Active Participant
0 Kudos

Hi Chris, Thanks a lot for both the solutions.

In Generic serivice if i want to default some field values then i have to do it in method Initialize, am i right.

Thanks, Once again,

Nikhil

ChrisSolomon
Active Contributor
0 Kudos

Yes. What this will do is give you "visibility" to any fields you have mapped to that generic service's operations. What this means though, is that you can't just add a generic services to soley have it do the initialization for you. However, there are ways around this. I can't give all my secrets away but let's just say I will own create a "dummyInit" operation and have any fields I might want accessible in "initialize" to that operation. Hopefully, you can guess how this works.