on 04-27-2006 10:38 AM
Hello,
maybe this is a general issue of understanding, but even I've studied the online help and the tutorials excessive, I did not get the point in above mentioned problem.
I have a table named TAB_SFLIGHTS, that is connected to the context DATA_SFLIGHTS. For the table I have implemented a method for the event ON_LEAD_SELECT:
method ONACTIONFILL_DETAIL_VIEW .
data: NODE type ref to IF_WD_CONTEXT_NODE,
wa_flights type sflights,
FLIGHTS type table of sflights,
NODE = WD_CONTEXT->GET_CHILD_NODE( 'DETAIL_SFLIGHTS' ).
select single * from SFLIGHTS into wa_FLIGHTS.
append wa_flights to flights.
NODE->BIND_ELEMENTS( FLIGHTS ).
endmethod.
At the moment it will show any entry from SFLIGHT in the Flight detail screen, but it should show the entry that was marked in the table.
How can I access the column values of the marked table column in this example?
Thank you in advance.
Hi Andreas,
To get node element which is "marked" in table you need method GET_LEAD_SELECTION (http://help.sap.com/saphelp_nw04s/helpdata/en/fd/be5b4150b38147e10000000a1550b0/frameset.htm).
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After a few more tries I made the application run. The code might be cumbersomely, but at least it works. Any suggestions are welcome.
method ONACTIONFILL_DETAIL_VIEW .
data: NODE_DETAILS type ref to IF_WD_CONTEXT_NODE,
NODE_TABLE type ref to IF_WD_CONTEXT_NODE,
NODE_TABLE_ROW type ref to IF_WD_CONTEXT_ELEMENT,
WA_FLIGHTS type SFLIGHTS,
IT_FLIGHTS type table of SFLIGHTS,
WA_FLIGHTLIST type IF_SHOW_FLIGHTS=>ELEMENT_DETAIL_SFLIGHTS.
* Ermitteln von LEAD_SELECTION in Tabelle DATA_SFLIGHTS
NODE_TABLE = WD_CONTEXT->GET_CHILD_NODE( 'DATA_SFLIGHTS' ).
NODE_TABLE_ROW = NODE_TABLE->GET_LEAD_SELECTION( ).
* Lesen Feldwerte aus Tabellenzeile
NODE_TABLE_ROW->GET_ATTRIBUTE( exporting NAME = 'CARRID' importing VALUE = WA_FLIGHTLIST-CARRID ).
NODE_TABLE_ROW->GET_ATTRIBUTE( exporting NAME = 'CONNID' importing VALUE = WA_FLIGHTLIST-CONNID ).
NODE_TABLE_ROW->GET_ATTRIBUTE( exporting NAME = 'FLDATE' importing VALUE = WA_FLIGHTLIST-FLDATE ).
* Detaildaten von DB lesen
select * from SFLIGHTS into table IT_FLIGHTS
where CARRID = WA_FLIGHTLIST-CARRID
and CONNID = WA_FLIGHTLIST-CONNID
and FLDATE = WA_FLIGHTLIST-FLDATE.
* Kontext von Detailansicht beschaffen und binden
NODE_DETAILS = WD_CONTEXT->GET_CHILD_NODE( 'DETAIL_SFLIGHTS' ).
NODE_DETAILS->BIND_ELEMENTS( IT_FLIGHTS ).
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for this hint, but as I mentioned above I already studied the online help and saw that information before. Thus I would be thankful for a concrete code example. Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.