ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SAPRequest node - BAPI structures

Post new topic  Reply to topic
 SAPRequest node - BAPI structures « View previous topic :: View next topic » 
Author Message
Qadeer_824
PostPosted: Fri Oct 08, 2010 1:47 am    Post subject: SAPRequest node - BAPI structures Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Hi All,
I am working on developing a message flow that interacts with SAP using BAPI's. The I/O structures that i need to pass to SAP are as given below:

Input:
Code:

<Request>
      <CustomerID>1234</CustomerID>
      <getMembership>Y</getMembership>
      <getCustInfo>Y</getCustInfo>
</Request>


Output:
Code:

<Response>
       <Membership>
                <MembershipID>10000000001</MembershipID>
                <Country>GB</Country>
       </Membership>
       <Customer>
                 <FirstName>Test1</FirstName>
                 <LastName>Test2</LastName>
                 <DOB>10042010</DOB>
        </Customer>
</Response>


I would like to use the SAPRequest node to interact with SAP. I have done the following:
a. Defined a BAPI with Import parameters as CustomerID, getMembership, getCustInfo.

However, following are the issues i face:
1. If i define the export parameters as MembershipID and Country, then when importing the BAPI definition, the Membership container is not present. Is there any way i can get the Membership element (without defining the complete structure as a table)?
2. When i import the BAPI definition, adapter node automatically prefixes it with sap. Is there any way i can remove the "sap" prefix from it?
3. I am not receiving the <Response> element in the BAPI. I.e. I would not be able to receive "repeating" structures of <Response> from the BAPI unless i define it as a table?

I understand that these questions are probably very specific to the BAPI definition, but just wondering if these are all the limitations imposed by BAPI or if its the adapter node?

Your inputs are highly appreciated..

Thanks,
Qadeer
Back to top
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Fri Oct 08, 2010 5:35 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Obviously you do not understand the SAP part of the BAPI and how it gets invoked through the JCO Adapter. Talk to your SAP Team with these questions.

Also make sure you evaluate the BAPIRETURN structure.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Qadeer_824
PostPosted: Fri Oct 29, 2010 5:26 am    Post subject: Reply with quote

Acolyte

Joined: 04 Oct 2007
Posts: 59

Hi All,
I have discussed with the SAP team and as i understand, the standard BAPI's do not use CDT (Complex Data Types). They instead use Tables for sending the information.

However, the issue is that the XML structure generated by the SAPRequest node for a repeating element does not have a root element.

ie. A response from SAP for Addresses and Contacts of a customer, the structure would be:

Code:

<root>
  <Addresses>
       <Address>
             <Line1>1212</Line1>
             <Line2>1212</Line2>
             .....other fields
        </Address>
       <Address>
             <Line1>1212</Line1>
             <Line2>1212</Line2>
             .....other fields
        </Address>
       <Address>
             <Line1>1212</Line1>
             <Line2>1212</Line2>
             .....other fields
        </Address>
     </Addresses>
     <Contacts>
          <Contact>
                 <ID>1</ID>
                 <Value>8728322873</Value>
                 <Type>H</Type>
           </Contact>
          <Contact>
                 <ID>1</ID>
                 <Value>8728322873</Value>
                 <Type>H</Type>
           </Contact>
          <Contact>
                 <ID>1</ID>
                 <Value>8728322873</Value>
                 <Type>H</Type>
           </Contact>
          <Contact>
                 <ID>1</ID>
                 <Value>8728322873</Value>
                 <Type>H</Type>
           </Contact>
      </Contacts>
</root>


However, the adapter creates the message set as per the structure below:
Code:

<root>
<!-- The Addresses element is mising.. -->
       <Address>
             <Line1>1212</Line1>
             <Line2>1212</Line2>
             .....other fields
        </Address>
       <Address>
             <Line1>1212</Line1>
             <Line2>1212</Line2>
             .....other fields
        </Address>
          <Contact>
                 <ID>1</ID>
                 <Value>8728322873</Value>
                 <Type>H</Type>
           </Contact>
          <Contact>
                 <ID>1</ID>
                 <Value>8728322873</Value>
                 <Type>H</Type>
           </Contact>
          <Contact>
                 <ID>1</ID>
                 <Value>8728322873</Value>
                 <Type>H</Type>
           </Contact>
          <Contact>
                 <ID>1</ID>
                 <Value>8728322873</Value>
                 <Type>H</Type>
           </Contact>
</root>


Is this the expected behaviour of the Adapter? How would repeating elements be handled? Please provide your inputs on this.

Thanks,
Qadeer
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » SAPRequest node - BAPI structures
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.