cancel
Showing results for 
Search instead for 
Did you mean: 

B1if UDO Outbound

szymon_lipnicki3
Active Participant
0 Kudos

Hi All,

I have a problem with my scenario package outbound for General Service. I want to add new data to my UDO so I set outbound like this:

Scenario Step Definition - OUTBOUND - CHANNEL:

Outbound Channel: SAP Business One

Outbound Format: DI Service

Details: GeneralService-Add

     Service Identifier: GeneralService

     Service Method Type: Add method

     Service Method Identifier: Add

     Get Method Identifier: getByParams

     Request Structure: CT_JB_ACKN_PRParams

     Request Keys: Code

I have 2 incidents in Consistency Check:

  • 0259 - vBIU inconsistency - outbound - details: 'Service Method Identifier' is not correct
  • 0262 - vBIU inconsistency - outbound - details: 'Get Method Identifier' is not correct

I have no idea how to solve this. I tried change Service Method Identifier to add or addCT_JB_ACKN_PR. How to set outbound channle for UDO?

Regards

Szymon

Accepted Solutions (1)

Accepted Solutions (1)

bastian_schaefer
Active Contributor
0 Kudos

Hi Szymon,

From my point of view your settings are correct and it should be working if you just ignore the consistency check and activate the scenario.

If your scenario is working after activation or you're not able to activate the scenario caused by this consistency check error, please create a CRM support message.

Many thanks

Bastian

szymon_lipnicki3
Active Participant
0 Kudos

Hi Bastian,

Those two incidents in consistency check don't allow to active step and scenario package. I create support message and wait for a response.

Regards

Szymon

bastian_schaefer
Active Contributor
0 Kudos

Hi Szymon,

as a workaround you can change the Configuration
of Development Environment
to allow activation of inconsistent steps.

Please open Maintenance -> Cfg. Dev Environment and change following parameter: Allow
manual setup of inconsistent steps .

After this change you should be able to activate your UDO step.

Anyway, we plan to correct the consistency check.

Best regards

Bastian

szymon_lipnicki3
Active Participant
0 Kudos

Hi Bastian,

I had checked "Allow manual setup of inconsistent steps" but I had to uncheck "Automatic de-setup inconsistent steps". After that I could active step and sceanrio, but after first test I have an error in message log:

com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception:

com.sap.b1i.bizprocessor.BizProcException: BPE001 Nested exception:

com.sap.b1i.utilities.UtilException: UTE001 Nested exception:

javax.xml.transform.TransformerException:

com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Element type "Code" must be

followed by either attribute specifications, ">" or "/>".

My atom0 transformation looks like this:

     <B1out type="service">

            <CT_JB_ACKN_PR>

                <row>

                    <Code>00000001</Code>

                    <Name>00000001</Name>

                    <U_ItemCode>ItemCode1</U_ItemCode>

                    <U_ItemName>ItemName1</U_ItemName>

                    <U_Revision>Revision1</U_Revision>

                </row>

            </CT_JB_ACKN_PR>

        </B1out>

Regards

Szymon


bastian_schaefer
Active Contributor
0 Kudos

Hi Szymon,

the transformation is not correct, it must have a B1 Service Object structure because it uses the GeneralService object:

<BS xmlns="" ServiceCode="CT_JB_ACKN_PR">

     <GetOrDelete>        

          <xsl:element name="CT_JB_ACKN_PRParams">

               <xsl:element name="Code">00000001</xsl:element>

             </xsl:element>

     </GetOrDelete>

      <InsertOrUpdate>

          <xsl:element name="CT_JB_ACKN_PR">

                <xsl:element name="Code">00000001</xsl:element>

             <xsl:element name="Name">00000001</xsl:element>

             ...

        </xsl:element>

      </InsertOrUpdate>

</BS>

The GetOrDelete section is only needed for updates and must not be there for add operations.

Best regards

Bastian

szymon_lipnicki3
Active Participant
0 Kudos

Thank You Bastian,

it all helped. Now I can add new data to my UDO object. One more thing - when I generate schema from atom details (Gen Template button) for Outbound for SAP Business One (service_full) I get a template in XSL file:

     <B1out xmlns="" type="service_full">

            <Control>

                <serviceid>

                    <!--service identifier, e.g. 'ApprovalRequestsService'-->

                </serviceid>

                <mtype>

                    <!--add, update, remove-->

                </mtype>

                <method>

                    <!--method to call, e.g. 'UpdateRequest'-->

                </method>

                <getmethod>

                    <!--id of the get method of the service, e.g. 'GetRequest'-->

                </getmethod>

                <requeststr>

                    <!--id of the request structure, e.g. 'ApprovalRequestParams'-->

                </requeststr>

                <keyname>

                    <!--name of the primary key, e.g. 'Code'-->

                </keyname>

            </Control>

            <Payload>

                <!--mandatory only if mtype='add'  or mtype='update'--><!--here you define the B1 XML schema of the service, e.g. <ApprovalRequest>...</ApprovalRequest>-->

            </Payload>

        </B1out>

