Você está na página 1de 5

BATCH INPUT PARTE I

PROGRAMA CLAVE PARA LA GRABACIN:


Este programa se realiza para poder hacer una grabacin y solo se
utiliza la transaccin que se genera.
CDIGO FUENTE
*&---------------------------------------------------------------------*
*& Report ZINSERTA_TABLA_EXAM
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZINSERTA_TABLA_EXAM.
TABLEs: ZTABLA_RA.
data: ok_code TYPE sy-ucomm.
START-OF-SELECTION.
CALL SCREEN 0010.
*&---------------------------------------------------------------------*
*&
Module STATUS_0010 OUTPUT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
module STATUS_0010 output.
SET PF-STATUS 'STATUS_0010'.
* SET TITLEBAR 'xxx'.
endmodule.
" STATUS_0010 OUTPUT
*&---------------------------------------------------------------------*
*&
Module USER_COMMAND_0010 INPUT
*&---------------------------------------------------------------------*
*
text
*----------------------------------------------------------------------*
module USER_COMMAND_0010 input.
CASE sy-ucomm.
WHEN 'BACK'. LEAVE PROGRAM.
WHEN 'CANCEL'.LEAVE PROGRAM.
WHEN 'EXIT'.LEAVE PROGRAM.
WHEN 'GUARDAR'.
INSERT INTO ZTABLA_RA VALUES ZTABLA_RA.
ENDCASE.
endmodule.

" USER_COMMAND_0010

Transaccin: ZCARGA_DATOS

INPUT

INICIO DE GRABACION.

Enseguida aparece la pantalla del programa de captura

Se debe obtener el cdigo del programa de la grabacin como se


muestra a continuacin.

CODIGO DE LA GRABACIN
CODIGO GENERADO
report ZBATCH_INPUT_EJEMPLO
no standard page heading line-size 255.
include bdcrecx1.
start-of-selection.
perform open_group.

perform bdc_dynpro
perform bdc_field
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform
perform

using 'ZINSERTA_TABLA_EXAM' '0010'.


using 'BDC_CURSOR'
'ZTABLA_RA-BSTAT'.
bdc_field
using 'BDC_OKCODE'
'=GUARDAR'.
bdc_field
using 'ZTABLA_RA-BUKRS'
'1000'.
bdc_field
using 'ZTABLA_RA-BELNR'
'43'.
bdc_field
using 'ZTABLA_RA-GJAHR'
'2006'.
bdc_field
using 'ZTABLA_RA-BLART'
'SA'.
bdc_field
using 'ZTABLA_RA-MONAT'
'3'.
bdc_field
using 'ZTABLA_RA-USNAM'
'D'.
bdc_field
using 'ZTABLA_RA-TCODE'
'T'.
bdc_field
using 'ZTABLA_RA-XBLNR'
'000'.
bdc_field
using 'ZTABLA_RA-BKTXT'
'2000'.
bdc_field
using 'ZTABLA_RA-BSTAT'
'L'.
bdc_dynpro
using 'ZINSERTA_TABLA_EXAM' '0010'.
bdc_field
using 'BDC_CURSOR'
'ZTABLA_RA-BUKRS'.
bdc_field
using 'BDC_OKCODE'
'=BACK'.
bdc_field
using 'ZTABLA_RA-BUKRS'
'1000'.
bdc_field
using 'ZTABLA_RA-BELNR'
'43'.
bdc_field
using 'ZTABLA_RA-GJAHR'
'2006'.
bdc_field
using 'ZTABLA_RA-BLART'
'SA'.
bdc_field
using 'ZTABLA_RA-MONAT'
'3'.
bdc_field
using 'ZTABLA_RA-USNAM'
'D'.
bdc_field
using 'ZTABLA_RA-TCODE'
'T'.
bdc_field
using 'ZTABLA_RA-XBLNR'
'000'.
bdc_field
using 'ZTABLA_RA-BKTXT'
'2000'.
bdc_field
using 'ZTABLA_RA-BSTAT'
'L'.
bdc_transaction using 'ZCARGA_DATOS'.

perform close_group.

Você também pode gostar