06-26-2012 7:27 AM
Hi friends,
I would like to retrieve the correct alternative bom to display in the report.
I was thinking to link STPO to STAS and then retrieve the alternative bom from STAS-STLAL column.
The linkage between STPO and STAS would be :-
However, i found that the above linkage is not unique enough.
Please refer to the below diagrams where STAS-STLKN = 11.
You will find that there are two entries where one alternative bom = "AA" and another is "UL".
So, may i know for this case, what would be the correct alternative bom and how to determine it?
In both STPO and STAS tables, there is a field called internal counter (STPO-STPOZ, STAS-STASZ).
May i know what are they used for?
Thanks, gk
06-26-2012 9:06 AM
hI
You would need to join mast as well......
INNER JOIN mast and stas on
stas-stlal = mast-stlal AND
stas-stlnr = mast-stlnr AND
INNER JOIN stpo
stpo-stlkn = stas-stlkn AND
stpo-stlnr = stas-stlnr AND
stpo-stlty = stas-stlty
Better use the below FM
CS_BOM_EXPL_MAT_V2 CSAP_MAT_BOM_READ
06-26-2012 9:06 AM
hI
You would need to join mast as well......
INNER JOIN mast and stas on
stas-stlal = mast-stlal AND
stas-stlnr = mast-stlnr AND
INNER JOIN stpo
stpo-stlkn = stas-stlkn AND
stpo-stlnr = stas-stlnr AND
stpo-stlty = stas-stlty
Better use the below FM
CS_BOM_EXPL_MAT_V2 CSAP_MAT_BOM_READ
06-26-2012 9:47 AM
Hi Ramachandran Rakhunathan, thanks much for your reply.
Actually, it won't made any difference linking to MAST table as it will also return those two records based on my MAST table :-
06-26-2012 9:22 AM
06-26-2012 10:15 AM
Hi Kesavadas Thekkillath, thanks much for your reply.
Actually, my report is a BOM's change history report. It is required to display the alternative BOM as the date of changes. I did try to use FM 'CS_CL_S_BOM_ALT_PROVIDE'. For the valid-from date and valid-to date, i entered the value of CDHDR-UDATE. Unfortunately, it did not return me any result. Did i make any mistake when entering the FM parameters? Thanks.
06-26-2012 10:22 AM
You must not pass the date from CDHDR. You must pass the validity date for example may be sy-datum or the maximum date value.
Does not the transactions CS80/ CS 81 help you ?
07-13-2012 6:53 AM
Hi Kesavadas Thekkillath,
Kindly please help to unlock my another forum post @ http://scn.sap.com/thread/3206262 , i would like to give points to the Manjesh Kumar who provided me with some useful info on how to solve my problem. Thanks and sorry for the inconvenience.
07-13-2012 6:59 AM
It was locked because it was a duplicate thread. Please do not do that from next time. As of now the thread remains locked.
Kesav
07-13-2012 7:15 AM
Hi Kesav, noted with thanks. Thanks much for unlocking the thread.
06-26-2012 10:00 AM
HI,
Try to use table mast .
where matnr = STPO-IDNRK.
specify the value of "STLAN' not equal to '1'.. ex. 1 for production, 2 for engineering etc.
Regards,
RAvi Singh