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

Functions

 changePurchaseInfoRecord args
 Updates an existing purchase info record in SAP. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well. More...
 
 changeVendor args
 Updates an existing SAP vendor object. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well. More...
 
 createPurchaseInfoRecord args
 Creates a purchase info record in SAP. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well. More...
 
 createVendor args
 Creates a new SAP vendor object. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well. More...
 
 getDetail VendorNo CompanyCode args
 Retrieves SAP vendor information. More...
 
 getDetail2 inputDict
 Retrieves SAP vendor information. More...
 
 getExternalNumber InternalNumber
 Retrieves the SAP external vendor id for a given SAP internal vendor id. More...
 
 getInfoRecordInfo args
 Checks if a purchase info record object exists in SAP. All import parameters are transferred via the global ::SAPDat TCL array within the section PurchaseInfoRecord. More...
 
 getInfoRecordInfo2 args
 Checks if a purchase info record object exists in SAP. All import parameters are transferred via the global ::SAPDat TCL array within the section PurchaseInfoRecordGetList. More...
 
 getInternalNumber ExternalNumber
 Retrieves the SAP internal vendor id for a given SAP external vendor id. More...
 
 getList args
 Matchcode search for vendor objects in SAP. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S JCO technology is used. Therefore it is necessary to download and install the proper SAP JCO libraries. More...
 
 getList2 inputDict inputDictList
 Matchcode search for vendor objects in SAP. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. More...
 
 getVendorContacts VendorNo args
 Retrieve SAP contact information for a given vendor. More...
 
 getVendorInfo args
 Retrieves SAP vendor information. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. More...
 
 InfoRecordGetList Vendor Material PurInfoRec
 Matchcode search for purchase info record objects in SAP. This method enables you to list purchasing info records. Pass on the desired selection criteria (e.g. vendor, material, plant) as import parameters. More...
 
 InfoRecordGetList2 Vendor Material PurInfoRec
 Matchcode search for purchase info record objects in SAP. This method enables you to list purchasing info records. Pass on the desired selection criteria (e.g. vendor, material, plant) as import parameters. More...
 
 readAMPL args
 Retrieves SAP approved manufacturer part list information. More...
 
 updateAMPL args
 Updates SAP approved manufacturer part list information. More...
 
 updatePurchaseInforRecord args
 Create or update a SAP vendor object based on a check wheter the vendor exists already. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well. More...
 
 updateVendor args
 Create or update a SAP vendor object based on a check wheter the vendor exists already. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well. More...
 

Function Documentation

◆ changePurchaseInfoRecord()

TPSAP::VENDOR::changePurchaseInfoRecord   args  

Updates an existing purchase info record in SAP. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well.

Returns
CHANGED with ID as TCL list or ERROR

◆ changeVendor()

TPSAP::VENDOR::changeVendor   args  

Updates an existing SAP vendor object. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well.

Returns
CHANGED with VendorNo as TCL list or ERROR

◆ createPurchaseInfoRecord()

TPSAP::VENDOR::createPurchaseInfoRecord   args  

Creates a purchase info record in SAP. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well.

Returns
CREATED with ID as TCL list or ERROR

◆ createVendor()

TPSAP::VENDOR::createVendor   args  

Creates a new SAP vendor object. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well.

Returns
CREATED with VendorNo as TCL list or ERROR

◆ getDetail()

TPSAP::VENDOR::getDetail   VendorNo CompanyCode args  

Retrieves SAP vendor information.

Deprecated:
Please use the new getDetail2 function
Parameters
VendorNo
CompanyCode
Returns
OK and global TCL array ::VendorResultDat or ERROR

◆ getDetail2()

TPSAP::VENDOR::getDetail2   inputDict  

Retrieves SAP vendor information.

Parameters
inputDicta dictionary with required keys what are:
  • VENDORNO
  • COMPANYCODE the possible keys are:
  • VENDORNO Vendor number
  • COMPANYCODE Company code.
Returns
dict structure with the following elements:
  • Status OK|ERROR
  • NWPStatus OK|ERROR
  • ErrorMessage last error message
  • MessageList message list and the global TCL array ::VendorResultDat

Sample code sequence for getDetail2

