on 05-18-2007 4:49 AM
Hi everyone, i get this error message again (I think before I have expert in this area but still i fail again).
Here my parameter BAPI
<b>FUNCTION hrwpc_rfc_montask_getlist.
*"----
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(BEGDA) TYPE PSKEY-BEGDA
*" VALUE(ENDDA) TYPE PSKEY-ENDDA
*" VALUE(GET_UNLOCKED_RECS_ONLY) TYPE XFELD DEFAULT 'X'
*" VALUE(GET_MONITORINGTASK_TEXTS) TYPE XFELD DEFAULT 'X'
*" VALUE(LOG_MESSAGES) TYPE XFELD DEFAULT 'X'
*" VALUE(REFRESH_LOG) TYPE XFELD DEFAULT 'X'
*" TABLES
*" T_PERNR STRUCTURE HRWPC_S_PERSONNELNUMBER
*" T_TASKTYPE STRUCTURE HRWPC_S_SUBTYPE OPTIONAL
*" T_MESSAGE_LOG STRUCTURE HRWPC_S_MESSAGE_LOG OPTIONAL
*" T_MONITORINGTASK STRUCTURE HRWPC_S_MONITORINGTASK
*" EXCEPTIONS
*" NOTHING_FOUND
*" NO_AUTHORIZATION
*" INTERNAL_ERROR
*"----
</b>
Here my context in custom controller
-GetOJT(model node)
--OutputOJT(model node)
---T_Monitoringtask(model node)
--T_Pernr(model node)
--T_Tasktype(model node)
-Begda
-Endda
-Get_Monitoringtask_Texts
-Get_Unlocked_Recs_Only
-Log_Messages
-Refresh_Log
Here my code
public void executeHrwpc_Rfc_Montask_Getlist( )
{
//@@begin executeHrwpc_Rfc_Montask_Getlist()
GetActivePeriod model = (GetActivePeriod)WDModelFactory.getModelInstance(GetActivePeriod.class);
// Get OJT
Hrwpc_Rfc_Montask_Getlist_Input montaskInput = new Hrwpc_Rfc_Montask_Getlist_Input();
wdContext.nodeGetOJT().bind(montaskInput);
// Set pernr
Hrwpc_S_Personnelnumber.Hrwpc_S_Personnelnumber_List listPernrElement = new Hrwpc_S_Personnelnumber.Hrwpc_S_Personnelnumber_List();
Hrwpc_S_Personnelnumber pernrElement = new Hrwpc_S_Personnelnumber();
pernrElement.setPernr(wdContext.currentContextElement().getEmployeeNumber());
listPernrElement.addHrwpc_S_Personnelnumber(pernrElement);
montaskInput.setT_Pernr(listPernrElement);
// Set Subtype
Hrwpc_S_Subtype.Hrwpc_S_Subtype_List listSubtypeElement = new Hrwpc_S_Subtype.Hrwpc_S_Subtype_List();
Hrwpc_S_Subtype subtypeElement = new Hrwpc_S_Subtype();
subtypeElement.setSubty("Z1");
listSubtypeElement.addHrwpc_S_Subtype(subtypeElement);
montaskInput.setT_Tasktype(listSubtypeElement);
Calendar cal = Calendar.getInstance();
Calendar cal2 = Calendar.getInstance();
cal.set(Calendar.YEAR,2000);
cal.set(Calendar.MONTH,Calendar.JANUARY);
cal.set(Calendar.DATE,1);
cal.set(Calendar.HOUR_OF_DAY,0);
cal.set(Calendar.MINUTE,0);
cal.set(Calendar.SECOND,0);
cal.set(Calendar.MILLISECOND,0);
cal2.set(Calendar.YEAR,9999);
cal2.set(Calendar.MONTH,Calendar.DECEMBER);
cal2.set(Calendar.DATE,31);
cal2.set(Calendar.HOUR_OF_DAY,0);
cal2.set(Calendar.MINUTE,0);
cal2.set(Calendar.SECOND,0);
cal2.set(Calendar.MILLISECOND,0);
wdContext.currentGetOJTElement().setBegda(new Date(cal.getTime().getTime()));
wdContext.currentGetOJTElement().setEndda(new Date(cal2.getTime().getTime()));
wdContext.currentGetOJTElement().setGet_Monitoringtask_Texts(true);
wdContext.currentGetOJTElement().setGet_Unlocked_Recs_Only(true);
wdContext.currentGetOJTElement().setLog_Messages(true);
wdContext.currentGetOJTElement().setRefresh_Log(true);
try
{
wdContext.currentGetOJTElement().modelObject().execute();
}
catch(WDDynamicRFCExecuteException e)
{
logger.traceThrowableT( Severity.ERROR, "executeHrwpc_Rfc_Montask_Getlist( )", "ERROR", e );
model.disconnectIfAlive();
throw new FeedbackException( e );
}
catch(WDRuntimeException e1)
{
logger.traceThrowableT( Severity.ERROR, "executeHrwpc_Rfc_Montask_Getlist( )", "ERROR", e1 );
model.disconnectIfAlive();
throw new FeedbackException( e1 );
}
wdContext.nodeT_Monitoringtask().invalidate();
wdContext.nodeOutputOJT().invalidate();
model.disconnectIfAlive();
//@@end
}
I suspect that this problem because of parameter type date. Anyone can help my problem ? Thank you
Regards,
Satria
Hi everyone, i have solved this problem. It is because of authorization in ESS. You must check it with su53. I know this when I try run the function module using another user (user R3 that login into ESS), before i try this function module with user that have full access or authorization. I learn too that this authorization problem can give wrong information for your Output Information (ex : In my case, I display table in webdynpro and when I compare with result table that I execute in se37, I find some column have different value). So be careful with authorization.
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.