cancel
Showing results for 
Search instead for 
Did you mean: 

Service Call

Former Member
0 Kudos

Hi Experts...

Someone can explain or give an example to create a Service Call

in B1if...

Thanks!!!!

Regards

Enrique

Accepted Solutions (1)

Accepted Solutions (1)

bastian_schaefer
Active Contributor
0 Kudos

Hi Enrique,

please first have a look into the B1i online help with following search tag: "Call B1 Service Atom".

If a specific B1 service is missing in the Drop-Down list of the B1 Service call atom, please manually start a metadata retrieval via (Maintenance -> Cfg Metadata) to update the information from a concrete B1 company database.

After selecting the B1 Service atom details, please press button "Generate Schema" to generate the XML Schema of the chosen B1 Service in the predecessor XFORM transformation atom.

Best regards

Bastian

Former Member
0 Kudos

Hi Bastian...

Thanks for the tip...

I have my XFORM atom before the B1 Call Object (192 - Service Call), the transformation section has the next information:

<xsl:template name="B1if.object.schema.">

  <b1im_multimsg>

  <b1im_msg>

  <B1out type="object">

  <ServiceCall>

  <row>

  <customer>C30000</customer>

  <custmrName>Microchips</custmrName>

  <subject>Enviado desde B1if</subject>

  <description>Prueba de llamada de Servicio desde B1if</description>

  </row>

  </ServiceCall>

  </B1out>

  </b1im_msg>

  </b1im_multimsg>

  </xsl:template>

But in the message log puts the next error:

<Payload Role="C" id="atom1" system="0010000100" status="success" b1login="Technical User" method="Synchronous Insert" objectid="191" payload="atom2" keyname="callID" keyvalue="" DIresult="failure" DImsg="Exception : DI Error: (-5002) Customer is not specified in service call [OSCL.customer]" />


You Can explained me or give me a orientatition of the correct way to send the payload data to generate my B1 Service Call???


Thanks...


Best Regards


Enrique

bastian_schaefer
Active Contributor
0 Kudos

Hi Enrique,

for structure of service calls, please open B1i Help -> B1 Service Help and check for your specific Service Call (192:ServiceCallOriginsService) the displayed methods.

The structure for each method can be found behind button Parameter Template.

An option to generate the schema in your integration flow is the following:

In your B1 Service call atom after you've chosen your service call details, press button "Generate Schema to fill the predecessor atom with the schema for your selected B1 service call atom.

Best regards

Bastian

Former Member
0 Kudos

Hi Bastian...

I have a question....

It's the same Call B1 Service and Call B1 Object (Service Call - ID 192)?

I want use the Call B1 Object and not the Call B1 Service, but if the two calls are the same one, i can try with your example...

Thanks!!!

Best Regards...

Enrique

Former Member
0 Kudos


Hi Sorry Bastian!!!!

The Call B1 Object Id is 191 (Service Call) and not 192 (Service Call Origin).....

Sorry for any inconvenience.

Best Regards

Enrique.

bastian_schaefer
Active Contributor
0 Kudos

Hi,

in this case please check Help -> B1 Object Help  (List Mode = sort by local id) and press Object List button. Search for object id 192 und you get your structure.

Best regards

Bastian

P.S.: The way to find /generate the structure for B1 service calls and B1 object calls is the same.

Former Member
0 Kudos

Hi Bastian...

You're the one!!!

Thank you so much...Now I can create Service Calls to B1 from B1if.

Best Regards

Enrique

Former Member
0 Kudos

Hello Bastian,

i will create a Szenario for Inventory Counting. The Inbound is a Webservice-Call, My Outbound is acually void.

I have create the Schema as your example:


