cancel
Showing results for 
Search instead for 
Did you mean: 

delimiting a child subtype in infotype 0021 through dynamic actions

Former Member
0 Kudos

Hi experts ,

I have a requirement like when respective US house hold dependent(92 subtype) record is being created, only the similar child(2 subtype) record is the one that should be delimited, not all the other child records. So if someone is creating the respective US household dependent, the system may check the birthdate any other field to validate the data and delimit the Child record accordingly.

I created dynamic actions like :

92 04 1 P PSPAR-TCLAS='A'

92 04 2 P T001P-MOLGA='10'

92 04 11 F CHECK_SUBTY(ZPXDYNEV_DMJ)

92 04 14 I MOD,0021,2,,(P0021-BEGDA),(P0021-ENDDA)

92 04 15 W P0021-ENDDA=RP50D-DATE1

92 FGBDT 04 13 P P0021-FGBDT=RP50D-FIELD1

In the CHECK_SUBTY(ZPXDYNEV_DMJ)

the code is like :

LOOP AT t_pa0021

ASSIGNING <fs_p0021>

WHERE fgbdt EQ p0021-fgbdt

AND favor EQ p0021-favor

AND fanam EQ p0021-fanam

AND fasex EQ p0021-fasex.

MOVE c_x TO rp50d-flag1 .

*" subtract 1 day from begda

SUBTRACT c_1 FROM p0021-begda.

MOVE : p0021-begda TO rp50d-date1 ,

<fs_p0021>-begda TO rp50d-date2 ,

<fs_p0021>-fanam TO e_result-fanam ,

<fs_p0021>-favor TO e_result-favor ,

<fs_p0021>-fgbdt TO e_result-fgbdt ,

<fs_p0021>-fasex TO e_result-fasex.

"<fs_p0021>-objps TO rp50d-field1 .

Move e_result-fgbdt to rp50d-field1.

ENDLOOP.

But I am facing an issue in identifying the correct child subtype record. It pick the first child record and delimits the end date which is incorrect. Please help as early as possible..

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

This message was moderated.

Former Member
0 Kudos

Hey,

Thanks a lot for the quick response and help.

The issue is solved at my end.

Regards,

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I would probably do the DELIMIT inside your program. This way you can connect to the right record.

Regards,

Serge