Skip to Content
avatar image
Former Member

passing table parameter from dynpro for java to sap r/3

I am sending table parameter from WebDynpro to sap r/3,but the table is not populating.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 27, 2007 at 08:28 AM

    can you post the exact code?

    kk

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      Write the below code:

      Zwsacs_Sod_Alert1_Input input = new Zwsacs_Sod_Alert1_Input();
      wdContext.nodeZwsacs_Sod_Alert1_Input.bind(input);
      
      // passing params to the table, considering table name as ZTable.
      ZTable tableInput;
      //if there is only one record to be inserted in the table then no need of for loop.
      for(int i=0; i<3; i++)
      {
       tableInput = new ZTable();
       tableInput.setId(sod_alert.getId());
       tableInput.setSend_Mail(sod_alert.getSend_Mail());
       tableInput.setInd(sod_alert.getInd());
      
      //add the table input to function module input
      input.addZTable(tableInput);
      }
      wdContext.currentZwsacs_Sod_Alert1_InputElement().modelObject().execute();
      wdContext.nodeOutput().invalidate();
      
      

      Refer to this thread for passing parameters to R/3 function module from Webdynpro

      need-infn-about-models-in-webdynpro

      Regards

      Srikanth

  • avatar image
    Former Member
    Jul 27, 2007 at 11:10 AM

    thanx,

    it's working.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 09, 2013 at 04:42 PM

    Hi,

    In 7.3:

    // models

                RFCModel1 modeloGral = new RFCModel1();

                Zfmfi_Certificado_Ret_Pdf_Input modeloRfc =                          wdContext.currentZfmfi_Certificado_Ret_Pdf_InputElement().modelObject();

               

                // clean

                if(modeloRfc.getIt_Tipo_Ret_Pobl()!=null && modeloRfc.getIt_Tipo_Ret_Pobl().size()>0){

                               modeloRfc.getIt_Tipo_Ret_Pobl().removeAll(modeloRfc.getIt_Tipo_Ret_Pobl());

                }

               

                //fill

                IEt_RetencionesElement retElem;

               

                int cant = wdContext.nodeEt_Retenciones().size();

                for(int i=0; i<cant; i++){

                   retElem = wdContext.nodeEt_Retenciones().getEt_RetencionesElementAt(i);

                   Zfie_Tipo_Retencion_Poblacion retencion = new                                                                            Zfie_Tipo_Retencion_Poblacion(modeloGral);

                                    retencion.setTipo_Ret(retElem.getTipo_Ret());

                                    modeloRfc.addIt_Tipo_Ret_Pobl(retencion);

                }

    Add comment
    10|10000 characters needed characters exceeded