on 05-19-2006 9:20 AM
Hi,
I have a search screen which displays master data from a RFC web service after the user enters some search criteria.
After the master data is displayed,I need to get the detail data of the record(table row) selected by the user.
My question is :how to get the data that is currently selected in the table?If my master table contains columns col1,col2,col3,how to get the corresponding values of these fields so that they can be passed to another RFC to get the details data.
thanx in advance,
Bhupesh
Hi Bhupesh,
1. For the table that you are displaying the output, change the selection property of the table to none.
2. In the table insert a new column.
3. Right click the new column and select the insert table celleditor and choose check box.
4. Assign a value attribute of type boolean to the column that was added.
For getting the data of the seected row. Give the following code in the implementation.
if(wdContext.<node ele>().get<checkbox att>())
{
wdContext.<node ele>().get<att name that u want>()
}
By the above code structure u can select the row element that u want.
For getting the master table corresponding elements u can just execute the rfc and get the particular element as given for row selection.
Hope it helps,
Regards,
Nagarajan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can't figure out where to pass the values to the RFC fetching the details record.Any help would be welcome.
The situation is like this:
a)I have a search screen which has input boxes(bound to the input parameters of the RFC(say RFC1).
b)When the user presses the 'search button',RFC1 fetches master data and diaplays it in a table.
So far it is working fine.
Now depending on the row selected,I need to call(RFC2) to get the detail data.RFC has import params.
The problem is:
While I can get the data out of the current selected row of the table,where do i write the stuff to pass these vales to the RFC2?Unlike the search screen,I cannot bind the table rows to the model represeting RFC2.
Please help.
thanx,
Bhupesh
Hi bupesh,
Get the values of the populated table by the on action lead select and follow the steps below.
Steps:
1. First create an instance for bapi and bind the instance to the bapi node.
Z<bapi name> zb=new Z<bapi name>();
wdContext.nodeZ<bapi name>. bind(zb);
2. Then if u have the import parameter u have to set them by using
The instance of the above bapi.
Zb.set<import parameters>;
3. If the bapi has a import table parameters then the structure for the table parameters will also be imported
In the model class.
4. Set the table parameters by creating the instance for that structure and using this instance set it.
Z<Struct>itm tab=new Z<Struct>();
Tab.set<table parameters>
5. Then add the structure instance to the bapi instance.
Zb.add(Tab);
6. Then Execute the bapi after setting the import parameters.
7. If there is any export parameters, then get the values after execution.
Regards,
Vijay
I managed to do it like this:
In the event handler for the event onLeadSelect,I call the executeRFC2 method of the controller.Before that I pass the values to the RFC2 by using these lines:
String str = wdContext.current<Node>Element().getXXX();
wdThis.wdGet<MyComponent>Controller().wdGetContext().current<Node>Element().setXXXX(str);
wdThis.wdGet<MyComponent>Controller().executeRFC2().
Not sure if this is the currect way.It works alright though.Let me know if there is any alternative way.
Thanx for your answers.
Bhupesh
Hi,
write the code in ur onAction LeadSelect of ur table,
wdContext.current<Nodename>Element.get<ColumnAttribute>();
Regards,
Vijayakhanna Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.