ABAP – APO Material master version dependent extra fields

SAPAPO system offers only 5 product specific and another 5 product-location specific, version dependent fields called AT101 – AT105 and ATT01 – ATT05. But what if you need MORE than these 10 extra fields to be version dependent? You can generate more extra fields using the EEWB (Easy Enhancement Workbench) but this tool generates the extra fields as version independent (all planning versions will share the same values).
In this article I’ll show how to make these extra fields made by EEWB version dependent.

Extra fields using EEBW

  1. Using EEWB you generate a structure called something like ZSCM_PRODUCT000005 with fields and ZSCM_PRODUCT000006 with update flags for fields you defined during EEWB wizard.
  2. Structure ZSCM_PRODUCT000005 is then used in table /SAPAPO/MATLOC and its include CI_MATLOC (table /SAPAPO/MATLOC contains an INCLUDE CI_MATLOC which includes structure ZSCM_PRODUCT000005) … this is also done by EEWB wizard.
  3. EEWB also generates a program called something like Z_MAT_GEN_LP0

Initial test

  1. Start material master using /SAPAPO/MAT1 in CHANGE mode with material-location in version 000 and navigate to tab Extra.
    Y
    ou’ll see the new extra fields as editable.
  2. Change any extra field generated by EEWB and save changes.
  3. Start material master using /SAPAPO/MAT1 in CHANGE mode with the same material-location but now in different version than 000 and navigate to tab Extra.
    You’ll see the new extra fields as read-only with values previously set and saved in version 000 => This proves that such extra fields are VERSION INDEPENDENT

Make EEWB extra fields version dependent

  1. In SE11 navigate to structure CI_MATLSIM and include the same Z-structure ZSCM_PRODUCT000005 generated by EEWB.
  2. In SE80 open Z-program Z_MAT_GEN_LP0 generated by EEWB and navigate to PBO of its screen 0001.
  3. Go to module SET_SCREEN and modify the code (comment/delete few lines) as in the following example:
    case gv_input.
      when gc_true.
    *   if gv_dynpro_mathead = cv_mat_version.
    *     move gc_off to screen-input.
    *   else.
          move gc_on to screen-input.
    *   endif.
        if /SAPAPO/MATIO-LOCID is initial.
          move gc_off to screen-input.
        endif.
      when gc_false.
        move gc_off to screen-input.
      endcase.
  4. Start material master using /SAPAPO/MAT1 with the same material-location in different version than 000 and navigate to tab Extra.
    WHAT ???
    You can see the new extra fields as EDITABLE with empty values (different from values in version 000) => This demonstrates that such extra fields are now VERSION DEPENDENT

One thought on “ABAP – APO Material master version dependent extra fields

Leave a Reply to MCUNCancel reply