ABAP Prog Propios SISTEMA
- report zsyst no standard page heading.
- tables: dd03l.
- data: bkp like syst,
- tipo(1),
- eax like sy-index.
- field-symbols: <n>, <m>.
- end-of-selection.
- bkp = syst.
- clear eax.
- do.
- add 1 to eax.
- assign component eax of structure syst to <m>.
- if sy-subrc ne 0. exit. endif.
- describe field <m> type tipo.
- case tipo.
- when 'C' or 'N'.
- if <m> <> '1'. <m> = '1'. else. <m> = '0'. endif.
- when others.
- if <m> <> 1. <m> = 1. else. <m> = 2. endif.
- endcase.
- enddo.
- clear eax.
- do.
- add 1 to eax.
- assign component eax of structure bkp to <n>.
- if sy-subrc ne 0. exit. endif.
- assign component eax of structure syst to <m>.
- check <n> ne <m>.
- select single * from dd03l where tabname = 'SYST'
- and position = eax.
- write: / dd03l-fieldname.
- enddo.