Beruflich Dokumente
Kultur Dokumente
LetsWebDynpro.PartVSAPYard
SAP YARD
TUTORIALS
CODE SNIPPETS
HELP FORUM
SAP QUIZ
18
Shares
SALV_WD_TABLE
Enteremail
Subscribe
WDR_OVS
WDR_SELECT_OPTIONS
SEARCH
Subscribe!
Follow@sapyard
http://www.sapyard.com/letswebdynpropartv/
1/16
10/30/2016
LetsWebDynpro.PartVSAPYard
In Part IV, we learnt how to make the elements visible as we need them and
also learnt how to make the mandatory elds throw error message. Till now
we dealt with the simple table output. In this part, we would see how we can
display the same tabular output in ALV. For ALV display in Web Dnypro
ABAP, we need to do Component Usage.
[adToAppearHere]
18
Shares
SAPYard
656likes
Liked
Youand2otherfriendslikethis
Subscribe!
Abapinho
7MostPopular&FeaturedArticles
2/16
10/30/2016
LetsWebDynpro.PartVSAPYard
Fiori App - An
Introduction from an
ABAPer
SAP HANA at Ground
18
Zero
Shares
Drag these nodes in the main View and now they are available in the view
(just like we pass variables as parameters in the Subroutine/Performs to
make those variable available in the subroutines).
NetworkedBlogs
Blog:
SAPYard
Topics:
Abap,Sap,Hana
Followourblog
Hope, by now you know how to create button and link it to an actions
(screen shot below in case you forgot).
http://www.sapyard.com/letswebdynpropartv/
3/16
10/30/2016
LetsWebDynpro.PartVSAPYard
18
Shares
NOVEMBER 3, 2014
For displaying the ALV output, we can use View Container UI Element
( gure above). The View Container UI Element need NOT be bound to any
http://www.sapyard.com/letswebdynpropartv/
4/16
10/30/2016
LetsWebDynpro.PartVSAPYard
18
Shares
Subscribe!
http://www.sapyard.com/letswebdynpropartv/
5/16
10/30/2016
LetsWebDynpro.PartVSAPYard
18
Shares
Subscribe!
* Code Snippet
http://www.sapyard.com/letswebdynpropartv/
6/16
10/30/2016
LetsWebDynpro.PartVSAPYard
METHOD onactionexecute .
* Read data entered in screen
DATA lo_nd_cn_sel_screen TYPE REF TO if_wd_context_node.
DATA lo_el_cn_sel_screen TYPE REF TO if_wd_context_element.
DATA ls_cn_sel_screen TYPE wd_this->element_cn_sel_screen.
DATA lo_nd_cn_result TYPE REF TO if_wd_context_node.
DATA lt_cn_result TYPE wd_this->elements_cn_result.
18
Shares
Subscribe!
7/16
10/30/2016
LetsWebDynpro.PartVSAPYard
ENDMETHOD.
The View Container UI Element is still not bound to any context. So the nal
step is to link a context to the nal output. For this we would leverage the
already existing standard WD Component, SALV_WD_TABLE.
Create a component usage. In this example the name is CU_DETAIL of WD
Component SALV_WD_TABLE. Naming convention CU_ for Component
Usage. Please note in the left side panel new Component Usages attributes
(CU_DETAIL) get created. Save/Activate the changes done till now.
http://www.sapyard.com/letswebdynpropartv/
Subscribe!
8/16
10/30/2016
LetsWebDynpro.PartVSAPYard
18
Shares
Go to the Window W_MAIN. On the right side, right click on the W_MAIN
window and select EMBED View. Choose the view V_MAIN. View V_MAIN
along with the View Container UI element is embedded in the Window. Now
right click on the View Container VC_RESULT and chose EMBED View select
Component Usage View TABLE. Your window is linked to standard
component SALV_WD_TABLEs TABLE view.
http://www.sapyard.com/letswebdynpropartv/
Subscribe!
9/16
10/30/2016
LetsWebDynpro.PartVSAPYard
18
Shares
Subscribe!
http://www.sapyard.com/letswebdynpropartv/
10/16
10/30/2016
LetsWebDynpro.PartVSAPYard
18
Shares
Now we need to bind the output data to the context of the SALV_WD_TABLE.
The context we would be binding to is DATA. Click on the
INTERFACECONTROLLER of the Component Usage CU_DETAIL. Check the
icon under DATA in context has single arrow underlined. Now we need to
let the SALV_WD_TABLE know, what data would be bound to the DATA
context. In our example, CN_RESULT context has the nal data, so, we drag
CN_RESULT from right to the DATA context on the left.
http://www.sapyard.com/letswebdynpropartv/
Subscribe!
11/16
10/30/2016
LetsWebDynpro.PartVSAPYard
18
Shares
Check, the arrow is two way now and also you should get the message
External mapping for context element DATA was de ned.
Subscribe!
http://www.sapyard.com/letswebdynpropartv/
12/16
10/30/2016
LetsWebDynpro.PartVSAPYard
This is one of the simplest way to show ALV. In real project scenarios, you rarely
use one ALV output. In the next parts, we would explore multiple ALVs and also
different features of the ALV list; like onclick of a row/ eld, make the ALV
display/input only, activate/deactive standard features of ALV, put custom
buttons programatically etc.
Please let us know, if you face any issue in any of the steps. We would be glad to
elaborate them.
18
Shares
If you want to get practical issues and resolutions straight to your inbox, please
SUBSCRIBE. We respect your privacy and take protecting it seriously.
If you liked this post, please hit the share button at the left side of your screen.
Thank you very much for your time!!
Our series on Web Dynrpo ABAP
Subscribe!
13/16
10/30/2016
LetsWebDynpro.PartVSAPYard
9. Is data element WDY_BOOLEAN and Flag (Char1) same for Web Dynpro
ALV?: Trick to create checkbox in ALV
10. Taking one step back after EhP7.4, does it make sense for Web Dynpro
UI?: Getting back the old look and feel after EhP740 upgrade
11. Can we avoid Table Type declaration for Attributes section in Web
Dynpro?
18
Shares
Subscribe!
http://www.sapyard.com/letswebdynpropartv/
14/16
10/30/2016
LetsWebDynpro.PartVSAPYard
18
Shares
Previous post
Next post
Subscribe!
http://www.sapyard.com/letswebdynpropartv/
15/16
10/30/2016
LetsWebDynpro.PartVSAPYard
18
Shares
Subscribe!
http://www.sapyard.com/letswebdynpropartv/
16/16