|
#1
|
||||
|
||||
Ayuda con ampliacion
Buen día a todos.
Tengo una apmliacion para la IW32, la cual tiene un detalle curioso que no he podido arreglar. El detalle es que cuando doy manualmente los datos y los guardos lo hace perfectamente, pero cuando doy enter para que de los datos de forma automatica, lo pone le doy guardar y no los guarda, dice que si pero cuando checo no hay nada. Asta hoy lo que e visto de deferente es que hay una bandera del sistema SY-DATAR, que no se activa cuando hace los calculos, pero si se actva cuando tecleo algo, ya puse en el codigo la badera activada y no hace nada, ¿Alguien tiene una idea de porque sea eso? Muestro el codigo IF ok-code eq 'BU'. *Se checa que fecha baja este llenado, de ser asi se verifica que CambioRealizado este marcado IF NOT afvgd-usr09 IS INITIAL AND afvgd-usr11 IS INITIAL. ok-code = 'ENT1'. message e461(iw) with 'Debe indicar la CambioRealizado'. ENDIF. *Se checa que CambioRealizado este marcado, de ser asi se verifica que la fecha de baja este llena IF NOT afvgd-usr11 IS INITIAL AND afvgd-usr09 IS INITIAL. * ok-code = 'ENT1'. sy-datar = 'X'. message e461(iw) with 'Debe indicar la Fecha de Baja'. ENDIF. ENDIF. clear: vl_band, wa_imrg. *agamez 23.03.2010 horometro de instalacion *if not afvgd-usr08 is initial and ok-code is initial. if not afvgd-usr08 is initial or ok-code eq 'BU'. r_idate2-sign = 'I'. r_idate2-option = 'BT'. r_idate2-low = afvgd-usr08. r_idate2-high = afvgd-usr09. append r_idate2. clear r_idate2. *Se checa si la badera de datos esta llena IF sy-datar eq space. sy-datar = 'X'. ENDIF. if afvgd-usr08 is initial. * ok-code = 'ENT1'. sy-datar = 'X'. message e461(iw) with 'Debe indicar primero la Fecha de Instalación'. else. concatenate 'IE' caufvd-equnr into lv_mpobj. select single point into lv_point from imptt where mpobj eq lv_mpobj and mptyp eq 'H' and inact eq ''. if sy-subrc is initial. *se checa si tiene datos en la fecha de instalacion * SELECT idate itime readg INTO CORRESPONDING FIELDS OF TABLE lt_IMRG select single idate itime readg into wa_imrg from imrg where point eq lv_point and idate eq afvgd-usr08 and cancl eq '' and vlcod ne 'INIT'. if sy-subrc eq 4. vl_band = 'X'. endif. *Se checa si tiene datos en el rango de fechas select idate itime readg into corresponding fields of table lt_imrg from imrg where point eq lv_point * AND IDATE GE AFVGD-USR08 * AND IDATE LE AFVGD-USR09 and idate in r_idate2 and cancl eq '' and vlcod ne 'INIT'. IF sy-subrc eq 4." AND NOT AFVGD-USR08 IS INITIAL AND AFVGD-USR09 IS INITIAL. SELECT idate itime readg INTO CORRESPONDING FIELDS OF TABLE lt_IMRG FROM IMRG WHERE POINT EQ lv_POINT AND IDATE LE AFVGD-USR08 AND CANCL EQ '' AND VLCOD NE 'INIT'. sort lt_imrg by idate descending itime ascending. endif. if afvgd-usr06 is initial. * sort lt_imrg by idate ascending itime ascending. read table lt_imrg index 1. if sy-subrc is initial. afvgd-usr06 = lt_imrg-readg / 3600 / 10. *Checa si el horometro esta en el rango de fechas establecido pero antes de la fecha dada if vl_band = 'X' and ok-code ne 'BU'. * ok-code = 'ENT1'. sy-datar = 'X'. message i461(iw) with 'Horómetro en pasado, FAVOR DE ACTUALIZAR'. clear vl_band. endif. elseif sy-subrc ne 0. if wa_imrg-readg eq space and ok-code ne 'BU'. * ok-code = 'ENT1'. sy-datar = 'X'. message i461(iw) with 'No existe horómetro, FAVOR DE ACTUALIZAR'. clear vl_band. else. afvgd-usr06 = wa_imrg-readg / 3600 / 10. endif. endif. endif. endif. endif. if wa_imrg ne space and afvgd-usr06 ne space. if afvgd-usr08 lt wa_imrg-idate. ok-code = 'ENT1'. message i461(iw) with 'Horómetro en pasado, FAVOR DE ACTUALIZAR'. clear vl_band. endif. endif. clear: vl_band. endif. IF afvgd-usr06 IS INITIAL AND NOT afvgd-usr08 IS INITIAL AND afvgd-usr09 IS INITIAL. ok-code = 'ENT1'. ENDIF. Si alguien me puede ayudar con eso le estoy muy agradecido ya que no le voe la puerta |
Herramientas | Buscar en Tema |
Desplegado | |
|
|