2011-12-29 10 views

答えて

1

1つの可能性:AOT(Ctrl-D)でJobsを右クリックし、New Jobを選択してください。新しいウィンドウで(正しいテーブルとカラム名を使用して、あなたが読みたい)のようなものを入力します。

static void Job() 
{ 
    YourTable yourTable; 
    ; 
    while select TheColumn from yourTable 
    { 
     // process yourTable.TheColumn 
     info(strFmt("value: %1", yourTable.TheColumn)); 
    } 
} 

が、セラは、他のいくつかの方法があります。Select Statements

+0

をu..I'llが... – Revathi

2

このコードは、のすべてのカラム値を表示します。記録。

static void Job1(Args _args) 
{ 
    DictTable dictTable = new DictTable(tableNum(CustTable)); 
    DictField dictField; 
    int   counter, fieldId; 

    CustTable custTable; 
    anytype  value; 

    select firstonly custTable; 

    for (counter = 1; counter <= dictTable.fieldCnt(); counter++) 
    { 
     fieldId = dictTable.fieldCnt2Id(counter); 
     dictField = new DictField(tableNum(CustTable), fieldId); 

     if (!dictField.isSystem()) 
     { 
      value = custTable.(fieldId); 
      if(value) 
      { 
       info(strFmt('%1 = %2', 
          dictField.label(), 
          any2str(value))); 
      } 
     } 
    } 
} 

特定の列のすべての値を取得するには、Carlos Heubergerのコードを使用してください。

+0

感謝をしてみてくださいyou..I'llしてみてくださいありがとうございました。.. – Revathi

-1

ただ、わずかなmodが、私のテーブル作業をするためにany2strを取った:

strFmt('%1 = %2 \r\n', dictField.label(), value);

関連する問題