Generally we use function modules like
VC_I_GET_CONFIGURATION_IBASE to get the values of
configuration of order/quote. But this will not always work as these functions are not released yet (or)
in case if we need to create a SAP query joining the database table or if we are working on
improving the performance of the report where in we are asked by the quality team to use the table instead of functions.
This Blog post would be helpful for writing SAP queries or for performance optimization in fetching configuration values in Variant Configuration using database.
Here I have shown the link of tables involved in storing the configuration values and how to fetch it.
Step1:
Get the configuration values using table links using SAP tables:
Input: Sales order number and item number
Pass the Sales order number to VBELN and Item to POSNR and get the field CUOBJ(Internal number) from the table
VBAP as below.
Step 2 :
Input : CUOBJ(internal number) from step 1
Pass CUOBJ to INSTANCE field in table
IBIN and get the IN_RECNO(record number) as output as shown below.
Step 3:
Input: IN_RECNO(record number) fetched in step 2
Get the SYMBOL_ID from IBINVALUES table as shown below,
Step 4 :
Input: SYMBOL_ID from Step 3
Pass SYMBOL_ID and get the fields ATINN(Characteristics internal number), ATWRT(characteristics value) from table
IBSYMBOL as below.
Step 5:
Input: ATINN( Characteristics Internal Number ) from Step 4
Pass ATINN and get the ATNAM (characteristics Name) from table
CABN as below,
Step 6:
Input: ATINN( Characteristics Internal Number ) from Step 5
Pass the ATINN and get the characteristics description from table
CABNT as below,
Step 7:
Input: ATINN( Characteristics Internal Number ) from Step 6
By passing ATINN get the characteristics value description from table
CAWNT as below,
Following the above steps you will get all the configuration values of the sales order with characteristics description along with characteristics value description without using any Function Modules.
Wherever you think you cannot use the function module you can use these database links to fetch the configuration values .
Hope this blog post helps!! and write out to me in comments section for any queries / doubts or any Variant configuration related issues.
Please do share your feedback to me .