Activity 0:-
THROUGH PUSH BUTTON WE'RE DISPALYING EMPLID, DEPTID, DNAME.
Steps and hints:
1. Create records
2. pages,
3. components- search record as our physical record
4. When you going to write code in you project , USE UR RECORD And FIELD names , otherwise it’ll execute
Flow of Objects:
This is the page after designed our requirement:
To write the below codes in push button - FIELD CHANGE
/* FOR FIRST & SECOND ROW ACCESS (IN SCROLL MORE ROWS + , - )*/
/* TO DISPLAY THAT 1ST AND 2ND ROW MEANS USE THIS CODE*/
/* DO IT & CHECK IT PIA */
/* &RSO = GetLevel0();
&RW0 = &RSO.GETROW(1);
&RS1 = &RW0.GETROWSET(Scroll.Z_DEP1_TBL);
&RW1 = &RS1.GETROW(1);
&REC = &RW1.GETRECORD(Record.Z_DEP1_TBL);
&FLD1 = &REC.GETFIELD(Field.EMPLID);
&FLD2 = &REC.GETFIELD(Field.DEPTID);
&FLD3 = &REC.GETFIELD(Field.DEPTNAME);
WinMessage("YOUR EMPLID IS " | &FLD1.VALUE, 16);
WinMessage("YOUR DEPTID IS " | &FLD2.VALUE, 64);
WinMessage("YOUR DEPTNAME IS " | &FLD3.VALUE, 64);*/
/*ABOVE CODE WITH THIS LOGIC(BY REPLACING OF &RW1 = &RS1.GETROW(1);)
&RW1 = &RS1.GETROW(2);
DO IT & CHECK IT PIA */
/* FOR MORE NUMBER OF ROWS - (MEANS FOR ONE EMPLID WE HAVE MORE DEPTID , DNAMES) */
&RSO = GetLevel0();
&RW0 = &RSO.GETROW(1);
&RS1 = &RW0.GETROWSET(Scroll.Z_DEP1_TBL);
For &I = 1 To &RS1.ACTIVEROWCOUNT
&RW1 = &RS1.GETROW(&I);
&REC = &RW1.GETRECORD(Record.Z_DEP1_TBL);
&FLD1 = &REC.GETFIELD(Field.EMPLID);
&FLD2 = &REC.GETFIELD(Field.DEPTID);
&FLD3 = &REC.GETFIELD(Field.DEPTNAME);
WinMessage("YOUR EMPLID IS " | &FLD1.VALUE, 16);
WinMessage("YOUR DEPTID IS " | &FLD2.VALUE, 64);
WinMessage("YOUR DEPTNAME IS " | &FLD3.VALUE, 64);
End-For;
**********************************************************
Try and Do this in practice with this above hints …
0 comments:
Post a Comment
Phaniraavi@gmail.com