Skip to Content

Sap Business One Integration Framework SAP B1 to HTTP Call using Rest API

Hi Experts,

Please share any examples of Integrating master data/transnational data from SAP B1 to third party application (eg:Zoho ,salesforce)..using Rest api, Payload Type Json.

Thanks and Regards,

YADAV

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 04, 2018 at 08:15 AM

    Hello YADAV,

    For Http call usage, you may refer to the training material including in B1if 2.0.

    Help -- Training -- 3. Set Up Parameters -- 3.02. Using XSL Transformation in Flow

    Thank & best regards

    Huan Yang


    03-02.png (636.7 kB)
    Add comment
    10|10000 characters needed characters exceeded

  • Dec 04, 2018 at 08:04 AM

    Hello YADAV,

    For different service provider, the API is different.

    Basically, you may user call http atom to reach it.

    <xsl:template name="transform">
            <call>
                <query id="identifier" value="value"></query>
                <!--optional - define your own query parameters - multiple elements allowed-->
                <connect>
                    <!--the connect section is optional - you can also define a reference to the sld-->
                    <destProtocol></destProtocol>
                    <destHost></destHost>
                    <destPort></destPort>
                    <destPath></destPath>
                    <query></query>
                    <proxyHost></proxyHost>
                    <proxyPort></proxyPort>
                    <method></method>
                    <authentification></authentification>
                    <user></user>
                    <password></password>
                    <user2query></user2query>
                    <password2query></password2query>
                    <trustStoreURI></trustStoreURI>
                    <keyStoreURI></keyStoreURI>
                    <tlsVersion></tlsVersion>
                </connect>
                <dtd>
                    <!--optional - document type definition-->
                </dtd>
                <pltype>
                    <!--optional - default is xml-->
                </pltype>
                <payload>
                    <!--optional - in case of POST request you specify here your request document-->
                </payload>
                <htta>
                    <par id="httpheader.???" value="">
                        <!--optional - you can specify here your own http header definitions - multiple elements allowed-->
                    </par>
                    <par id="htta.returnpltypeforce" value="">
                        <!--optional-->
                    </par>
                    <par id="htta.returnpltypedefault" value="">
                        <!--optional-->
                    </par>
                </htta>
            </call>
        </xsl:template>
    

    Thank & best regards

    Huan Yang

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 22 at 08:00 AM

    I am facing the same for WCF outbound call WSAS adapter.

    But not able to pass SOAP Request to WCF service.

    I am reading sales order data after B1Event and pushing the same to a WCF service

    Below is the transformation defined.

    <?bpc.pltype.out bpm.pltype=xml?>
        <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:b1e="urn:com.sap.b1i.sim:b1event" xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent" xmlns:b1im="urn:com.sap.b1i.sim:b1imessage" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:exslt="http://exslt.org/common"
            xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter" xmlns:js="com.sap.b1i.bpc_tools.Javascript" xmlns:rev="urn:com.sap.b1i.adapter:revaadapter" xmlns:rfc="urn:sap-com:document:sap:rfc:functions" xmlns:sim="urn:com.sap.b1i.sim:entity" xmlns:utils="com.sap.b1i.bpc_tools.Utilities"
            xmlns:vpf="urn:com.sap.b1i.vplatform:entity" xmlns:xca="urn:com.sap.b1i.xcellerator:appconfig" xmlns:xci="urn:com.sap.b1i.xcellerator:intdoc" version="1.0" exclude-result-prefixes="b1e b1ie b1im bfa jdbc js rfc utils xci xca vpf exslt sim rev" b1e:force=""
            b1ie:force="" b1im:force="" bfa:force="" jdbc:force="" js:force="" rfc:force="" utils:force="" xci:force="" xca:force="" vpf:force="" exslt:force="" sim:force="" rev:force="">
            <?prodver 1.0.0?>
                <xsl:include href="../../com.sap.b1i.dev.repository/IDE/init.xsl" />
                <xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']" />
                <xsl:variable name="msg1" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='T']" />
                <xsl:template match="/">
                    <vpf:Msg>
                        <xsl:copy-of select="/vpf:Msg/@*" />
                        <xsl:copy-of select="/vpf:Msg/vpf:Header" />
                        <vpf:Body>
                            <xsl:copy-of select="/vpf:Msg/vpf:Body/*" />
                            <vpf:Payload Role="X" id="{$atom}">
                                <xsl:call-template name="transform" />
                            </vpf:Payload>
                        </vpf:Body>
                    </vpf:Msg>
                </xsl:template>
                <xsl:template name="transform">
                    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
                        <soapenv:Header/>
                        <soapenv:Body>
                            <tem:ReadEvent>
                                <!--Optional:-->
                                <tem:request>
    
                                    <DataOperation>
                                        <xsl:value-of select="$msg1/Event/b1e:b1events/b1e:b1event/b1e:transactiontype" />
                                    </DataOperation>
                                    <DocEntry>
                                        <xsl:value-of select="$msg/BOM/BO/Documents/row/DocEntry" />
                                    </DocEntry>
                                    <DocType>17</DocType>
                                    <Schema>
                                        <xsl:value-of select="$msg1/Event/b1e:b1events/b1e:b1event/b1e:eventsource" />
                                    </Schema>
                                </tem:request>
                            </tem:ReadEvent>
                        </soapenv:Body>
                    </soapenv:Envelope>
                </xsl:template>
        </xsl:stylesheet>
    Add comment
    10|10000 characters needed characters exceeded

    • Dear Rakesh, please do not use elder threads for your questions (these should have been closed anyway ideally). Please open a new question on your recent issue, this will also increase the chance for getting answers as it will be shown in feeds, which is not the case if you try re-using existing ones. Thanks for your collaboration, Peter