Open Catalog Interface - Transport For London

Transcription

ADDON.NDCRM OCIOpen Catalog InterfaceRelease 2.0B

SAP online help11.07.00Copyright Copyright 2000 SAP AG. All rights reserved.No part of this brochure may be reproduced or transmitted in any form or for any purposewithout the express permission of SAP AG. The information contained herein may bechanged without prior notice.Some software products marketed by SAP AG and its distributors contain proprietarysoftware components of other software vendors. Microsoft , WINDOWS , NT , EXCEL , Word and SQL Server are registered trademarks ofMicrosoft Corporation. IBM , DB2 , OS/2 , DB2/6000 , Parallel Sysplex , MVS/ESA , RS/6000 , AIX , S/390 , AS/400 , OS/390 , and OS/400 are registered trademarks of IBM Corporation. ORACLE is a registered trademark of ORACLE Corporation, California, USA. INFORMIX -OnLine for SAP and Informix Dynamic ServerInformix Software Incorporated. TMare registered trademarks of UNIX , X/Open , OSF/1 , and Motif are registered trademarks of The Open Group. HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C , World WideWeb Consortium, Laboratory for Computer Science NE43-358, Massachusetts Institute ofTechnology, 545 Technology Square, Cambridge, MA 02139. JAVA is a registered trademark of Sun Microsystems, Inc. , 901 San Antonio Road, PaloAlto, CA 94303 USA. JAVASCRIPT is a registered trademark of Sun Microsystems, Inc., used under license fortechnology invented and implemented by Netscape.SAP, SAP Logo, mySAP.com, mySAP.com Marketplace, mySAP.com Workplace,mySAP.com Business Scenarios, mySAP.com Application Hosting, WebFlow, R/2, R/3,RIVA, ABAP, SAP Business Workflow, SAP EarlyWatch, SAP ArchiveLink, BAPI, SAPPHIRE,Management Cockpit, SEM, are trademarks or registered trademarks of SAP AG in Germanyand in several other countries all over the world. All other products mentioned are trademarksor registered trademarks of their respective companies.Open Catalog Interface2.0B2

SAP online mmendationSyntaxTipOpen Catalog Interface2.0B3

SAP online help11.07.00Open Catalog Interface. 5Open Catalog Interface: Outbound Section . 6Open Catalog Interface: Inbound Section . 9Example of a Catalog Interface . 14Open Catalog Interface2.0B4

SAP online help11.07.00Open Catalog InterfacePurposeThe Open Catalog Interface (OCI) is the interface between catalogs and SAP Business-toBusiness Procurement. SAP’s Open Catalog Interface uses standard Internet protocols. It hasalready been implemented between several catalog applications and SAP Business-toBusiness Procurement.IntegrationThe graphic below shows how catalogs are integrated with SAP nal catalogStructureThe catalog interface consists of two separate and distinct sections: the outbound section andthe inbound section. The outbound section [Page 6] defines the information being sent from the SAPBusiness-to-Business Procurement application to the catalog application. Thisincludes information such as the catalog URL and login data. The inbound section [Page 9] consists of the information being sent from the catalogapplication to the SAP Business-to-Business Procurement application. This sectioncontains data on the items selected in the catalog, such as the items descriptions,quantities ordered, and prices. For more details, see the interface diagram underInbound Section.Open Catalog Interface2.0B5

SAP online help11.07.00Open Catalog Interface: Outbound SectionThe following graphic shows how the purchasing application redirects the browser from SAPBusiness-to-Business Procurement to the catalog using the parameters of the outboundsection:DatabaseCatalogCatalogITSSAPBBPURL and parametersRequest withURL and parametersInternetInternetbrowserbrowserWhen a user selects a catalog and clicksGo, the purchasing application redirectsthe browser to the catalog using theparameters described in the outboundsection. The browser then displays thehomepage of the catalog.EmployeeThe outbound section consists of information that is sent to the catalog application by theSAP Business-to-Business Procurement application. This information originates in the SAPsystem, where it is created and maintained using SAP transaction SM34, view clusterVC CATALOG. You also have to define user attribute CAT to make the catalog visible for theuser in the SAP Business-to-Business Procurement application.Using this information, the SAP Business-to-Business Procurement application constructs aURL call to the catalog application and redirects the browser to this URL. The CGI script ofthe catalog application then has to parse and decode this information.In the SAP Business-to-Business Procurement system, you can set up this information inCustomizing.Path in the SAP Implementation Guide (IMG):Business-to-Business Procurement Define Catalogs.Note the following when setting up this information: Many of the field names and values are dependent on the particular catalog application. Every field contains a name and a value (Contents column) and has a type. Possibletypes are: URL SAP field Fixed value Field from service Return URL You must structure the fields in the order shown in the table below. In particular, definethe catalog-specific information directly after the catalog URL and the OkCode and Target, and Caller fields directly after the Return URL field. Typically, field values are entered as literals. For example, the LOGIN field can have aliteral value of GUEST. However, system variables such as SY-UNAME can also be usedOpen Catalog Interface2.0B6

