You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Can anyone help me to change the level 3 key field and ordinary field values by giving a code in FIELD CHANGE for Component Inte

1 reply [Last post]
ashok_star2004's picture
User offline. Last seen 1 week 6 days ago. Offline
Joined: 02/13/2009
Posts: 45

Hi All!!
Can anyone help me to change the level 3 key field and ordinary field values by giving a code in FIELD CHANGE for Component Interface.

Guest's picture
Guest (not verified)
Re: Can anyone help me to change the level 3 key field and ...

Here is a typical peoplecode example for reaching the level three reord using rowset peoplecode.

/* Need to insert a row when a flag = ‘Y’ after graying all other fields in the row in correction mode */
PeopleCode Event : COMPONENT_NAME(Component).GBL.PostBuild(Component PeopleCode)

Local Rowset &TQ_Lvl0, &TQ_Lvl1, &TQ_Lvl2, &TQ_Lvl3;
Local number &insert_row, &lvl_1_row, &lvl_2_row, &lvl_3_row;

&TQ_Lvl0 = GetLevel0();
&TQ_Lvl1 = &TQ_Lvl0(1).GetRowset(Scroll.LEVEL1_SCROLL_NAME);
&insert_flag = “N”;

For &lvl_1_row = 1 To &TQ_Lvl1.ActiveRowCount
&TQ_Lvl2 = &TQ_Lvl1(&lvl_1_row).GetRowset(Scroll.LEVEL2_SCROLL_NAME);
For &lvl_2_row = 1 To &TQ_Lvl2.ActiveRowCount
&TQ_Lvl3 = &TQ_Lvl2(&lvl_2_row).GetRowset(Scroll.LEVEL3_SCROLL_NAME);
For &lvl_3_row = 1 To &TQ_Lvl3.ActiveRowCount
&tq_adj_applied = &TQ_Lvl3(&lvl_3_row).LEVEL3_RECORD_NAME.FIELD_NAME.Value;
If &tq_adj_applied = “Y” Then
&TQ_Lvl3(&lvl_3_row).MPF_TINQ_LOG.EARNS_END_DT.Enabled = False;
&TQ_Lvl3(&lvl_3_row).MPF_TINQ_LOG.MPF_ADD_SUBTRACT.Enabled = False;
&TQ_Lvl3(&lvl_3_row).MPF_TINQ_LOG.MPF_HOURS_TYPE.Enabled = False;
&TQ_Lvl3(&lvl_3_row).MPF_TINQ_LOG.MPF_HOURS_ADJ.Enabled = False;
If %Mode = %Action_Correction Then
&TQ_Lvl3.InsertRow(&TQ_Lvl3.ActiveRowCount);
End-If;
End-If;
End-For
End-For;
End-For;

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.