cancel
Showing results for 
Search instead for 
Did you mean: 

BOM status change during material replacement

Former Member
0 Kudos

we use CSKB to create an order BOM. within the bom, we do a material replacement for one of the components, so that it's bom can also be modified. At the time of replacement, the material bom has a status of 1, but after copying to the sales order bom, the status is changed to 3. this causes history tracking to turn on for the sales order bom, and we dont want that.

is this change of status configured soemplace?

tia

Accepted Solutions (1)

Accepted Solutions (1)

Shiva_Ram
Active Contributor
0 Kudos

Hi,

Not sure this is right place, but you can test it.

Check in t.code OS25, whether sales BOM History required is checked. You can uncheck the box and test it.

The path for OS25 is SPRO->Production ->Basic data-> Bill of material ->General data ->Configure history requirements of BOMs.

Regards,

Former Member
0 Kudos

thank you... we saw this option. the issue is, if the status is 3, we need to have history. the issue is that the status is CHANGING from 1 to 3 when we do the materila replacement, and we want it to stay a 1.

Former Member
0 Kudos

I have found what i think to be th eproblem. the default bom status is set to 3, which is fine for a material BOM, but it appears it is also being used for the order bom.

so... i decided to implement a method in BOM_UPDATE BADI. I copied some code from another message on this site, as follows:


method if_ex_bom_update~change_at_save.
  data: wstko type cs01_stkob.
  data: name_tstko(30) value '(SAPLCSBT)O1-STPOB[]'.
  field-symbols: <tstko> type table.

  assign (name_tstko) to <tstko>.
  read table <tstko> into wstko index 1.
  if sy-subrc = 0.
* if an order bom at status 03, change it to status 01
    if wstko-stlty = 'K' and wstko-stlst = '03'.
      wstko-stlst = '01'.
      modify <tstko> from wstko index 1.
    endif.
  endif.
endmethod.

The code compiles and executes fine, but the change is not made. i am guessing it has to do with the value in name_tstko, since that program is not even in my program stack when i save the bom (i put a breakpoint at the assign statement, and ran CSKB. I have tried various values based on the code that IS in my stack, and it simply short dumps, apparently unable to assign the names.

this could potentially fix my status issue (and a couple of other issues) if i can get it to work. any help is appreciated.

dave

Former Member
0 Kudos

the issue was with the VBKZ field. i nned to populate this field with "U" to designate that i wanted to update the table data.

Answers (0)