SAP online help11.07.00as values for a field, allowing the actual value to be determined at runtime. In this case,you should assign the type SAP field to the relevant field. As of Release 2.0, the name/value pair OCI VERSION "2.0" is passed to the catalog.This indicates that the SAP B2B Procurement system involved is a Release 2.0 system.The outbound data you maintain is structured as described in the table below. In this table,Fixed indicates that the field name must be exactly as specified, whereas Variable indicatesthat the field name is catalog-specific.DescriptionMandatory Catalog- Field NamespecificField Name is MeaningFixed/VariableCatalog URLYesYesFixedThe URL of the catalog. Thisshould refer to the location ofthe catalog CGI script file.All catalogspecific fieldsAs relevantYesVariableThe set of catalog-specificfields. An example ofcatalog-specific fields isprovided in the table below.Return URLYesNoHOOK URLVariableThe URL used to return tothe SAP Business-toBusiness Procurementapplication from the catalogapplication. Set the value ofthis field to blank. It isautomatically filled at runtimeby the procurementapplication. (See also Notebelow.)OK CodeYesNo OkCodeFixedContains the transactioncode indicating that thefunction Add Items to SAPshopping basket is to beperformed. Must be set toADDI for SAP Business-toBusiness Procurement.TargetYesNo TARGETFixedSpecifies the frame to whicha catalog is to return in aframe-based environment. Ifthis field is not set, thecatalog application mustprovide a default target oftop.CallerYesNo CALLERFixedIndicates that the data wassent by an external catalog.Content must be set to CTLG. blank The HOOK URL can have a different name, but the type of this field must be setto Return URL. The HOOK URL is encoded so that special characters such as ':'and '/' are represented by '%' and the hex digits for the ASCII code for thecharacters. The catalog application is responsible for decoding this string into avalid URL. Note that the catalog application must not make any assumptionsabout the HOOK URL, for example, it cannot assume that a question mark ispresent to delineate the URL variables.Open Catalog Interface2.0B7

SAP online help11.07.00Example of catalog-specific parameters:DescriptionField NameField Name isFixed/VariableMeaningRequest typeREQTYPEVariableRequests a login when the catalog isfirst accessed.LoginUSERNAMEVariableThe user ID for logging in to thecatalog.PasswordPASSWORDVariableThe login password.Database identifierSERVICEVariableThe database identifier. This may berequired for some catalogs.Additional Catalog FunctionsAn external catalog may support additional functionality. This additional functionality can betriggered by several name/value pairs which are passed over to the catalog within the querystring of the catalog URL when the functionality is needed. The following functions arepossible: Detail of a productThe following name/value pairs are additionally transferred to the catalog:FUNCTION "DETAIL" andPRODUCTID "database key of product in the catalog" Validation of a productThe following name/value pairs are additionally transferred to the catalog:FUNCTION "VALIDATE" andPRODUCTID "database key of product in the catalog" Sourcing of a productThe following name/value pairs are additionally transferred to the catalog:FUNCTION "VALIDATE" andSEARCHSTRING "string to directly start the catalog search" andVENDOR "vendornumber in the buyer's system"The functions "DETAIL" and "VALIDATE" will only work if the parameterNEW ITEM-EXT PRODID[n] was filled from the catalog in a previous call.If a catalog supports one or more of these three additional functions, the corresponding flaghas to be set in the SAP transaction SM34, view cluster VC CATALOG. Path in the SAPImplementation Guide (IMG): Business-to-Business Procurement Define Catalogs.The expected data to be returned from the catalog is described in this document underInbound Section[Page 9]Open Catalog Interface2.0B8

SAP online help11.07.00Open Catalog Interface: Inbound SectionUseThe inbound section consists of information that is sent to the SAP Business-to-BusinessProcurement application by the catalog application.For each item selected in the catalog and sent to the SAP Business-to-Business Procurementapplication, all mandatory fields have to be sent, along with the relevant optional fields.The fields can be sent back to the purchasing application by either the GET or the POSTmethod (because to the limitations of GET, POST is strongly recommended).Note the following: Fields should not contain leading spaces. All numeric fields that allow fractional amounts must explicitly include thedecimal point "." at the correct byte position. Apart from the decimal point, numeric fields may not include commas orany other non-numeric characters. As of Release 2.0, no distinction is made between a service master and amaterial master. Both will be stored as a product master. As of Release 2.0 the inbound section can be sent back to the SAPBusiness-to-Business Procurement system as follows: As an HTML version (as in Release 1.0) As an XML versionHTML versionThe following graphic illustrates the data flow of the inbound section:DatabaseCatalogCatalogITS3311HTML form containingthe catalog HTML form containingthe catalog dataThe catalog generates an HTML form whichis sent to the browser. If the user clicksSubmit, the form is sent to the ITS. Thebrowser then displays the SAP Business-toBusiness Procurement application.SubmitTo handle multiple items selected in the catalog, each field name must be an array using thebracket subscript convention as per the C programming language. Subscripts must start at 1(not zero). For example, the description of an item would be returned as a name such as"NEW ITEM-DESCRIPTION [1]" (refer to the Example of a Catalog Interface [Page 14]).Open Catalog Interface2.0B9

