Code: Alles auswählen.
FIELD-SYMBOLS: <lt_table_structure> TYPE table.
FIELD-SYMBOLS: <ls_table_structure> TYPE any.
FIELD-SYMBOLS: <value> TYPE ANY.
"aus einer Customizing-Tabelle lese ich die tiefe Felkomponente und weise sie <lt_table_structure> zu.
ASSIGN COMPONENT ls_mapfld-component OF STRUCTURE gs_partner TO <lt_table_structure>.
LOOP AT <lt_table_structure> ASSIGNING <ls_table_structure>.
" aus meiner Customizing-Tabelle bestimme ich nun das entsprechende Feld innerhalb tiefen Struktur
ASSIGN COMPONENT ls_mapfld-fieldname OF STRUCTURE <ls_table_structure> TO <value>.
ENDLOOP.
Code: Alles auswählen.
<tr>
<td class="column1"><%= ls_display_order-description%></td>
<%
READ TABLE lt_mapfld INTO ls_mapfld WITH KEY fieldname = ls_display_order-field.
IF sy-subrc = 0."Feld ist von einem komplexen Datentypen --> Wert wird nicht in gs_partner übernommen
ASSIGN COMPONENT ls_mapfld-component OF STRUCTURE gs_partner TO <lt_table_structure>.
READ TABLE <lt_table_structure> ASSIGNING <ls_table_structure> INDEX 1.
ASSIGN COMPONENT ls_mapfld-fieldname OF STRUCTURE <ls_table_structure> TO <value>.
ELSE."Feld ist von einem einfachen Datentypen --> Wert wird in gs_partner übernommen
ASSIGN COMPONENT ls_display_order-field OF STRUCTURE gs_partner TO <value>.
ENDIF.
%>
<td class="colIntake2"><%= <value>%></td>
<td class="column3"> </td>
<td class="column_sep"> </td>
Code: Alles auswählen.
CREATE DATA ls_table_line TYPE (ls_mapfld-substructure).
ASSIGN ls_table_line->* TO <fs_table_line>.
ASSIGN COMPONENT ls_mapfld-component OF STRUCTURE gs_partner TO <lt_table_structure>.
ASSIGN ls_table_line->* TO <ls_table_structure>.
READ TABLE <lt_table_structure> INTO <ls_table_structure> INDEX 1.
ASSIGN COMPONENT ls_mapfld-fieldname OF STRUCTURE <ls_table_structure> TO <value>.
Code: Alles auswählen.
READ TABLE <lt_table_structure> INTO <ls_table_structure> INDEX 1.
ASSIGN COMPONENT ls_mapfld-fieldname OF STRUCTURE <ls_table_structure> TO <value>.
Code: Alles auswählen.
READ TABLE <lt_table_structure> ASSIGNING <ls_table_structure> INDEX 1.
ASSIGN COMPONENT ls_mapfld-fieldname OF STRUCTURE <ls_table_structure> TO <value>.
Code: Alles auswählen.
CREATE DATA ls_table_line TYPE (ls_mapfld-substructure).
ASSIGN ls_table_line->* TO <fs_table_line>.
ASSIGN COMPONENT ls_mapfld-component OF STRUCTURE gs_partner TO <lt_table_structure>.
ASSIGN ls_table_line->* TO <ls_table_structure>.
READ TABLE <lt_table_structure> ASSIGNING <ls_table_structure> INDEX 1.
ASSIGN COMPONENT ls_mapfld-fieldname OF STRUCTURE <ls_table_structure> TO <value>.
Code: Alles auswählen.
FIELD-SYMBOLS: <lt_table_structure> TYPE STANDARD TABLE.
ASSIGN COMPONENT ls_mapfld-component OF STRUCTURE gs_partner TO <lt_table_structure>.
Code: Alles auswählen.
READ TABLE <lt_table_structure> ASSIGNING <ls_table_structure> INDEX 1.
Code: Alles auswählen.
ASSIGN COMPONENT ls_mapfld-fieldname OF STRUCTURE <ls_table_structure> TO <value>.
Code: Alles auswählen.
FIELD-SYMBOLS: <lt_table_structure> TYPE STANDARD TABLE.
ASSIGN COMPONENT ls_mapfld-component OF STRUCTURE gs_partner TO <lt_table_structure>.
READ TABLE <lt_table_structure> ASSIGNING <ls_table_structure> INDEX 1.
ASSIGN COMPONENT ls_mapfld-fieldname OF STRUCTURE <ls_table_structure> TO <value>.
Code: Alles auswählen.
DATA lt_fields TYPE tihttpnvp.
* Get fields from Layout
CALL METHOD request->get_form_fields
CHANGING
fields = lt_fields.