Multi-layer extended BOM Functions

Source: Internet
Author: User

There are many related multi-layer extended BOM functions. The following lists the three most commonly used BOM extended functions and two document structure extended functions.

Of course, there are other related functions that start with cs_bom.

Pay attention to this attribute mehrs when using it. If mehrs = 'x', it will be extended in multiple layers. Otherwise, only the current BOM will be opened.

 

Data: STB type standard table of stpox with header line.
Data: matcat type standard table of cscmat with header line.

 

P_mat type rc29l-matnr obligatory, item No.
P_wer type rc29l-werks default '200', "Factory
P_stl type rc29l-stlal, "selectable BOM
P_cap type rc29l-capid obligatory, "Bom application pp01 zdes
P_dat type rc29l-datuv default sy-datum. "Date

 

"Extended item bom1

Call function 'cs _ bom_expl_mat_v2'
Exporting
Capid = p_cap
Datuv = p_dat
Mehrs = 'X'
Mtnrv = p_mat
Stlal = p_stl

Werks = p_wer

Importing
Topmat = topmat
Tables
STB = STB "detail list
Matcat = matcat "Bom list
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.
If sy-subrc <> 0.
* Message ID SY-MSGID type SY-MSGTY number SY-MSGNO
* With SY-MSGV1 SY-MSGV2 SY-MSGV3.
Endif.

 

 

 

"Extended item bom2

 

 

Data: stbp type standard table of csxgen with header line.

Call function 'cs _ bom_explosion'
Exporting
Capid = p_cap
Datuv = p_dat
Mehrs = 'X'
Mtnrv = p_mat
Stlal = p_stl

Werks = p_wer

Importing
Topmat = topmat
Tables
STB = STB "detail list
Matcat = matcat "Bom list
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 If sy-subrc <> 0.
* Message ID SY-MSGID type SY-MSGTY number SY-MSGNO
* With SY-MSGV1 SY-MSGV2 SY-MSGV3.
Endif.

 

"Extended item bom3

 

Data: STB type standard table of stpol with header line.

Call function 'cs _ bom_explosion'
Exporting
Capid = p_cap
Datuv = p_dat
Mehrs = 'X'
Mtnrv = p_mat
Stlal = p_stl

Werks = p_wer

Importing
Topmat = topmat
Tables
STB = STB "detail list
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
Others = 8
If sy-subrc <> 0.
* Message ID SY-MSGID type SY-MSGTY number SY-MSGNO
* With SY-MSGV1 SY-MSGV2 SY-MSGV3.
Endif.

 

 

 

 
"Extended Document structure 1

Call function 'cs _ bom_expl_doc_v1'
Exporting
Datuv = sy-Datum
Docnr = Document No.
Docar = Type
Doctl = part
Docvr = version

Importing
Topdoc = returns the document information in the document structure header.
Tables
STB = return detailed list
Doccat = List of returned document structures (several document structures are available)
Exceptions
Call_invalid = 1
Document_not_found = 2
Missing_authorization = 3
No_bom_found = 4
No_suitable_bom_found = 5
Bom_not_active = 6
Bom_flagged_for_deletion = 7
Bom_without_positions = 8
Others = 9
.
If sy-subrc <> 0.
* Message ID SY-MSGID type SY-MSGTY number SY-MSGNO
* With SY-MSGV1 SY-MSGV2 SY-MSGV3.
Endif.

 
"Extended Document structure 2

Call function 'cs _ bom_expl_gnrl2_v1'
Exporting

Datuv = sy-Datum
Docnr = Document No.
Docar = Type
Doctl = part
Docvr = version
Mehrs = 'X'

Importing
Topdoc =
Tables
Stbd =
Stbp =
Exceptions
Call_invalid = 1
Object_not_found = 2
Missing_authorization = 3
No_bom_found = 4
No_suitable_bom_found = 5
Bom_not_active = 6
Bom_flagged_for_deletion = 7
Bom_without_positions = 8
Others = 9
.
If sy-subrc <> 0.
* Message ID SY-MSGID type SY-MSGTY number SY-MSGNO
* With SY-MSGV1 SY-MSGV2 SY-MSGV3.
Endif.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.