cancel
Showing results for 
Search instead for 
Did you mean: 

Table to find BOM valid-till-date

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

yes,

we can use FM: CSAP_BOM_READ . when i wanted only STPO contents with valid till date.

Bom explosion when we need full fledged info from BOM.

Thank you,

Kiran

Former Member
0 Kudos

hi Kiran,

can you please share how to get the valid till date through the CSAP_BOM_READ .

thanks.

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

Valid from date field DATUV is available in table STKO

Regards

Shiva