adesso orange🍊Stellenangebote:
Software Engineer Trainee · Senior
| (Senior) Cloud Software Engineer BTP
(Senior) Consultant Technologie · Consultant ABAP
Werkstudent Softwareentwicklung · Fiori / UI5 · Consulting · Application Management
Konvertierung Spalten- in Zeilenformat
Aus SAP Wiki ツ
Version vom 18. Juli 2021, 15:06 Uhr von M1ch3lde (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Kategorie:Codeschnipsel Beispiel 1: LOOP AT columns ASSIGNING FIELD-SYMBOL(<columns_fieldsymb>). ASSIGN COMPONENT sy-tabix OF STRUCTURE…“)
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.