T4S4  19.1 C8540 A23673
Teamcenter Gateway for SAP S/4HANA API Reference
TPSAP::PRODORDER Namespace Reference

Functions

 callBAPI_PRODORD_GET_LIST args
 Calls SAP function 'BAPI_PRODORD_GET_LIST'. The following lines are extracted from the SAP function module documentation, Copyright SAP AG. More...
 
 getExternalNumber InternalNumber
 Retrieves the SAP external production order id for a given SAP internal production order id. More...
 
 getInternalNumber ExternalNumber
 Retrieves the SAP internal production order id for a given SAP external production order id. More...
 
 getProductionOrderDocumentLinks ?ProdOrderNumber? ?FullProdOrderLinkKey? ?ConvertProdOrderNumber2InternalFormat? args
 Calls SAP function '/TESISPLM/PRODORD_OBJ_LINK_GET' in order to read the document links for a given production order. To use this functionality, the SAP transport package 'TESISPLM_T4S_MISC' must be imported into the SAP system. More...
 
 getProductionOrderOperationDetails OrderPlanNumber ?ConvertTo10DigitFormat? args
 Calls SAP function '/TESISPLM/T4S_GET_PRODORD_OPR' in order to read additional operation information for a given production order which is not returned by BAP_PRODORD_GET_DETAIL. This information is mainly required to link a production order operation to the corresponding routing operation using the attributes APLZL and ZAEHL. To use this functionality, the SAP transport package 'TESISPLM_T4S_MISC' must be imported into the SAP system. More...
 
 getProductionOrderSerialNumbers ProdOrderNumber ?Taser? ?InitializeArrayPattern? args
 Calls SAP function '/TESISPLM/GET_SN_OF_DOCUMENT' in order to read all defined serial numbers for a given production order. To use this functionality, the SAP transport package 'TESISPLM_T4S_MISC' must be imported into the SAP system. More...
 
 readProductionOrder ProdId args
 Retrieves SAP production order information using the BAPI BAPI_PRODORD_GET_DETAIL. More...
 
 readProductionOrder2 ?ProductionOrderNumber? ?blnSupportSubOperations? args
 Retrieves SAP production order information using the BAPI BAPI_PRODORD_GET_DETAIL. More...
 
 setProdOrderUserStatus args
 Sets user status for a prod order on the header. More...
 
 setProdOrderUserStatus2 inputDict orderNumberList
 Sets user status for a prod order on the header. More...
 

Function Documentation

◆ callBAPI_PRODORD_GET_LIST()

TPSAP::PRODORDER::callBAPI_PRODORD_GET_LIST   args  

Calls SAP function 'BAPI_PRODORD_GET_LIST'. The following lines are extracted from the SAP function module documentation, Copyright SAP AG.

_______________________________________________... | INCLUDE COBAPI_GET_LIST OBJECT DOKU ID TX ..._______________________________________________

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

◆ getExternalNumber()

TPSAP::PRODORDER::getExternalNumber   InternalNumber  

Retrieves the SAP external production order id for a given SAP internal production order id.

Parameters
InternalNumberSAP internal production order id
Returns
External number

◆ getInternalNumber()

TPSAP::PRODORDER::getInternalNumber   ExternalNumber  

Retrieves the SAP internal production order id for a given SAP external production order id.

Parameters
ExternalNumberSAP external production order id
Returns
Internal number

◆ getProductionOrderDocumentLinks()

TPSAP::PRODORDER::getProductionOrderDocumentLinks   ?ProdOrderNumber? ?FullProdOrderLinkKey? ?ConvertProdOrderNumber2InternalFormat? args  

Calls SAP function '/TESISPLM/PRODORD_OBJ_LINK_GET' in order to read the document links for a given production order. To use this functionality, the SAP transport package 'TESISPLM_T4S_MISC' must be imported into the SAP system.

Parameters
ProdOrderNumber- If given, this PO number is concatenated with a wildcard at the end to search for all links with that PO number.
FullProdOrderLinkKey- Optional (Default Empty) - If provided, this full key will be used to search for existing links (no wildcard search is used)
ConvertProdOrderNumber2InternalFormat- Optional (Default X) - If 'X', the given ProdOrderNumber is converted into the internal SAP number format.
Returns
OK and global TCL array ::TESISPLM_PRODORD_OBJ_LINK_GET_ResultDat, NOT_FOUND or ERROR with message and StatusDict as TCL list

◆ getProductionOrderOperationDetails()

TPSAP::PRODORDER::getProductionOrderOperationDetails   OrderPlanNumber ?ConvertTo10DigitFormat? args  

Calls SAP function '/TESISPLM/T4S_GET_PRODORD_OPR' in order to read additional operation information for a given production order which is not returned by BAP_PRODORD_GET_DETAIL. This information is mainly required to link a production order operation to the corresponding routing operation using the attributes APLZL and ZAEHL. To use this functionality, the SAP transport package 'TESISPLM_T4S_MISC' must be imported into the SAP system.

