on 02-03-2007 2:57 PM
Hi All,
I have a BAPI available in my NWDSthrough a WebService Model (WSDL).
The structure is as follows :
<i>-Request_Equip........................(BAPI) -
0..1
-
LOCID......................(MN) -
0..n
-
LOCValue ..........(MA inside LOCID)
-
Response..................(MN) -
0..1
-
Result.................(MN inside Response) -
0..n
-
EquipId.........(MA inside Result)
-
Customer..................(MA directly inside Request_Equip)</i>
Our objective is to execute the BAPI (Request_Equip) by passing the parameters -
-
Customer
-
LOCValue(s) in LOCID node,
so that the Result node will get populated with EquipId(s) as output.
We have followed the following code, in which we were able to correctly
pass the value for "Customer", but somehow the "LocIds" are not getting passed.
Request_LspmResponseEquipIdsOSMI_lspmResponseEquipIdsOSMI requestBAPI = new Request_LspmResponseEquipIdsOSMI_lspmResponseEquipIdsOSMI();
wdContext.nodeRequest_Equip().bind(requestBAPI);
ArrayList arrayL = new ArrayList(1);
arrayL.add("0000000099");
requestBAPI.setCustomer("0000300006");
requestBAPI.setLOCID(arrayL);
<b>//The method - setLOCID accepts parameters in the form of List or Item[] only</b>.
try
{
requestBAPI.execute();
}
catch(Exception ex)
{
manager.reportSuccess("ERROR stack : "+ex.getStackTrace());
}
wdComponentAPI.getMessageManager().reportSuccess("Result Size1 : "+wdContext.nodeResult().size());
wdContext.nodeResponse().invalidate();
wdContext.nodeResult().invalidate();
No matter what, we always get the size of the Result-node as "0", but from the R3, we get to see 2 records for the same inputs.
Please provide the code steps to achieve this functionality.
Regards,
Ashwin.
Message was edited by:
Ashwin Upadhyay
You forgot to add
wdContext.nodeResult().invalidate()
to refersh the context values. If you don't execute that command after doning execute the context values won't be updated.
see the web dynpro tutorial on how to use model :
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/f0b0e990-0201-0010-cc96-d7ecd2e51715
Regards
Omer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
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.