cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a Function Module to read all BOM Variants

Former Member
0 Kudos


Hi,

I have a requirement to read all the BOM variants of Engineering BOM through a Function Module and pass this information to Third Party Application.

Is there any such Function module/BAPI?

Need your expert advice.

Thanks and Regards,

OmPrakash

Accepted Solutions (1)

Accepted Solutions (1)

former_member214775
Contributor
0 Kudos

Hi OmPrakash,

if you mean the PSM and variants then you can use the followings:

you can use the function module PVSHI_PNCMP_READ and the method PRELID_READ in class CL_PPEXIENG_CNTL to read the hierarchy. (same)


For PSM nodes:


you can use the GET_HIERARCHY_ABOVE of assistance class /PLMU/CL_PPE_CMP_TREE_ASSIST.

Or you can use the function module PVSHI_PNCMP_READ. You can use the node ID in table componentnodedata. The componentrelation table will display the relationships.

Hope this helps!

Best regards

Tamas

Former Member
0 Kudos

Hi Tamas,

This is good info on fetching Variants from PSM structure.

As of now we are still using Variant Configuraiton to build the multiple variants. It would really helpfull if you can provide some info on how to fetch bom variants in this case.

Regards,

OmPrakash

former_member214775
Contributor
0 Kudos

Hi OmPrakash,

if you want a list of your material variants assigned to your eBOM (KMAT header) then you can use the transaction CU44 and the programs assigned to that.

Best regards

Tamas

Answers (2)

Answers (2)

former_member183072
Active Participant
0 Kudos

Hi ,

If you want to use 'CS_BOM_EXPL_MAT_V2' funtion to get the BOM components, you need to give the importing parameter mtnrv( material number).

the components are stored in TABLES : stb.

I am doing this way.

but werks, date , and capid are optional .

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

       EXPORTING

         mtnrv                 = i_matnr

         werks                 = i_werks

         datuv                 = i_date

         capid                 = l_capid

       IMPORTING

         topmat                = ms_cstmat

       TABLES

         stb                   = lt_stpox

       EXCEPTIONS

         alt_not_found         = 1

         call_invalid          = 2

         material_not_found    = 3

         missing_authorization = 4

         no_bom_found          = 5

         no_plant_data         = 6

         no_suitable_bom_found = 7

         conversion_error      = 8.

Please give it a try.

BR,

Ovidiu

jogeswararao_kavala
Active Contributor
0 Kudos

You may go through these FMs and try SAP bom explosion fms (Function Modules)

Former Member
0 Kudos

Hi Jogeswara Rao Kavala,

Thanks for the info.

I am trying to use "CS_BOM_EXPL_MAT_V2" Function module. But there are so many input parameters. Not sure how to use this.

Any further help on this?

Regards,

OmPrakash

former_member223190
Participant
0 Kudos

Hello OmPrakash

Please let me are looking out for variants from PSM ?

Thanks & Regards

Satish