Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BOM EXPLOSION

Former Member
0 Kudos

Hi friends,

can any one let me know how to explode a bom data by giving purchase order material, Quantity & Due date.

Please let me know,

Regards,

Roberts.K

9 REPLIES 9

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here is a function module.



data: begin of istpox occurs 0.
        include structure stpox.
data: end of istpox.

  call function 'CS_BOM_EXPL_MAT_V2'
       exporting
            capid                 = 'PP01'
            mehrs                 = 'X'
            datuv                 = sy-datum
            mtnrv                 = matnr
            werks                 = werks
            emeng                 = menge
       tables
            stb                   = istpox
       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
            others                = 8.

Regards,

Rich Heilman

0 Kudos

hiheilman,

thank you very much for the information ,can u explain me the fields i mean for which they are related for , that will be greatful.

thanks , regards

Roberts.K

0 Kudos

mmm......



mtnrv   = ekpo-matnr "This is the material
werks   = ekpo-werks "This is the plant
emeng   = ekpo-menge "This is the quantity

Not sure what you are asking for here.

Regards,

Rich Heilman

0 Kudos

i am asking about capid, mehrs and datuv, please and the fields in structure stpox. thanks.

roberts.k

0 Kudos

So I was right with the other thread!

Have a look at program: RCS12001.

It calls the FM CS_BOM_EXPL_MAT_V2, and shows you how the parameters are filled.

Cheers,

Brad

Message was edited by: Brad Williams

0 Kudos

thank you, but could you let me know how to find the appropriate application id i.e CAPID and in datuv field which date i have to give.

thanks in advance,

regards,

roberts.k

0 Kudos

Hi Roberts,

Application ids are defined as follows

BEST Inventory management

INST Plant maintenance

PC01 Costing

PI01 Process manufacturing

PP01 Production - general

SD01 Sales and distribution

These are the ones delivered by SAP. You can define your own as well. Depending on what type of BOM you are dealing with you will use the appropriate application ID. Go to CS12 which will do the same thing that you are trying to do programatically. Check the help on the fields there. DATUV is the valid-from date. It depends on your program logic as to what date you pass to this field. If you are looking for a valid BOM on a specific date(not necessarily system run date), then you will pass that date, but if you are looking for a BOM that is valid on the current run date, then just pass sy-datum.

Hope this helps,

Srinivas

Message was edited by: Srinivas Adavi

I was just looking at your requirement, I think you need to pass due date for the DATUV field.

0 Kudos

Hi Srinivas,

Than you very much for the help , will go through the information u gave and will get back to you,

thanks a lot,

regards,

roberts.k

0 Kudos

Thanks for your advice.

However what is the performance of this function module