Posts

Showing posts from July, 2014

SecondLevel Traverse(To make the field visible at first Level)

Ø       Local Rowset &RS2,&RS3; Ø    &RS2 = GetLevel0()(1).GetRowset(Scroll.JOB); Ø     For &I = 1 To &RS2.ActiveRowCount Ø    &RS3 = &RS2.GetRow(&I).GetRowset(Scroll.JOB_JR); Ø     For &J = 1 To &RS3.ActiveRowCount                  &RS3.GetRow(&J).GetRecord(Record.HR_LBL_WRK).GetField(Field.DETYA_LBL_AUS).Visible = True; Ø          End-For ; Ø       End-For ;

FirstLevel Traverse(To make the field visible at first Level)

Ø   Local Rowset &RS1; Ø   &RS1 = GetLevel0()(1).GetRowset(Scroll.JOB); Ø   For &I = 1 To &RS1.ActiveRowCount Ø   &RS1.GetRow(&I).GetRecord(Record.DERIVED_IC_GBL. Ø   GetField(Field.GBR).Visible = True; Ø   End-For ;

FirstLevel Traverse(CB_APAR_RVW1_VW is a Grid At first level):

Ø   Local Rowset &RS1, &R1; Ø   &RS1 = GetLevel0()(1).GetRowset(Scroll.CB_APAR_RVW1_VW); Ø   For &i = 1 To &RS1.ActiveRowCount Ø       &EmployeId = &RS1(&i).GetRecord(Record.CB_APAR_RVW1_VW).EMPLID.Value; Ø   End-For ;

Scroll Select Syntax

Ø   ScrollFlush(Record.CB_APAR_RVW1_VW); Ø   ScrollSelect(1, Record.CB_APAR_RVW1_VW, Record.CB_APAR_RVW1_VW, "Where EMPLID = :1 and CB_AGREE  = : 2 ", CB_APPEAL_WRK.EMPLID, &Agree);

Create SQL Syntax:

Ø   Local SQL &SelectRec; Ø   &SelectRec = CreateSQL("Select YEARCD FROM PS_CB_APAR_ADMIN WHERE EMPLID  =:1 OR JOBCODE =:2 and  %datein(:3) between START_DATE AND END_DATE", &Emplid, &Jobcode, %Date, &YearCd); Ø   While &SelectRec.Fetch(&YearCd); Ø   Your Code for Selected Rows Ø   End-While;

SQL Exec: Effective Dated Query

  SQLEXEC("Select A.JOBCODE from PS_JOB A WHERE A.EMPLID = :1 AND  A.EFFDT = (select max(B.effdt) from PS_JOB B WHERE B.EMPLID = A.EMPLID  AND B.EMPL_RCD = A.EMPL_RCD AND B.EFFDT <=SYSDATE) AND  A.EFFSEQ = (SELECT MAX(C.EFFSEQ) FROM PS_JOB C WHERE  C.EMPLID= A.EMPLID AND C.EMPL_RCD = A.EMPL_RCD AND  C.EFFDT = A.EFFDT)",&Emplid, &Jobcode);

Effective Dated Query

Ø   SELECT * FROM PS_JOB A WHERE A.EMPLID = 'KU0007' AND A.EFFDT = (SELECT MAX(B.EFFDT) FROM PS_JOB B Ø   WHERE B.EMPLID = A.EMPLID AND B.EMPL_RCD = A.EMPL_RCD AND B.EFFDT<=SYSDATE) Ø   AND A.EFFSEQ = (SELECT MAX(C.EFFSEQ) FROM PS_JOB C WHERE C.EMPLID = A.EMPLID and Ø   C.EMPL_RCD = A.EMPL_RCD AND C.EFFDT = A.EFFDT)