Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

[Custom Infotype] Maintaining field based on subtype

Former Member
0 Likes
585

Hi expert,

I want to create a new subtype to store an employee's test result

Data need to be maintained are:

1. Test_type -> Subtype field

2. Person_in_charge

3. Result

4. Date.

The problem which i have is:

the result field can only be filled with certain value and specific for a subtype.

e.g:

Subtype 1 can only has result: A, B, C.

subtype 2 can only has result: D, E, F.

It's basically similar like the one on infotype 22 education where certain certificate is only applicable based on its educational establishment.

So my question is, how do you achieve above objective?

1 ACCEPTED SOLUTION
Read only

snursalim
Participant
0 Likes
522

Hi Pandu,

Just create a check table for example:

ZTEST where you have the subtype, and test result as the primary key.

On your infotype structure, from se11, create a checking and set Ztest as your check table. Set the checking proposal. And voila you'll get the result.

Hope this helps

Hi expert,

I want to create a new subtype to store an employee's test result

Data need to be maintained are:

1. Test_type -> Subtype field

2. Person_in_charge

3. Result

4. Date.

The problem which i have is:

the result field can only be filled with certain value and specific for a subtype.

e.g:

Subtype 1 can only has result: A, B, C.

subtype 2 can only has result: D, E, F.

It's basically similar like the one on infotype 22 education where certain certificate is only applicable based on its educational establishment.

So my question is, how do you achieve above objective?

2 REPLIES 2
Read only

snursalim
Participant
0 Likes
523

Hi Pandu,

Just create a check table for example:

ZTEST where you have the subtype, and test result as the primary key.

On your infotype structure, from se11, create a checking and set Ztest as your check table. Set the checking proposal. And voila you'll get the result.

Hope this helps

Read only

0 Likes
522

You will need to create a mapping table for you subtype and the allowed result values.

In your screen flow logic under a process on value-request. You can generate the values for your field based on the subtype.

process on value-request.

field p9xxx-zresult module result_help.

Then in the module result_help:

module sub_code_help input.

*--- Select your allowed values from your mapping table

Into table_of_results

*---- And call the function for value help..

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'ZRESULT_CODE'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'T_PXXX-SUB_CODE'

value_org = c_struc

tables

value_tab = table_of_results

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

if sy-subrc <> 0.

message e000(38) with 'Unable to provide Value Help'(003).

else.