Konvertierung Spalten- in Zeilenformat

Aus SAP Wiki ツ


Beispiel 1:

      LOOP AT columns ASSIGNING FIELD-SYMBOL(<columns_fieldsymb>).
        ASSIGN COMPONENT sy-tabix OF STRUCTURE struc_from_itab TO FIELD-SYMBOL(<struc_fieldsymb>).
        IF sy-subrc = 0.
          <struc_fieldsymb> = <columns_fieldsymb>-name.
        ENDIF.
      ENDLOOP.
      APPEND struc_from_itab TO itab_data.

Beispiel 2:

 LOOP AT it_splitted_data_colums ASSIGNING FIELD-SYMBOL(<splitted_data>).
    ASSIGN COMPONENT sy-tabix OF STRUCTURE <structure> TO FIELD-SYMBOL(<field>).
    IF sy-subrc = 0.
      <field> = <splitted_data>.
    ELSE.
      error_occurs = abap_true.
      MESSAGE e018(zbc_if_idoc) WITH sy-tabix str_name iv_filename iv_row_in_file INTO DATA(msg).
      zcl_bc_application_log=>add_sy_msg_to_bal_msg_tab( CHANGING xt_bal_msg = xt_log ).
    ENDIF.
  ENDLOOP.