on 07-28-2005 7:12 AM
Hello,
I have a RFC that has Table parameter say "InputLoad".
In webdynpro, I populate this table dynamically.
This works fine.
But when I execute the model, the values are not passed to R/3? What am I missing?
Do I again need to create an instance of the model and then copy all the elements one by one and then execute it?
There should be some simplar way.
Any suggestions are welcome.
Regards,
Shubham
hi,
after importing the model you will also have the table which you are sending as input parameter,
so while binding the model
z<rfc-name> r1 = new z<rfc-name>();
z<table-name> tab = new z<table-name>();
tab.set<table-columns>("value");
r1.add<table>(tab);
only then value will get passed in the table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Subham,
I don't know If I can be help you out. I'll give you the usual steps I follow to connect to R/3.
Say you have an RFC 'ZMYRFC' which uses a table 'mytable' of type some type 'ZTAB'. When binding this node make sure you bind the tables inside th 'output' node and not those outside to it. The lines of code you need to write to invoke this RFC with the table as input are :
ZMYRFC_Input input = new ZMYRFC_Input() // create an instance of the Input class;
ZTAB table = new ZTAB();
//if you do not know table type of 'mytable', check the function input.addMytable(<table type>)
table.set<property>('value');
.
.
table.set<property>('value');
input.addMytable(table);
wdcontext.currentZMYRFC_inputElement.bind(input);
wdContext.currentZMYRFC_inputElement().modelObject().execute();
wdContet.nodeOutput.invalidate()
// clears the old value in the output node
Hope this helps,
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Subham,
My suggestion is first check in R/3 system weather insertion is working or not using se37 transaction .
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anilkumar,
The insertion works.
If we remember the flight program example, in that before excuting the model we bind the nodeelement again to the node and then execute the model.
Here also now I am doing the same, but still there is no data being passed to backend.
Any sample code of any table passing to backend will be helpful.
Regards,
Shubham
Hi,
do check the following article it will answer all your queries regarding passing table and structures to RFC.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/li... rfc to web dynpro.pdf
Regards,
Vijith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijith,
I am stuck up at the following place.
try {
wdContext.currentZ_Kwf01Modify_Pax_Size_InputElement().modelObject().execute();
wdContext.nodeModifyPaxSizeOutput().invalidate();
} catch (Exception ex){
ex.printStackTrace();
}
In this code, when I check the values of the node Addnpaxload inside Z_Kwf01Modify_Pax_Size_Input, it has 10 rows. But when I see the table Addnpaxload in R/3, there is No record.
Am I missing something. Do I need to create another instance of the model and then copy all the values from one node to other?
All inputs are welcome.
Regards,
Shubham
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.