Ver Mensaje Individual
  #10  
Viejo 02/04/09, 17:08:08
RakelD RakelD is offline
Junior Member
 
Fecha de Ingreso: mar 2009
Mensajes: 12
Ya lo tengo así, he intentado hacerlo poniendo antes un open_form y nada la cuestion es que
check co_perform-active <> true
tienen el mismo valor, por lo que no ejecuta las siguientes instrucciones..., estando ya en el codigo de la funcion write_form.

Pasa del primer rojo al ultimo, porque tienen los dos el valor X.

function write_form.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(ELEMENT) DEFAULT SPACE
*" VALUE(FUNCTION) DEFAULT 'SET'
*" VALUE(TYPE) DEFAULT 'BODY'
*" VALUE(WINDOW) DEFAULT 'MAIN'
*" EXPORTING
*" VALUE(PENDING_LINES)
*" EXCEPTIONS
*" ELEMENT
*" FUNCTION
*" TYPE
*" UNOPENED
*" UNSTARTED
*" WINDOW
*" BAD_PAGEFORMAT_FOR_PRINT
*" SPOOL_ERROR
*" CODEPAGE
*"----------------------------------------------------------------------
data:
create type i,
etype like itcca-tdetype.

check co_perform-active <> true.

pending_lines = false.

if rstxc-tddebug = true.
perform debug_write_form using element function type window.
endif.
if rstxc-tdopen = false.
call function 'SAPSCRIPT_MESSAGE_DEF'
exporting no = 423
v1 = 'WRITE_FORM'.
perform exception.
message a423 with 'WRITE_FORM' raising unopened.
endif.
if rstxc-tdclose = true.
call function 'SAPSCRIPT_MESSAGE_DEF'
exporting no = 443
v1 = 'WRITE_FORM'.
perform exception.
message a443 with 'WRITE_FORM' raising unstarted.
endif.
* Start Parser, if not started
if type = 'BODY' or window ne system_window_main.
if rstxc-tdwinopen = false.
perform pa_open_windows.
endif.
if rstxc-tdstarted = false and window = system_window_main.
perform pa_open.
if rstxc-tddebug = true.
perform debug_write_form using element function type window.
endif.
endif.
endif.
* Type
case type.
when 'TOP'.
if window ne 'MAIN'.
call function 'SAPSCRIPT_MESSAGE_DEF'
exporting no = 424
v1 = 'TOP'.
perform exception.
message a424 with 'TOP' raising type.
endif.
etype = etype_top.
when 'BOTTOM'.
if window ne 'MAIN'.
call function 'SAPSCRIPT_MESSAGE_DEF'
exporting no = 424
v1 = 'BOTTOM'.
perform exception.
message a424 with 'BOTTOM' raising type.
endif.
etype = etype_bottom.
when 'BODY'.
etype = etype_current.
when others.
call function 'SAPSCRIPT_MESSAGE_DEF'
exporting no = 425
v1 = type.
perform exception.
message a425 with type raising type.
endcase.
* Read Windows
read table windows with key tdwindow = window
tdetype = etype
binary search.
if sy-subrc ne 0.
call function 'SAPSCRIPT_MESSAGE_DEF'
exporting no = 426
v1 = window
v2 = rstxc-tdform.
perform exception.
message a426 with window rstxc-tdform raising window.
endif.
* Read ELEMENTS
read table elements with key tdwindow = window
tdevent = element
binary search.
if sy-subrc ne 0.
call function 'SAPSCRIPT_MESSAGE_DEF'
exporting no = 427
v1 = element
v2 = window
v3 = rstxc-tdform.
perform exception.
message a427 with element window rstxc-tdform raising element.
endif.
perform tx_set using tx_form_txtind.
if tx_catalog-tdastyle ne space.
clear tx_catalog-tdastyle.
modify tx_catalog index tx_catalog-tdtxtind.
endif.
* Function
case function.
when ev_func_set.
perform ev_set_element using etype create.
when ev_func_append.
if window = system_window_main and etype = etype_current.
perform ev_set_element using etype create.
else.
perform ev_append_element using etype create.
endif.
when ev_func_delete.
perform ev_delete_element.
when others.
call function 'SAPSCRIPT_MESSAGE_DEF'
exporting no = 428
v1 = function.
perform exception.
message a428 with function raising function.
endcase.
if rstxc-tddebug = true.
perform debug_func using elements-tdfromline.
debug-break. "#EC NOBREAK
endif.
* Main
check window = system_window_main.

case etype.
when etype_current.
ev_actual = create.
perform pa_body.
when etype_bottom.
perform pa_bottom.
if pc_bottom_height > ft-bot_height.
pending_lines = true.
endif.
when etype_top.
endcase.

endfunction.
Responder Con Cita