on 06-15-2010 5:30 AM
Hi,
We have a function module called Z_HR_ESS_PA0003 in backend system which is used to grab the field called AccountTo from infotype 3. I tried to fetch this field to do some validation in ESS banking but failed. Could you suggest what I did wrong in the following steps.
1. I created a model to import Z_HR_ESS_PA0003 function module.
2. I added this model in Used Model
3. I did the comtext mapping of Z_HR_ESS_PA0003_Input between custom controllers and used model and between detailedView and custom controlllers
4. Date t = wdContext.nodeZ_Hr_Ess_Pa0003_Input().nodeOutput().currentOutputElement().getE_Abrdt(); to get the E_Abrdt();
But it got null without any values. Could sum1 shed a light on this please? Thanks.
I got the following code added
Z_Hr_Ess_Banking_Pa0003_Input model= new Z_Hr_Ess_Banking_Pa0003_Input();
wdContext.nodeZ_Hr_Ess_Banking_Pa0003_Input().bind(model);
if(wdContext.nodeZ_Hr_Ess_Banking_Pa0003_Input().nodeOutput().currentOutputElement().getE_Abrdt() != null)
{
Date t = wdContext.nodeZ_Hr_Ess_Banking_Pa0003_Input().nodeOutput().currentOutputElement().getE_Abrdt();
}
and received the error
java.lang.NullPointerException
Sorry I am not good at JAVA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Insert the following statement after the bind statement:
Z_Hr_Ess_Banking_Pa0003_Input model= new Z_Hr_Ess_Banking_Pa0003_Input();
wdContext.nodeZ_Hr_Ess_Banking_Pa0003_Input().bind(model);
wdContext().currentZ_Hr_Ess_Banking_Pa0003_Input().modelObject().execute();
if(wdContext.nodeZ_Hr_Ess_Banking_Pa0003_Input().nodeOutput().currentOutputElement().getE_Abrdt() != null)
{
Date t = wdContext.nodeZ_Hr_Ess_Banking_Pa0003_Input().nodeOutput().currentOutputElement().getE_Abrdt();
}
Also find out if the RFC expects any input parameters from the WDJ program. If yes, set the parameters using:
wdContext().currentZ_Hr_Ess_Banking_Pa0003_Input().set<attributeName>();
Regards,
Poojith MV
Yes It works fine now. Thank you very much.
There is one input parameter in this custom RFC. But there is another implementation problem poped up.
For this ess banking application, generally there are two projects involved. One is essaubanksapcom, the other is esspersapcom. We have implemented the code to validate the date period in esspersapcom/CvPersInfoDetailFooter, However we require the input parameter from another project which is essaubanksapcom/VcPerBankAuDetail. How am I supposed to pass this input parameter from one project to another? Is there an easy way to do? Thanks.
To be more specific, it is user id i need as input parameter
Edited by: Bai Li on Jun 15, 2010 9:01 AM
Hi,
try using this line:
if(wdContext.currentOutputElement().getE_Abrdt() != null)
{
Date t = wdContext.currentOutputElement().getE_Abrdt();
}
This will avoid any errors if the output element is null
Before that, execute the RFC in ECC using transaction SE37 by providing the parameters if required?
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.
hello
1) Open SE37 execute FM check whether you are getting Date value or not. If you are getting there means there is some issue with WDJ Code.
2) Take Instance of the node . Pass required input parameters to FM and execute FM.
Check above points.
Regards
Sridhar S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.