1 set resultDict [::TPSAP::VENDOR::getDetail2 [dict create VENDORNO 9002 COMPANYCODE 1000]]
2 if { [dict get $resultDict Status] eq "OK" } {
3  foreach e [array names ::VendorResultDat] {
4  puts "$e => $::VendorResultDat($e)"
5  }
6 }

◆ getExternalNumber()

TPSAP::VENDOR::getExternalNumber   InternalNumber  

Retrieves the SAP external vendor id for a given SAP internal vendor id.

Parameters
InternalNumberSAP internal vendor id
Returns
External number

◆ getInfoRecordInfo()

TPSAP::VENDOR::getInfoRecordInfo   args  

Checks if a purchase info record object exists in SAP. All import parameters are transferred via the global ::SAPDat TCL array within the section PurchaseInfoRecord.

Deprecated:
This function is deprecated and will be replaced by TPSAP::VENDOR::getInfoRecordInfo2
Returns
OK or ERROR

◆ getInfoRecordInfo2()

TPSAP::VENDOR::getInfoRecordInfo2   args  

Checks if a purchase info record object exists in SAP. All import parameters are transferred via the global ::SAPDat TCL array within the section PurchaseInfoRecordGetList.

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) and global TCL array ::PurchaseInfoRecordResultData

◆ getInternalNumber()

TPSAP::VENDOR::getInternalNumber   ExternalNumber  

Retrieves the SAP internal vendor id for a given SAP external vendor id.

Parameters
ExternalNumberSAP external vendor id
Returns
Internal number

◆ getList()

TPSAP::VENDOR::getList   args  

Matchcode search for vendor objects in SAP. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S JCO technology is used. Therefore it is necessary to download and install the proper SAP JCO libraries.

Deprecated:
Please use the new getList2 function
Returns
OK and global TCL array ::sap_result_array or ERROR

◆ getList2()

TPSAP::VENDOR::getList2   inputDict inputDictList  

Matchcode search for vendor objects in SAP. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor.

Parameters
inputDicta dictionary with required keys what are:
  • MAX_CNT
  • PL_HOLD the possible keys are:
  • MAX_CNT Maximum Number of Records Found, 0 mean no limit
  • PL_HOLD Meta Character Permitted, please set this to "" ?.
Returns
dict structure with the following elements:
  • Status OK
  • NWPStatus OK
  • ErrorMessage last error message
  • MessageList message list and the global TCL array ::VendorFind

Sample code sequence

1 set resultDict [::TPSAP::VENDOR::getList2 [dict create MAX_CNT 0 PL_HOLD ""] [list [dict create COMP_CODE 0001 TABNAME LFB1 FIELDNAME PERNR FIELDVALUE *]]]
2 if { [dict get $resultDict Status] eq "OK" } {
3  foreach e [array names ::VendorFind] {
4  puts "$e => $::VendorFind($e)"
5  }
6 }

◆ getVendorContacts()

TPSAP::VENDOR::getVendorContacts   VendorNo args  

Retrieve SAP contact information for a given vendor.

Parameters
VendorNo
Returns
OK and global TCL array ::VendorResultDat, NOT_FOUND or ERROR with message

◆ getVendorInfo()

TPSAP::VENDOR::getVendorInfo   args  

Retrieves SAP vendor information. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor.

Returns
OK and global TCL array ::VendorResultDat or ERROR

◆ InfoRecordGetList()

TPSAP::VENDOR::InfoRecordGetList   Vendor Material PurInfoRec  

Matchcode search for purchase info record objects in SAP. This method enables you to list purchasing info records. Pass on the desired selection criteria (e.g. vendor, material, plant) as import parameters.

Deprecated:
InfoRecordGetList is deprecated; please use the TPSAP::VENDOR::InfoRecordGetList2
Parameters
Vendor
Material
PurInfoRec- Info Record Number
Returns
OK and global TCL array ::sap_result_array or ERROR

◆ InfoRecordGetList2()

TPSAP::VENDOR::InfoRecordGetList2   Vendor Material PurInfoRec  

Matchcode search for purchase info record objects in SAP. This method enables you to list purchasing info records. Pass on the desired selection criteria (e.g. vendor, material, plant) as import parameters.

