Skip to Content
0
Former Member
Sep 06, 2012 at 10:24 AM

How to get all names and values from complexed type?

12 Views

Hello,

I need to get all field names and values from type.

Structure can be like:

DATA: pit TYPE ZPPLP_pit8ar.

And Types defined as:

TYPES: BEGIN OF ZPPLP_row8ar,
zaliczka1 LIKE pc207-betrg,
zaliczka2 LIKE pc207-betrg,
zaliczka3 LIKE pc207-betrg,
zaliczka4 LIKE pc207-betrg,
zaliczka5 LIKE pc207-betrg,
zaliczka6 LIKE pc207-betrg,
zaliczka7 LIKE pc207-betrg,
zaliczka8 LIKE pc207-betrg,
zaliczka9 LIKE pc207-betrg,
zaliczka10 LIKE pc207-betrg,
zaliczka11 LIKE pc207-betrg,
zaliczka12 LIKE pc207-betrg,
zaliczka13 LIKE pc207-betrg,
sum LIKE pc207-betrg,
prowizja LIKE pc207-betrg,
end_sum LIKE pc207-betrg,
END OF ZPPLP_row8ar.


TYPES: BEGIN OF ZPPLP_pit8ar,
nip(13),
year(10),
from(10),
to(10),
row01 TYPE ZPPLP_row8ar,
row02 TYPE ZPPLP_row8ar,
row03 TYPE ZPPLP_row8ar,
row04 TYPE ZPPLP_row8ar,
row05 TYPE ZPPLP_row8ar,
row06 TYPE ZPPLP_row8ar,
row07 TYPE ZPPLP_row8ar,
row08 TYPE ZPPLP_row8ar,
row09 TYPE ZPPLP_row8ar,
row10 TYPE ZPPLP_row8ar,
row11 TYPE ZPPLP_row8ar,
row12 TYPE ZPPLP_row8ar,
description TYPE string.
TYPES: END OF ZPPLP_pit8ar.

I need to get all names and values from type pit.

For example:

nip | 7638472938

year | 2012

row01-zaliczka1 | 1501

row01-zaliczka2 | 1502

Is there any simple way to do this?

Thank you for helping in advance.