Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Pankaj Singh
more by this author
SAP Advanced Planning and Optimization
characteristic value combinationcvcsap advanced planning & optimization
share 0
share 0
tweet
share 0
Follow
A. What is CVC?
CVC, Characteristic Value Combination is a master data of APO Demand Planning. It is
group of characteristic values (hence known as combination) which is used in
forecasting process. In CVC, we define, with what characteristics (values) forecasting
can be done. To learn more about CVC please check http://goo.gl/qjkwB
B. Steps to create CVC
CVCs can be created in transaction /n/SAPAPO/MC62 using following different options:-
APO Demand Planning will not worry about the real integration with ECC. So
irrespective of whether CVC value is valid or invalid, it will anyway create CVC
combination. Our client wanted to do real time check with R/3 and that CVC
should be created only if valid characteristic values are used to create CVCs.
Also, this check should be done irrespective of the method used for creating CVC.
E. Final solution!!
Some more (actually lot more) analysis and debugging took us back to BAdi
/SAPAPO/SDP_MASTER but this time method COMBI_ENRICH. Documentation of this BAdi
method suggests that this can be use to enhance CVC values just before creation. So
this is the place where we can modify CVC values as required. This method also gets
called in all the above ways of creating CVCs. Thus we decided to use BAdi
/SAPAPO/SDP_MASTER~COMBI_ENRICH. Technical pseudo logic is discussed in section
below and gives clear picture on how we used this BAdi method for our validation
scenario.
F. Technical Pseudo Logic
2. To log error message for invalid CVC to application log, we will need application
log handle. When control comes to this point use function module
/SAPAPO/TS_GENER_CODING by passing planning object and program class
PSTRU_PLOB_CREATE to get internal generated program name for respective
planning object. Variable (Generated program name)GV_LOGHANDLE from ABAP
memory will give handle of application log currently being used.
4. If error message is returned for respective CVC, log this error message in
application log using handle reteived from ABAP memory, as explained in point 2
above. Also delete respective CVCs from table parameter CT_PLOB_VALUES_TAB
so that same is not created.
5. From performance point of view, it is advisable to pass all CVCs in single RFC call
to R/3, get the validation done there and let error message be send back to APO.
6. We also store the CVC context when logging error message to application log.
This helps in understanding which CVC lead to respective error. Check below
screen shot to get an idea how error message will appear in application log.
G. Conclusion
I hope this helps anyone who have similar requirement on CVCs validation with ECC.
Alert Moderator
5 Comments
Hi Pankaj,
Can you explain the 2nd point To log error message for invalid CVC to application log in
detail? How do we get the application log handle from generated program name?
Thanks in advance.
Madhura
EXPORTING
i_plobid = iv_bas_plobid
IMPORTING
e_gen_repid = gv_gen_prog_name
EXCEPTIONS
generation_failed = 1
OTHERS = 2.