on 05-19-2005 2:23 PM
Hi all,
I have a problem when I call a BAPI parsing a input table.
Normaly, I can define a input using: on the Custom Controller.
Z_Bapi_Mov_Estoc_Input input2 = new Z_Bapi_Mov_Estoc_Input();
wdContext.nodeZ_Bapi_Mov_Estoc_Input().bind(input2);
input2.setParam1("test");
but this bapi have a input table.
How can I add this values?
I've try with this code, but no work's:
IPublicMagatzemListCust.IItemsElement newMaterialNodeElement;
newMaterialNodeElement = wdContext.createItemsElement(new Zdetalle());
wdContext.nodeItems().bind(newMaterialNodeElement);
newMaterialNodeElement.setMatnr("3233");
newMaterialNodeElement.setQuant(1);
the table is mapped using Items node.
Can anyone help me?
thanks in advance,
david
Hi,
I've another issue.
I implemented this code to build my table and parse to Bapi input:
Zdetalle tab = new Zdetalle();
for(int i=0;i<size;i++){
tab.setMatnr(Items[1]<i>);
tab.setQuant(Integer.parseInt(Items[0]<i>));
}
input2.addItems(tab);
but, this tab only contain one row. How can I add the values incrementing the row number?
thanks in advance,
david
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ok
thank's for all.
david
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great!
it work
Zdetalle tab = new Zdetalle();
tab.setMatnr("3233");
tab.setQuant(1);
input2.addItems(tab);
thanks in advance,
david
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the "tab" object is not a AbstractList.
thanks in advance,
david
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
My table name is "Items".
Is a subfolder of wdContext.nodeZ_Bapi_Mov_Estoc_Input.
On the Model definition, I see that exist a dictionary structure type called Zdetalle.
I can create a table using this structure:
zdetalle tab = new zdetalle();
but I cannot add this "tab" to my input Z_Bapi_Mov_Estoc_Input object.
If I try to add the "Items" on the Input object:
input.setItems( AbstractList )
and the Zdetalle is not an AbstractList.
thanks in advance,
david
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David
Well lets say the table name is "MYTAB"
Then what you need to do is in the model if you see you will get a Table class called "MYTAB"
//After your lines
Z_Bapi_Mov_Estoc_Input input2 = new Z_Bapi_Mov_Estoc_Input();
wdContext.nodeZ_Bapi_Mov_Estoc_Input().bind(input2);
input2.setParam1("test");
//code to add values to table
MYTAB tab = new MYTAB();
//Set table attributes
tab.set<attribute>();
tab.set<attribute1>();
now add the tab to the inp created
input2.setMYTAB(tab);
Hope that helps you. This will add the values to the table.
regards
ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.