ISchedulerTask and SAP JAVA call

Hi All,
Has anyone made a JAVA call to a SAP RFC from the SchedulerTasks?
The SAP JAVA Connector code requires the IPortalComponentRequest for it to work.  However in the ISchedulerTask run() method, I believe that it can not be obtained.
I am interested to hear from other people with similar experiences or comments.
Cheers,
Vic

I have used ScheduleTasks to grab the data via BAPIs from BW. These requires you to write a portal service that executes the bapi and then the SchedulerTask calls the portal service.
Scheduler Task->Portal Service->RFC or BAPI
You still have one issue which is IPortalComponentRequest. Portal service doesn't have access to it but you can get around it by setting up a SAP system for usermapping and then mapping that userid to a generic userid. Example code:
private IConnection getConnection(
               String alias)
               throws Exception {
IUser user =
UMFactory.getUserFactory().getUserByLogonID("Administrator");     
IConnectorGatewayService cgService = (IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
ConnectionProperties prop = new ConnectionProperties(user.getLocale(), user);
return cgService.getConnection(alias, prop);

Similar Messages

  • IDOCs performance creation between SAP and SAP Java Adaptor

        Hi,
    We have a legacy systemt that send some IDOCs to SAP ECC through  a SAP JAVA connector.   Problem is that we send the idocs and we detected that we have some performance issues on the IDOC creation.
    We are using the SAP standard code and SM58, SMQ1, SMQ2, traces, etc etc seem to be fine.
    As per customer requirement we have to use process inmediately on the partner profile.  We also set the mass processing option but no difference .
    We have also other functionalities that run on IDOCs and they are running fine without any performance issue on it .
    Could someone help us?
    Thanks a lot, Sapera

    Hello,
    What kind of performance issue u have noticed?
    Check if below idoc_aae tuning note helps u...
    1641541 - IDoc_AAE Adapter performance tuning  
    Thanks
    Amit Srivastava

  • Call 'SAP Java Connector'

    Hi,
    has someone integrated in Forms 9.0.4 the call to the 'SAP Java Connector'?
    If yes, do you have an HowToDo or a ProfOfConcept?
    All Tipps and Tricks are welcome.
    Best Regrads
    Martin

    You probarbly already solved the problem but to others who run into the same problem add the following to the reference.txt file on the server: "reference service:eisconnector library:com.sap.mdi"
    The reference.txt is located on the path "..\usr\sap\EP60\j2ee\j2ee_00\cluster\server\managers"
    Depending on the portal version a reference.txt might be located on the state controller as well. In that case modify the reference.text on the state controller instead, restart the portal as verify the reference.txt on the server has been add the reference.
    /Ole

  • Sample Java code and detail to call RFC from Java clas developed in Eclipse

    Hi All,
    I am new to Java. I have downloaded Eclipse IDE  and planning to use for developing Java application to send data to SAP by calling RFC JCO Interface.
    I need a sample java code/tutorial step by step to create Java class for simple example to call RFC from Java.
    I have downloaded SAPJCO3 from service market place.
    Kindly help me to send steps involved to configure for JCO  with my Eclipse with JCO.
    Thanks in advance.
    Sharma

    Hi Sharma,
    Please have a look at [Example: Using Generated Proxies to Call Function Modules |http://help.sap.com/saphelp_nw04/helpdata/en/b6/55e3952a902447847066a0df27b0d6/content.htm]
    JCo Exceptions : http://help.sap.com/saphelp_nw70ehp1/helpdata/en/f6/daea401675752ae10000000a155106/content.htm
    Hope it will helps
    Regards
    Arun

  • Java call rfc check in original:error while checking in and storing.

    hi,experts.
    java call rfc check in original:error while checking in and storing. BAPI in the RFC is "BAPI_DOCUMENT_CJANGE2",
    the RFC was fine in SE37 and calling by Visual Basic. and in java,when mConnection.setAbapDebug(true), and  runing by step and step, was fine too.
    if mConnection.setAbapDebug(false) in JAVA, up error in title was displayed.
    what cause this error?
    Best Regards.

    Hi Priya
    Please use Su53 after getting the error and find any authorization is missing for the user..
    S_GUI Full Authorization is required..
    Since by giving BASIS Authorization its rectificed, then it shud be mostly due to Auth issues only
    Regards
    Aby

  • Java from cmd and Java called from Forms Services

    I apologize in advance if this is not place where i did must question.
    Anyway this is:
    From cmd on win xp If I run java -version I get:
    C:\Documents and Settings\Administrator>java -version
    java version "1.4.2_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
    Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
    While i installed JVM 1.6 and this is called from my forms services(OC4J)
    What I missing?
    Thanks in advance and sorry for my question

    *%JAVA_HOME\bin%* isn't the correct way to add the reference to the JAVA_HOME variable. You want *%JAVA_HOME%\bin*, notice the closing % sign comes after the name of the variable you created earlier (*JAVA_HOME*) and that causes its value to be prepended to \bin.
    Edited by: nogoodatcoding on May 18, 2009 7:33 PM

  • How to find SAP  java realted roles for ABAP and Basis

    Hi Gurus,
    I am new in SAP Security First week, I got the assignment to find the SAP Roles and Trans for ABAP and Basis in all Systems like Ecc, BI, ......
    I use SE16 ->AGR_TCODES then SAP* in Table Name it give me all SAP Roles and Trans.
    Pls help me to get only SAP Java and Basis roles and Trans Seperately
    Thanks

    Hi,
    Are you speaking about the standrad SAP roles? If yes, you can have a look at BC and ABAP roles. However, if your question is about the created roles, you should see the convention that was followed in your organization to identify the roles.
    Rgds,
    Raghu Boddu

  • Data transfer between SAP & Java and Vice versa using IDOC Process

    Dear Experts,
            We are working on one of the good requirement related to data transfer between SAP and Java software. Client requirement is, they want to transfer the data in both the ways (from SAP --> Java and Vice versa also).
    In detail is, after sales order creation using one custom program loading plan details will be calculated. Once loading dates are confirmed then, user will release the sales document to transfer the data from SAP to Java using "Outbound IDOC processing". Similarly in that JAVA software some shipment details will be performed, once completed from JAVA software again details needs to be pumped back to SAP as "Inbound IDOC Processing".
    For this fields are already identified from external software SAP and we are looking for the same to perform the steps in SAP.
    At this stage, I need your expert opinion  / feedback how to go  about at this stage.
    Meaning,  
                     1. What are the customizing steps needs to be done in SAP..?
                     2. How to trigger the :Outbound IDOC process" once the documents are "Released" from custom transaction
                     3. How to create the link between SAP and JAVA to transfer the data between these 2 software
                     4. How to trigger the "Inbound IDOC Process" from JAVA software to SAP and how to store the data in SAP
    Experts, please give your feedback in terms of reply or by sending the step by step process to fulfill this client requirement.
    Thanks for your cooperation.
    Regards,
    Ramesh

    Maybe too many open questions in the same document.
    Maybe you should repost a more specific question in a technical forum.
    This looks like a small project where you already know what you want, maybe you should contract a technical specialist so he proceeds to the implementation!

  • How to Install and configure SAP Java GUI on windows 2003 sp1.

    Dear All,
    Can I step-by-step on how to install and configure SAP GUI for Java on windows 2003 sp1.
    Pls come with brief as I am completely new to Java and I am practicing the same on my home system first. I have latest SAP Java Pack with me.
    Regards,
    Dillu

    hi,
    Please check this link and install accordingly
    SAP GUI Family
    Regards,
    Naveen.

  • Insert/flag data to PV9 (db) with CVP script (Call Studio) and create java class

    Hi all,
    i already created workflow with CVP script using Call studio, i have a problem how to insert call entered digit to PV9 and check the bill customerID with java class.
    The workFlow design:
    1. Customer enter the customerID (sessionID from ICM)
    2. Play the customerID ---> Insert to PV9 (ex: 12390)
    3. Check monthly bill
    4. Option enter another customerID
    5. Back to step 2 ---> Insert to PV9 (ex:12390,12380)
    When we want to create a java class is enough to install default call studio + JDK and create new call studio project? because when i created new call studio project only will be created callflow folder and app.callflow
    thx before,
    darma

    Hi Chintan,
    This'is my callflow design with callStudio
    i want create java class to get value from REST Url, i already have the script but i'm still confused how to deploy it in call studio, my call studio project is like this
    this'is the java source, how to compile and what prerequisites are required?
    /*   1:    */ import com.audium.server.AudiumException;
    /*   2:    */ import com.audium.server.session.ActionElementData;
    /*   3:    */ import com.audium.server.voiceElement.ActionElementBase;
    /*   4:    */ import java.io.BufferedReader;
    /*   5:    */ import java.io.InputStreamReader;
    /*   6:    */ import java.io.PrintStream;
    /*   7:    */ import java.net.URL;
    /*   8:    */ import java.net.URLConnection;
    /*   9:    */ 
    /*  10:    */ public class MyBill
    /*  11:    */   extends ActionElementBase
    /*  12:    */ {
    /*  13:    */   static final int PREDICT_THRESHOLD = 3;
    /*  14:    */   private static String vBill;
    /*  15:    */   
    /*  16:    */   public static void GetDataBill(String strDataBill)
    /*  17:    */     throws Exception
    /*  18:    */   {
    /*  19: 23 */     vBill = "0";
    /*  20:    */     
    /*  21: 25 */     URL strBill = new URL("http://192.168.10.23//wsclient.php?id=" + strDataBill);
    /*  22:    */     
    /*  23:    */ 
    /*  24:    */ 
    /*  25: 29 */     URLConnection hpCon = strBill.openConnection();
    /*  26: 30 */     int len = hpCon.getContentLength();
    /*  27: 32 */     if (len > 0)
    /*  28:    */     {
    /*  29: 36 */       BufferedReader in = new BufferedReader(
    /*  30: 37 */         new InputStreamReader(strBill.openStream()));
    /*  31: 38 */       vBill = in.readLine();
    /*  32:    */     }
    /*  33:    */     else
    /*  34:    */     {
    /*  35: 45 */       vBill = "0";
    /*  36:    */     }
    /*  37: 49 */     System.out.println("YourBill : " + vBill);
    /*  38:    */   }
    /*  39:    */   
    /*  40:    */   public void doAction(String name, ActionElementData actionAPI)
    /*  41:    */     throws AudiumException
    /*  42:    */   {
    /*  43: 63 */     String strCustID = (String)actionAPI.getSessionData("QueueIDs");
    /*  44:    */     try
    /*  45:    */     {
    /*  46: 66 */       GetDataBill(strCustID);
    /*  47:    */     }
    /*  48:    */     catch (Exception e)
    /*  49:    */     {
    /*  50: 69 */       System.out.println("0");
    /*  51:    */     }
    /*  52: 74 */     String balance = vBill.trim();
    /*  53: 81 */     if (balance == "0")
    /*  54:    */     {
    /*  55: 83 */       actionAPI.removeAllSessionData();
    /*  56: 84 */       actionAPI.setSessionData("balance", balance);
    /*  57:    */     }
    /*  58:    */     else
    /*  59:    */     {
    /*  60: 91 */       String strSess = balance.substring(0, 1);
    /*  61: 92 */       String strSess2 = balance.substring(1);
    /*  62:    */       
    /*  63:    */ 
    /*  64: 95 */       actionAPI.setSessionData("StsBill", strSess);
    /*  65: 96 */       actionAPI.setSessionData("ValBill", strSess2);
    /*  66: 99 */       if (strSess > "1")
    /*  67:    */       {
    /*  68:102 */         actionAPI.setSessionData("StsBill", "1");
    /*  69:103 */         actionAPI.setSessionData("balance", strSess2);
    /*  70:    */       }
    /*  76:110 */       if (strSess == "0")
    /*  77:    */       {
    /*  78:112 */         actionAPI.setSessionData("StsBill", "0");
    /*  79:113 */         actionAPI.setSessionData("balance", strSess2);
    /*  80:    */       }
    /*  81:115 */       if (strSess == "9")
    /*  82:    */       {
    /*  83:117 */         actionAPI.setSessionData("StsBill", "9");
    /*  84:118 */         actionAPI.setSessionData("balance", "0");
    /*  85:    */       }
    /*  86:121 */       if (strSess2.trim() == "") {
    /*  87:122 */         actionAPI.setSessionData("balance", "0");
    /*  88:    */       } else {
    /*  89:124 */         actionAPI.setSessionData("balance", strSess2);
    /*  90:    */       }
    /*  91:    */     }
    /*  92:    */   }
    /*  93:    */ }
    please help Me

  • When will SAP Java AS for EE 7 see the light? And NWDS on Eclipse 4.2?

    Hi,
    since thread 2028916 When will SAP Java AS for EE 6 see the light? became too long and old - scrolling on mobile devices is a pain -  I decided to start a new thread to discuss the future of the SAP Java AS on premise platform in combination with the development tool NWDS.
    Java EE 7 is general available for a year next week. It is difficult to get courses on Java EE 5 and books at the antiquarian bookshop. Eclipse 3.5 underneath NWDS is completely outdated already and out of support on Eclipse side. BPM, SAP's still emerging software, is only availble in this old tooling.
    SAP's CTO Sikka left the company giving us the chance to discuss this topic beyond the time of HANA hype.
    Hopefully this thread will begin with good news.
    Best regards
    Rolf

    Hello Steffen,
    thank you for your input. Because of holiday a late answer.
    You are absolutely right, and I am sure it is not only your personal opinion, but the simple truth.
    NetWeaver Java's right to exist is only as platform for CE tools like PI and BPM engine.
    And because SAP cut themselves off Java 7 and EE >=6 standard, even these tools will become outdated quickly. E.g. you run into trouble running current oData libraries on this platform. I cannot recommend anybody to use BPM in new projects - a tool that is running on Java 6 / EE 5 in 2014 and needs a strange and unneccessary concept of "Development Components" at design time.
    If we knew what we know today in 2010, we would have abandoned the NW Java platform already and found a nice web frontend. But SAP kept stalling us, so now we have dozens of WD Java that want to be replaced.
    What really is striking me at this topic is the hype of the al the important SAP people (mentors etc.) around "kiss of death of WD Java" that kept the social networks busy in 2010 as constrasted with the ignorance regarding the way more substantial decay of the complete SAP NetWeaver Java platform. Our customers and we as software developers could live for the next 10 years with a rock solid and "mature" UI framework like WD Java even without any enhancements, but we cannot bear complete stagnation in our business layer and the platform and development infrastrucure on the whole.
    SAP NetWeaver Java is dead, "deader" than WD Java will ever be, but the important people do not even read the death notice. Probably they are out of town in the HANA cloud.
    SAP neglected the house for a too long time, the house is decayed, it is too late for cosmetic repairs by SAP, we have to move out.
    Best regards
    Rolf

  • ABAP+Java Kernel and only Java Kernel

    Hi Friends,
    Is there any difference in ABAP+Java Kernel and only Java Kernel?
    Can we use the kernel for above both from the same location as below?
    1#
    Support Packages and Patches> Additional Components> SAP Kernel> SAP KERNEL 64-BIT UNICODE> SAP KERNEL 6.40 64-BIT UNICODE
    Following Files
    DB Dependent  - ORACLE
              SAPEXEDB_175-20000227.SAR
              DBATL640O92_44-20000227.SAR
    Database Independent
              SAPEXE_175-20000226.SAR
    Assuming above SAR files contain R3trans, R3load, tp ,... also.
    2#
    As per my knowledge SAP has given one more path to download J2EE SP's which contains Kernel and J2EE Support Packages.
    http://service.sap.com/patches --> Support Package and Patches -> Entry by Application Group -> SAP NetWeaver -> SAP NetWeaver -> SAP NetWeaver 04 -> Entry by Component -> Application Server Java -> SAP J2EE Engine 6.40 -> J2EERT19_0-10001982.SAR/J2EERT20_0-10001982.SAR (OS Independent) and CTRLDB219_0-20000114.SAR(OS Dendependent)
    What is the difference between above two kernels?
    1# contains R3trans, R3load, tp ...etc which is exclusively used by ABAP Stack related functions. The startsap script used here would check R3trans -d authentication successful before starting database and then only it starts the database from sidadm. I observed OPS$ users available in only ABAP schema SAPSID but not available in SAPSIDDB. If I use the kernel downloaded from 1# for Java Stack only system, startsap would fail as R3trans authentication fail as there is no ABAP schema in Java systems.
    This applies well for ABAP+JAVA or only ABAP based systems.
    If I use only JAVA Stack based system can I use the kernel downloaded from 1# . What is the kernel and SP available in 2#? Is this also contains the same kernel given in 1# or it is different. I also observed in JAVA they are not calling Kernels by Patch No like 154, 175... they call it by SP19. Please correct me if I am wrong.
    Did anyone come accross this type if issue? I would appreciate if anyone can clarify my questions given above.
    My main target is to have clear strategy for ABAP+JAVA, ABAP, JAVA kernels to avoid mess up. Which one to download? What is best practice? Differences?
    Thanks and Regards
    Prasad

    Hi Sacha,
    Thank a lot for your answer I am clear now. Before rewarding points to you.
    I have final question.
    You mean that there is not seperate kernel for Java Stack Systems.. When we apply SP11 or SP19 by default it applies Kernel and also support packages w.r.t the SP. Do we have option to seperate Kernel and Support package while applying SP's for Java System?
    If we take for example SAP NW 2004 (WAS 640) latest kernel is 175 (I mean ABAP+JAVA). If I want to know the latest kernel for Java Stack system, Do I need to say it is at level SP19 or check the sapwebdisp -V (Resepctive patch level)?
    For ABAP system we check disp+work -V to get the source kernel version. How to justify the source kernel version for Java System?
    As per SAP Note: 710914 - Upgrading the J2EE Engine Startup Framework after applying SP for Java System, Do we need to upgrade J2EE Startup Framework?
    Thanks and Regards,
    Prasad

  • Java call to RFC FM for replacing CRM pricing

    Hi Experts,
    I have a requirement to make a RFC call to retrieve the pricing from ECC in CRMD_ORDER transaction after hit enter key with product/qty entry (use Web UI/shop/IC as frontend). Is it possible to made a Java call to RFC FM in SAP CRM which in turn calls R/3 to execute pricing and display this price on web order page?  If yes, any documentation/samples and advise please.
    Thanks in advance, Jin

    Hi all,
    Following the AP7 Pricing Userexit Manual, I can change the price value in the exit (good doc, thanks).  my next steip is to get sales org, customer and product info to make RFC, but I don't know from which Interface I can retrieve these info, can anyone help me? any doc or sample code?
    Thanks, Jin

  • Is this possible: SAP Java Connector - XI - R3 with XI RFC Adapter?

    Hi,
    I try to call a RFC on a remote R/3 System over the XI Server in a Java Application with SAP Java Connector.
    I have configured a RFC Sender Adapter in XI. I get the
    following Exception:
    "lookup of alternativeServiceIdentifier via CPA-cache failed for channel 'SenderChannel_RFC"!
    Is this scenario possible? Or do the connection from
    a SAP Java Connector App to the XI RFC Adapter not work?
    You can't set the Client and System ID of a Third-Party or
    Standalone Java system in the SLD.
    Thanks for any help!
    Regards
    Wolfgang

    Hi,
    We use a JCO for directly connecting to sap systems.
    In that case we need not use any XI also.
    But if you want to use RFC adapter and java application the best way is to use java proxies as sender and reciever as RFC adapter.
    I donot think there is any  architectural significance in using rfc adapter of XI while using JCO.
    Let me know if I mis-understood the context.

  • Processing ABAP Idocs in SAP Java AS CE 7.1 web service client applicatin

    I am trying to build a Java web service client which would call a web service in a non-SAP system.  I am trying to send  Idocs from the back-end CRM system to my Java web service client using a Jco RFC Provider.  I have already created the RFC Destination on the ABAP side to send my Idocs to my Jco RFC Provider program on the Java side.  The connections between the ABAP and Java are working fine.  My question is how in my Java web service client do I pick up the IDoc sent from ABAP to the Jco RFC Provider? 
    Please let me know if more clearification is needed

    I do receive the IDoc with the SAP Java AS "RFC Jco Provider" component I created, and in my Java application I created a class for "IDOC_INBOUND_ASYNCHRONOUSBean" which has a method "processFunction(Function function)" and in that method I can do function.write("filename.xml") and it writes out an xml document of the Idoc sent from the ABAP server.  I can further process the Idoc by pulling field values from the xml structure.  However, my problem is I am now trying to write a second Java application to do the same thing but with a different Idoc type.  I created a a second RFC Jco provider(listener) on the server but the Idocs still flow through the first Java application, which is an undesirable affect.  I got this idea from this document originally "http://nwadave.com/NwadExplorer/data/SAPDoc/ProcessingIDocsWithTheSAPJavaConnector.doc", and it works fine until now when I'm trying to add a second application to do similar work.  This is makeing me wonder if I should have even done the first one this way?  Bottomline is what tell the RFC Jco provider(listener) on the Java server which application to send the Idocs too?

Maybe you are looking for

  • I can't authorized my iMac to store and transfer all my library of itunes

    I've been synchronized  my music, videos and movies through the itunes in my Macbook, I have everything on it, but recently I bought an iMac to use at home but I can't authorized this iMac to use my account to transfer or sync all my devices now (Ipa

  • Re: HP Printer Control app for Windows 8

    do I need some kind of disc to install my printer?  it's been packed for a year and just plugged into laptop????  i just want to print something!!  thank you

  • CRS malfunctions in db 10.2.0.4 in windows 64bit

    I must install a 2 node RAC database 10.2.0.4 in OS Windows server 2003 Enterprise Edition (64 bit) . When i installed the CRS software 10.2.0.1 and then upgraded it to 10.2.0.3 the crs worked fine, the ons, gsd and vip were functionning correctly fo

  • I can't open my emails (i CAN in internet explorer)

    when i open email in firefox, i can get to the first page ...it's xfinity/comcast, and it shows a summary of the last ten emails....i try to " view the entire inbox"....the little colored dots go round and round....and then the summary page re-appear

  • Can not download photoshop cc trail vers. on my mac OS X Lion

    When I try to download Photoshop cc trail v. I get a promt says "This link needs to be opened with an application"   choose an application ? I don't understand this.... regards Poul