FieldNo and Data Value

raven44raven44 Member Posts: 85
I've got a FieldNo and a Data value - I wish to write this into the respective field within a table.

Basic Example.
Table 50000
Field 1 Code
Field 2 Description

Function(TableNo,FieldNo,DataValue)
CASE TableNo OF
50000: ....its here where I want to push the DataValue into the respective FieldNo
END;

Normally we would write Table.Description := DataValue; but I have the FieldNo at this point. Is there anyway to push the value into the field?

This is just a basic example, I'm working with a vast majority of tables that contain lots of fields - so doing something like:
CASE Table.FIELDNO OF
1: Table.Code := datavalue;
2: Table.Description := datavalue;
END;
...wouldnt really work - looking (hoping) that this can be done in a simpler way.

Thanks.

Comments

Sign In or Register to comment.