Quantcast
Channel: SCN : All Content - Web Dynpro Java
Viewing all articles
Browse latest Browse all 1288

RFC call in a Webdynpro Java help?

$
0
0

Hi all,

 

I need used in my webdynpro Java a FM that I created in R3. Exactly I need load in a combo box  the results of my function module.

 

I do it this but not works correctly. I think thats my code is not correctly..Anybody can help me?

 

 

public void inicializarPrimerAprobadorTarea( )  {
    //@@begin inicializarPrimerAprobadorTarea()
   //Creamos variable para transformar el login en nombre
   String nombre;
   IModifiableSimpleValueSet valueSet = wdContext.nodeCONTAINER().getNodeInfo().getAttribute("AGENT_APPROVAL").getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();

    // Obtenemos la primera tarea asociada al los aprobadores
    PP4Model2 pp4model2 = new PP4Model2();
    Z_Hsp_Wf_Gbs_Apro_Pva_Input rfcPrimerAprob = new Z_Hsp_Wf_Gbs_Apro_Pva_Input(pp4model2);
  
    //wdContext.nodeZ_Hsp_Wf_Gbs_Apro_Pva_Output().bind(rfcPrimerAprob);
    try {
rfcPrimerAprob.execute();
  wdContext.nodeOutput_1().invalidate();

  if(rfcPrimerAprob.getOutput().getEx_Subrc()!= 0){
   msgmgr.reportException(rfcPrimerAprob.getOutput().getEx_Mensaje());
  }else{ 
   for( int i=0;i<wdContext.nodeLt_Tabla_Pva().size();i++){
    //Transformamos el login en nombre
    nombre = getNombreUsuario(wdContext.nodeLt_Tabla_Pva().getLt_Tabla_PvaElementAt(i).getApprover_Id());
    //Imprimimos mensajes para ver si está correcto.
    msgmgr.reportSuccess(nombre);
    //Metemos el valor en la variable del container.
    valueSet.put(wdContext.nodeLt_Tabla_Pva().getLt_Tabla_PvaElementAt(i).getApprover_Id(),wdContext.nodeLt_Tabla_Pva().getLt_Tabla_PvaElementAt(i).getApprover_Id());  }
  }
 
}catch (Exception e) {
   msgmgr.reportException("Error. "+e.getMessage());          
}
    //@@end
  }

 

Any body knows the main steps from call correctly to my FM?

 

Regards,

 

C. Castillo


Viewing all articles
Browse latest Browse all 1288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>