T4S4  18.1 C7177 A20283
Teamcenter Gateway for SAP S/4HANA API Reference
TPSAP::BOM::BAPI Namespace Reference

Functions

 createBillOfMaterial args
 This function creates a BOM via the CSAP_MAT_BOM_CREATE function based on the content of the corresponding ::SAPDat(BillOfMaterial:*) array attributes provided after the mapping. More...
 
 createBillOfMaterial2 args
 This function creates a BOM via the CSAP_MAT_BOM_CREATE function based on the content of the corresponding ::SAPDat(BillOfMaterial:*) array attributes provided after the mapping. More...
 
 deleteBillOfMaterial args
 Deletes an existing SAP BOM object via CSAP_MAT_BOM_DELETE. More...
 
 init_CT_EX_S_PATH_UPD4BOM_PARAMETER args
 Init of paramters for the /TESISPLM/CT_EX_S_PATH_UPD4BOM function call. More...
 
 initSAPBomHeaderStructure ?CleanMode? args
 Resets the corresponding global TCL ::SAPDat array within the section BillOfMaterial. More...
 
 maintainBillOfMaterial args
 This function changes a BOM via the CSAP_MAT_BOM_MAINTAIN function based on the content of the corresponding ::SAPDat(BillOfMaterial:*) array attributes provided after the mapping. If necessary, the function is also able creates BOMs. More...
 
 maintainBillOfMaterial2 args
 This function changes a BOM via the CSAP_MAT_BOM_MAINTAIN function based on the content of the corresponding ::SAPDat(BillOfMaterial:*) array attributes provided after the mapping. If necessary, the function is also able creates BOMs. More...
 
 readBillOfMaterial args
 Retrieves information about an existing SAP BOM. All import parameters are transferred via the global ::SAPDat TCL array within the section BillOfMaterial. More...
 
 readBillOfMaterial2 args
 Retrieves information about an existing SAP BOM. All import parameters are transferred via the global ::SAPDat TCL array within the section BillOfMaterial. More...
 
 readBillOfMaterialWithAssemblyFlag args
 Retrieves information about an existing SAP BOM including the assembly flag per BOM line (like CS03 does). All import parameters are transferred via the global ::SAPDat TCL array within the section BillOfMaterial. This procedure requires the ABAP function /TESISPLM/MAT_BOM_READ. More...
 

Detailed Description

Method: mapBomResultDat

Function Documentation

◆ createBillOfMaterial()

TPSAP::BOM::BAPI::createBillOfMaterial   args  

This function creates a BOM via the CSAP_MAT_BOM_CREATE function based on the content of the corresponding ::SAPDat(BillOfMaterial:*) array attributes provided after the mapping.

This function is only able to create the BOM alternative 1.

Deprecated:
The function is deprecated, please use TPSAP::BOM::BAPI::createBillOfMaterial2
Parameters
argsnone
Returns
List of Status CREATED and MaterialNumber or ERROR, MaterialNumber and list or error messages

References createBillOfMaterial2(), and TPSAP::getSessionLogChannel().

◆ createBillOfMaterial2()

TPSAP::BOM::BAPI::createBillOfMaterial2   args  

This function creates a BOM via the CSAP_MAT_BOM_CREATE function based on the content of the corresponding ::SAPDat(BillOfMaterial:*) array attributes provided after the mapping.

This function is only able to create the BOM alternative 1.

Parameters
argsnone
Returns
StatusDict dict structure with the following elements:
  • Status OK|ERROR|JCO_ERROR
  • ErrorMessage last error message
  • NoOfMessages number of messages
  • LogMessageMessage(1 .. n)
  • LogMessageSeverity(1 .. n)

References TPSAP::doCommitOrRollBackBasedOnStatusDict(), T4X::CORE::getSessionLogChannel(), TPSAP::getSessionLogChannel(), and tpwrite().

Referenced by createBillOfMaterial().

◆ deleteBillOfMaterial()

TPSAP::BOM::BAPI::deleteBillOfMaterial   args  

Deletes an existing SAP BOM object via CSAP_MAT_BOM_DELETE.

Parameters
argsnone
Returns
DELETED or ERROR

Sample code sequence

