A method is provided to automatically fill the variables table from a data structure or table row. This is /FLOE/CORE=>GET_DATA_FROM_STRUCTURE.
This can be used within the Email Data User-Exit or before invoking the Floe API.
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: |
DATA: lt_vars TYPE /floe/vars_t. TYPES: BEGIN OF ty_data, id TYPE char20, txt_first_name TYPE text40, txt_last_name TYPE text40, END OF ty_data. DATA: ls_data TYPE ty_data, lt_data TYPE TABLE OF ty_data. *--------------------------------------------------------------------* * Fill structure * *--------------------------------------------------------------------* ls_data-id = '1234570'. ls_data-txt_first_name = 'John'. ls_data-txt_last_name = 'Smith'. *--------------------------------------------------------------------* * Get data from a structure determining the variable names * *--------------------------------------------------------------------* CALL METHOD /floe/core=>get_data_from_structure EXPORTING im_structure = ls_data IMPORTING ex_vars = lt_vars. |
The code example fills the variable table: