Skip to Content
0
Former Member
Dec 01, 2008 at 07:33 PM

Read field informations

11 Views

Hello,

My Problem is following:

I tried to get datas from a Repository.

This work fine. But when I tried to work with the datas, for example I want to read a line looking there for a boolean field and wanna have a look if its true or false. then the system dont find something like that.

Here is a code snipped:

LOOP AT lt_result_set into ls_result_set.

Field-Symbols: <value> type any.

assign ls_pair-value->* to <value>.

IF <value> = 'X'.

WRITE: 'JA'.

ELSE.

WRITE: 'NEIN'.

ENDIF.

ENDLOOP.

Here how I read out the datas:

...

DATA ls_pair TYPE mdm_name_value_pair.

LOOP AT lt_result_set into ls_result_set.

NEW-LINE.

READ TABLE ls_result_set-name_value_pairs INDEX 1 INTO ls_pair.

*ID Ausgabe

ASSIGN ls_pair-value->* TO <field_value>.

IF sy-subrc = 0.

WRITE: AT (5) <field_value>.

ELSE.

WRITE: AT (5) 0.

ENDIF.