Author: Christian Gradolf

ProNovia Produkte Korrekturanleitung
Knowledge Base ID / Version | CFM-270 / V8.2.1
Ausgabe Korrekturanleitung | 05.09.2023
Farblegende Korrekturen | INSERT | REPLACE THIS | REPLACE WITH | DELETE

Include | /PRONOVIA/LPROCMGRF01
Form | MSAVE_INIT

FORM msave_init CHANGING pfx_call_wrkb
                         cv_no_processing.                  "CG/ID11576

  DATA:
      lf_xrefm            TYPE matnr
    , lf_xknft            TYPE /pronovia/knftp
    , lf_org_init         TYPE char1
    , ls_org_info         TYPE /pronovia/prm_org_info
    , lf_cad              TYPE char1
    , lv_subrc            TYPE sysubrc
    , lo_objchng          TYPE REF TO /pronovia/cl_prm_objchng          "CG/ID9264
    , lv_multiobj         TYPE multobj
    , lv_no_processing    TYPE abap_bool VALUE abap_false               "MK/ID11895
    , le_error            TYPE REF TO /pronovia/cx_badi_error           "CG/ID11576
>>>START INSERT
    , lv_do_reset_knftp   TYPE abap_bool                                "CG/CFM-270
>>>END INSERT
    .
  FIELD-SYMBOLS:

. . .

  "CG/ID9264}

  IF gs_msinfo-is_new = true.
    IF /pronovia/cl_prm_def=>cust_mai-new_chng_dialog = abap_true.

. . .

      IF /pronovia/cl_prm_def=>cust_mai-mm01diagtime = 
                                  /pronovia/cl_prm_def=>c_mm01diagtime-on_save
      AND gs_msinfo-dark_mode = false
      AND gs_msinfo-gui_available = abap_true               "CG/ID10615
      AND ( lo_objchng->change_ctrl-dialog_ctrl < 
                                  /pronovia/cl_prm_objchng=>c_dialog_ctrl-processed
         OR lo_objchng->mo_dialog_owner = go_x_owner ).
>>>START INSERT
        "<CG/CFM-270
        IF gs_msinfo-knftp_usr = abap_true.
          FREE MEMORY ID '/PRONOVIA/KNFTP'.
          CLEAR gs_msinfo-knftp.
          DELETE gt_knftp WHERE matnr = gs_msinfo-matnr.
        ELSE.
          lv_do_reset_knftp = boolc( gs_msinfo-knftp IS INITIAL ).
        ENDIF.
        "CG/CFM-270>
>>>END INSERT

        PERFORM msave_init_proc_chdiag.

>>>START INSERT
        "<CG/CFM-270
        IF  lv_do_reset_knftp = abap_true
        AND lo_objchng->change_ctrl-knftp IS NOT INITIAL.
          gs_msinfo-knftp_usr = abap_true.
        ENDIF.
        "CG/CFM-270>
>>>END INSERT

      ENDIF.

      gs_msinfo-knftp  = lo_objchng->change_ctrl-knftp.
      gs_msinfo-ablmat = lo_objchng->change_ctrl-ablma.
      gs_msinfo-reftyp = lo_objchng->change_ctrl-ref_type.

. . .

Include | /PRONOVIA/LPROCMGRF02
Form | MSAVE_HANDLE_OBJECTS

FORM msave_handle_objects USING   pf_all_late.

. . .

    "CG/ID11104:
    DELETE gt_objhndl_data
           WHERE msinfo-matnr      = ls_objhndl_data-msinfo-matnr
             AND msinfo-marc-werks = ls_objhndl_data-msinfo-marc-werks
             AND msinfo-mvke-vkorg = ls_objhndl_data-msinfo-mvke-vkorg
             AND msinfo-mvke-vtweg = ls_objhndl_data-msinfo-mvke-vtweg.
    "export data for object handling to memory
    ls_objhndl_data-all_late = pf_all_late.
    APPEND ls_objhndl_data TO gt_objhndl_data.              "CG/ID9873

    IF pf_all_late = true.
      CALL FUNCTION '/PRONOVIA/UTI_SET_COMMIT_ACTN'
        EXPORTING
          pf_repid    = lf_repid
          pf_formname = 'MSAVE_HANDLE_OBJECTS_AFC'
          pf_priority = 9.
    ELSE.
      PERFORM msave_handle_objects_exe USING 'D'. "direct

>>>START INSERT
      "CG/CFM-270/verschoben, nur wenn direkt
      "wenn Objekte behandelt werden/wurden -> der Konfigurationstyp
      "kann nicht mehr gewechselt werden!
      CLEAR gs_msinfo-knftp_usr.
>>>END INSERT
    ENDIF.

    "{CG/ID12079
    IF  ls_objhndl_data-call_type = c_call_type_newvs
    AND lv_objects_provided = abap_false
    AND /pronovia/cl_prm_def=>cust_mai-new_object_dialog = abap_false.
      "in dem Fall nachlesen
      IMPORT after_vb TO lf_after_vb
             process  TO lv_process_usage
        FROM MEMORY ID '/PRONOVIA/HNDLUSAGEINFO'.
    ENDIF.
    "CG/ID12079}

    IF lv_process_usage = abap_true.                        "CG/ID9268
      "allfällige Mehrfachverwendungen, je nach dem vor oder nach VB
      "CG/ID9268/Info: Mehrfachverwendungen (alt) sind unabhängig der
      "eigentlichen Objektbearbeitung -> auch in AFW Objekte nicht zurück stellen
      "IMPORT nach oben verschoben

      EXPORT revinfo       FROM ls_objhndl_data-revinfo
             trigger_matnr FROM ls_objhndl_data-msinfo-mara-matnr
             trigger_famnr FROM ls_objhndl_data-msinfo-famnr
          TO MEMORY ID '/PRONOVIA/PRM_OBJ_HANDL_USAGE_CTX'.

      IF  lf_after_vb = false.
        SUBMIT /pronovia/prm_fbctx WITH pf_func = '6'
                                   AND RETURN.
        IMPORT return    TO ls_bret
          FROM MEMORY ID '/PRONOVIA/PRM_OBJ_HANDL_USAGE_CTX'.
        FREE MEMORY ID '/PRONOVIA/PRM_OBJ_HANDL_USAGE_CTX'.
        IF ls_bret-type CA 'EA'.
          m_fill_msgn ls_bret-id ls_bret-type ls_bret-number.
          m_fill_msgv ls_bret-message_v1 ls_bret-message_v2
                      ls_bret-message_v3 ls_bret-message_v4.
          PERFORM msave_stop_with_error USING '0'.
        ENDIF.
      ELSE.
        CALL FUNCTION '/PRONOVIA/UTI_SET_COMMIT_ACTN'
          EXPORTING
            pf_repid    = lf_repid
            pf_formname = 'MSAVE_HANDLE_USAGE_LATE'
            pf_priority = 9.
      ENDIF.
    ENDIF.

>>>START DELETE
*   wenn Objekte behandelt werden/wurden -> der Konfigurationstyp
*   kann nicht mehr gewechselt werden!
    CLEAR gs_msinfo-knftp_usr.
>>>END DELETE

    IF ls_objhndl_data-call_type = c_call_type_handle_usage. "CG/ID9873

. . .

<ENDE>

ProNovia Produkte Korrekturanleitung		Template  Version B.00