Class to create Price Family / Family Group
I am technical consultant and working in SAP. I wanted to write this blog post just to share my knowledge and experience in developing one of the object in IS Retail project which will create price families for multiple articles.
Transaction Code is PRFAM to create / update / Delete price family.
There are many transactions which are not having any FM or BAPI released by SAP to create / update the data. This is one of them. I got requirement to create price family / Groups and also assigning different materials and prices to the same group using file upload.
Conceptually it was very good requirement for the users to create this Tree using file upload.
So I did some research and tried to find if I can achieve this using BAPI or FM. But there was nothing available for me to use it directly. So I found below class.
CL_FAMILY-> Methods: ADD_GROUP ADD_TEXT CHECK_SAVING
This will create / change family. As my requirement was not foreground i used above methods but if you want to create it using dialog mode you can do it using below method,
For Create/ Change Family Group,
CL_FAMILYGROUP-> ADD_ARTICLE CHECK_OTHER_FAMILIES GET_ARTICLES
There is another class which will help you to activate the family, which you can use it for saving
CL_FAMILYMANAGEMENT-> Methods: ACTIVATE_FAMILY
There are many different methods you can use depending on your requirement.
You can use this class for creating / changing or deleting the price families rather than using BDC approach. I would love to hear back from experts their opinion and knowledge share regarding this.