PDA

Ver la Versión Completa : Como crear un mensaje de error en Web Dynpro


Jacobo
10/08/11, 08:49:33
Hola

Quería saber como crear un mensaje de error en Web Dynpro para sacarlo por pantalla cuando se ha escrito algo incorrecto o se deja el campo vacio,que pasos habría que hacer,soy nuevo en esto del Webdynpro y la parte de los mensajes nunca la he visto

Gracias

sook
10/08/11, 18:44:35
Que tal Jacobo.
Te pongo una parte de código para que lo hagas similar

DATA: lo_message_manager TYPE REF TO if_wd_message_manager.

lo_message_manager->report_error_message(
EXPORTING
message_text = 'Este es mi mensaje de error' ).
EXIT.

Saludos

Jacobo
10/08/11, 21:08:05
Hola Sook,no me va,te pongo lo que me sale,como puedo corregirlo

What has happened?
The URL http://agrupo2.dnsalias.com:8000/sap/bc/webdynpro/sap/zjlb_wd_reservas2/ was not called due to an error.


Note

■The following error text was processed in the system IDE : Access via 'NULL' object reference not possible.
■The error occurred on the application server idesecc_IDE_00 and in the work process 0 .
■The termination type was: RABAX_STATE
■The ABAP call stack was:
Method: ONACTIONBUSCARR of program /1BCWDY/B0TA3C3U8UXMLH61OW99==CP
Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/B0TA3C3U8UXMLH61OW99==CP
Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP





What can I do?
■If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system IDE in transaction ST22.
■If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server idesecc_IDE_00 in transaction SM21.
■If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server idesecc_IDE_00 . In some situations, you may also need to analyze the trace files of other work processes.
■If you do not yet have a user ID, contact your system administrator.


Error code: ICF-IE-http -c: 800 -u: MASTER203 -l: E -s: IDE -i: idesecc_IDE_00 -w: 0 -d: 20110810 -t: 230456 -v: RABAX_STATE -e: OBJECTS_OBJREF_NOT_ASSIGNED_NO



HTTP 500 - Internal Server Error


Your SAP Internet Communication Framework Team

sook
10/08/11, 22:49:16
Perdón, es q me faltó poner el código de creación de éstos objetos.
Sería algo así:

Data:
lo_comp TYPE REF TO if_wd_component,
lo_message_manager TYPE REF TO if_wd_message_manager.

lo_comp = wd_comp_controller->wd_get_api( ). lo_message_manager = lo_comp->get_message_manager( ).

lo_message_manager->report_error_message(
EXPORTING
message_text = 'tu error' ).
EXIT.


Con eso debería de funcionar.
Saludos

Jacobo
14/08/11, 15:17:52
Gracias,si ya me va ,saludos