Skip to Content
avatar image
Former Member

Table to find BOM valid-till-date

Hi Friends,

I have to check the vality of BOM components, through transaction CS03 i could able to see the Valid-till-date and i need to check the same in my code.

Looked into following tables, thre is a field valid-from-date(DATUV) but i'm not getting field Valied-to-date(DATUB).

MAST Material to BOM Link

EQST Equipment to BOM Link

STAS BOMs header

STKO BOM header

STPN BOM follow-Up control

STPO BOM item

STPU BOM sub-item

STST Standard BOM link

STVB Bills of material - Serialisation of posting

STZU Permanent BOM data

Can any one please help me.

Thanks in advance.

/Kiran

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 03, 2008 at 05:13 AM

    Hi kiran,

    I think the Valid-to-date is in table AEEF-DATE_HI which can be linked with the BOM Header table STKO by field AENNR. Try this.

    Otherwise you can also get the Date using the FM CS_BOM_EXPLOSION....

    Use it as follows;

    CALL FUNCTION 'CS_BOM_EXPLOSION'
    EXPORTING
    AUMNG = 0
    CAPID = ' '
    DATUV = DATVAL "valid-from date
    EHNDL = '1'
    MKTLS = 'X'
    MEHRS = 'X'
    MMORY = '1'
    MTNRV = MATNR
    STLAL = LAL "like mast-stlal default '1'
    STLAN = LAN "like mast-stlan default '2'
    SVWVO = 'X'
    VRSVO = 'X'
    WERKS = WERKS
    mmaps = 'X'
    IMPORTING
    TOPMAT = STARTMAT "includes structure CSTMAT
    TABLES
    STBD = TBD "includes structure CSXDOC
    STBE = TBE "includes structure CSXEQUI
    STBK = TBK "includes structure CSXKLA
    STBM = TBM "includes structure CSXMAT
    STBP = TBP "includes structure CSXGEN
    STBT = TBT "includes structure CSXTDL
    EXCEPTIONS
    ALT_NOT_FOUND = 1
    CALL_INVALID = 2
    MISSING_AUTHORIZATION = 3
    NO_BOM_FOUND = 4
    NO_PLANT_DATA = 5
    NO_SUITABLE_BOM_FOUND = 6
    OBJECT_NOT_FOUND = 7
    CONVERSION_ERROR = 8
    OTHERS = 9.

    After the function call you will get the Valid to Date(DATEUB) from table STBP.

    Hope this Helps you...

    Regards

    Karthik D

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 24, 2008 at 03:59 AM

    Hi

    Valid from date field DATUV is available in table STKO

    Regards

    Shiva

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 12, 2009 at 12:44 PM

    Hi,

    Maybe you have solved this already, since it was a while.

    The table AEEF is not available (filled) in my system nor is the field AENR

    populated in the correct way in STKO and STPO. The change you will find

    in table AENR.

    I think you need to do your own routine from the STAS table.

    If you go from the BOM Header number and do a search in STAS you get

    all items related to the BOM.

    These records you have to match against your STPO records through STLKN.

    The first record found is for valid-from date (DATUV).

    If you don't have a second record for the STPO record the valid-to date

    is the default date 9999-12-31.

    If you have a second record the valid-to date is in the DATUV field.

    There probably is a change number also and the indicator LKENZ is set.

    Ok?

    Rgds,

    /Fredrik.

    Add comment
    10|10000 characters needed characters exceeded