Skip to Content
avatar image
Former Member

UI Element for display smartform

Hi All,

I have scenario where I am calling two rfc to display two different smartform. The requirement is that on the click of a link other smartform should be displayed. I have tried linktoaction but it is giving errors. please suggest me what to use and please provide me the code also.

Thanks

Shilpi

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 23, 2014 at 10:31 AM

    Hi all,

    thanks for your responses.

    please tell me the procedure for the link to action. Do i need to create and action or separate context element?

    what is the procedure for that? no document is helping me

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 22, 2014 at 09:25 AM

    Hi,

    Check this thread may be help for you.

    Regards,

    Durga.

    Add comment
    10|10000 characters needed characters exceeded

    • hi shilpi ,

      here you have done parameter mapping for the link to action , so here

      in the action which is binded to the link should have parameter

      public void onAction********(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.tc.webdynpro.progmodel.api.IWDNodeElement selectedElement )

      {

      }

      and in wd modify view method

      IWDLinkToAction link = (IWDLinkToAction) view.getElement("LinkToAction4");

      link.mappingOfOnAction().addSourceMapping("nodeElement","selectedElement");

      in your case the

      iwdlinktoAction link = (iwdlink...) z...view.getElement("Previous Year");

      here Previous Year is wrong , becuase no UI element names have space in between thier ids , so make sure that UI element linktoaction name might be Previous_Year or previousyear ...

      Regards

      Govardan

  • Sep 22, 2014 at 09:18 AM

    hi shilpi ,

    Please display the error so that we can know what issue you are facing.

    Regards

    Govardan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 22, 2014 at 10:23 AM

    Hi,

    Check this link.

    http://help.sap.com/saphelp_nw70/helpdata/en/60/1f1f056f057d4d962375efd3c92ed0/content.htm

    Check this code may be helping for you.

    wdDoModifyView(...)

    {

    if (firstTime)

    {

    IWDLinkToAction link = (IWDLinkToAction) view.getElement("LinkID");

    link.mappingOfOnAction().addSourceMapping("nodeElement", "currElement");

    }

    }

    void onActionLinkClicked(..., I<DataSourceNode>Element currElement)

    {

    /* do whatever with currelement */

    }

    Add comment
    10|10000 characters needed characters exceeded