on 02-02-2007 9:31 AM
Hello All,
I have created a Web Dynpro application which makes BAPI calls.
I need to pass data to the BAPI as input parameter, but I am failing to do so.
I tried to execute "Bapi_Requisition_Create". But I saw Table Cell editors are disabled. I tried to bind "Requisition_Items" structure which is cardinality 0..n.
Could you help me about this problem? Please anyone can give sample codes or have any idea for solution?
Thanks in advance.
Hi,
i am assuming that you are binding tableui with Requisition_Items node.
since Requisition_Items is structure it will be treated as class in web dynpro.
so if you want add records to your table you have to create object for this class.
please use following code.
Bapi_Requisition_Create_Input input2 = new Bapi_Requisition_Create_Input();
wdContext.nodeBapi_Requisition_Create_Input().bind(input2);
Requisition_Items obj = new Requisition_Items ();
input2.add<Requisition_Items>(obj);
wdcontext.nodeRequisition_Items.addElement(wdcontext.createRequisition_Itemselement(obj));
it will allow you enter one record
if you want more records repeat the code that i added.
With Regards
Balaram Naidu
|
|
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Rasim,
Will you send me ur Structure of ur context
With Regards
Naidu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Balaram
You can find my structure of context:
Context |
--- Bapi_Requisition_Create_Input (cardinality 0..n)
---Output (cardinality 0..1) |
---Requisition_Items (cardinality 0..n)
I added following code inside CustomController wddoInit section:
Bapi_Requisition_Create_Input input2 = new Bapi_Requisition_Create_Input();
wdContext.nodeBapi_Requisition_Create_Input().bind(input2);
Could you tell me my mistake?
Kind Regards,
Rasim
HI Rasim,
what dio u mean by 'table in the form'
are you passing internal tabel data to BAPI
With Regards
Naidu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Balaram
I am sorry mistake. Because I am new developer in WebDynpro. I used another programming terms.
it means i used UI Table in my view. I created context mapping via BAPI. Then I saw my table input fields are disable. Normally I should enter data in Table Edit fields.
Do you have any idea why they are disabled?
Thanks
Best Regards,
Rasim
Hi,
Add your BAPI to controllers and views and in customcontroller init method write the code like this.
thru context mapping u can pass the node structure controller to View.
Once it has done.
goto the Init mehtod of the View and menthion the following code.
FNModule_Input input = new FNModule_Input();
wdContext.nodeFNModule_Input().bind(input);
// pass the input
input.setZ_Kunnr("0000000001");
try {
wdContext.currentFNModule_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
} catch (WDDynamicRFCExecuteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Thanks,
Lohi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.