A method is provided to automatically fill the variables table from a table. This is /FLOE/CORE=>GET_DATA_FROM_TABLE.
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: 29: 30: 31: 32: 33: 34: 35: 36: 37: |
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 table * *--------------------------------------------------------------------* ls_data-id = '1234570'. ls_data-txt_first_name = 'John'. ls_data-txt_last_name = 'Smith'. APPEND ls_data TO lt_data. ls_data-id = '0056755'. ls_data-txt_first_name = 'Barry'. ls_data-txt_last_name = 'Jones'. APPEND ls_data TO lt_data. *--------------------------------------------------------------------* * Fill variables from a table assigning the row number * *--------------------------------------------------------------------* CALL METHOD /floe/core=>get_data_from_table EXPORTING im_table = lt_data IMPORTING ex_vars = lt_vars. |
The code example fills the variable table: