on 04-04-2007 1:48 PM
Hello Forum,
i need help concerning Web Dynpro Java, i think i have a comprehension problem:
When i import the Bapi_Salesorder_Getlist as Adaptive RFC, Map the Model to the context via Apply Template (Service Controller), Apply Template into the View and create a InputForm (Values are of InputField-Type), Button and an Output-Table (TextViews), i'm able to Deploy the Project and use the Input Fields CustomerNumber and Salesorganization to generate the wanted Results.
If i to the same with Bapi_Salesorder_Createfromdat2 it doesn't work. What i can do is to hard-code the Entries for OrderHeaderIn etc., but i cannot use the Input Filds because they're blanked out.
I think this is because of the imported Model-Structure. When i test the Bapis i can directly enter the Test-Data, in Salesorder_Createfromdat2 there are underlying Structures like OrderHeaderIn.
Do i have to manually create Sub-Model Nodes or something like that? How am i getting theese Structures filled? Could it be another Problem perhaps with the Apply-Template mechanism?
Any help is appreciated!
Regards
Hi abhijeet,
The only mandatory input parameter of the Bapi is Order_Header_In with reference-type bapisdhd1.
Under Model, the Class Bapi_Salesorder_Createfromdat2_Input contains the structured parameter Order_Header_In. In the Model Class of the imported Model there the non-executable model class Bapisdhd1 which is containing the method set.Division
If i try Salesorder. i'm not getting the setDivision Method!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you both for your Help, it works now.
Best Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ramganesan
i tried implementing like you said but Salesorder doesnt know the Method setDivision, Bapisdhd1 does contain the set.Division Method.
Bapi_Salesorder_Createfromdat2_Input Salesorder = new Bapi_Salesorder_Createfromdat2_Input();
wdContext.nodeBapi_Salesorder_Createfromdat2_Input().bind(Salesorder);
Bapisdhd1 header = new Bapisdhd1();
Salesorder.setDivision(header);
This produces following Error:
"The Method setDivision(Bapisdhd1) is undefined for the type Bapi_Salesorder_Createfromdat2_Input"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi abhijeet,
yes, i want to pass a table respectively a structure. In my Case the Structure Bapisdhd1 containing OrderHeaderIn.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramganesan,
thanks for your Reply;
I'm not working with Material_Savedata, but with Salesorder_Createfromdat2. What exactly do you mean by "Object of corresponding Field" ? Could you perhaps give a code-sample?
I already did this:
Bapi_Salesorder_Createfromdat2_Input Salesorder = new Bapi_Salesorder_Createfromdat2_Input();
wdContext.nodeBapi_Salesorder_Createfromdat2_Input().bind(Salesorder);
Bapisdhd1 header = new Bapisdhd1();
header.setDivision("");
...
Is it btw important WHERE i add the code, could i use the executeBapi-Method OR the DoInitMethod? Do i have to do somethong with the Input Fields except create them with Apply Template?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefen,
You can place your code Doinit Method itself.
Object of corresponding Field means Try Like This,
Bapi_Salesorder_Createfromdat2_Input Salesorder = new Bapi_Salesorder_Createfromdat2_Input();
wdContext.nodeBapi_Salesorder_Createfromdat2_Input().bind(Salesorder);
Bapisdhd1 objHeader = new Bapisdhd1();
Saleorder.setDivision(ObjHeader);
Thankyou.
Regards,
Ram.
hi
whatever structure you want to fill data in is that a tables parameter passed to the FM ?
if this is a tables parameter then that need other way to populate and for that you should better use population method using context attribute
let me kno if that is a table
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
Applying template mechanicanism could nor be the problem.
You have to create the Object for the corresponding context values classes
and set them to the corresponding attrributes.
Bapi_Material_SaveData_Input input = new Bapi_Material_SaveData_Input ();
wdcontext.nodeBapi_Material_SaveData_Input.bind(input);
input.setMaterial(obj); //Object ofcorresponding field
(Or)
You have to set some default values for those fields.
Eg:
Bapi_Material_SaveData_Input input = new Bapi_Material_SaveData_Input ();
wdcontext.nodeBapi_Material_SaveData_Input.bind(input);
input.setMaterial(""); //empty Values
Regards,
Ramganesan K.
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.