on 05-30-2005 1:27 PM
Hi Experts,
My RFC module requires input in form of a data structure.
So I my creating a model object for the structured input parameter . but he setter method requires arguement as abstraction list.What does it mean?
Zdata_Input getNewdata = new Zdata_Input();
wdContext.Zdata_Input().bind(getNewdata);
Zsubdata NewNo = new Zsubdata();
getNewdata.setZsubdata(NewNo); // giving Error
Zdata_input is my main context node .
Zsubdata is subnode of this model node .(Table Parameter in associated BAPI) .
Thanks in advance .
getNewData.addZSubData(NewNo);
You probably have a table as import parameter in the RFC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to every body . My Problem is solved because of your valuable help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
In case of structures you will see some classes generated when you import the adaptive RFC models.
Assume for your Bapi "Z_RFC_Input" there is a structure called ZSTRUCT
then you will have a proxy class called "ZSTRUCT" generated.
So in your code you would do something like
Z_RFC_Input inp = new Z_RFC_Input();
wdContext.nodeZ_RFC_Input_Element().bind(inp);
//This is how you pass values to the structure
ZSTRUCT zs = new ZSTRUCT();
zs.set<Attribute1>();
zs.set<Attribute2>();
inp.set<Structname>(zs);
try
{
//you execute the model
wdContext.currentZ_RFC_InputElement.modelObject().execute();
}
catch(Exception e)
{
}
Hope that helps.
regards
ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If Zsubdata is an import Structure, then get the Model Class Name for Zsubdata.Suppose it is ModelSubdata.Then,
ModelSubdata Obj = new ModelSubdata ();
Obj.set<attribute1>;
Obj.set<attribute2>;....
getNewdata.setZsubdata(Obj);
If Zsubdata is an import Table, then,
for(all the elements to be added)
{
ModelSubdata obj = new ModelSubdata ();
obj.set<attribute1>;
.
.
getNewdata.addZsubdata(Obj);
}
Hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.