on 06-09-2005 10:19 PM
Hello,
I am using a model based on a BAPI which has two mandatory parameters. One of the parameters is a single field, the other parameter is a structure which contains several subfields:
e.g
import parameters:
- Field A type C(10).
- Structure B contains
- Field B1 type C.
- Field B2 type C.
- Field B3 type C.
Inside the component controler i create and bind a contextmodel for the main model and also create and bind context for structure B.
When the BAPI is called it complains the structure B is not passed.
I was able to fill the fields by using the wdContext.currentStructureB.setB... methods
What am i doing wrong or is it just not possible to use structures as an import parameter
Thanks
Bertil Rebergen
Hi Bertil,
You have to fill the data in the structure by using the following code.
//Initialize the RFC/BAPI input
Bapi_ABC_Input input = new Bapi_ABC_Input();
wdContext.nodeBapi_ABC_Input().bind(input);
//Set the value for the FieldA
input.setA("<<some value>>");
//Create object of the structure
StructureB objStructureB = new StructureB();
objStructureB.setB1("<some value>");
objStructureB.setB2("<some value>");
objStructureB.setB3("<some value>");
//bind the created structure to the context
input.setI_Shlp(objStructureB);
//execute the RFC/BAPI
wdContext.currentBapi_ABC_InputElement().modelObject().execute();
Try the above steps your problem should be solved. If you require any further do let me know.
Regards,
Santhosh.C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.