Parameters
OrderPlanNumber- This is the parameter AUFPL from the table AFVC.
ConvertTo10DigitFormat- Optional (Default = true) - If true, the input parameter will be converted to a 10 digit number with leading zeros (this is SAP standard in this case).
Returns
OK and global TCL array ::TESISPLM_T4S_GET_PRODORD_OPR_ResultDat, NOT_FOUND or ERROR with message and StatusDict as TCL list

◆ getProductionOrderSerialNumbers()

TPSAP::PRODORDER::getProductionOrderSerialNumbers   ProdOrderNumber ?Taser? ?InitializeArrayPattern? args  

Calls SAP function '/TESISPLM/GET_SN_OF_DOCUMENT' in order to read all defined serial numbers for a given production order. To use this functionality, the SAP transport package 'TESISPLM_T4S_MISC' must be imported into the SAP system.

Parameters
ProdOrderNumber
Taser- Optional (default = SER05). Can be one of the following values:
SER01 LIKE objk-taser VALUE 'SER01', "Lieferung\n SER02 LIKE objk-taser VALUE 'SER02', "SD-Auftrag
SER03 LIKE objk-taser VALUE 'SER03', "MM-Belegposition\n SER04 LIKE objk-taser VALUE 'SER04', "Prueflos
SER05 LIKE objk-taser VALUE 'SER05', "PP-Auftrag\n SER06 LIKE objk-taser VALUE 'SER06', "Handlingunit
SER07 LIKE objk-taser VALUE 'SER07', "Inventurbeleg\n SER08 LIKE objk-taser VALUE 'SER08', "Bestelleinteilung
SER09 LIKE objk-taser VALUE 'SER09'. "Bestellanforderung
InitializeArrayPattern- Optional (default = true). If true, the array ::SAPDat ProdOrderGetSerialNumber:* will be cleared before executing this call.
Returns
OK and global TCL array ::TESISPLM_TESISPLM_GET_SN_OF_DOCUMENT_ResultDat, NOT_FOUND or ERROR with message and StatusDict as TCL list

◆ readProductionOrder()

TPSAP::PRODORDER::readProductionOrder   ProdId args  

Retrieves SAP production order information using the BAPI BAPI_PRODORD_GET_DETAIL.

Parameters
ProdIdProduction order number
argsnot used
Returns
OK and global TCL array ::sap_result_array or ERROR

◆ readProductionOrder2()

TPSAP::PRODORDER::readProductionOrder2   ?ProductionOrderNumber? ?blnSupportSubOperations? args  

Retrieves SAP production order information using the BAPI BAPI_PRODORD_GET_DETAIL.

Parameters
ProductionOrderNumber- (optional) -> if the value is empty the content of the ::SAPDat(ProdOrder:PARAMETER:NUMBER) variable is used to retrieve the production order information
blnSupportSubOperations- (optional - false) (true|false) -> Retrieve SUBOPERATIONS information; Not supported from older SAP systems
argsnot used
Returns
OK and global TCL array ::sap_result_array or ERROR

◆ setProdOrderUserStatus()

TPSAP::PRODORDER::setProdOrderUserStatus   args  

Sets user status for a prod order on the header.

Deprecated:
Please use the new setProdOrderUserStatus2 function
Parameters
argsnone
Returns
List of Status (OK| ERROR and list of erroe message )

◆ setProdOrderUserStatus2()

TPSAP::PRODORDER::setProdOrderUserStatus2   inputDict orderNumberList  

Sets user status for a prod order on the header.

Parameters
inputDicta dictionary with required keys what are:
  • STATUS_PROFILE
  • STATUS the possible keys are:
  • STATUS_PROFILE Status profile that is assigned to an order head
  • STATUS Object Status
  • WORK_PROCESS_GROUP ogon/Server Group Name default COWORK_BAPI
  • WORK_PROCESS_MAX Maximum number of work processes that can be used default 99
orderNumberLista list with order numbers
Returns
dict structure with the following elements:
  • Status OK|ERROR
  • ErrorMessage last error message
  • NoOfMessages number of messages
  • LogMessageMessage(1 .. n)
  • LogMessageSeverity(1 .. n) and TCL array ::sap_result_dat or ERROR

Sample code sequence for setProdOrderUserStatus2

1 dict set inputDict STATUS_PROFILE PP000001
2 dict set inputDict STATUS RLAL
3 set orderNumberList [list 000060003385]
4 set returnDict [::TPSAP::PRODORDER::setProdOrderUserStatus2 $inputDict $orderNumberList]
5 if { [dict get $returnDict Status] eq "OK" } {
6  foreach key [array names ::ProdOrderSetStatusResultDat] {
7  puts "$key => $::ProdOrderSetStatusResultDat($key)"
8  }
9 } else {
10  puts [dict get $returnDict Status]
11  puts [dict get $returnDict ErrorMessage]
12 }