cancel
Showing results for 
Search instead for 
Did you mean: 

Returning row number

Former Member
0 Kudos

Hi Gurus,

I have a scenario where I have to return row number to display smartform. The table is coming from R/3 side and I have to return the row number which will be selected by the user and on that input smartform will displayed. I have tried on leadselect but I am not able to get it.

Thank & Regards

Shilpi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Gurus,

Please provide me solution.

Thanks & Regards

Shilpi

govardan_raj
Contributor
0 Kudos

hi shilpi mahajan ,

itseem you are using nwds 7.3 and here lead selection will alway point to first row, so use Parameter mapping ,

see the below link

http://help.sap.com/saphelp_nw70/helpdata/en/2f/55f35ceb9ca9458598ba61a4ca2fbb/content.htm

wdDoModifyView(...)

{

  if (firstTime)

  {

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

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

  }

}

paste above code in the view which has your table and then im assuming you are having a link to action in the table and on click of that you are getting smart form , so in that action you have to create an input parameter of type that tablenode Element as shown below...

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

{

  /* do whatever with row element */

}

hope this solves your problem.

Regards

Govardan Raj

govardan_raj
Contributor
0 Kudos

use the above code and understand have any doubts do reply ill sort out your issue , lead selection of table always points to first row of  a table in nwds7.31 and higer versions,

Former Member
0 Kudos

Hi Govardan,

I am using 7.01.00 version. Will it work on that version also? Is it possible to use LinktoAction on table??

Thanks & Regards

Shilpi

Former Member
0 Kudos

Hi u,

it is same as salary statement facility in ESS, the scenario is i have table displaying contents plus a column with sequence number, on the click the RFC should return sequence number and a smartform will be displayed.

the problem that i am facing is, when I am keeping my onleadselection property of the table blank it is selectable and when i am putting an event it just selects the first row and other rows are not selectable.

Please Help!

Thanks & Regards

Shilpi

former_member197472
Active Participant
0 Kudos

Chang selectionMode to 'Auto'

You must have set it to 'none'

Also get selected row number by index of current element.

For this you will need to create an action/event onLeadSelect

Regards

Amey

Former Member
0 Kudos

Hi Amey,

The value is already set to 'Auto', I have created an action onLeadSelect, But when I left it blank, my table is selectable otherwise the selection is fixed to first row. I am not able to select other row.

Thanks & Regards

Shilpi

former_member197472
Active Participant
0 Kudos

Hi Shilpi,

Why to keep it blank ? Just keep that action as it is. if you want Don't write code in it.

You have to create this action so as to use selection of Table.

Also make sure that property rowSelectable= true;

<<if possible can you attach screenshots of table and properties of it ?>>

Regards,

Amey

Former Member
0 Kudos

Hi Amey,

I cant keep it blank, I kept it blank to just test it. Below is the screen shot of my table.

It is not allowing me to select second row.

Thanks & Regards

Shilpi

former_member197472
Active Participant
0 Kudos

What is selection cardinality of node assigned to the table ?

It seems properties are appropriate. Issue should not occur.

I have also done same in 7.3. But I am not facing such issue.

Instead of binding 'output node residing in input node', can you try for separate output node? 

Else

Can you try to delete and recreate table using apply template ?

--

Regards,

Amey

junwu
Active Contributor
0 Kudos

don't know what u are talking....