SAP online help11.07.00ItemNameRequired/Opt DetailsionalType LengthDescriptionNEW ITEMDESCRIPTION[n]Required if the The description of theitem to be orderedSAP productmasternumber is notspecified.CHAR - 40Product masterNEW ITEM-MATNR[n] Required if the The SAP product master CHAR - 18Descriptionnumberfield is notspecified.Product groupNEW ITEMMATGROUP[n]OptionalThe SAP product groupQuantityNEW ITEMQUANTITY[n]RequiredCHAR - 15Quantity to add. Therecan be a maximum of 11digits to the left of thedecimal point, and theremust be 3 digits to theright.Unit of measureNEW ITEM-UNIT[n]Required ifproductmaster field isnot filledUnit of measure of theitem. Must be thestandard ISO code.CHAR - 3PriceNEW ITEM-PRICE[n]OptionalPrice of the item in thecatalog. There can be amaximum of 11 digits tothe left of the decimalpoint, and there must be3 digits to the right.CHAR - 15Price unitNEW ITEMPRICEUNIT[n]OptionalThe number of units that CHAR - 9must be purchased atthe given price. Thisquantity defaults to one.CurrencyNEW ITEMCURRENCY[n]Required if aprice isreturned,otherwiseoptionalMust be the ISO code for CHAR - 5the currency.Lead timeNEW ITEMLEADTIME[n]OptionalNumber of days fromtoday until the productwill be available. If notspecified, noassumptions will bemade about the leadtime.VendorNEW ITEMVENDOR[n]OptionalCHAR - 10The business partnernumber in the SAP B2BProcurement system, ifthe product is purchasedthrough a multi-suppliercatalog.Open Catalog Interface2.0BCHAR - 10CHAR - 510

SAP online help11.07.00ItemNameRequired/Opt DetailsionalType LengthVendor productnumberNEW ITEMVENDORMAT[n]OptionalThe vendor product partnumber of the productCHAR - 22Manufacturer'scodeNEW ITEMMANUFACTCODE[n]OptionalThe manufacturer's code CHAR - 10Manufacturer'sproduct numberNEW ITEMMANUFACTMAT[n]OptionalThe manufacturer'sproduct part number ofthe product.OptionalThe number of theCHAR - 10contract with the vendor.Contract number NEW ITEMCONTRACT[n]CHAR - 40Item of acontractNEW ITEMCONTRACT ITEM[n]OptionalThe number of an itemCHAR - 5within a contract with thevendor.Service flagNEW ITEMSERVICE[n]OptionalA flag which indicates ifthe line refers to aservice or to goods.CHAR - 1QuotationNEW ITEMEXT QUOTE ID[n]OptionalA reference to anexternal quotation.CHAR - 35Quotation itemNEW ITEMOptionalEXT QUOTE ITEM[n]A reference to anexternal quotation item.CHAR - 10Product IDNEW ITEMOptionalEXT PRODUCT ID[n]Key to identify a productin the catalogCHAR - 40DescriptionNEW ITEMLONGTEXT n:132[](see Note below)OptionalDescription of aconfiguration, forexample.CHAR - NorestrictionCustomerspecific fieldNEW ITEMCUST FIELD1[n]OptionalCustomer-specific field, CHAR - 10which may be handled ina business add-in in theSAP Business-toBusiness ProcurementsystemCustomerspecific fieldNEW ITEMCUST FIELD2[n]OptionalAs aboveCHAR - 10Customerspecific fieldNEW ITEMCUST FIELD3[n]OptionalAs aboveCHAR - 10Customerspecific fieldNEW ITEMCUST FIELD4[n]OptionalAs aboveCHAR - 20Customerspecific fieldNEW ITEMCUST FIELD5[n]OptionalAs aboveCHAR - 50The field NEW ITEM-LONGTEXT forms an exception. In this case, the indexmust be attached with an underscore followed by 132 and empty brackets:NEW ITEM-LONGTEXT n:132[] (see also the Example of a Catalog Interface[Page 14]).The fields shown in bold type are new with Release 2.0B.Open Catalog Interface2.0B11

