BAPI call generic sync?

Hi,
i am an absoulte newbie in this area of mobile infrastructure.
I want to know if it is possible to call a BAPI in the backend from a JSP application with generic sync?
If yes, how does it work?
If no, how can i use that BAPIS anyway?
Thanx
Tim
Message was edited by: Tim Nees
Message was edited by: Tim Nees

Hi,
please check the following example in the MDK:
http://media.sdn.sap.com/public/html/submitted_docs/MI/MDK_2.5/content/appdev/genericsync/introduction.html
To generate wrapper modules for your bapis check out the transaction ME_WIZARD.
Rgds Thomas

Similar Messages

  • Problem with persistence in Generic Sync application

    Hi:
    We are developing an application which runson SAP Mi 2.5, SP 18,
    Windows Mobile 5.0 and Generic Sync for PDAs.
    We need persistence in our application. We tried with persistence API but
    we found a problem and we send a message to SAP. Until we can solve
    this issue we must implement persistence in other way to satisfy our customer requierements
    Since now,we have implemented persistence with files but the performance of this solution does not meet our customer requirements (the search of data in the PDA is very slow).
    We are thinking in another solution, which consists on using
    Syncbos.Using this alternative, before making a generic sync, and
    executing the code shown below:
    SmartSyncRuntime.getInstance().getSyncBoDescriptorFacade
    ().getAllSyncBoDescriptors()
    the returned syncBOS are those which I have defined in XML. On the
    contrary, after making a generic sync, executing the same code, the
    returned syncbos ARE NOT those whic I have defined in XML. The only
    return that I get is the MIAUTH.
    Any other ideas?
    Thanks
    Kind Regards

    hi satur,
    there are some things to take care if you want to use the persistence layer of the
    SmartSync layer from your GenericSync app.
    first, you have to let the MI client think that your application is using the
    SmartSync functionality. this can be achieved by just including a dummy metadata
    meRepMeta.xml file in the war archive during the deployment process. once the
    MI client framework sees this during the installation, it will set a flag on the MSD
    that your app is a smartsync.
    second, if your app is considered a smartsync, MI will generate the delta request
    and upload messages for your data if ever you have your SyncBo defined in the
    metadata. Since you don't want such functionalities to be ON, i would suggest to
    mark all your SyncBo as local ones; i.e. using attributes suppressDownload=true
    and suppressUpload=true. this way, the MI framework will skip creating the requests
    and delta upload messages for your app during the synchronization process.
    third, your application has to have the syncEventListener implementation to get
    notification when the Sync button (or event) was initiated. if you don't want your
    app to be notified, you may just add synchronization button within your application
    that will call your data manager to prepare your containers (i.e. retrieving the newly
    inserted syncbo, modified syncbos and the list of deleted ones -> genericSync
    containers) and to call the synchronizeWithBackend method.
    fourth, you need to have the inboundProcessor that will parse your data and insert
    them a SyncBo into your local database.
    having tried this but i guess it might work...
    regards
    jo

  • Generic Sync Application and Persistence DB2e

    Hi all,
    I have a generic sync application. I need persistence and so, I have created a xml file with many syncbo to manage the persistence with db2e. If I execute the statement before the synchronization:
    SmartSyncRuntime.getInstance().getSyncBoDescriptorFacade().getAllSyncBoDescriptors().size()
    the result is five (because I have five syncbo).
    But when I do a generic synchronization and I try to store data of this synchronization into syncbo, I get an exception because only there is one syncbo.
    In fact, the previous statement returns only one synbo. This syncbo is called MIAUTH and I don´t have defined it.
    How can I solve this issue? Thanks a lot.
    Regards,

    Hi all,
    I know it is better to use persistence API than syncbos in generic sync application but we have many problems with persistence API and SP versions. While SAP solve our problems we are searching any alternative.
    We use MVC and after doing generic synchronization, if the application generates a event and navigate to other jsp and in it, the application generates other event, I get all of my syncbos.
    How could I simulate it, after generic sync finishes, in the same method by code? Any ideas?
    Thanks and Regads.

  • Problem in Generic Sync example

    Hi
    I downloaded the generic sync templete from the MDK documentation and deployed it to my MI client but when i try to get the information from the WEBAS it is giving the following error
    Error: 500
    Location: /SAMPLE_GENERICSYNC/start
    Internal Servlet Error:
    java.lang.NullPointerException
         at com.sap.ip.me.sync.SyncHeader.(Unknown Source)
         at com.sap.ip.me.sync.SyncOutboundContainer.(Unknown Source)
         at com.sap.ip.me.sync.SyncOutboundContainer.(Unknown Source)
         at com.sap.ip.me.sync.ContainerFactory.createOutboundContainer(Unknown Source)
         at genericsyncexample1.GenericSyncExample.getUserInfo(Unknown Source)
         at genericsyncexample1.GenericSyncExample.doHandleEvent(Unknown Source)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at com.sap.ip.me.api.runtime.jsp.AbstractMEHttpServlet.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:479)
    The Trace error from the MI Client is
    E There is no MSD for current application (genericsync_simple)
    how do i set the MSD for the Application?
    do i have to make any changes to the template and then deploye or is there anything missing in the SAP WebAS installed?
    i also checked the BWAFMAPP table for the method name "MDK_USER_INFO_READ"
    Thanks and Regards
    Gopi

    Hi Gopi!
    You are getting the following error from the Trace error from the MI Client is
    "E There is no MSD for current application "(genericsync_simple)
    Is that right?
    (1) Log On to MI Web Console, Verify you have Uploaded the Mobile Component "genericsync_simple" correctly in the MI WebConsole.Since you have deployed the application in MI Client you should have your MCD Description here.Make sure the deployment info is correct.
    (2) Log on to SAP MI Server and go to transaction MCD and then display your MCD "genericsync_simple' and make sure the information provided under Deployment Tab matches correctly with your info in MI Web Console.It should be the same.
    (3) You have already checked table BWAFMAPP for method MDK_USER_INFO_READ and make sure you have the correct BAPI Wrapper assigned here.You are fine here i guess.
    (4)Verify that table MEMAPPDEST has the correct RFC Destination defined for the Method MDK_USER_INFO_READ.
    (5) Did you Re-Start your MI Client after the First Sync that deployed the application in your MI Client.
    Setting up MCD is part of Step 1 and 2.You should have completed it already.
    Let me know your results.
    Thanks
    Gisk
    Message was edited by: Sivakumar Ganesan(Gisk)

  • Error message in BAPI call

    I have imported RFC Interfaces from SAP system. Each interfaces doesn't  have fault message.
    How to get error message in BAPI call when error occurs?
    I can catch an exception in BPM but I need to get error message and send it to another system.

    Hi Denis,
    >>>I have imported RFC Interfaces from SAP system. Each interfaces doesn't have fault message.
    if you want to use fault messages
    consider using ABAP Proxies
    >>>>How to get error message in BAPI call when error occurs?
    most bapis have return table in which they
    return error messages (you can do it either
    in a sync way or in an async way if the call is too long - with corrlelation of course)
    Regards,
    michal

  • Integration Process not continuing after Synchronous BAPI call

    I have an integration process that splits up a batch file of purchase orders into single purchase order messages. This allows me to use the "ForEach" block to call the synchronous BAPI_PO_CREATE1.
    I have managed to get the process to call the BAPI and create the purchase order. The response message arrives back though the abstract synchronous interface and is mapped to the asyncronous response message. After that the process seems to hold where I am expecting it to continue on the process and be appended to a container storage list for mapping to a single return message.
    I have not set up any correlation sets as I thought they wouldn't be needed for a sychronous call.
    Has anyone got any advice on my approach to this process and how I might fix it.
    Thanks in advance

    Hi Bhavesh,
    There are no errors as such in the SXMB_MONI but it gets as far as the Inbound Message (PE_ADAPTER) stage after the Sych BAPI call.
    Also the SOAP Header at this stage seems to be missing "sysnchronous" or "asynchronous" in the  SAP:ProcessingMode tags.
    The technical workflow is as follows
    FTP Batch file outbound to Integratin Process Receive (Async)
    Transform message into a Multiline list of BAPI_PO_CREATE1.request (async abstract)
    Enter "For Each" Block using the multiline list.
    BAPI_PO_CREATE1 mapped to synchronous abstract interface
    synchronous abstract interface mapped to BAPI_PO_CREATE.request and response
    BAPI_PO_CREATE.response mapped to async BAPI_PO_CREATE.response
    async BAPI_PO_CREATE.response appended to multiline list
    Exit block
    Transform multiline response list into single line response
    FTP inbound
    As far as I can make out I have not correctly configured the receiver of PO_CREATE1.response after it has been mapped from the sync to async so it just persists it and sits there waiting or it is waiting for somethign else to happen.
    Let me know if I can clarify anything further.
    Thanks
    Ben

  • Authentication on MI Server + Generic SYnc

    Hi,
    When we call a RFC by Generic Sync, if i call this RFC 10 times,  MI Client do the authentication (user+password) on MI Server 10 times? If yes, is there a way to increase the performance to do this authentication?
    Other... If a user is add in 10 devices, if he needs update password, Will he need update in this 10 devices?
    Or there is a way to do the authentication online on MI Server?
    Regards,
    Bruno
    Message was edited by:
            Bruno Ambrozio
    Message was edited by:
            Bruno Ambrozio

    Hi Nameeta,
    This synchronization time is with Windows Mobile 2003...
                                  10 seconds
    MI Client -
    > MI Server
                <----
                                 2 seconds
    But, using the same WLAN, the tests with Windows Desktop are very differences...
                                  3 seconds
    MI Client -
    > MI Server
                <----
                                 2 seconds
    I know that the hardware of Windows Mobile is less powefull than Windows Desktop, but how i said the WLAN is the same... i would like to understand the large difference...
    Thanks for your attention.
    Regards,
    Bruno

  • Generic Sync. support for non-SAP backend

    Hi
    Does Generic synchronization allows mobile applications to call function module residing in any non-SAP backend.I am not sure about this.
    The documentation for MDK says we have to use Business Connector for this.
    Where can i find the Business Connector for this purpose.
    Which non-SAP backends are supported by Generic Sync framework.
    Regards
    Ashwani Kr Sharma
    HCL Technologies

    Hello Ashwani,
    have a look at http://service.sap.com/connectors. Here you will find also the SAP Business Connector.
    Regards
    Gregor

  • How to see the data in data containers when working on Generic Sync ?

    Hi All,
    I am working on Mobile Sales For HandHeld Generic Sync based application. To check the data transafer from Mi Client > MI server> CRM backend, we are using Generic Sync Queue Monitor in NWA. But how to check the actual dara in data containers showed on the monitor? Any specific transaction ( e.g. merep_mon for smart sync) to chk the same?
    Thanks & regards,
    Rucha Atre

    Hi,
    This is a tedious process of viewing the data in the containers since there is no tool to monitor the same. The data sent from the client is stored MESYHEAD and MESYBODY. Once the entire processing is completed then the entries from this table is deleted. If the processing has failed or not taken place then the entries will in this table.
    Data Containers will name value pairs with field name and data in the data field. This table will also contain data from smart sync applications.
    Thanks..
    Preetham S

  • Problem with Generic Sync after upgrade

    Hi guru,
    I have this problem:
    I have done a upgrade ME2.1 -> MI2.5 SP18.
    I have a simple Generic sync application that using a simple Function Module:
    <b>
    function Z_ME_TEST_CONNECTION.
    ""Interfaccia locale:
    *"  EXPORTING
    *"     VALUE(STATUS) LIKE  BWAFSYHEAD-STATUS
    *"  TABLES
    *"      INBOUND_CONTAINER STRUCTURE  BWAFCONT
    *"      OUTBOUND_CONTAINER STRUCTURE  BWAFCONT
      perform CALL_OFFLINE_ME_METHOD using 'TEST_CONNECTION'
                                            INBOUND_CONTAINER[]
                                            OUTBOUND_CONTAINER[].
      OUTBOUND_CONTAINER-FIELDNAME = 'RESULT_CONNECTION' .
      OUTBOUND_CONTAINER-LINENUMBER = 0 .
      OUTBOUND_CONTAINER-FIELDVALUE = 'OK'.
      append OUTBOUND_CONTAINER.
    endfunction.</b>
    When i synchronize my mobile client it returns back
    <b>"EWAF                 001Could not execute method Z_ME_TEST_CONNECTION"</b>
    Can anybody help me in resolving this?

    Hi Sivakumar, I have write the my FM in the BWAFMAPP and the RFC destination in MEMAPPDEST but i have tha same error.
    This is my simple method in my application:
    <b>public String testSync(String userName) {
              String errormessage = null;
              try {
    //        get user out of the SyncSettings
                String user = Configuration.getInstance().getProperty(PropertyKeys.SYNCSETTINGS_USER, userName);
                OutboundContainerFactory outfactory = OutboundContainerFactory.getInstance();
                if (outfactory == null) {
                   errormessage = "testSync->OutboundContainerFactory.getInstance failed";
                }  else {
                   OutboundContainer out = outfactory.createOutboundContainer(
                   VisibilityType.SEPARATED,
                   R3_METHOD_TEST_SYNC,
                   OutboundContainer.TYPE_REQUEST);
              // add the name that has been typed into the JSP
                   out.addItem(DC_I_USER_NAME, user.toUpperCase());
                  out.addItem(DC_I_NUMBER_OF_LINES,"0");
                   out.close();
              // Start Sync
                 SyncManager.getInstance().synchronizeWithBackend(VisibilityType.SEPARATED);
              catch (SyncException ex) {
                   errormessage = ex.getMessage();
              catch (IllegalArgumentException ex) {
                      errormessage = ex.getMessage();
              catch (Exception ex) {
                        errormessage = ex.getMessage();
              finally {
            System.out.println("testSync: errormessage="+errormessage);
              return errormessage;
         }</b>
    You have anathor idea?
    Thanks

  • Howto bapi calls

    Hello,
    I am working on a scenario in which a client (abap proxy) sends a message to the integration server, which dispatches the messages to an rfc-adapter, an bapi call.
    Therefore I have read the tutorial, which can be found on this site, but unfortunately I have run into problems. Maybe someone can help me at this point. This is what I did:
    1.I have imported the BAPI_FLIGHT_CHECKAVAILABILITY as suggested in the tutorial.
    2. I created an Message interface named: U2_BAPI_IF
    3. For the output message I have chosen: BAPI_FLIGHT_CHECKAVAILABILITY and for the input:
    BAPI_FLIGHT_CHECKAVAILABILITY.Response. I have left the fault message field empty.
    4. I did no message mapping, since I want to work with the BAPI Response structure in the abap proxy.
    5. The Message interface is defined as outbound synchron.
    6.In the Integration Directory I created a Receiver Determination with a Service as a sender, the message interface is U2_BAPI_IF. Additionally I configured a "configured receiver" the client with the BAPI.
    7.I created a Interface Determination, for the sender the same entries as above and for the configured Inbound Interface I have chosen BAPI_FLIGHT_CHECKAVAILABILITY and the receiver client
    8.I created a receiver agreement.
    9. Saved the change list.
    10. I have generated the abap proxy for the message interface U2_BAPI_IF, without problems
    11. I created the following abap program:
    data: lv_msg_raus TYPE ZU2_BAPI_IF_BAPI_FLIGHT_CHECK1,
          lo_proxy TYPE REF TO ZCO_U2_BAPI_IF,
          lv_msg_rein TYPE ZU2_BAPI_IF_BAPI_FLIGHT_CHECKA.
          lv_msg_raus-AIRLINEID = 'AA'.
          lv_msg_raus-CONNECTIONID = '0017'.
          lv_msg_raus-FLIGHTDATE = '20040801'.
          create object lo_proxy.
          call method lo_proxy->execute_synchronous
            exporting
              OUTPUT = lv_msg_raus
            importing
              INPUT = lv_msg_rein.
    12. I execute the program and I receive the following error:INTERFACE_REGISTRATION_ERROR, the SAP Stack says:
    <SAP:Stack>No implementing class registered for the interface (type ifmmessif, name BAPI_FLIGHT_CHECKAVAILIBILITY, namespace urn:sap-com:document:sap:rfc:functions )</SAP:Stack>
    So now my question, do I have to implement a class (proxy) on the receiver side to receive the message and pass it then via bapi call myself, or did I something totally wrong?
    I hope somebody can help me,
    Thanks
    Oliver

    Hi Oliver,
    I was wondering if you finally got this scenario to work, if Yes. Could you explain how did yo manage to (solve your problem)setup your scenario as described in your earlier note?
    Thanks,
    Rob.

  • Bapi call in abap proxy reaching dialog timeout in async scenario

    Hi all,
    We have an XI interface to create sales orders. Legacy app sends a soap message async to XI with a group of orders. XI sends this group of orders to an Abap proxy async on ECC side. Into this Abap proxy we have a loop to process each order received in the group with BAPI_SALESORDER_CREATEFROMDAT2. Ending the loop, abap proxy start another async process to send the response to XI with an outbound abap proxy, and the response is redirected by XI to Legacy app.
    The problem is, this group of orders can have two or two thousand orders... so, the async process guarantee that no timeout limit will be reached. This is working for the whole process. But when this BAPI is creating an order, the time out of BAPIs execution seems to be the same as the timeout of dialog processes (now set to 10 minutes). This is our problem. Some orders spend more than 10 minutes to process (orders with five hundreds items, for example)... when this occurs, BAPI throws a time out reached error and the async process stops on the inbound queue with status sysfail.
    We are now trying to understand why this timeout is been triggered by the BAPI. As it is running into an Async process, it should execute without any kind of timeout limits...
    If anybody has any idea, please, help us.
    Thank you.
    regards.
    roberti

    May be I was not so clear... the total spent time in the process can be many many hours, days, etc... no timeout is reached. I can post 10.000 orders, no timeout is reached. The problem is that if the processing of only one order with BAPI_SALESORDER_CREATEFROMDAT2 takes longer than 10 minutes, then the timeout is reached. This is the strange part. The processing of the bapi seems to get the same timeout of dialog processes, we already tested increasing the dialog process timeout and the timeout of bapi execution was the same...
    We already monitor on SE66 to see if it opens a dialog process to execute the bapi call function, but it does not.
    If anyone has any tip, please, provide us.
    Thanks!
    roberti

  • Problem with mutiple BAPI calls during the commit

    Hi all,
    I am trying to create accounts for a given partner i the transaction F9K1 using the BAPI BAPI_BKK_ACCNT_CREATE. After calling the BAPI I am committing it too.
    The problem is if I try to create multiple accounts like RCA, ACA, MCA, IOE and so on, the first time the BAPI is called to create RCA account it is successful an it is even committing. When I call the BAPI to create the the ACA account the return table from the BAPI shows success message but the commit fails. If I restart the program and try creation of accounts now the RCA will throw a error msg saying account already exist, ACA account will be created and then the MCA account creation fails in the same manner explained above.
    I see the issue is with multiple BAPI calls and I tried using all sort of methods like clearing buffers, start new task in local and wait command and all.  But none of them seems to be working for me.
    Can anyone please guide me on how I can overcome this problem.
    Thanks.

    BAPI :
    BAPI BAPI_BKK_ACCNT_CREATE
    Functionality
    Use this method to create an account in Bank Customer Accounts. This method returns the following values:
    Identification details for the newly created account such as the internal and the external account number, and the bank area details
    A table containing error messages
    To create an account by using this method, you must specify values for the import parameters Bank Area (BANKAREA) and Product (PRODUCTNAME).
    Note: You must also specify a value in the External Account Number (EXTERNALACCOUNTNR) parameter if you have defined an external number range for the bank .
    REgards,
    Jayan.

  • Is it possible to compose XML in BPM from responses of multiple BAPI calls?

    Hi guys!
    I want to send into BPM an XML document, which will be parsed and it will call some BAPIs more times. And I need to get response. Is it possible, to compose an XML document from these BAPI return codes to be sent back as response? Concretely I will use SOAP->XI->SAP and response SAP->XI->SOAP...  I will use it as asynchronous call..
    Thanx, Peter
    Message was edited by: Peter Jarsunek

    Hi Peter,
    It depends:
    - what kind of bapi is it? (does it have some sort of number?) like delivery number or something else?
    if not you'll have to add something
    so you can correlate your bapi with bapi response
    if you want to know which response corresponds to which bapi call
    but you can do it with a bapi wrapper
    >>>>Is it possible, to compose an XML document from these BAPI return codes to be sent back as response?
    you you can collect message in a BPM - standard pattern
    (but remember about the "correlation")
    Regards,
    michal

  • Problem facing during BAPI call for an inbound interface.

    I have requirement where in i need to make a BAPI call from SRM system using RFC adapter.
    After importing the BAPI(Z_INV_REF_PO) in the Integration Repository the structure looks to be a follws,
    1.Request
    2.Response and
    3.Exception (fault) Message types.
        In my BPM i did a transformation for my source structure with BAPI request. But while doing a BAPI call it throws me Application error as follows,
    RFC adapter is working fine.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Inbound Message
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="RFC_ADAPTER">APPLICATION_ERROR</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="urn:sap-com:document:sap:rfc:functions">Z_INV_REF_PO.Exception</SAP:ApplicationFaultMessage>
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Please help me out on this. Itz very urgent

    Hi,
    As the error is Applcation_error, the data reached the target system but the BAPI call fails. So you mignt not be providing all the mandatory fields to the BAPI.
    Perform a standalone testing of your BAPI, with the data being passed from XI See if the BAPI call is successful..
    Hope this helps you.
    cheers,
    Siva Maranani.

Maybe you are looking for

  • Can i tranfer contacts from one apple id to another

    Is it possible to transfer info from one ios device to an iphone 5 with different apple ids.(old iphone4 to iphone5).

  • Running Workflow step in Background & code inside doing Foreground proceing

    Hi all, I am extracting an attachment (file) from DMS (document management services: txn: CV02N) to the presentation server in Background Mode.  Again my Function Module is uploading the file in the forground Mode and at this point workflow is giving

  • Missing Release Strategy Tab in PO

    Dear All, I am using EXIT_SAPMM06E_006 exit and added a new field using SAPLXM06 0101 ( ME21N ). Here i am able to see my custom field but unfortunately release strategy tab is missing. Can anyone help in this please.... Thanks in Advance..

  • Static noises when calling normal?

    i have been experiencing static noises when making phone calls. im the only one who can hear them and not the person im calling.(already confirmed myself.) is the at&t service or is the iphone defected. i hear the static through the normal earpiece a

  • What is meant by " Activation in Parallel"in DSO

    Hi, After loading the data into  DSO , when we R.C>  manage> rEQUEST TAB> select the request and click on activate .We get a screen with different options    Like...Activation in parallel,Generation of SID's,start..etc now my query is What are these