T4S4  18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
TPSAP::VENDOR Namespace Reference

Namespaces

 GEN
 

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...
 
 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...
 
 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

References TPSAP::CALL_TRANSACTION::call_transaction(), TPSAP::getSessionLogChannel(), and tpwrite().

Referenced by updatePurchaseInforRecord().

◆ 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

References TPSAP::CALL_TRANSACTION::call_transaction(), TPSAP::S4::checkIfTargetSystemIsS4HANA(), TPSAP::getSessionLogChannel(), tpco_scanHEX16(), and tpwrite().

Referenced by updateVendor().

◆ 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

References TPSAP::CALL_TRANSACTION::call_transaction(), TPSAP::getSessionLogChannel(), and tpwrite().

Referenced by updatePurchaseInforRecord().

◆ 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

References TPSAP::CALL_TRANSACTION::call_transaction(), TPSAP::S4::checkIfTargetSystemIsS4HANA(), TPSAP::getSessionLogChannel(), tpco_scanHEX16(), and tpwrite().

Referenced by updateVendor().

◆ getDetail()

TPSAP::VENDOR::getDetail   VendorNo CompanyCode args  

Retrieves SAP vendor information.

Parameters
VendorNo
CompanyCode
Returns
OK and global TCL array ::VendorResultDat or ERROR

References TPSAP::VENDOR::GEN::callBAPI_VENDOR_GETDETAIL(), getInternalNumber(), TPSAP::getSessionLogChannel(), tpco_scanHEX16(), and tpwrite().

Referenced by T4S::PROP::CUSTOM::MAPPING::GetVENDORData(), getVendorInfo(), updateAMPL(), and updateVendor().

◆ 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

References TPSAP::getSessionLogChannel().

Referenced by T4S::VENDOR::CUSTOM::MAPPING::SAP_Vendor2TC_Object().

◆ 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

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

Referenced by updatePurchaseInforRecord().

◆ 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

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

◆ 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

References TPSAP::getSessionLogChannel().

Referenced by getDetail(), and getVendorContacts().

◆ 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.

Returns
OK and global TCL array ::sap_result_array or ERROR

References tpco_scanHEX16().

◆ 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

References getInternalNumber(), T4X::CORE::getSessionLogChannel(), and tpwrite().

◆ 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

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

◆ 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

References InfoRecordGetList2(), and tpco_scanHEX16().

Referenced by getInfoRecordInfo().

◆ 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

References TPSAP::VENDOR::GEN::callBAPI_INFORECORD_GETLIST().

Referenced by getInfoRecordInfo2(), and InfoRecordGetList().

◆ 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

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

◆ 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

References TPSAP::MM::checkMaterialMasterExistence(), TPSAP::doCommitOrRollBackBasedOnStatus(), getDetail(), TPSAP::getSessionLogChannel(), tpco_scanHEX16(), and tpwrite().

◆ 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

References changePurchaseInfoRecord(), createPurchaseInfoRecord(), and getInfoRecordInfo().

◆ 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

References changeVendor(), createVendor(), and getDetail().