Bom expand CS_BOM_EXPL_MAT_V2, bom expand

Source: Internet
Author: User

Bom expand CS_BOM_EXPL_MAT_V2, bom expand
FUNCTION ZRFC_BOM_EXPL.
*"----------------------------------------------------------------------
* "*" Local interface:
* "IMPORTING
* "VALUE (I _WERKS) TYPE WERKS_D OPTIONAL
* "VALUE (I _MATNR) TYPE MATNR OPTIONAL
* "VALUE (I _DATUM) TYPE DATUM DEFAULT SY-DATUM
* "TABLES
* "Output structure ZRFC_BOM_EXPL OPTIONAL
*"----------------------------------------------------------------------


DATA: GIT_STPOX like stpox occurs 0 with header line.
DATA: GIT_CSCMAT like cscmat occurs 0 with header line.

Call function 'cs _ BOM_EXPL_MAT_V2'
EXPORTING
CAPID = 'pp01' "BOM type, such as production BOM, R & d bom, and sales BOM
DATUV = SY-DATUM "fill in the date, the function filters out Valid Components Based on the date
EHNDL = '1'
EMENG = 1000 "set usage Unit
* MEHRS = 'x' "has a value that indicates multi-layer expansion, similar to the things code CS12.
MTNRV = I _MATNR "BOM ID
STLAN = '1' "is similar to the CAPID parameter, which limits the nature of the expanded BOM.
WERKS = I _WERKS"
TABLES
STB = GIT_STPOX"
MATCAT = GIT_CSCMAT ."


Loop at GIT_STPOX.
OUTPUT-MATKL = GIT_STPOX-MATKL.
OUTPUT-IDNRK = GIT_STPOX-IDNRK.
IF GIT_STPOX-IDNRK <> ''.
OUTPUT-DOBJT = GIT_STPOX-IDNRK.
ELSE.
OUTPUT-DOBJT = GIT_STPOX-POTX1.
ENDIF.
OUTPUT-OJTXP = GIT_STPOX-OJTXP.
OUTPUT-MNGKO = GIT_STPOX-MENGE.
OUTPUT-MEINS = GIT_STPOX-MEINS.
Append output.
Clear output.
ENDLOOP.

ENDFUNCTION.

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.