Application Development and Automation 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: 
Read only

BOM issue

Former Member
0 Likes
268

Hi

I have one requirement to check for valid to date for BOM.If search date(Valid-from date) entered by user in selection has already passed the valid to date, then I have to get the latest valid to date in the list and display the material listing for the BOM.Currently if the valid date to date is in past, no materials are displayed.

Please advise .

Thanks

1 REPLY 1
Read only

Former Member
0 Likes
250

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

CAPID = 'PP01'

<b>DATUV = sy-datum---> here u have to pass Date enterd by the user , this is nothing but Valid Date</b>

MKTLS = 'X'

MEHRS = 'X'

MTNRV = it_matnr-matnr

STLAL = p_stlal (default is 1)

STLAN = p_stlan (default is 01)

STPST = 0

SVWVO = 'X'

WERKS = p_werks

VRSVO = 'X'

TABLES

STB = it_stb

MATCAT = it_matcat

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

CONVERSION_ERROR = 8

OTHERS = 9.

check this FM

Regards

Prabhu