1 #
2 ::TPSAP::BOM::initSAPBomHeaderStructure
3 
4 set ::SAPDat(Bom:BomHeader:BomAlternative) $Alternative; # Alternative BOM
5 set ::SAPDat(Bom:BomHeader:BomUsage) $Usage; # BOM usage $Position
6 set ::SAPDat(Bom:BomHeader:MaterialNumber) $MaterialNumber
7 set ::SAPDat(Bom:BomHeader:PLANT) $Plant
8 set ::SAPDat(Bom:BomHeader:BomValidFrom) $ValidFromDate ; # Valid-from date
9 set ::SAPDat(Bom:BomHeader:ChangeNumber) $ChangeNumber
10 

References TPSAP::doCommitOrRollBackBasedOnStatus(), TPSAP::getSessionLogChannel(), and tpwrite().

◆ init_CT_EX_S_PATH_UPD4BOM_PARAMETER()

TPSAP::BOM::BAPI::init_CT_EX_S_PATH_UPD4BOM_PARAMETER   args  

Init of paramters for the /TESISPLM/CT_EX_S_PATH_UPD4BOM function call.

Parameters
argsnone
Returns
OK

References TPSAP::getSessionLogChannel().

◆ initSAPBomHeaderStructure()

TPSAP::BOM::BAPI::initSAPBomHeaderStructure   ?CleanMode? args  

Resets the corresponding global TCL ::SAPDat array within the section BillOfMaterial.

Parameters
CleanMode(optional - ALL) -> If ALL is provided, the whole section BillOfMaterial:* will be cleared, otherwise only the section BillOfMaterial:Parameter:* and BillOfMaterial:I_STKO:* will be cleared.
argsnone
Returns
OK

References TPSAP::getSessionLogChannel().

Referenced by T4S::PROP::CUSTOM::MAPPING::GetBOMData().

◆ maintainBillOfMaterial()

TPSAP::BOM::BAPI::maintainBillOfMaterial   args  

This function changes a BOM via the CSAP_MAT_BOM_MAINTAIN function based on the content of the corresponding ::SAPDat(BillOfMaterial:*) array attributes provided after the mapping. If necessary, the function is also able creates BOMs.

In case more than one alternative is needed then this function has to be used.

Deprecated:
The function is deprecated, please use TPSAP::BOM::BAPI::maintainBillOfMaterial2
Parameters
argsnone
Returns
List of Status CHANGED and MaterialNumber or ERROR, MaterialNumber and list or error messages

References TPSAP::getSessionLogChannel(), and maintainBillOfMaterial2().

◆ maintainBillOfMaterial2()

TPSAP::BOM::BAPI::maintainBillOfMaterial2   args  

This function changes a BOM via the CSAP_MAT_BOM_MAINTAIN function based on the content of the corresponding ::SAPDat(BillOfMaterial:*) array attributes provided after the mapping. If necessary, the function is also able creates BOMs.

In case more than one alternative is needed then this function has to be used.

Parameters
argsnone
Returns
dict structure with the following elements:
  • Status OK|ERROR|JCO_ERROR
  • ErrorMessage last error message
  • NoOfMessages number of messages
  • LogMessageMessage(1 .. n)
  • LogMessageSeverity(1 .. n)

References TPSAP::doCommitOrRollBackBasedOnStatusDict(), T4X::CORE::getSessionLogChannel(), TPSAP::getSessionLogChannel(), and tpwrite().

Referenced by maintainBillOfMaterial().

◆ readBillOfMaterial()

TPSAP::BOM::BAPI::readBillOfMaterial   args  

Retrieves information about an existing SAP BOM. All import parameters are transferred via the global ::SAPDat TCL array within the section BillOfMaterial.

Deprecated:
The function is deprecated, please use TPSAP::BOM::BAPI::readBillOfMaterial2

Sample code sequence

