Code: Alles auswählen.
CALL FUNCTION 'CSAP_MAT_BOM_OPEN'
EXPORTING
material = l_matnr
plant = i_mast-werks
bom_usage = i_mast-stlan
* CHANGE_NO = WRK_AENNR
valid_from = l_datuv
alternative = i_mast-stlal
* REVISION_LEVEL = I_STKO-REVLV
IMPORTING
o_stko = l_stko
fl_warning = l_warning
TABLES
t_stpo = t_stpo
t_dep_data = t_dep_data
t_dep_descr = t_dep_descr
t_dep_order = t_dep_order
t_dep_source = t_dep_source
t_dep_doc = t_dep_doc
EXCEPTIONS
error = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE: AT / i_mast-matnr, ' / ', i_mast-stlal,
' / ', i_mast-stlan, '->', mara-matnr
,' nicht geöffnet' COLOR COL_NEGATIVE.
ELSE.
Code: Alles auswählen.
CALL FUNCTION 'CSAP_MAT_BOM_OPEN'
EXPORTING
material = l_matnr
plant = i_mast-werks
bom_usage = i_mast-stlan
* CHANGE_NO = WRK_AENNR
valid_from = '03112010' " anstatt '20101103' wie beim sy-datum Format
alternative = i_mast-stlal
* REVISION_LEVEL = I_STKO-REVLV
IMPORTING
o_stko = l_stko
fl_warning = l_warning
TABLES
t_stpo = t_stpo
t_dep_data = t_dep_data
t_dep_descr = t_dep_descr
t_dep_order = t_dep_order
t_dep_source = t_dep_source
t_dep_doc = t_dep_doc
EXCEPTIONS
error = 1
OTHERS = 2.