SAP online help11.07.00The functions DETAIL and VALIDATE will only work if the parameterNEW ITEM-EXT PRODUCT ID[n] was filled from the catalog in a previous call.The index of the line items is shown as 'n' in the table above.The content of the five customer fields can be handled using business add-inBBP CATALOG TRANSFER. For further documentation on how to developbusiness add-ins, see:Implementation Guide (IMG): SAP Business-to-Business Procurement Business Add-Ins for SAP Business-to-Business Procurement Copy ShoppingBasket from Catalog in SAP B2B ProcurementXML VersionWith Release 2.0 the interface is also able to process XML as input. The prerequisite for thisis that you install the SAP Business Connector on the receiving side, which is used as amapping tool.The following graphic illustrates the data flow of the inbound interface:DatabaseCatalogCatalogITS3311HTML form containingthe XML data22The XML data ispassed to the SAPBusiness Connectorfor mapping purposesHTML form containingthe XML BBPSubmitThe catalog generates an HTML form whichis sent to the browser. When a user clicksSubmit, the form is sent to the ITS. Thebrowser then displays the SAP Business-toBusiness Procurement application.If XML is used, the XML file has to be passed over to the browser in an HTML form in an inputfield with the name xmlDocument. (This should have the type hidden .) The content of thegenerated XML file is expected to be bound to the input field xmlDocument as a base64encoded string (see the Example of a Catalog Interface [Page 14]). The encoding can bedone directly on the server side, or, as in the example, on the client side.In addition the type of XML to be transferred has to be passed over in another input field. Thename of this field is xml Type. This variable is used to distinguish between several XMLschemas on the SAP Business Connector. Possible values for this field are: ESAPO(Encoded SAP Object) and ERNO (Encoded RosettaNet Object). To see the SAP XMLschema, refer to the file pdi oci.xsd at http://www.sap.com/csp/scenarios SAP B2BProcurement B2B-OCI.Open Catalog Interface2.0B12

SAP online help11.07.00Additional Catalog FunctionsThe table below shows what data is expected to be returned to the catalog if one of theadditional functions is called:FunctionData To Be Returned From TheCatalogDetail of a productDETAILNo data has to be returned fromthe catalog. The detail view ofthe product has to be shown inthe browser.Validation of a productVALIDATEThe application expects thecomplete product data to bereturned. If the product no longerexists, the catalog is notexpected to return any data.Data transfer must be done inthe background.Sourcing of a productVALIDATEThe catalog is expected totransfer the data in the normalway.Open Catalog Interface2.0B13

SAP online help11.07.00Example of a Catalog InterfaceThe following excerpts are examples of the HTML and XML source code generated by acatalog engine after a user has finished selecting items for a shopping basket. You canextract the source code and display the data in a Web browser.HTML versionIn the HTML version, all the line items are placed as name/value pairs in an HTML form asshown below. This can be done as text or hidden fields. The parameter HOOK URL has to beplaced in the action parameter of that form, so that the HTML form can be sent to the SAPBusiness-to-Business Procurement system.HTML Form (interface.asp): HTML HEAD HEAD H1 SAP Open Catalog Interface: HTML - Example /H1 /HEAD P This is an example, what needs to be generated by the catalog engine, ifthe user is done with picking items in his shopping basket. /P P View the source of this file to see all the text inputs. /P BODY bgcolor "#DED6C2" FORM action " % Request.QueryString("HOOK URL")% " method post target top !--For more information about the interface fields, refer to the cataloginterface description-- !--Item number 1-- input type "hidden" name "NEW ITEM-DESCRIPTION[1]"Easytouch, Medium, Black" input type "hidden" name "NEW ITEM-MATNR[1]"value "Pen,value "" input type "hidden" name "NEW ITEM-MATGROUP[1]"value "" input type "hidden" name "NEW ITEM-QUANTITY[1]"value "1" input type "hidden" name "NEW ITEM-UNIT[1]"value "EA" input type "hidden" name "NEW ITEM-PRICE[1]"value "0.50" input type "hidden" name "NEW ITEM-PRICEUNIT[1]"value "5" input type "hidden" name "NEW ITEM-CURRENCY[1]"value "USD" input type "hidden" name "NEW ITEM-LEADTIME[1]"value "1" input type "hidden" name "NEW ITEM-VENDOR[1]"value "1768" input type "hidden" name "NEW ITEM-V

Open Catalog Interface 2.0B 5 Open Catalog Interface Purpose The Open Catalog Interface (OCI) is the interface between catalogs and SAP Business-to-Business Procurement. SAP’s Open Catalog Interface uses standard Internet protocols. It has already been implemented between several catalog applications and SAP Business-to-Business Procurement .File Size: 314KBPage Count: 24