on 03-29-2013 7:17 PM
Hi Experts,
i have one interesting requirement from my client.
They want to have a report for USAGE PROBABILITY for their KMAT material orders. This means if a KMAT material is a car and it comes in Black, Blue & Red colours as 3 characteristic values, then they want to determine the percentage of each of the colours against the total number of cars sold.
For example, if 1000 cars were sold in a given period of time, then Black coloured cars were 400, Red ones 300 & Blue ones 300 (total 1000).
By doing so, they want to be able to carry out more efficient demand forecasting and customer buying trend analysis.
I know we can achieve this requirement by developing a Z report and the remaining logic is already suggested by me but i am stuck here.
I want to know how we can pull all the characteristics maintained for a material based on the material number. is there any Table for this one? I know CAWN & CABN tables are for characteristics and Classes respectively but HOW TO HAVE A LOGICAL LINK (ABAP) BETWEEN THE KMAT MATERIAL NUMBER (MATNR) AND IT'S CLASSES / CHARACTERISTICS?
Please suggest as I believe this will be an important learning for me and most of the people here in this forum.
Thanks,
Siddhant
Use this BAPI --BAPI_OBJCL_GETDETAIL_KEY.
Put Objkey as Material Number and ClassNum as your class as an input parametres and get the value of all characterstics maintained in that class.
Let me know,if i misunderstood your requirement.
Regards
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Guys,
thanks for all the vital inputs. good learning for me.
@Sai Krishna,
I had already tried to search the forum before posting but could not find the relevant threads mentioned by you. may be my search key words were wrong
Thanks for the help anyway,
Siddhant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siddhant,
I request you to search in forum before posting it. We have lot of threads in SCN on this.
Few examples:
http://scn.sap.com/thread/3279960
http://scn.sap.com/thread/3283661
http://scn.sap.com/thread/3188482
This will save everyone's time.
Regards,
Sai Krishna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Siddhant,
Hope the following link helps. Thanks.
http://wiki.sdn.sap.com/wiki/display/SAPMDM/Issues+in+fetching+internal+characteristics+of+materials
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, there is one more query here.
Can we pull what characteristics were selected for that material in the sales order?
I mean a KMAT material can have many variants & characteristics but at the time of sales order we select only those characteristics / variants which the customer wants. So can we fetch the data for only the selected characteristics for the order?
Pls suggest
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siddhant,
Based on the sales order number and item, you will get object number CUOBJ field in VBAP,
then pass the same no to following function module (VC_I_GET_CONFIGURATION).
DATA: IT_CONFIG LIKE TABLE OF CONF_OUT,
WA_CONFIG LIKE LINE OF IT_CONFIG.
SELECT SINGLE CUOBJ INTO WA_FINAL-CUOBJ FROM VBAP
WHERE VBELN = WA_FINAL-VBELN AND POSNR = WA_SALES-ITM_NUMBER.
CALL FUNCTION 'VC_I_GET_CONFIGURATION'
EXPORTING
INSTANCE = WA_FINAL-CUOBJ
LANGUAGE = SY-LANGU
TABLES
CONFIGURATION = IT_CONFIG
EXCEPTIONS
INSTANCE_NOT_FOUND = 1
INTERNAL_ERROR = 2
NO_CLASS_ALLOCATION = 3
INSTANCE_NOT_VALID = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
Regards,
Bastin.G
Thanks for the info Bastin and Amit. I will surely check this out and post it here.
Siddhant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to use this FM also .
CLAF_CLASSIFICATION_OF_OBJECTS
BAPI_OBJCL_GETDETAIL
Regards,
Bastin.G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.