Parameters
Vendor
Material
PurInfoRecInfo Record Number
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) and global TCL array ::PurchaseInfoRecordResultData

◆ readAMPL()

TPSAP::VENDOR::readAMPL   args  

Retrieves SAP approved manufacturer part list information.

To achieve this functionality, the T4S readAMPL ABAP is used. Therefore it is necessary to implement this ABAP as well. The corresponding input parameters are defined through the global TCL array ::SAPDat before the call is executed: set ::SAPDat(AMPL:PARAMETER:I_BMATN) $SapMatNo I_BMATN = Number of firm's own (internal) inventory-managed material

Parameters
argsnone
Returns
OK and global TCL array ::AMPLResultDat or NOT_FOUND / ERROR

◆ updateAMPL()

TPSAP::VENDOR::updateAMPL   args  

Updates SAP approved manufacturer part list information.

To achieve this functionality, the T4S updateAMPL ABAP is used. Therefore it is necessary to implement this ABAP as well. The corresponding input parameters are defined through the global TCL array ::SAPDat before the call is executed. Possible values: set ::SAPDat(AMPL:YYAMPL:BMATN:$Index) "" -> Number of firm's own (internal) inventory-managed material set ::SAPDat(AMPL:YYAMPL:AMPNR:$Index) "" -> Number of AMPL record set ::SAPDat(AMPL:YYAMPL:EMATN:$Index) "" -> Material Number Corresponding to Manufacturer Part Number set ::SAPDat(AMPL:YYAMPL:MFRNR:$Index) "" -> Number of a Manufacturer set ::SAPDat(AMPL:YYAMPL:WERKS:$Index) "" -> Plant set ::SAPDat(AMPL:YYAMPL:DATUV:$Index) "" -> Date as of which the MPN materail may be procured set ::SAPDat(AMPL:YYAMPL:DATUB:$Index) "" -> Date until which the MPN material may be procured set ::SAPDat(AMPL:YYAMPL:REVLV:$Index) "" -> Revision Level set ::SAPDat(AMPL:YYAMPL:AMPSP:$Index) "" -> Blocked manufacturer/part combinations set ::SAPDat(AMPL:YYAMPL:REOAM:$Index) "" -> Deletion indicator: AMPL record set ::SAPDat(AMPL:YYAMPL:ERDAT:$Index) "" -> Date on Which Record Was Created set ::SAPDat(AMPL:YYAMPL:ERNAM:$Index) "" -> Name of Person who Created the Object Example: set ::SAPDat(AMPL:YYAMPL:BMATN:$iAMPL_CreateIndex) "$SapMatNo" set ::SAPDat(AMPL:YYAMPL:AMPNR:$iAMPL_CreateIndex) "$sAMPL_CreateIndex" set ::SAPDat(AMPL:YYAMPL:EMATN:$iAMPL_CreateIndex) "$sMfgPartSAPMatNo" set ::SAPDat(AMPL:YYAMPL:WERKS:$iAMPL_CreateIndex) "$::T4S_Defaults(PlantId)" set ::SAPDat(AMPL:YYAMPL:MFRNR:$iAMPL_CreateIndex) "$sMFR_NO" set ::SAPDat(AMPL:YYAMPL:DATUV:$iAMPL_CreateIndex) "[clock format [clock seconds] -format "Ymd"]" set ::SAPDat(AMPL:YYAMPL:DATUB:$iAMPL_CreateIndex) "99991231"

Parameters
argsnone
Returns
UPDATED and global TCL array ::AMPLResultDat or ERROR

◆ updatePurchaseInforRecord()

TPSAP::VENDOR::updatePurchaseInforRecord   args  

Create or update a SAP vendor object based on a check wheter the vendor exists already. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well.

Returns
CREATED/CHANGED with VendorNo as TCL list or ERROR

◆ updateVendor()

TPSAP::VENDOR::updateVendor   args  

Create or update a SAP vendor object based on a check wheter the vendor exists already. All import parameters are transferred via the global ::SAPDat TCL array within the section Vendor. To achieve this functionality, the T4S call transaction mechanism is used. Therefore it is necessary to implement the T4S call transaction ABAP as well.

Returns
CREATED/CHANGED with VendorNo as TCL list or ERROR