on 02-25-2014 12:37 PM
Hi,
I have to display ALV data in 2nd view based on the values in select-options( of KUNNR ) from 1st view.
1.) I have created & instantiated both the components in their respective views. ( 1st view wdr_select_options and 2nd view salv_wd_table ).
2.) Mapped the context node in both the views and created buttons and plugs for outbound n inbound ( n vice versa ).
3.) External mapping is done for alv.
My problem, when tested data is not displaying in ALV (2nd view ).
My query is, is it correct to write the select query in the 1st views ( along with the bind table logic or should I add the bind table logic in 2nd view for displaying data ).
Regards,
Krishna.
Hi Krishna,
Approach what you have followed is right,
can you debugg and check whether you are getting data for the given KUNNR.
If yes, set the data to the node.
Note: Logic can be either written in view1 or view2.
If you need to write logic in view2, then pass the data of select options throught outbound plug and write the logic in the method of INBOUND plug.
Thanks & Regards,
Sankar Gelivi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krishna,
Yes, your approach is correct.
Let us say you have view1 with select options and "submit" button , view2 with alv
On click action of button "submit",
you can get data required based on the value given in select options and bind it to the context node of alv table.
After that, you fire the outbound plug, to navigate to view 2.
It should work.
Make sure that you have mapped context nodes properly.
here, are the two possibilities:
- Are you getting blank alv with all columns & no data?
Then the data is not bound to context node properly i.e. you context node should be mapped on to the context node "DATA" of ALV component's interface controller context
- Are getting just empty screen instead of alv table & columns ?
Then, you have not embedded the alv view table into the view container element of your view2
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rama,
My current req is similar to the previous req if u remember ( displaying alv with select-options n radio buttons ).
Here in the component usage interface controller, the external mapping is already done.
( what I did is I copied the previous component into a new one and removed my ALV from 1st view and placed it in 2nd view and embedded in window )
PS:- As u said, it's the first possibilities but the binding is already done.
Hi Krishna,
View embedding of alv component into your view container ui element looks fine.
I suspect, the data is not set to the context of your view2.
I suggest you to try the below point
Regards,
Rama
This is how my code is in "handlefrom_input_view" event handler :-
DATA: NODE_YCUST TYPE REF TO IF_WD_CONTEXT_NODE.
DATA: IT_YCUST TYPE STANDARD TABLE OF IF_OUTPUT_VIEW=>ELEMENT_YCUST,
WA_YCUST LIKE LINE OF IT_YCUST.
NODE_YCUST = WD_CONTEXT->GET_CHILD_NODE( NAME = 'YCUST').
NODE_YCUST->GET_STATIC_ATTRIBUTES_TABLE(
IMPORTING
TABLE = IT_YCUST ).
*Process data
LOOP AT IT_YCUST INTO WA_YCUST.
....
....
ENDLOOP.
* Update context: bind updated data to the table context
NODE_YCUST->BIND_TABLE( IT_YCUST ).
Well, i figured out using debugging and correcting some parts of code.
PS:-This is certainly to come in handy at some point. I have post it bcoz somebody may need it.
Regards,
Krishna.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.