#1
|
|||
|
|||
Utilizar estructura para un LOOP AT
Hola compañeros.
Tengo una cuestion que aunque se puede solucionar declarandolo como tablas separadas preferiria mantener la estructura que he declarado. Les cuento. Me declaro una estructura con varias "tablas" dentro. TYPES: BEGIN OF ty_statdir, summary TYPE sapwlsumry OCCURS 0, hitlist_dbcalls TYPE sapwlhitl OCCURS 0, hitlist_respti TYPE sapwlhitl OCCURS 0, accountstat_tasktype TYPE sapwluswlx OCCURS 0, time_stat TYPE sapwltimes OCCURS 0, table_record_stat TYPE sapwltabtr OCCURS 0, application_stat TYPE sapwlustcx OCCURS 0, * function_code_stat TYPE sapwlfcode OCCURS 0, terminal_io_stat TYPE sapwltmbyt OCCURS 0, tasktype_stat TYPE sapwltskti OCCURS 0, user_stat TYPE sapwluenti OCCURS 0, memory_stat TYPE sapwlmem OCCURS 0, rfc_client_stat TYPE sapwlrfcc OCCURS 0, rfc_server_stat TYPE sapwlrfcs OCCURS 0, rfc_client_dest_stat TYPE sapwlrfccd OCCURS 0, * instances TYPE sapwlinst OCCURS 0, rfc_server_dest_stat TYPE sapwlrfcsd OCCURS 0, spool_activity_stat TYPE sapwlspoac OCCURS 0, spool_print_stat TYPE sapwlspopr, dbprocedure_stat TYPE SAPWLDBPRO OCCURS 0, * detailtcode_stat TYPE SAPWLTCDET OCCURS 0, * Application Statistic as_statistic TYPE sapwlvdas OCCURS 0, as_hitl_dbcalls TYPE sapwlashit OCCURS 0, as_hitl_respti TYPE sapwlashit OCCURS 0, * externsys TYPE sapwlsrvex OCCURS 0, END OF ty_statdir, Luego declaro la tabla. DATA: ex_data TYPE STANDARD TABLE OF ty_statdir WITH HEADER LINE. Y despues me gustaria hacer un LOOP AT ex_data-time_stat. MOVE ENTRY_ID TO it_datatab-ENTRY_ID. MOVE Count TO it_datatab-Count. MOVE RESPTI TO it_datatab-RESPTI. * MOVE RESPTI2 TO it_datatab-RESPTI2. it_datatab-RESPTI2 = RESPTI/Count. MOVE CPUTI TO it_datatab-CPUTI. * MOVE CPUTI2 TO it_datatab-CPUTI2. it_datatab-CPUTI2 = CPUTI/Count. APPEND it_datatab. ENDLOOP. El problema es que al compilar .... The internal table "EX_DATA-TIME_STAT" has no header line - explicitspecification of an output area with "INTO wa" or "ASSIGNING <fs>" is required. Alguna sugerencia o tendre que terminar declarando tablas individuales? GRACIAS por anticipado. |
Herramientas | Buscar en Tema |
Desplegado | |
|
|