Monday, 28 March 2016

Dynamic Call Section with Sample Program


 Procedure to Call Sections Dynamically

·    Create and assign a State Record with AE_APPLID and AE_SECTION fields.
·    Include DoSelect and insert AE_APPLID and AE_SECTIONID
(OR)
·    Include PeopleCode Action and based on the Conditions assign Program Name and Section Name.
Then
·    Make the Section as Dynamic by selecting Dynamic Check Box.

.      Sample Program 

MAIN
  Step1
    DoSelect
%Select(AE_APPLID, AE_SECTIONID)
Select AE_APPLID, AE_SECTIONID FROM PS_ABC

OR

    PeopleCode
MessageBox(0, "", 0, 0, "Main Section - Step1 - PeopleCode");
If %OperatorId = "PS" Then
   ABC_AET.AE_APPLID.Value = "ABC_APPENG";
   ABC_AET.AE_SECTION.Value = "Insert";
Else
   ABC_AET.AE_APPLID.Value = "ABC_APPENG";
   ABC_AET.AE_SECTION.Value = "Delete";
End-If;
    Call Section
      Select Dynamic Check Box
Delete Section
  Step1
    PeopleCode
MessageBox(0, "", 0, 0, "Delete Section - Step1 - PeopleCode");
Insert Section
  Step1
    PeopleCode
MessageBox(0, "", 0, 0, "Insert Section - Step1 - PeopleCode");

No comments:

Post a Comment