Local File &myFile;
Local Rowset &fileRowset1, &fileRowset;
Local Row &fileRow;
&myFile = GetFile("c:\temp\test.txt", "W", %FilePath_Absolute);
If &myFile.SetFileLayout(FileLayout.TEST_FILE_LAYOUT) Then
&fileRowset = &myFile.CreateRowset();
&fileRowset = GetLevel0();
&fileRow = &fileRowset.GetRow(1);
&fileRowset1 = &fileRow.GetRowset(Scroll.TEST_BU_REC);
&myFile.WriteRowset(&fileRowset1);
End-If;
******* Comment ********
The code should be written on the key fields
For accessing further levels we have to give full scroll path
****************** to access next levels ********************
Local File &myFile;
Local Rowset &fileRowset1, &fileRowset;
Local Row &fileRow;
&myFile = GetFile("c:\temp\myfiledept.txt", "W", %FilePath_Absolute);
If &myFile.SetFileLayout(FileLayout.TEST_FILE_LAYOUT) Then
&fileRowset = &myFile.CreateRowset();
&fileRowset = GetLevel0();
&fileRow = &fileRowset.GetRow(1);
&fileRowset1 = &fileRow.GetRowset(Scroll.TEST_BU_REC).GetRow(1).GetRowset(Scroll.TEST_DEPT_REC);
&myFile.WriteRowset(&fileRowset1);
End-If;
********************** end ************************************
No comments:
Post a Comment