Skip to content

Instantly share code, notes, and snippets.

@dantesco
Created November 11, 2013 17:22
Show Gist options
  • Save dantesco/7416861 to your computer and use it in GitHub Desktop.
Save dantesco/7416861 to your computer and use it in GitHub Desktop.
Obtener la salida de un programa y guardarla en memoria
DATA: BEGIN OF tabla OCCURS 0.
INCLUDE STRUCTURE abaplist.
DATA:END OF tabla.
* Ejecutar programa Transacciòn S_ALR_87012332.
SUBMIT rfausz00 WITH br_budat IN s_budat
WITH br_bukrs-low EQ s_bukrs WITH br_gjahr-low EQ s_any
LINE-SIZE 255 EXPORTING LIST TO MEMORY AND RETURN.
**** Pasa la información de Memoria a una Tabla
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = tabla.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = tabla.
**** Pasa la información de la tabla bin a una tabla ascii
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = zlistado
listobject = tabla
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment