IPC - write java routines or use RFCs

This is more of a design question. I am new to IPC. We need to write really really huge pricing routines with a lot of hard coded values and case statements for CRM pricing in Java. One approach is to just do it in java. But the other approach is to write one small java routine and have it call an RFC in CRM and put all the calculation logic in that RFC. Since I don't know much about IPC, can some one please recommend which apporach would be more feasable based on your experience. What are the main performances issues you guys have faced for IPC.Can someone please share any experiences or "lessons learned for best practices" with me.
Thanks
Shahid

remus.dragos wrote:
Peter__Lawrey wrote:
The simplest means of IPC in Java is using Sockets.
However, you have mentioned JNI, but have considered calling the C code from the Web Service via JNI directly. This could be the simplest and most efficient.I agree on that, JNI is much more simplified when used from a web container. Although I used only
Tomcat with JNI it was easy to use.However if it causes a system exception it will take down your tomcat server. And it is very difficult to debug.
A socket solution has neither of those problems.

Similar Messages

  • Writing java program that uses UMTS service

    Hi
    I wonder if it is possible to write java programs that use UMTS services. Is there any class-package in java related with UMTS services?

    you can call a batch file using NT service. the batch file executes the java program. and you can also send an email thru that java program.

  • JAVA Application speed using JARs

    Good day guys,
    I have a quick question about the perfomance.
    When I write Java application that uses other third party JARs, do I have to remove all the
    classes from those jars that I dont use to make application run faster or it does not metter?
    Thank you very much

    Ajaxian wrote:
    Good day guys,
    I have a quick question about the perfomance.
    When I write Java application that uses other third party JARs, do I have to remove all the
    classes from those jars that I dont use to make application run faster or it does not metter?
    Thank you very muchLet's take that to another level. Suppose this is on Windows, and that none of the apps running on it will ever use some DLL(s) or some APIs in those DLLs, which are already installed on the box. Do you really think you should worry about trimming them down?
    And surely none of the java specific apps you will write will use ALL of the classes and methods in the whole java library, so should you whack those too?

  • Accessing SAP DB(Oracle/Max DB) without using RFC in webdynpro java

    Dear Friends,
    I'm developing an application in Adobe interactive Forms using webdynpro java. To retrive the data from R/3 generally we use RFC / BAPI's.
    But i dont want to use RFC / BAPI's which is written in ABAP.
    I want to write one RFC /BAPI using java to store  / retreive the data from R/3. or how to access the data / store the data using JAVA from R/3.
    Can any one guide me on the same.
    Thanks in Advance.
    Regards,
    Gowripathirao.
    Edited by: Gowripathirao on Nov 30, 2009 7:58 AM

    don't do that ( I always wanted to write this since joining SDN )
    If you want to access database tables in general, check the EJB3 tutorial in SAP Help
    http://help.sap.com/saphelp_nwce10/helpdata/en/45/f72761af4020fde10000000a1553f6/frameset.htm

  • How to write a java function for use in where clause in SQL statement

    Hi,
    Does anyone know a good tutorial on how to write and include a Java class/function into Oracle.
    I'd like to write mathematical function to use in my queries, but the resources available in PL/SQL are very limited.
    Many thanx

    Pim,
    I see you got an answer in the PL/SQL forum.
    But in case you haven't seen it, perhaps this Web page will help:
    http://www.oracle.com/technology/tech/java/jsp/index.html
    Good Luck,
    Avi.

  • How Do I write an XML file using Java?

    Hello there!! to everyone reading my post.
    I have this project I need to do, and I have no clue where to start, I was wondering if you guys could help me out.
    I need to know how to write an XML file using a Java Program, but without using a Third party library.... just using java native APIs.
    I will probably take the values to construct the file from a form.
    I will certainly appreciate if you could post some sample code for me.
    Thank you very much in advance..

    Hello there!,
    I have some doubts about the Tutorial I am currently reading. correct me If I'm wrong, but the section "Write a simple XML file" teaches you how to do so using a text editor. I need to create my XML file from a running Java Program written by myself, that takes the values to build it from some variables.
    If I'm totally wrong about what I'm saying, could you please point me to where I can find the information of how to do what I'm asking for, inside the tutorial.
    Thank you very much,...
    sincerely.

  • How to write a messenger with using java?

    May I know how to write a messenger with using java? The messenger need included two functions which are file transfer and add users to join the conversation.
    Thank you.

    Ok, so you need to start from the beginning, the requirements, is it a swing (i.e. GUI) app, web app, console, etc...?
    As stated by sprizor making an IM client is no easy task, you need to both implement the server side and the client side, which both communicate with each other, file transfers are also quite complex, and even maintaining a multi-user chat can be quite difficult.
    If you are after a Web Based app, then you will need to look into Push technologies, like Grizzly Comet which is a nice wrapper for the NIO java stuff:
    https://grizzly.dev.java.net/
    Good luck...

  • How to write conversion routine for key figure?

    Our customer has this requirment:
    we need to know the last time of some TV program in BEx report, If a TV program last 500 seconds, we need show the key figure like this:  00:08:20, If a TV program last 100000 seconds, we need show the key figure like 27:46:40 (27 hours and 46 minitues and 27 seconds), If we define a key figure as time,  BW system will report a error that say it is not acceptable time.  If we want to define a integer, but we need display it like hhmmss format.  We know we can write conversion routine for char.  but I don't how to write conversion routine for key figure.   Please give me any hint if any other solutions?
    Edited by: SY DONG on Dec 2, 2010 3:36 AM

    If you want to do in Transformation Layer :
    You can use routine ...break up the seconds into minute hour and seconds
    you will have to handle few cases in this:
    let say your variable lv_seconds holds the number of seconds you want to convert to hour min and seconds
    DATA: lv_seconds type i,
               lv_hrs  type  i,
              lv_sec type i,
              lv_min type i.
    lv_hrs = lv_seconds / 3600
    if lv_hrs >= 1.
    lv_min = (lv_hrs - trunc(lv_hrs))*60
    here again handle seconds if min >60.
    else.
    lv_hrs = '00'.
    lv_min = lv_hrs*60
    It is just hint ..how you can manipulate the seconds to get it...you will have to think about the complete algorithm
    Regards,
    RK

  • Need to write ABAP Routine at infopackage Selection Options

    Hi All,
    I need to write ABAP Routine at Info Package Selection Options.
    Requiremnet i need to bring  some Sales Document Types (Sales Orders Types) only from R/3.
    Ex I need OrderTypes ZQT,ZSIV etc
    Can any body help to resolve this.
    Regards,
    P.C.V.

    Hi P.C.V,
    If the order type field is already available in the Data Selection Tab of the InfoPackage, then you just need to place your selections there (e.g. order type = ZQT, ZSIV) without the need to use ABAP routines.
    If ever you really need an ABAP routine, here is an example ABAP routine. The most important concept is to modify the range table l_t_range so that the selection reflect what you need.
    data: l_idx like sy-tabix.
    data: w_startdate like sy-datum,
          w_startweek like scal-week,
          w_maxdate like sy-datum,
          w_maxweek like scal-week.
      w_startdate = sy-datum.
      w_maxdate = w_startdate + 104 * 7.
    * Calculate horizon for extraction
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          DATE         = w_startdate
        IMPORTING
          WEEK         = w_startweek
        EXCEPTIONS
          DATE_INVALID = 1
          OTHERS       = 2.
      CALL FUNCTION 'DATE_GET_WEEK'
        EXPORTING
          DATE         = w_maxdate
        IMPORTING
          WEEK         = w_maxweek
        EXCEPTIONS
          DATE_INVALID = 1
          OTHERS       = 2.
              read table l_t_range with key
                   fieldname = 'CALWEEK'.
              l_idx = sy-tabix.
              l_t_range-sign = 'I'.
              l_t_range-option = 'BT'.
              l_t_range-low = w_startweek.
              l_t_range-high = w_maxweek.
              modify l_t_range index l_idx.

  • Lock object using RFC

    Hi,
    in standard transaction I lock an object in an other system using RFC lock(enqueue function) but when I exit from transaction the object in other system is automatically unlocked without using the dequeue function.
    Is It the correct behaviour?
    Thanks,
    Max Boscolo

    Hi
    Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
    SAP Provide three type of Lock objects.
    - Read Lock(Shared Locked)
    protects read access to an object. The read lock allows other transactions read access but not write access to
    the locked area of the table
    - Write Lock(exclusive lock)
    protects write access to an object. The write lock allows other transactions neither read nor write access to
    the locked area of the table.
    - Enhanced write lock (exclusive lock without cumulating)
    works like a write lock except that the enhanced write lock also protects from further accesses from the
    same transaction.
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    check this link for example.
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    tables:vbak.
    call function 'ENQUEUE_EZLOCK3'
    exporting
    mode_vbak = 'E'
    mandt = sy-mandt
    vbeln = vbak-vbeln
    X_VBELN = ' '
    _SCOPE = '2'
    _WAIT = ' '
    _COLLECT = ' '
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
    Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
    1. enque_lockobject
    1. deque_lockobject
    before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    GO TO SE11
    Select the radio button "Lock object"..
    Give the name starts with EZ or EY..
    Example: EYTEST
    Press Create button..
    Give the short description..
    Example: Lock object for table ZTABLE..
    In the tables tab..Give the table name..
    Example: ZTABLE
    Save and generate..
    Your lock object is now created..You can see the LOCK MODULES..
    In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
    Lock objects:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Match Code Objects:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
    See this link:
    http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
    Check these links -
    lock objects
    Lock Objects
    Lock Objects
    Regards
    Anji

  • Using RFC in File to Idoc Scenario

    Hi all,
       I got a complex requirement in EDI to IDOC Scenario , I am getting EDI 850 file from Customer and posting IDOC to R3 . In this process i need to have some validations using RFC(Which connects to R3) at XI level, If these validations fails then we should not post Idoc to R3 and we need to send back a mail to customer. I am not expert at XI, So can you please suggest is there is any way to build this requirement.
    Thanks for looking into this. Your help is appreciable
    Thanks,
    Kishore

    HI Kishore,
    I got a complex requirement in EDI to IDOC Scenario , I am getting EDI 850 file from Customer and posting IDOC to R3 . In this process i need to have some validations using RFC(Which connects to R3) at XI level, If these validations fails then we should not post Idoc to R3 and we need to send back a mail to customer. I am not expert at XI, So can you please suggest is there is any way to build this requirement.
    Yes, u can achieve it by using multimappping.
    First write a functional module wich is remote enabelled(just change the parameter value).
    Then in message mapping u will have  a multimapping,with mail (0..1) occurence.
    If suppose the validation fails u will send a flag or a field which to PI, and based on this value the mail is sent to the recepients.
    In operation mapping make sure that Mail occurence is 0..1.
    If any prblm still.. pl do post.
    Babu

  • How to use RFC in 7.10?

    Hi,
    I'm a little bit confused by the help on NW 7.10 SP7. I normally use RFC connections from web Dynpro but this time I have to use RFC from an EJB. As before I tried "SAP Enterprise Connector" which seems to be depricated.
    I followed the example how to use Destination Service. It imports "cam.sap.mw.jco.JCO". After correcting one error in the given source (could never run that way), I get the JCO marked as deprecated as well. So this source code there seems to be a left over from NW 2004?
    Is the destination service itself also depricated?
    So I found out JCO is now depricated and I should use SAP Java Resource Adapter instead. Can I combine it with destination service or is there something similar as in web dynpro? For Ehp 1 I found this adaptive RFC package, but seems not to be available in 7.10?
    What I clearly want to avoid is to give any user, password or system parameters in the source code as I'm used from Web Dynpro. Can I use the web dynpro mechanism maybe somehow?
    Maybe someone can bring some light in all this
    Thx,
    Frank

    Hi Frank
    >After correcting one error in the given source (could never run that way), I get the JCO marked as deprecated as well. So this source code there seems to be a left over from NW 2004?
    Not exactly. The deprecation means that the JCo API version is 2.X while JCo 3.0 is already available. However, this does not mean that you cannot use the "com.sap.mw.jco.JCO". I know lots of projects running even on 7.11 and 7.20 that still use the JCo 2.X.
    >Is the destination service itself also depricated?
    No, no, no.
    >So I found out JCO is now depricated and I should use SAP Java Resource Adapter instead. Can I combine it with destination service or is there something similar as in web dynpro? For Ehp 1 I found this adaptive RFC package, but seems not to be available in 7.10?
    Java Resource Adapter is just a new JEE container for JCo API. Still it's also has some problems. So I'd not recommend you to use it.
    >What I clearly want to avoid is to give any user, password or system parameters in the source code as I'm used from Web Dynpro. Can I use the web dynpro mechanism maybe somehow?
    Use JCo 2.X + Destination Service. Ignore the API deprecation.
    BR, Siarhei

  • Call remote function on a satellite system using RFC target sys option

    Hi all,
    I am on the Java stack and I would like to call the ABAP stack of a statellite system. I can create a JCo connection on this system directly but for security reason I am not allowed to do that. I would like to call this system through the ABAP stack of my machine (I am in dual stack environment).
    - How can I use RFC target sys (available in SE37 for Remote-Enabled functions) with my JCo connection?
    - Or, is there a generic function which can call all other functions on a remote system (still using RFC target sys)?
    Many thanks,
    Stephan

    Siddhesh - thank you for the link; the blogs by Thomas are required reading as far as I am concerned.
    Hi Raja;
    <i> do you mean another ABAP system (was6.40)?
    and from here using another FM you call the 4.6c
    system RFC ?</i>
    Yes, that is what we are doing.  We are calling a web service from an Intranet form to the 6.40 system that, in turn will call the 4.6C system and pass the data back to the Intranet form (through 6.40)
    <i> may be you could pass the RFC destination as import
    parameter to the 6.40 RFC and use the same will the
    call to 4.6C RFC from the 6.40 RFC</i>
    That would work, but it would be more beneficial to just use the function module on the 6.40 system as a proxy to the function on 4.6c and not have to enter code in it each time. 
    I had thought of writing just one function module in the 6.40 system that could dynamically call any different function module in 4.6c (based on the input parameters), but since were are trying to accomplish SOA, we need visiblity to each web service (ergo function module).
    If it's not possible, that is OK I am just hoping someone had found a way to pull this off.
    Thanks!
    John

  • Need clarification to write transformation routine for my requirement

    Hi all,
    I have a requirement as mentioned below...
    I have a keyfigure amount which will hold the amount value..now i have been asked to add amount_2000 key figure...it has been done..
    But the real problem is that
    They will give a filter value in DTP selection for the field "area".
    now if they give area as 1000 then the amount field should populat with the respective amount value
    but whereas amount_2000 should populate with only the amount of the area 2000 irrespective of the filter condition given...
    i need to write the routine in the transformation...But the problem is that when we give the filter value in DTP i coudnt get value for amount_2000 as only it gets the value for 1000.
    I hope the requirement is clear...
    can any one help me in this.
    Thanks & Regards,
    Hari.

    Write a routine for the InfoObject amount_2000.
    Use amount and area as source fields.
    Now the coding should look like:
    IF source_fields-area = '2000'.
      RESULT = source_fields-amount.
    ELSE.
      RESULT = 0.
    ENDIF.
    This is independent of the filter values in the DTP.
    Best regards
    Dirk

  • Accessing BAPI's using JAVA with out using webdynpro URGENT

    hi Experts,
    What is the procedure for calling RFC/BAPI's using JAVA with out using the webdynpro. Please let me know what are the possibilities with step by step implementation.
    Regards
    Vijay

    Hi Boris Rubarth,
    Thaks for relavant information.
    I have kind of the requirement. The clinet is asking for connecting the SAP RFC using java application. The build Jar or .war or .Ear for which are going to develop should be compatible for running on any of the Applications server like they have Tom cat, weblogic, websphere server.
    so the .jar for or .ear file which we are going to develop should be able to run accessing the RFC/ BAPIs from any of these servers other than SAP WAS that is what their target.
    Please give me your suggestion, which is better approach. currently their SAP system is 4.6c . So presently it is not possible the webservice approach. But they have plans to go for upgrade to ECC6.0
    In that case only JCO option is possible. If use this option . Is it possible to access application which is deployed irrespective of the WAS by doing the required configuration.
    Basically i am aware of the ABAP webservice work bech steps and also the JAVA coding also.
    Please suggest me what is the better way to achieve this.
    Regards

Maybe you are looking for

  • How to change URL for "Log Out" link in CE?

    We need the Communications Express "Log Out" link to go to a different page to the usual log in page. How can I change this? I've found the logout function in the uwc/common/Header.jsp file which looks like: function logout() {   url = "<%= getLogout

  • Any ideas for a (fairly) simple program?

    Does anybody have any ideas for a fairly simple program that I could try to write (I am a fair programmer, but I'm not to creative)?

  • Error while building binutils for msp430

    [anish@thinkpad binutils-msp430]$ makepkg pkgbuild ==> Making package: binutils-msp430 2.21.1a-2 (Fri Mar 15 20:28:31 UTC 2013) ==> Checking runtime dependencies... ==> Checking buildtime dependencies... ==> Retrieving Sources... -> Found mspgcc-2012

  • Save and load variables in java

    Hi , I need a help about Save and load . I have a project(tool) which have JText, JRadioButton and other things also. I want to save all the changes for the next execution ( fresh startup or fresh bring up of the tool). Please let me know what will b

  • Changing Text Headings in Web Report

    Hi SDN, Can you please assist us in this scenario, as i have not worked with Table Interface Class previously, and if you can help out with the steps it would be much appreciated. We have created a query which uses 2 structures in the Rows area.  To