ProNovia Produkte Korrekturanleitung
Knowledge Base ID / Version | CFM-324 / V8.4.1
Ausgabe Korrekturanleitung | I / CG / 22.04.2024
Farblegende Korrekturen | INSERT | REPLACE THIS | REPLACE WITH | DELETE

Include | /PRONOVIA/LPRMOBDF02
Form | MAST_HEADER_GET

FORM mast_header_get
            USING    ps_info      TYPE /pronovia/prm_obd_info
            CHANGING ptx_objects  TYPE  /pronovia/prm_objinfo_tab.

  DATA:

. . .

    , lt_mast_obj         TYPE /pronovia/prm_objinfo_tab                "CG/ID10540
>>>START INSERT
    , lv_datub_bom        TYPE datub                                    "CG/CFM-324
    , lv_dpvsorder        type /pronovia/prm_objinfo-dpvsorder          "CG/CFM-324
>>>END INSERT
    .
  FIELD-SYMBOLS:

. . .

*   Köpfe ausgeben (rest mit Expand No Children)
    LOOP AT lt_mast_obj INTO ls_objinfo.                    "CG/ID10540

*     wenn DP mit Struktur, dann muss dieses auch vorhanden sein. DRAW
*     (>DP) wird immer zuerst behandelt.
>>>REPLACE THIS
      PERFORM check_dp_is_ok USING ptx_objects
                                   ls_objinfo.
>>>REPLACE WITH
      "<CG/CFM-324/hier selber wegen Gültigkeit
      "      PERFORM check_dp_is_ok USING ptx_objects
      "                                   ls_objinfo.
      lv_datub_bom = ps_info-datub. "default max / ohne DP Struktur
      IF ls_objinfo-dpstr <> c_dp_struc_none.
        LOOP AT ptx_objects ASSIGNING FIELD-SYMBOL(<ls_dp>)
                             WHERE dptyp     =  ls_objinfo-dptyp
                               AND obrel     IS INITIAL
                               AND NOT objek IS INITIAL
                               AND orgty     =  ls_objinfo-orgty
                               AND orgky     =  ls_objinfo-orgky
                               AND dpvrs     =  ls_objinfo-dpvrs.
          lv_dpvsorder = <ls_dp>-dpvsorder + 1.
          LOOP AT ptx_objects ASSIGNING FIELD-SYMBOL(<ls_dp2>)
                              WHERE dptyp     =  ls_objinfo-dptyp
                                AND obrel     IS INITIAL
                                AND NOT objek IS INITIAL
                                AND orgty     =  ls_objinfo-orgty
                                AND orgky     =  ls_objinfo-orgky
                                AND dpvsorder =  lv_dpvsorder.
            lv_datub_bom = <ls_dp2>-datuv - 1.
          ENDLOOP.
          CLEAR sy-subrc. "unten
        ENDLOOP.
      ELSE.
        CLEAR sy-subrc.
      ENDIF.
      "CG/CFM-324>
>>>END REPLACE
      CHECK sy-subrc = 0.

*     ggf. ist eine Organisationseinheit zugewiesen? => Filter

. . .

          CALL FUNCTION '/PRONOVIA/UTI_DATUV_FOR_OBJ'
            EXPORTING
              pf_aennr  = lf_aennr
              pf_stlty  = 'M'
              pf_stlan  = <mastb>-stlan
              pf_werks  = <mastb>-werks
              pf_stlal  = <mastb>-stlal
              pf_aedtz  = lf_aedtz
            IMPORTING
              pfx_datuv = lf_datuv.
>>>REPLACE THIS
          IF  lf_datuv <= ps_info-datub
>>>REPLACE WITH
          IF  lf_datuv <= lv_datub_bom "CG/CFM-324 
>>>END REPLACE
          AND lf_datuv > ls_objinfo-datuv.
            ls_objinfo-datuv = lf_datuv.
            ls_objinfo-aennr = lf_aennr.
          ENDIF.
        ENDSELECT.

        "{CG/ID7806
        IF ls_objinfo-datuv IS INITIAL.
          SELECT datuv INTO ls_objinfo-datuv
                 FROM stko
                 UP TO 1 ROWS
                 WHERE stlty = 'M'
                   AND stlnr = <mastb>-stlnr
                   AND stlal = <mastb>-stlal
                   AND lkenz = space
>>>REPLACE THIS
                   AND datuv <= ps_info-datub
>>>REPLACE WITH
                   AND datuv <= lv_datub_bom "CG/CFM-324
>>>END REPLACE
            ORDER BY datuv DESCENDING.
          ENDSELECT.
        ENDIF.
        "CG/ID7806}

        "Markieren als BOM Kopf

. . .

        SELECT SINGLE antxt INTO ls_objinfo-bezei
               FROM t416t
               WHERE spras = sy-langu
                 AND stlan = ls_mast_key-stlan.
        IF sy-subrc NE 0.
          CLEAR ls_objinfo-bezei.
        ENDIF.

>>>REPLACE THIS
        ls_mast_key-datuv = ps_info-datuv.                  "CG/ID7800
        ls_mast_key-datub = ps_info-datub.                  "CG/ID7800
>>>REPLACE WITH
        ls_mast_key-datuv = ls_objinfo-datuv. "CG/CFM-324 "CG/ID7800
        ls_mast_key-datub = lv_datub_bom.     "CG/CFM-324 "CG/ID7800
>>>END REPLACE

        "CG/ID8285/keine DP Gültigkeit mehr!

>>>START DELETE
        "{CG/ID6266
        IF  ls_mast_key-datub > ps_info-datub.
          "DATUB in from DP is greater > datub from range - correct
          ls_mast_key-datub = ps_info-datub.
        ENDIF.

        IF ls_objinfo-datuv > ls_mast_key-datuv.            "CG/ID7800
          ls_mast_key-datuv = ls_objinfo-datuv.             "CG/ID7800 CG/ID7934
        ENDIF.                                              "CG/ID7800
        ls_objinfo-objek = ls_mast_key.                     "CG/ID7800 CG/ID6266}
>>>END DELETE

        "Daten übernehmen

. . .

ENDFORM.                    " mast_header_get

<ENDE>