Ver Mensaje Individual
  #7  
Viejo 02/07/09, 15:33:06
cosagaucha cosagaucha is offline
Member
 
Fecha de Ingreso: ago 2006
Mensajes: 64
Codigo dentro de la funcion:

*Typos
types: begin of ty_bdc_tab,
program type bdcdata-program,
dynpro type bdcdata-dynpro,
dynbegin type bdcdata-dynbegin,
fnam type bdcdata-fnam,
fval type bdcdata-fval.
types: end of ty_bdc_tab.

*Tablas
data: gt_bdc_tab type ty_bdc_tab.

*Variables
DATA: x_l(10) TYPE c.

CASE p_codigo.

WHEN 'C'. "Creación de Equipos

PERFORM ztest USING 'C'
CHANGING x_l.

WHEN 'M'. "Modificacion de datos del Equipo

PERFORM ztest USING 'M'
CHANGING x_l.
ENDCASE.


ENDFUNCTION.


*&---------------------------------------------------------------------*
*& Form ztest
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->CL_A text
* -->CL_L text
*----------------------------------------------------------------------*
FORM ztest USING cl_a
CHANGING cl_l TYPE c.
IF cl_a EQ 'C'.
MOVE 'Creacion' TO cl_l.
ELSE.
MOVE 'Modificacion' TO cl_l.
ENDIF.

ENDFORM. "ztest

*&--------------------------------------------------------------------*
*& Form dynpro
*&--------------------------------------------------------------------*
* -->MODO Modo de ejecución
* -->NOMBRE Nombre de programa
* -->VALOR Valor de la dynpro
*---------------------------------------------------------------------*
form dynpro using modo nombre valor
changing wa_tabla type ty_bdc_tab.
* ACA DA EL ERROR, en la linea del changing,
* donde pone que el "type ty_bdc_tab is unknown"

clear wa_tabla.
if modo = 'X'.
move: nombre to wa_tabla-program,
valor to wa_tabla-dynpro,
'X' to wa_tabla-dynbegin.
else.
move: nombre to wa_tabla-fnam,
valor to wa_tabla-fval.
endif.
append wa_tabla.
endform. "dynpro
Responder Con Cita