Why is it different from schema You gave me for GeneralService? I'm asking because I'm wondering how transformation should look like for multiple OUTBOUND. I know that I should use <b1im_multimsg/> but how pass details about UDO object id, method etc.

I mark this discussion as answered, but I will be thankful if You answer my question in this post.

Regards

Szymon

szymon_lipnicki3
Active Participant
0 Kudos

Hi,

One more thing. I try to add data to UDO using B1 Service atom.

Transformation:

     <BS xmlns="" ServiceCode="CT_JB_ACKN_PK">

            <InsertOrUpdate>

                <xsl:element name="CT_JB_ACKN_PK">

                    <xsl:element name="Code">00000003</xsl:element>

                    <xsl:element name="Name">00000003</xsl:element>

                    <xsl:element name="U_ItemCode">ItemCode3</xsl:element>

                    <xsl:element name="U_ItemName">ItemName3</xsl:element>

                    <xsl:element name="U_Revision">Revision3</xsl:element>

                </xsl:element>

            </InsertOrUpdate>

        </BS>

I get an error while testing:

com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: java.lang.RuntimeException: java.lang.RuntimeException: No 'ServiceCode' defined as property of BS node for GeneralService call

How to solve this?

If You want I can start another discussion just for this problem.

Regards

Szymon

bastian_schaefer
Active Contributor
0 Kudos

Hi Szymon,

the difference is that you defined the schema in your OUTBOUND definitions already.

Outbound Channel: SAP Business One

Outbound Format: DI Service

Details: GeneralService-Add

     Service Identifier: GeneralService

     Service Method Type: Add method

     Service Method Identifier: Add

     Get Method Identifier: getByParams

     Request Structure: CT_JB_ACKN_PRParams

     Request Keys: Code

So you don't need the full schema, it's filled implicitly by B1if with you entere OUTBOUND definitions.

Best regards

Bastian

bastian_schaefer
Active Contributor
0 Kudos
Hi Szymon,
you can try to use a trick and define everything in the previous xform atom.
Therefore define your B1 service call as follows:
     Service Identifier = #Payload
     Service Method Type = #x
     Service Method Identifier = #x
     Request Method = #x
     Request Structure = #x
     Request Keys = #x
     Key Values = #x
     Payload = #<number of atom defining the call>

In the defining payload atom please enter the complete B1 Service Object structure (service object update in this case):
</xsl:template>
...
<xsl:template name="transform">
<!--<place_here_your_B1_Service_Schema xmlns=""/>-->
<Envelope xmlns="">
     <Header>         
          <Action DIServiceName="GeneralService" update="update" get="getByParams" throwException="false">update</Action>
     </Header>
     <Body>
          <BS ServiceCode="CT_JB_ACKN_PK">
               <GetOrDelete>
                    <xsl:element name="CT_JB_ACKN_PKParams">
                         <xsl:element name="Code">xxx</xsl:element>
                    </xsl:element>
               </GetOrDelete>
               <InsertOrUpdate>
                     <xsl:element name="CT_JB_ACKN_PK">         
                         <xsl:element name="Code">xxx</xsl:element>
                         <xsl:element name="Name">xxx</xsl:element>
                         ...
                     </xsl:element>
               </InsertOrUpdate>
           </BS>
      </Body>
</Envelope>
</xsl:template>
Please check if this is working already.
Best regards
Bastian
0 Kudos

Hi,

did you get it to work?

I have the same issue when using a B1 Service atom - it says no ServiceCode defined.

Kind regards

Peter

Trinidad
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Peter,

I have it working in my machine (thanks to Bastian Schaefer ;o).

The solution is to:

1. In the B1 Service CALL just reference the payload without any details:

2. In the xform atom put the Envelope with Header and Body information:

<xsl:template name="transform">

  <Envelope xmlns="">

    <Header>

       <Action DIServiceName="GeneralService" update="update" get="getByParams" throwException="false">update</Action>

    </Header>

    <Body>

      <BS ServiceCode="UDO2">

        <GetOrDelete>

          <xsl:element name="UDO2Params">

            <xsl:element name="Code">6</xsl:element>

         </xsl:element>

       </GetOrDelete>

       <InsertOrUpdate>

          <xsl:element name="UDO2">

            <xsl:element name="Code">6</xsl:element>

           <xsl:element name="Name">sechs</xsl:element>

          </xsl:element>

       </InsertOrUpdate>

      </BS>

    </Body>

  </Envelope>

</xsl:template>

Hope it helps

Trinidad.

Former Member
0 Kudos

Hi Maria,

I have tried to add to my UDO but I also get:

com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: java.lang.RuntimeException: java.lang.RuntimeException: No 'ServiceCode' defined as property of BS node for GeneralService call

I did exactly what you did.

Please help...

Regards, Brenden Draper

Answers (0)