1 #
3 
4 set ::SAPDat(BillOfMaterial:Parameter:MATERIAL) $MatNr
5 set ::SAPDat(BillOfMaterial:Parameter:PLANT) $Plant
6 set ::SAPDat(BillOfMaterial:Parameter:BOM_USAGE) $BomUsage
7 set ::SAPDat(BillOfMaterial:Parameter:CHANGE_NO) $ChangeNr ; # (optional)
8 set ::SAPDat(BillOfMaterial:Parameter:VALID_FROM) $ValidFrom ; # (optional)
9 set ::SAPDat(BillOfMaterial:Parameter:VALID_TO) $ValidTo ; # (optional)
10 set ::SAPDat(BillOfMaterial:Parameter:REVISION_LEVEL) $RevLevel ; # (optional)
11 set ::SAPDat(BillOfMaterial:Parameter:ALTERNATIVE) $BomAlternative ; # (optional)
12 
Returns
TCL list with BOM_FOUND or BOM_NOT_FOUND, material number and error message (empty if no such message does exist) and global TCL array ::BOMResultDat

References TPSAP::getSessionLogChannel(), and readBillOfMaterial2().

◆ readBillOfMaterial2()

TPSAP::BOM::BAPI::readBillOfMaterial2   args  

Retrieves information about an existing SAP BOM. All import parameters are transferred via the global ::SAPDat TCL array within the section BillOfMaterial.

Sample code sequence

1 #
3 
4 set ::SAPDat(BillOfMaterial:Parameter:MATERIAL) $MatNr
5 set ::SAPDat(BillOfMaterial:Parameter:PLANT) $Plant
6 set ::SAPDat(BillOfMaterial:Parameter:BOM_USAGE) $BomUsage
7 set ::SAPDat(BillOfMaterial:Parameter:CHANGE_NO) $ChangeNr ; # (optional)
8 set ::SAPDat(BillOfMaterial:Parameter:VALID_FROM) $ValidFrom ; # (optional)
9 set ::SAPDat(BillOfMaterial:Parameter:VALID_TO) $ValidTo ; # (optional)
10 set ::SAPDat(BillOfMaterial:Parameter:REVISION_LEVEL) $RevLevel ; # (optional)
11 set ::SAPDat(BillOfMaterial:Parameter:ALTERNATIVE) $BomAlternative ; # (optional)
12 
Returns
dict structure with the following elements:
  • Status OK|ERROR|JCO_ERROR
  • BomExists BOM_NOT_FOUND|BOM_FOUND
  • ErrorMessage last error message
  • NoOfMessages number of messages
  • LogMessageMessage(1 .. n)
  • LogMessageSeverity(1 .. n) and global TCL array ::BOMResultDat

References TPSAP::getLoginLanguage(), TPSAP::getSessionLogChannel(), and tpwrite().

Referenced by T4S::PROP::CUSTOM::MAPPING::GetBOMData(), and readBillOfMaterial().

◆ readBillOfMaterialWithAssemblyFlag()

TPSAP::BOM::BAPI::readBillOfMaterialWithAssemblyFlag   args  

Retrieves information about an existing SAP BOM including the assembly flag per BOM line (like CS03 does). All import parameters are transferred via the global ::SAPDat TCL array within the section BillOfMaterial. This procedure requires the ABAP function /TESISPLM/MAT_BOM_READ.

Sample code sequence

1 #
3 
4 set ::SAPDat(BillOfMaterial:Parameter:MATERIAL) $MatNr
5 set ::SAPDat(BillOfMaterial:Parameter:PLANT) $Plant
6 set ::SAPDat(BillOfMaterial:Parameter:BOM_USAGE) $BomUsage
7 set ::SAPDat(BillOfMaterial:Parameter:CHANGE_NO) $ChangeNr ; # (optional)
8 set ::SAPDat(BillOfMaterial:Parameter:VALID_FROM) $ValidFrom ; # (optional)
9 set ::SAPDat(BillOfMaterial:Parameter:VALID_TO) $ValidTo ; # (optional)
10 set ::SAPDat(BillOfMaterial:Parameter:REVISION_LEVEL) $RevLevel ; # (optional)
11 set ::SAPDat(BillOfMaterial:Parameter:ALTERNATIVE) $BomAlternative ; # (optional)
12 
Returns
TCL list with BOM_FOUND or BOM_NOT_FOUND, material number and error message (empty if no such message does exist) and global TCL array ::BOMResultDat

References TPSAP::getLoginLanguage(), TPSAP::getSessionLogChannel(), and tpwrite().