on 05-19-2010 7:16 AM
Hi Friends
That Edit Context Mapping is OK .
If I add "wdContext.nodeZben_Demo_Rfc_Input().bind(Ak);"
I will get error: java.lang.ArrayIndexOutOfBoundsException: -1 .
public void wdDoInit()
{
//@@begin wdDoInit()
Zben_Demo_Rfc_Input Ak = new Zben_Demo_Rfc_Input();
//wdContext.nodeZben_Demo_Rfc_Input().bind(Ak);
//@@end
}
.
Plz tell me how to do? ......
regards,
Ben
Edited by: BenChen on May 19, 2010 8:16 AM
Hi BenChen,
Please use required statement for executing RFC/BAPI in web dynpro.
First Create method in component controller like getDemoRFCDetails().
Write the code in method like
Zben_Demo_Rfc_Input Ak = new Zben_Demo_Rfc_Input(WDModelScopeType.APPLICATION_SCOPE);
wdContext.nodeZben_Demo_Rfc_Input().bind(Ak);
//Execute RFC
Ak.execute();
//Invalidate Output node for context node Zben_Demo_Rfc_Input
wdContext.nodeOutput().invalidate();
Then call method from wdDoInit()
public void wdDoInit()
{
getDemoRFCDetails();
}
Hope it helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ben,
Try to follow these Steps.
First you are getting bapi from the ECC by using Adaptive RFC Model
By using context mapping you will pass model node and model attributes to the Component Controller
Now in Component Controller you can write the code.
In wdinit() this method you can write the code.
ModelNodeName input = new ModelNodeName ();
wdContext. ModelNodeName ().bind(input);
Next you have to Create on One method in CC that method name ABC(). Now you have to Execute u BAPI in ABC Method
Can you follow the code.
public void executeABC( )
{
//@@begin executeYmm_Sc_Bapi_Podelay_Input()
IWDMessageManager manager = wdComponentAPI.getMessageManager();
try
{
wdContext.ModlelNodeElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
}
catch(WDDynamicRFCExecuteException e)
{
manager.reportException(e.getMessage(), false);
}
//@@end
}
Hope this will helps you. If you have any problem please ask me.
Thanks
Vijay Kalluri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ben,
Form the code u have pasted, I can see that the bind statement is commented?????
Did u try executing after doing this?
//wdContext.nodeZben_Demo_Rfc_Input().bind(Ak);
This is the code to execute an RFC:
Bapi_Salesorder_Getlist_Input salesOrder = new Bapi_Salesorder_Getlist_Input();
wdContext.nodeBapi_Salesorder_Getlist_Input().bind(salesOrder);
wdContext.currentBapi_Salesorder_Getlist_InputElement().setCustomer_Number(wdContext.currentContextElement().getCustomer_Number());
wdContext.currentBapi_Salesorder_Getlist_InputElement().setSales_Organization(wdContext.currentContextElement().getSales_Org());
wdContext.currentBapi_Salesorder_Getlist_InputElement().modelObject().execute();
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Arun Jaiswal
I chcek the parameter for the RFC zben_demo_rfc is optional ~~
but still have error.
thx your propose.
the error become
com.sap.tc.webdynpro.progmodel.context.ContextConfigurationException: DataNodeInfo(Bencust.Zben_Demo_Input.Output.Gtb): structure field Zurid not found
Regards
Ben
Edited by: BenChen on May 19, 2010 11:04 AM
Hi Ben,
Is this happening for all BAPI's which u try to access or only few. If its happening for all the BAPI's, then u should inform your BASIS team to have a look at the permissions of the user which they have used for the JCo destinations.
By the way, what mode are u using for authentication for METADATA and MODELDATA?
Regards,
Poojith MV
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.