Ver Mensaje Individual
  #5  
Viejo 03/03/09, 14:21:18
ongo ongo is offline
Member
 
Fecha de Ingreso: ago 2007
Mensajes: 45
¿A que te refieres con error de consistencia?

Yo lo hice así:

at selection-screen on value-request for clasedoc.

* La siguiente función es para sacar el Matchcode del campo Clase de
* Documento. Recoje el valor que se ha elegido en el Matchocode
* Declaramos las siguientes variables para poder utilizar la función

data: t_dynpselect type dselc occurs 0 with header line,
t_dynpvaluetab type dval occurs 0 with header line.

data: t_help like help_info,
ayuda like help_info-fldvalue.

t_help-call = 'V'.
t_help-tabname = 'BSIK'.
t_help-fieldname = 'BLART'.

call function 'HELP_START'
exporting
help_infos = t_help
* PROPERTY_BAG =
importing
* SELECTION =
select_value = ayuda
* RSMDY_RET =
tables
dynpselect = t_dynpselect
dynpvaluetab = t_dynpvaluetab
.

clasedoc = ayuda.

* Cogemos el descriptivo de la Clase de Documento

select single ltext into texto from t003t where blart =
clasedoc and spras = 'S'.

* Necesitamos que actualice el campo Texto cada vez que se cambie la
* Clase de Documento en la pantalla
* Declaramos las siguientes variables para poder utilizar la función

data: t_dynpfields type dynpread occurs 0 with header line.

data: d_prog like d020s-prog,
d_numb like d020s-dnum.

d_prog = sy-repid.
d_numb = sy-dynnr.

t_dynpfields-fieldname = 'TEXTO'.
t_dynpfields-fieldvalue = texto.

append t_dynpfields.


call function 'DYNP_VALUES_UPDATE'
exporting
dyname = d_prog
dynumb = d_numb
tables
dynpfields = t_dynpfields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
.
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Responder Con Cita