*---------------------------------------------------------------------*
*       FORM UPDATE_ENTRY                                             *
*---------------------------------------------------------------------*
*       ........                                                      *
*---------------------------------------------------------------------*
FORM update_entry USING value(ue_total_only).
  DATA: rec LIKE sy-subrc, tabix LIKE sy-tabix.
  tabix = sy-tabix.
  IF <status>-upd_flag EQ 'X' OR <status>-upd_flag EQ 'E' OR
     <status>-upd_flag EQ 'Y'.
    IF x_header-customauth CO sap_cust_ctrl_classes OR
       vim_ale_keyspec_check NE space.
      PERFORM check_allowed_keyranges.
    ENDIF.
    move <table1> to <vim_total_struc>.
*    WRITE <table1> TO total(x_header-tablen).
    IF <xact> EQ original.
      <action>          = aendern.
    ELSE.
      <action>          = <xact>.
    ENDIF.
  ENDIF.
  IF x_header-bastab NE space AND x_header-texttbexst NE space AND
     <status>-upd_flag EQ 'X' OR <status>-upd_flag EQ 'T' OR
     <status>-upd_flag EQ 'Y'.
    IF x_header-customauth CO sap_cust_ctrl_classes OR
       vim_ale_keyspec_check NE space.
      PERFORM check_allowed_keyranges.
    ENDIF.
    IF <status>-upd_flag NE 'Y'.
      IF <vim_xtotal_text> EQ <text_initial_x>.
        <action_text> = neuer_eintrag.
      ELSE.
        IF <xact_text> EQ original.
          <action_text>          = aendern.
        ELSE.
          <action_text>          = <xact_text>.
        ENDIF.
      ENDIF.
    ENDIF.
    MOVE <table1_xtext> TO <vim_xtotal_text>.
*    MOVE <table1_text> TO <total_text>.
  ENDIF.
  IF replace_mode NE space.
    <mark> = nicht_markiert.
  ELSE.
    <mark> = <xmark>.
  ENDIF.
  MODIFY total  INDEX tabix.
  IF ue_total_only EQ space.
    IF x_header-delmdtflag NE space.
      PERFORM check_if_entry_is_to_display USING 'L' <vim_xtotal_key>
                                                 'X' <vim_begdate>.
      rec = sy-subrc.
    ENDIF.
    extract = total.
    IF x_header-delmdtflag EQ space OR rec LT 8.
      MODIFY extract INDEX index.
    ENDIF.
  ENDIF.
ENDFORM.                               "update_entry