<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:b1e="urn:com.sap.b1i.sim:b1event" xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter" xmlns:rfc="urn:sap-com:document:sap:rfc:functions" xmlns:sim="urn:com.sap.b1i.sim:entity" xmlns:vpf="urn:com.sap.b1i.vplatform:entity" xmlns:xci="urn:com.sap.b1i.xcellerator:intdoc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" bfa:force="" vpf:force="" jdbc:force="" rfc:force="" b1ie:force="" b1e:force="" xci:force="" sim:force="">

    <xsl:output method="xml" encoding="UTF-8" indent="yes"></xsl:output>

    <xsl:param name="atom"></xsl:param>

    <xsl:param name="sessionid"></xsl:param>

    <xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;S&apos;]"></xsl:variable>

    <xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"></xsl:variable>

    <xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"></xsl:variable>

    <xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover=&apos;P&apos;]/@Id"></xsl:variable>

    <xsl:variable name="vpInboundMSG" select="/vpf:Msg/vpf:Header/vpf:Variables/vpf:var[./@id=&apos;InboundMSG&apos;]/@value"></xsl:variable>

    <xsl:template match="/">

        <Msg xmlns="urn:com.sap.b1i.vplatform:entity">

            <xsl:copy-of select="/vpf:Msg/@*"></xsl:copy-of>

            <xsl:copy-of select="/vpf:Msg/vpf:Header"></xsl:copy-of>

            <Body>

                <xsl:copy-of select="/vpf:Msg/vpf:Body/*"></xsl:copy-of>

                <Payload Role="X" id="{$atom}">

                    <xsl:call-template name="B1if.schema.InventoryCountingParams"></xsl:call-template>

                </Payload>

            </Body>

        </Msg>

    </xsl:template>

    <xsl:template name="B1if.schema.InventoryCountingParams">

        <InventoryCountingParams >

            <!--DB Table Name: OINC -->

            <DocumentEntry>1</DocumentEntry>

            <DocumentNumber>1</DocumentNumber>

        </InventoryCountingParams>

    </xsl:template>

</xsl:stylesheet>

When i test it, i get only this error message.

I know i can get the List about a SQL-Call, but i will unterstand this possibility.

Because the next scenario is to update the InventoryCounting.

bastian_schaefer
Active Contributor
0 Kudos

Hallo Ronny,

in your B1 service atom in parameter "Key Values" you entered "#DocumentEntry", but here you need to enter the value of the Inventory Counting document you want to retrieve, e.g. "#1,1" for the first Document.

For test purposes you can enter it manually (see screenshot).

Later for productive use it would make sense to read it from a previous payload atom.

In your case, the Key Values parameter needs to be filled with "#$[DocumentEntry],$[DocumentNumber]" (see screenshot below, with syntax explanation):

You can open the variable help under following symbol

Best regards

Bastian

Former Member
0 Kudos

Hello Bastian,

thanks, that was the Error.

Kind Regards

Ronny

Former Member
0 Kudos

Hi Bastian,

I want to add an inventory count document. What's the key values parameter for addition? Why isn't mine correct on screenshot below? B1if doesn't allow me to leave it blank even though i want to implement addition. What's wrong with the parameters below?

Best Regards

Bilâl

Former Member
0 Kudos

Hello Bilal,

lock at my Config:

Best Regards Ronny

Former Member
0 Kudos

Hi again Ronny,

Simply entered an xpath and referenced to an empty DocumentEntry element. It seems to be working; at least the processing flow has begun to throw some sensible DI exceptions.

But now, Integration framework started to get crazy. What's wrong with my payload? I want to add simple inventory count document with only one item successfully then going to try with batchnumbers etc. I've entered a new topic you can help me via this link:


<Payload Role="X" id="atom2">

- <InventoryCounting xmlns="">

  <DocumentEntry />

  <CountDate>2014-12-18</CountDate>

  <SingleCounterType>12</SingleCounterType>

  <CountingType>ctSingleCounter</CountingType>

- <InventoryCountingLines>

- <InventoryCountingLine>

  <LineNumber>0</LineNumber>

  <ItemCode>1234567</ItemCode>

  <WarehouseCode>01</WarehouseCode>

  <UoMCode>kg</UoMCode>

  <UoMCountedQuantity>15</UoMCountedQuantity>

  </InventoryCountingLine>

  </InventoryCountingLines>

  </InventoryCounting>

  </Payload>

- <Payload Role="C" id="atom1" system="0010000106" systype="B1.8.8" b1login="Technical User" status="success" serviceid="InventoryCountingsService" type="Add method" method="add" requeststr="InventoryCountingParams" requestkeys="DocumentEntry" requestmethod="add" keyvalues="" ptype="synchronous" payload="atom2" DIresult="failure" DImsg="Exception : Error on completion of HTTPS-roundtrip: java.net.ConnectException: Connection refused: connect; nested exception is: java.net.ConnectException: Connection refused: connect">

  <Exception xmlns="">Error on completion of HTTPS-roundtrip: java.net.ConnectException: Connection refused: connect; nested exception is: java.net.ConnectException: Connection refused: connect</Exception>

  </Payload>

Best regards,

Bilâl

Message was edited by: Bilal Altan

Answers (0)