3 Replies Latest reply: Dec 17, 2014 5:07 AM by Julien Vaillant RSS

    Use of the FieldValue function on several lines

    Julien Vaillant



      I just wrote the following code:


      Rows:  NoConcatenate LOAD BUKRS, GJAHR, CPUDT Resident BKPF;
      DROP Table BKPF; 
      FOR i=1 to $(rows)
      SET BUKRS='';
      SET GJAHR = '';
      SET CPUDT = '';
      Trace i = $(i); 
      Let BUKRS = FieldValue('BUKRS',$(i)); 
      Let GJAHR = FieldValue('GJAHR',$(i)); 
      Let CPUDT = Date(FieldValue('CPUDT',$(i)),'YYYYMMDD');
      Trace BUKRS = $(BUKRS) - GJAHR = $(GJAHR) - CPUDT = $(CPUDT);



      In my example, there are three rows in my 'Rows' table. The trace function works fine with the first record, like this:

      BUKRS = 1000 - GJAHR = 2014 - CPUDT = 20141214, but for the following records, it looks like this BUKRS = 1100 - GJAHR = - CPUDT = . Only the BUKRS variable is set, even though there are values for GJAHR and CPUDT in my 'Rows' table.


      I've tried to look for solutions for the last hour, but I could not find any.