Skip to Content

Subscribing to EPCF event in a java Web dynpro from MDM resultset iview

Hi

I am trying to Export the data from Result Set Iview to Excel using a Java Web dynpro application.

I am passing an MDM search parameter but when I am trying to get the value ,its coming as null...

This is what I am doing

public void wdDoInit()

{

//@@begin wdDoInit()

wdThis.readSystemDtls();

namespace = "urn:com.sap.tc.webdynpro.exporttocsv";

eventname= "Export";

WDPortalEventing.subscribe(namespace,eventname,wdThis.wdGetExportAction());

//@@end

}

public void onActionExport(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String value )

{

//@@begin onActionExport(ServerEvent)

wdComponentAPI.getMessageManager().reportSuccess("data"+value);

int marked=value.indexOf("=");

String srcValue=value.substring(marked+1);\wdContext.currentContextElement().setCatchedValue(srcValue);

String targetValue=wdContext.currentContextElement().getCatchedValue();

Search search = Search.deserialize(targetValue);

.....

Please help...

Regards

Priya

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Mar 30, 2009 at 06:11 AM

    Hi,

    There might be some error in your cde which is used for fetching the search result from MDM.

    please check the connection or user session should not be null.

    Can you please post the code so that it can be analyzed.

    Regards

    Narendra

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Narendra/Sidharth,

      I have been referring the same blog below of Vinay for developing the WDJ application:

      Importing Records from MDM BP ResultSet iView to Excel:--https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/504814b6-da5f-2b10-0dbd-e5ee597c74a5

      I have created an event in the ResultSet iview with the details below :

      Event Name = "Export"

      nameSpace = "urn:com.sap.tc.webdynpro.exporttocsv"

      Parameter is of type [MDM Search] and the value is "value"

      And in the Web Dynpro app,following is the code

      public void wdDoInit()

      {

      //@@begin wdDoInit()

      String nameSpace = "urn:com.sap.tc.webdynpro.exporttocsv";

      String event = "Export";

      WDPortalEventing.subscribe(nameSpace,event,wdThis.wdGetExportAction());

      //@@end

      }

      In the Event handler below,Currently I have removed the rest of code to fetch result from MDM ,I am just trying to access the Search object (i.e string value) and I am getting the value as null.

      Can you please tell me what is going wrong....

      public void onActionExport(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String value )

      {

      //@@begin onActionExport(ServerEvent)

      wdComponentAPI.getMessageManager().reportSuccess("The search object:"+value);

      //@@end

      }

  • avatar image
    Former Member
    Mar 30, 2009 at 11:23 AM

    Hi,

    Verify your procedure with the below PDF:

    Importing Records from MDM BP ResultSet iView to Excel:--https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/504814b6-da5f-2b10-0dbd-e5ee597c74a5

    once you get the required values you can use the following procedure for Excel export

    https://www.sdn.sap.com/irj/scn/wiki?path=/x/0mq

    Siddharth

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 30, 2009 at 12:54 PM

    Hi Bishnu,

    make sure that you have specified exactly the same name for Eventname and name space in WD.

    Also verify:

    if you have clicked on the UploadtoExcel button on the Standard ResultSet iView and then to SaveExcel link in the customized application to complete the task.

    Check the following PDF on EP-MDM EPCF :

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/12195312-0e01-0010-a392-debbd32e39d4

    Siddharth

    Add comment
    10|10000 characters needed characters exceeded

    • Hi ,

      I am doing everything as per the document,the namespace and event name are all correct ,still getting null value when trying to subscibe that event inthe Dynpro application..

      Please help

  • avatar image
    Former Member
    May 19, 2009 at 03:00 PM

    Hi Bishnu,

    i had the same issue. Try to change the parameter name of your event handler to extact "dataObject", seems the mechanism uses hard-coded name. This solved my problem.

    Hope it helps.

    Best regards,

    Ge

    Add comment
    10|10000 characters needed characters exceeded