Look Up API through JCO
Hi all,
I m using look up through JCO and calling a RFC on backend R/3 for the particular validation.I m using UDF for that.In the UDF i have specified imports as:-
imports :-java.util.;java.lang.obj.;com.sap.aii.mapping.lookup.;com.sap.mw.jco.;java.io.*;
source code --
//write your code here
JCO.Repository myRepository;
// Change the logon information to your own system/user
JCO.Client myConnection = JCO.createClient(
// all the client information namely client ,user id pwd etc
myConnection.connect();
// create repository
myRepository = new JCO.Repository( "SAPLookup", myConnection );
// Create function
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("xxxxx"); //Name of RFC
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
input.setValue( a , "xxxxx" ); //import parameter of RFC, a is input argument.
myConnection.execute( function );
String ret = function.getExportParameterList().getString( "XXXX" ); //export param
myConnection.disconnect();
return ret;
however on test i m getting follwing error:
Source code has syntax error: D:/usr/sap/XID/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map6df266d0f96411dbb2a4000bcd3f5f3d/source/com/sap/xi/tf/_MM_Source_To_Target_.java:157: 'class' or 'interface' expected public static void main(String[] args) throws Exception{/!_$ClNRep_/_MM_Source_To_Target_ st = new /!_$ClNRep_/_MM_Source_To_Target_(); st.testExecute(); }
Can anybody help me out in rectifying this Syntax errror.
Regards,
AshwinM
You are hardcoding the user id , password etc in your UDF. This is something will cause issues asyou move your objects across environments from Dev to Qaulity and production.
You cannot change the user id and passwordi n your mapping code in your Quality and Prodction. Use of RFC Lookup is strongly recommended with the RFC adapter.
I dont think using RFC Lookup API causes any perfromance degradations. We have used this feature multiple times in and have never faced performance constraints as a result of this.
Regards
Bhavesh
Similar Messages
-
How to handle multiple connection through JCO
Hello JCo Experts,
My requirement is as follows:
> I need to create a Web Dynpro Java Application
> I have multiple users (different Users on SAP System).
> I need to execute BAPI/Module Functions through these multiple users.
Example:
Users: A and B
User A has logged in from a remote location
User B has logged in from a another remote location
both users have logged in through SAP system Login Ids
Two JCo Connections should be created and all the request from User A must use Connection A and request from B must use Connection B.
> The connection should be created at first time when user login first time.
How can I handle this scenario through JCo or other way. I have multiple BAPI/ModuelFunction which I need to execute but with User specific.
waiting for positive response.Dear Shiv,
Please need to look into [How to Configure the JCo Destination Settings|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/3103eb90-0201-0010-71af-be6f4a6f61d1]
http://wiki.sdn.sap.com/wiki/display/Snippets/DynamicJCOHandling-Creation,Updationetc
Best Regards
Arun Jaiswal -
How to retrieve all BAPIs through JCo
Hi All,
i'm currently using JCo to access an SAP server, and just wondering if there's a method to retrieve all BAPIs from the server. From the available online documents, i can only see methods that returns a specific BAPI with a given function name.
If we can't get all BAPIs through JCo, whether there're some system BAPIs that i can call on to process the searching? just like sys procedure in database's context.
Any helps are highly appreciated. ThanksWell, the Repository seems to only expose methods like
getFunctionInterface() & queryFunctionInterface(), both of which certainly don't serve my needs.
The reason why i expect JCo has such built-in "retrieving all func names" services is because i saw some tooling applications, purely written in Java, developed navigator to display all BAPIs of a SAP. I mean it could be some button say "search all BAPIs", and when the user gestures to hit that button, it just populates all BAPIs returned from server.
While since i can't find such methods from the JCO doc, does it mean it can't be achieved through JCo? -
RFC Look Up APIs for a IDOC Receiver Communication Channel
Hi,
Can we use RFC Look Up APIs in UDF for a IDOC Receiver Communication Channel. (File to IDOC Scenario). Requirement is to send a notificaiton when IDOC got posted with IDOC number.
Best Regards,
Madan AgrawalAs the name suggests, RFC lookup uses RFC receiver channel only. In mapping of your File to Idoc scenario, you may perform this lookup.
Requirement is to send a notificaiton when IDOC got posted with IDOC number.
Configure ALEAudit for this requirement. How were you planning to use RFC lookup for such a requirement?
Regards,
Prateek -
Error when i am calling BAPI_GOODSMVT_CREATE through JCO
Hi experts,
Error:-604 Item 001 Ntwk actvty 9000006262 0050 budget exceeded
When we post Goods Receipt or Invoice using BAPI_GOODSMVT_CREATE/BAPI_INCOMINGINVOICE_CREATE we are getting the above error message.This error message generating when i call the BAPI through JCO.
I have tested from front end SAP transcation MIGO and also entered data manually in BAPI
through SE37, Goods receipt is created successfully, I feel background run created problem when BAPI called from JCO.
Please any can suggest me the solution.Hi Narasimh,
I suggest to put breakpoints in the BAPI, so that you can be sure that the expected BAPI is called and check the runtime values of the variable/fields as expected.
As it seems from the error that the "budget exceeded" is a functional error.
Please do the above and let me know whether you found the solution.
Regards,
Prashil -
How to call an API through Forms
Hi,
I want to call 'inv_quantity_tree_pub.query_quantities' from a custom form developed using Template.fmb.
It is displaying error that 'remote package can not be called '.
can any one help me on this issue.Hi;
What is your OS?
Please check below which could be helpful for your issue
Oracle E-Business Suite Java APIs for Forms Troubleshooting Guide, Release 12 [ID 966982.1]
http://drupal.org/node/751826
http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/how-to-call-windows-apis-through-oracle-forms-developer-6i-1082381
Regard
Helios -
Customize the look and feel through CLAF
Hi...
anyone has a detailed document about Customize the look and feel through CLAF
if you just can give me a link
thanksCkeck out in OAF Personalization guide CLAF section under "Personalizing OA Framework Applications"
-
Look for APIs or editor to update LDT files to avoid editing file directly
I have used FNDLOAD to import/export ldt files, but I am looking for APIs or "editor" to avoid editing the LDT file directly. Mainly need to customize program name, request group name, etc. for multi clients. Any ideas? thanks!
Harm,
thanks for your comment.
Your understanding was absolutely right.
Sorry my mistake its QNAP 639 PRO, populated with 5 1TB, one is empty.
So for my understanding, in my configuration you suggest NOT to use RAID-0. Im not willing to have more drives in my workstation becouse if my projekts are finished, i archiv on QNAP or archiv on other external drive.
My only intention is to have as much speed and as much performance as possible during developing a projekt
BTW QNAP i also use as media-center in combination with Sony PS3 to run the encoded files.
For my final understanding:
C: i understand
D: i understand
E and F: does it mean, when i create a projekt on E, all my captured and project-used MPEG - files should be situated in F? Or which media in F you mean?
Following your suggestions in want to rebulid Harms-Best Vista64-Benchmark comp to reach maximum speed and performance. Can i use in general the those hardware components (exept so many HD drives and exept Areca raid controller ) in my drive configuration C to F. Or would you suggest some changings in my situation? -
How can SAP tRFC server tell client through JCo that function carried out?
SAPs "Transactional RFC Technical Description" document (release 4.0) says in section Transactional RFC on page 6: "Finally, the server tells the client, that the function has been carried out and the client acknowledges this.".
How can the server tell this to the client when the server communicates with the client through JCo (Java Connector)?System.out.println goes to console, which is not a file... This whole thing is much easier if you use standard logging:
http://help.sap.com/saphelp_nw04/helpdata/en/d2/5c830ca67fd842b2e87b0c341c64cd/frameset.htm -
Accessing an API through a Database Link
Hi,
I am using Jdeveloper 11.1.2.2.0
My use case is that, I need to access an API through a DB Link and pass some parameters/data using this DB link into the API and commit it into the remote database.
I will be having a page from where I will passing the parameters, which should be committed into the database of the API provider.
For this I have created a DB link and tried to query data from the remote database tables, its working.
How to pass the parameters into the API using DB link and commit it into the remote database ?
Thanks,
Nigel.Hi Frank,
Thanks for the suggestion.
But in my case I need to call the external API using a DB Link.
I am able to call the API and it is returning me the statements that the new row is being created successfully and returns the ID of the newly created row.
But when I try again to access the Database through a query it is showing all the Rows with theirs ID's and data inside them, before and after the Row which I entered.
The rows which has the ID which I entered is having no values in their columns. Is it because the data is not getting committed ?
What is the reason for this ?
Thanks,
Nigel.
Edited by: Nigel Thomas on Jun 14, 2012 2:52 AM -
BAPI call in java through jco destination defined in content Administration
Hi All,
Is it possible to use JCO destination defined in Content Administration to execute BAPI in a java DC class file rather than creating a jco client through code.
Any pointers for the same?
regards
Radhika KuthialaHi Radhika Kuthiala
It's possible. Use the code below:
JCO.Client client;
try {
client = JCO.getDestinationClient(rfcDestName);
client.connect();
} catch (JCO.Exception ex) {
BR, Siarhei -
RFC call through JCo or webservice
Can anybody point differences(advantages/disadvantages) between a)calling a BAPI using JCo b)creating a web service for the RFC and calling the webservice fron WD application.
regards,
BhupeshHi Bhupesh,
Jco is written in java and it convert the java calls into the native ABAP calls ..so comunication is done between a java program and r/3 system through the JCo.....if the BAPI is exposed as a webservice ..then the processing language use is XML and SOAP protocol any language which can create and process XML can communication to BAPI(r/3) system...like java,dotnet etc....else u need a middleware like JCO which can convert java calls to abap calls for that language ...and now a days ....XML is commanly used by most of the Internet technologies...
hope this will clear ur doubt.
Regards,
yash -
I am in need of Java Outlook API through which i need to access Contacts
I need Java API for Outlook through which i can access contacts and tasks in outlook.
Try a third-party software like J-Integra for Exchange. It exposes a Java API that allows your Java app to access Exchange objects like e-mail, calendar and contact items. For more information, refer to:
http://j-integra.intrinsyc.com/support/exchange/doc/
Frankie Ragasa
J-Integra Interoperability Solutions
http://j-integra.intrinsyc.com/
high performance interop middleware for java, corba, com & .net -
Looking for api hooks w/o invoking server
hi there,
i'm are looking into the automated conversion of millions of pdf's from version 1.0 to 1.4 A/1-b. i am evaluating multiple ways to do this, and i have no prior experience with livecycle, but i am an experienced programmer. most of these pdf's are quite large (some gigabytes in size) and so i'm looking for a way to use the api without having to invoke a service over the network.
i have looked into watched folders, and this maybe the way to go, but i'm really hoping for hooks into an api that basically allows me to open a pdf in place, manipulate it (add, change or remove some parts such as xmp, creator, document id, etc), and then save it as pdf A\1-b.
are there any such hooks in the api? if not, would i need to build a custom service that did the above, and then invoke over the network, or have it watch a folder?
basically, i hoping to not to have to use the lc es server.
any thoughts/help is appreciated!please forgive some of my gramatical errors... typing to slow for my thoughts :-)
-
Calling pl/sql api through multiple java threads
Hi All,
I need to call a pl/sql api from multiple java threads simultaneously and all thread will use same db connection.
I want to know if all the threads will simultaneously call the pl/sql api then will the local variable inside pl/sql procedure be shared between them or they will get separate instances of variables.
TIAYou cannot make multiple parallel client calls over the same Oracle session handle. There is a single non-threaded/non-fibre serialised server process servicing client requests for that session. (physical process on Linux/Unix, thread in the oracle.exe process on Windows).
Each thread on the client side, needs its very own Oracle session. Thus each thread will have a server process footprint on the server. Which could be problematic if 10 clients each starts 10 threads - as it means a 100 processes on the server are needed to service these client threads.
Have a look at Overview of OCI Multithreaded Development in the Oracle® Call Interface Programmer's Guide for how to use the threading call interface of the OCI - as oppose to rolling your own where each thread manually needs to deal with is OCI session context.
Maybe you are looking for
-
My iPod touch is in recovery mode, how do I get it out of this?
My daughter's iPod touch is in recovery mode (we know this by the code it gives us when she plugs it in to the computer), how do we get it out of this? We have tried resetting by holding down the on/off button and the other button on the bottom fron
-
65L7300U LED No longer connects to the internet
Just bought this LED. Was able to set it up yesterday just fine. Came back today and TV is unable to connect to the internet. It says it can't find the access point [although, it sees every available wireless network]. Anyone have any ideas? Is
-
Why does my G4 ibook display only work when it's partially open?
The display on my iBook G4 shows no video until I nearly close the lid. I can then see the display working but it is at an extreme angle. I'm thinking that it must be a contact problem, but cannot find any forum or troubleshooting support that addres
-
Oracle Press book gives incorrect information about when you are certiifed
SQL Certified Expert Exam Gudie: ISBN: 978-0-07-161421-4 Page: 12 ... and I left (the testing center) a happy and Certified SQL Expert. THIS IS WRONG. When you leave the exam you receive a score report indicating you have passed the exam (I beleive s
-
Dynamic Pie Chart in Smart Form
Hi Frn's , How can i show the dynamic Pie chart in Smartform . Thanks and Regards Priyank Dixit