on 08-09-2011 9:01 AM
hi,
i created some input fields and bind them with the value field at the specific bapi_field. all went fine except for the two fields for the materialdescription (i'm trying to create a new material with the bapi_material_savedata). these two input fields are not editable and i don't know why. everything seems similiar to the other input fields.
do you hav any idea?
excuse me, i've never worked before with web dynpro. and i think i know what you mean. i did this in implementation:
Bapi_Material_Savedata_Input input = new Bapi_Material_Savedata_Input();
wdContext.nodeBapi_Material_Savedata_Input().bind(input);
Bapimathead bapihead = new Bapimathead();
input.setHeaddata(bapihead);
Bapi_Mara bapiclient = new Bapi_Mara();
input.setClientdata(bapiclient);
Bapi_Makt_List bapidescr = new Bapi_Makt_List();
input.setMaterialdescription(bapidescr);
so, there i created the node and bind the elements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
According to [http://www.se80.co.uk/sapfms/b/bapi/bapi_material_savedata.htm], the BAPI parameter "materialdescription" is a TABLES parameter and has type "bapi_makt".
In the Web Dynpro model classes you will then get a corresponding subclass of AbstractList where you can add the "table rows".
Bapi_Material_Savedata_Input input = new Bapi_Material_Savedata_Input();
wdContext.nodeBapi_Material_Savedata_Input().bind(input);
Bapimathead bapihead = new Bapimathead();
input.setHeaddata(bapihead);
Bapi_Mara bapiclient = new Bapi_Mara();
input.setClientdata(bapiclient);
/* add "rows" to table "materialdescription": */
{
Bapi_Makt materialDescription = new Bapi_Makt();
materialDescription.set<AttributeName>(<value1>);
input.addMaterialdescription(materialDescription);
}
{
Bapi_Makt materialDescription = new Bapi_Makt();
materialDescription.set<AttributeName>(<value2>);
input.addMaterialdescription(materialDescription);
}
could you please help me? is the solution the cardinality? and if it so, what do i have to do to solve this problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
cardinality is 0..n. is this the solution of my problem? but my application is just like a prototyp, so it would be enough, if i can type in one description and language.
what have i to do? implement a table? i tried this before, but i was not able to make a editable cell field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
where do i check them? i think i can create more material_descriptions in different languages. because of this the type of the material_descriptions implements the abstract list.
change this something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
so, i just looked the flights example up and compared it with my application. there are no differences. the flight example has also a parent node with some child nodes/folders where the attributes are. same as mine. and they also do not create a child node. i tried it, but there is no child node available only the parent node.
so there has to be another reason. do you or anyone have an idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
are you sure? because in the flights example from sap, they don't create the child node. they only add the attributes at the parent node like me.
and if i have to create the child nodes, why are there only problems with my material_description and not with the headdata etc, which are also child nodes?
and if you are right, how do i create the child node? because webdynpro tells me that there is no completion availabe only the one which i had created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i thought with
Bapi_Material_Savedata_Input input = new Bapi_Material_Savedata_Input();
wdContext.nodeBapi_Material_Savedata_Input().bind(input);
i created the node.
i think i still don't understand the whole thing. could you please tell me exactly where i have to create which nodes or where i can look which nodes i have created?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well, the main node is the Bapi_Material_Savedata_Input(), which is created as you can see. this contains different children, like the material_description and the material_description contains the 2 attributes which i'm trying to set with the not editable input fields. do i have to create another node element?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
as i told you, there is the element. i created it with the wizard and i can see it. there is the element in the controller and there is the element in the view. and because there are the elements i can choose the element in the value. if it was't there, i couldnt choose it, am i right?
and if not, i still dont understand where i have to create the element, because in my oppinion, it is there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
so, is there any idea what i miss?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just create the element.
if you still don't understand, make a simple test
create node A under root context.
create Attribute A1 under node A
bind the A1 to an inputfield
run your application, what you will see?
create a button , in the action handler, create a node element for node A. run your application again and click the button, try to see what happen.
do you mean the node in the controller context? there is one for material_description. and there is also one in the view.
i created them with the wizard where i marked the parts of the bapi which i want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what do you mean with create it? and why is it only by one inputfield that it doesn't work? where can i see if there exists one?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
well, i bind it to the context node. but i don't think that there are any elements, because i'm going to fill them with the input data or am i wrong?
the values are all from the bapi_material_savedata which is from sap.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what do you mean with this? for the value of the inputfield i selected the value Bapi_Material_Savedata_Input.Materialdescription.Matl_Desc. similar to the other inputfields. there i selected for example value Bapi_Material_Savedata_Input.Headdata.Matl_Type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the context you bind to at least has one element.
if not, please create it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.