Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
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); |
NEXT
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.
Thanks!
As Joe pointed out, FieldValues() operates on values, not rows. If you want to process a table row-by-row use the peek() function.
-Rob
Hi,
Fieldvalue requires distinct values on every row, what does your data look like? This may be your issue
Joe
As Joe pointed out, FieldValues() operates on values, not rows. If you want to process a table row-by-row use the peek() function.
-Rob
Hi,
Right, I did not understand the bit about distinct values in the help for FieldValue(). Thanks! GJAHR and CPUDT were indeed identical for the three records in my table.
The peek() function works just fine. Thanks again.