APO EEWB – Version Dependent Extra Fields
Original article is taken from my blog at oprsteny.com
APO 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
- 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.
- 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.
- EEWB also generates a program called something like Z_MAT_GEN_LP0
- Start material master using /SAPAPO/MAT1 in CHANGE mode with material-location in version 000 and navigate to tab Extra.
You’ll see the new extra fields as editable.
- Change any extra field generated by EEWB and save changes.
- 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
- In SE11 navigate to structure CI_MATLSIM and include the same Z-structure ZSCM_PRODUCT000005 generated by EEWB.
- In SE80 open Z-program Z_MAT_GEN_LP0 generated by EEWB and navigate to PBO of its screen 0001.
- 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.
- 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