Passing values through RFC
Hi All,
I have a requirement where we need to connect to a different system using RFC and pass data.
I have data in the table . The requirement is using RFC, i have to write a code, so that i can send all the possible values of a field in the table to the remote system. I have 5 fields in my table in SAP. First i need to pass all the possible values of field1 to the remote system and based on the input in their system, i need to pass all possible values for field2 to remote system and again based on field1 and field2 i need to pass all possible values for field3 to remote system.
Pls let me know how to do coding for this.
Thanks,
Raju
Raj,
We need to pass the possible values from our custom table to the remote system, so that the user can see all the possible values for the fields. Similar to the F4 option.
And based on field1 input in the form by the user, we need to get corresponding values for field2 of all possible values and pass it to the remote system.
If your user is filling the forms in the non-SAP system itself, means you are just providing the data to that system for the actual user action there. So, either you can send the whole data everytime and let non-sap system handle the logic which you need for the possible values for each selection. Better if you are able to store all data in the remote system itself to avoid large data communication everytime and just sync the 2 systems whenever something changes in SAP.
Otherwise, if you want to control it from SAP itself, then you need 2 way communication.....once user fills 1st field in FORM, remote system sends that to SAP and then you send the 2nd field valid values to remote system again using same/different RFC and so on. But, I doubt that will be efficient for the user filling the form.
Regards,
Diwakar
Similar Messages
-
Passing values to RFC holding structure.
Hi Experts,
I have DC which needs to update backend table through RFC. In this RFC i have a structure in import tab which holds 2 fields.
From webDynpro Java code , i have to pass the those 2 fields as input before when i execute the model.
How can i write code for inputing the values for this structure fields ?
thanks in advance.
Regards,
sureshHi Suresh,
Steps to execute you Adaptive RFC Model:
1. Create an instance of the BAPI's input structure-
<Your BAPI Name>_Input input = new <Your BAPI Name>_Input();
2. Set the two input parameters to this input structure with desired parameter values-
input.set<Your Para 1>(<Desired Parameter Value>);
input.set<Your Para 2>(<Desired Parameter Value>);
3. Create and Bind a model node in context to the input structural node of Your BAPI using model binding. Now using code bind the instance of the input structute to the model nodel in conext as stated below-
wdConext.node<Your Custom created Model Node in Context>().bind(input);
4. Execute the model and invalidate the output node-
try{
wdContext.current<Your Model Node in Conext>().modelObject().execute();
wdConext.node<Output Node in the conext>().invalidate();
}catch(Exception){
5. Pick all the output parameters from the Output Node in the context.
Hope it helps!!
Regards,
Tushar S -
Passing values to RFC/BAPI Table
Hi,
I am having a very strange problem. While passing the values to RFC/BAPI table using add method the values are not passed to backend SAP. Below is the code which I am using just to pass some data in RFC/BAPI table.
The same code was working few days back. Is there any configuration in JCO or any other problems other than the code?
Your l help is greatly appreciated.
public void executeZtest_Function_Input( )
// //@@begin executeZtest_Function_Input()
// //$$begin Service Controller(943377124)
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try{
Ztest_Function_Input input = new Ztest_Function_Input();
for (int i=0; i<5;i++){
Zhr_Ear_Cclist cc =new Zhr_Ear_Cclist();
cc.setFi_User("[email protected]");
input.addIcc_List(cc);
wdContext.nodeZtest_Function_Input().bind(input);
wdContext.currentZtest_Function_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
} catch(WDDynamicRFCExecuteException ce) {
manager.reportException(ce.getMessage(), false);
//$$end
//@@endHi Raksh,
I also got the same problem. Please check the following ways then you will solve problem.
1. First check the appropriate BAPI in SAP GUI Software. You have to determine where is the problem?. Is it in Dynpro or BAPI itself?.
2. Suppose the BAPI structure change you will wont't run. If BAPI strusture change you have to reimport BAPI.
3. Please check the JCo connectio using test Button. Then redeploy your project.
4. Rebuild your project then redeploy.
Check the above ways you may get answer.
Kind Regards,
S.Saravanan -
Hi Friends
I have a requirement where I have to pass few values from Adapter Module to RFC which will update the database table.
Example: I have to pass filename and filesize to RFC which will update the table X
Could someone provide me the snippet of the code.
Thanks
Abhishek MahajanHi Abhisek,
Through UDF, you can access the Adapter Specific Attributes like File Name and pass the same to RFC.
Pls go through
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516
Hope this will resolve.The code snippete is written there.
Regards,
Subhendu -
Hi All,
I have designed a customized screen in which a value is been fetched through a RFC program from a third-party software(Legacy system).
The value in the legacy system changes in every 2 seconds. So in order to match with the legacy system value I have to call the RFC for every 2 second and populate the same in deleloped SAP-screen.
But I donot know how to call the RFC( which is a function module) in every 2 seconds interval in-order to refresh the SAP-screen value.
It will be great help if somebody has the solution for the above mentioned problem. The person with right answer will be awarded with points as per forum rules.
Thanks in advance.
Regards,
Satyathis is something very hard to do in ABAP
here is a nice workaround :
you display value at a certain time and also this time (so user knows the value was correct at this time) and you provide a button "refresh" on screen so that user can refresh the value
now if you really want to have an automatically updated display, you will have to deal with some very special functionnalities of calling functions in asynchronous mode
let's look at an example at address http://richard-harper.me.uk/Kb/showtext.aspx?id=0014 -
Pass value through URL without setting local page item
Folks,
I have a table where I have created a dummy column with a hyperlink on it to go to another page in the application which runs a report passing through columns on the table
As I am doing this several times (for different pages in my application) - Is there a way of passing a variable through a URL to a report without setting a local variable
i.e.
Click Here
Here I am assigning a local variable on Page 25 which is hidden called P25_TEST1
What I would like to do is pass the value straight to page 25 (which runs the report) without the need to create hidden items on the report pages all the while
Thanks
GarethYou have a plain HTML page that loads with a url with something like ?field=value
And you want "value" to show on your page, correct?
<html>
<body>
<script>
var qsParm = new Array();
function qs() {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
var pos = parms<i>.indexOf('=');
if (pos > 0) {
var key = parms<i>.substring(0,pos);
var val = parms<i>.substring(pos+1);
qsParm[key] = val;
qsParm['field'] = null;
qs();
if (qsParm['field'])
document.write('You selected ' + qsParm['field'] );
</script>
</body>
</html>
Call that as test.html?field=Hello
Here's a nice link that explains it in detail: http://www.eggheadcafe.com/articles/20020107.asp -
Passing values through command range
Hi All,
I am passing the values for costelement through command range in my workbook.
User will give the value of the costelement and I am accessing the value in my planning function.
But, is there a way wherin I can run the same planning function taking all the values of the costelement in my infoprovider(not a single value and not multiple values for a costelemet which the user would select)? In such a case, what value can the user select in the command range for the costelement so that my planning function takes all the values in my infoprovider?
Any help is highly appreciated.
Regards,
Srinivas Kamireddy.Hi Deepti,
I have tried with the selection-options optional variable but it didn't work. I am able to pass a single value as in my earlier case where I was using a single value optional variable.
But, when I pass a blank value, I am getting an error mesaage 'You have to enter variable values before you execute'.
Any ideas?
Regards,
Srinivas Kamireddy. -
I have the next problem:
I have a text box named "City" , and next to it I have a button, which open a new window where the user can search for a specific city. For expample, when the search window opens, the user can input %new%, and then the same page load new york, new yersey, etc, so the user pick one, and accept.
So the city that the user chose, have to be passed somehow to the first page. How can I do this, pass the value to the first page? that is how can I pass the city "new york" for example, from the search window to the first window?
Thanks a lot.You have two options:
1) use javascript to set a form field (recommended)
2) use the session
a popup window has the same session as the opener. As for javascript, you can use something like:
window.opener.formname.fieldname.value = document.formname.city.value;to set the field 'fieldname' in the parent page. -
Can we pass value through "EXPORT" in background scheduled report
hi experts
my query is can we pass some field using 'EXPORT' statement while scheduling a report to run in background using statement
submit 'ZXYX' via job jo_name number jo_num and return.
i am using 'IMPORT" statement in 'ZXYZ'EXPORT, as I recall, is limited to your user context. Check shared objects (which still may not work, although you can propagate to servers) and INDX-like tables. Research use of INDX-like tables for how data is passed into and out of these tables (import/export).
-
Passing values through javascript
hI gurus,
I have a javascript function
I open a new jspdynpage component in this window and pass a parametre along with it
name = "xyz", name keeps changing ,Its
function x(name)
window.open("irj/servlet/portal/prtroot/Appname.Componentname?param = name")
now when I do request.getparametre("param"), I get name , wherin I need xyz ...
how can I achieve thisHi,
that shoud be a problem with the parenthesis, try this:
window.open("irj/servlet/portal/prtroot/Appname.Componentname?param="+name)
Romano -
How to passing lowercase values to RFC/BAPI using webdynpro for JAVA
Hi Exerts,
When we sending values to RFC/BAPI through webdynpro (JAVA), the values are sent in capital (uppercase) letters to ECC.
So if we fill xxxx, it is send like XXXX. Why? and how to avoid this?
Thanks in advance,
JoeriHi,
There could be two possibility if you are storing this value in ABAP table.
1. You are entering value in UPPERCASE in your webdynpro application.
2. The data stored in ABAP table, converts value in small to upper case.
1. Can you tell me how you are passing this value, is user entering value in some input field which is binded to some context and this value are you passing to RFC/BAPI...???
Or else before passing value to RFC/BAPI you can use toLowerCase string function and the npass this value to RFC/BAPI
e.g String name = wdContext().currentContextelement().getName().toLowercase();
Now pass this name to RFC/BAPI is should go as lowercase only..
This is from webdynpro java side..
2. If you are storing this value in ABAP table, check the domain/type of variable in ABAP table for which you are storing the value. Ask ABAPper, so that this value are stored in small case letter.
There is one tick in domain which you need to remove so that it stores in lower case. I dont have exact information but you can consult this with ABAPer.
Hope this information helps guy ..!!!!
Regards,
Jigar -
How to pass attribute values through variables in JSP Custom TagLib
Hi,
Can anybody help me how to pass values through varuables in the jsp custom tag.
i am using JSP custom tag. I am unable to pass attribute values through variables.
<invitation:invdetails invid="<%=invid%>"/> The value is passing as <%=invid%> ,not value of the invid.
But i am getting throuh the fllowing
<invitation:invdetails invid='1' />
Please anybody suggest me how to pass value by using the variable.Hi,
It sounds like you need to set the <rtexprvalue> tag to true in the TLD for your tag. If you do this the tag will read in the value you are trying to pass to it.
dapanther... -
Passing value from JSP to JApplet
Hello,
I am stuck up with a problem, can anyone please tell me how do i pass a value from a JSP page
to a JApplet,
and the parameter passed through JSP should be displaed in the JTextArea.
It would be kindful if any of you could help.
Thanks
Sanamhello,
thanks for reply.
I know how to pass parameters from html,
I want to pass values from jsp page,
and i dono how to do it, may be we cann pass values through url connection but i dono how.
if anone knows plz help me in solving this.
i hvae posted my applet code.
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.JToolBar;
import javax.swing.JButton;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
import javax.swing.JPanel;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.sql.*;
<applet code = "DocApplet" width = 500 height =5000>
</applet>
public class DocApplet extends JApplet
private JPanel jp;
private Container cp;
private JTextArea jt;
private JToolBar tb;
private JScrollPane sp;
private String annotation;
private String url;
private Connection con;
private Statement stmt;
public void init()
jp = new JPanel();
cp = getContentPane();
jt = new JTextArea();
tb = new JToolBar();
sp = new JScrollPane(jt);
repaint();
public void start()
jp.setLayout(new BorderLayout());
jp.add(tb, BorderLayout.NORTH);
jp.add(sp, BorderLayout.CENTER);
jt.setBackground(Color.BLACK);
jt.setForeground(Color.WHITE);
setContentPane(jp);
addButtons(tb);
repaint();
public void run()
repaint();
public void paint()
private void addButtons(JToolBar tb)
JButton button = null;
button = new JButton("Save");
button.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
tb.add(button);
} -
Hi Guys!
My Problem is to pass values through call forms to another form. There are two ways I had done it before. First:global variables.
Second library spec with variables in in, then call forms share library data and the calles form uses the same library. The second way is descriped by Oracle Corp., too.
Do you know another, better way, or do I have to make one of this better? What's the best way? Thank you very muchYou can build and pass a parameter list. Look at the help for CALL_FORM for details (I think you'll see an example there of how to use it).
-
Passing value via cookies to the ITS
Hi mighty experts,
I would like to known if any of you knowns if it is possible to pass values through cookie on the ITS?
If possible, how can it be done ?
Thanks in advanced!
/JesperHi Christopher,
The problem is that I need to pass the value of the cookie to the back-end. The way that I see it, the solutions You propose will require that I first read the value of the cookie with JavaScript, assigns the value to a form input and submits the page again. In essence I need to render the page twice in order to pass the value.
What I was looking/hoping for, was a way/FM to read the value of the cookie from the back-end (the ABAP program behind the Internet Service).
Br.
Jesper
Maybe you are looking for
-
I am trying to create a form where there are ten choices - a multiple choice question. Depending on what answer is chosen, I may or may not need them to choose from an addition drop down box. Is that possible?
-
Help! I don't know what to do
-
How to display Rtf Contents.I used Jeditorpane and RtfEditorKit. But Image in the Rtf files not Displaying?I read RTFEditorkit is not Supporting image.Any Way to display Image?
-
Hi Friends, I have some queries, please help me to resolve the issues. 1) i have replicated the plant from R/3 to CRM, plant is already been replicated, but the issue is under which role the plant will be treated as, it has taken the standard interna
-
Hey all, Every so often i repair permissions on my computer, like i should... And most of the time it fixes those little bugs which can ruin your life. Good! then that works, it does what it should! now here's my question, who knows what the text you