You are on page 1of 2

*&

---------------------------------------------------------------------*
*& Report ZPROBANDOHER10
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZPROBANDOHER10.
TABLES : t001, BSIK.
DATA : OK_CODE TYPE SY-UCOMM,
SAVE_OK LIKE OK_CODE.
DATA : TXT1(4) TYPE C.
TYPES: BEGIN OF EST_JUNTOS,
BUTXT LIKE t001-BUTXT,
LAND1 LIKE t001-LAND1,
ORT01 LIKE t001-ORT01,
END OF EST_JUNTOS.
DATA : TABLITA TYPE TABLE OF EST_JUNTOS WITH HEADER LINE.

CALL SCREEN 100.
*&---------------------------------------------------------------------*
*&
Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0100 INPUT.
SAVE_OK = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK.
WHEN 'DSP'.
SELECT SINGLE * FROM t001
WHERE BUKRS = t001-BUKRS.
TXT1 = t001-BUKRS.
WHEN 'DTL'.
CALL SCREEN 200.
WHEN 'BTNDES'.
SELECT BUTXT LAND1 ORT01
INTO TABLE TABLITA
FROM t001.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename
= 'C:\prueba_hoy.txt'
filetype
= 'ASC'
TABLES
data_tab
= TABLITA.

WHEN 'SALIR'.

ENDMODULE. " USER_COMMAND_0200 INPUT . ENDMODULE. SELECT SINGLE * FROM BSIK WHERE BUKRS = TXT1. " USER_COMMAND_0100 INPUT *&---------------------------------------------------------------------* *& Module USER_COMMAND_0200 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE USER_COMMAND_0200 INPUT.LEAVE PROGRAM. TXT1 = 'A'. ENDCASE.