‎2008 Aug 11 3:13 PM
hi everybody
I have created an OOP ALV but I dont know how to attach it to a screen, i know its tcode se51, but i dnt know how to link it to the ALV
can anybody help me?
‎2008 Aug 11 3:25 PM
Create a Dynpro using SE51, in the dynpro (layout) create a "Custom Control".
In your Abap (or in PBO) create a container object ([cl_gui_custom_container|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=cl_gui_custom_container&adv=false&sortby=cm_rnd_rankvalue]) with container_name equal to the name of your Custom control then create an alv grid object ([cl_gui_alv_grid|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=cl_gui_alv_grid&adv=false&sortby=cm_rnd_rankvalue]), then use the method set_table_for_first_display on your alv grid object.
Look at
- [ALV Grid Control (BC-SRV-ALE)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf]
- [SAP Container|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIDOCK/BCCIDOCK.pdf]
Also don't hesitate to use the SAP demos program, look at transactions
- DEMO_SCREEN_FLOW Demonstration for Screen Sequences
- DEMO_TRANSACTION Demonstration Transaction
- DWDM Development Workbench Demos
- SE83 Reuse Library
Regards
‎2008 Aug 11 3:19 PM
Hello,
I think first you have to check some standard sap program :
BCALV_EDIT_01 Switch on and off the ready-for-input status of the entire grid
BCALV_EDIT_02 Define ready-for-input status at cell level
BCALV_EDIT_03 Verification of modified cells
BCALV_EDIT_04 Delete and append rows
BCALV_EDIT_05 Checkboxes
BCALV_EDIT_06 Dropdown Listbox at Column Level
BCALV_EDIT_07 Dropdown Listbox at Cell Level
BCALV_EDIT_08 Integrate Non-Standard F4 Help
there simple process like you have to add a container on a screen
and in report program
create an instance
data g_container TYPE scrfname VALUE 'ZGW_CONTAINER',
grid1 TYPE REF TO cl_gui_alv_grid.
where zgw_container is conatiner name which is asing to screen
then call the method set_table_for_first_display of class cl_gui_alv_grid .
pass the require parameter to that method.
CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
* I_BUFFER_ACTIVE =
* I_BYPASSING_BUFFER =
* I_CONSISTENCY_CHECK =
* I_STRUCTURE_NAME = 'ZGW3RE007'
IS_VARIANT = GS_VARIANT
I_SAVE = 'A'
* I_DEFAULT = 'X'
IS_LAYOUT = GS_LAYOUT
* IS_PRINT =
* IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING = lt_exclude
* IT_HYPERLINK =
* IT_ALV_GRAPHICS =
* IT_EXCEPT_QINFO =
* IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = GT_OUTTAB[]
IT_FIELDCATALOG = WA1_FIELDCATALOG
* IT_SORT =
* IT_FILTER =
* EXCEPTIONS
* INVALID_PARAMETER_COMBINATION = 1
* PROGRAM_ERROR = 2
* TOO_MANY_LINES = 3
* others = 4
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
or read this pdf document.
http://www.sap-partner.hu/ABAP_HELP_INFO/An%20Easy%20Reference%20for%20ALV%20Grid%20Control.pdf
Thanks
Anirudh Saini
‎2008 Aug 11 3:25 PM
Create a Dynpro using SE51, in the dynpro (layout) create a "Custom Control".
In your Abap (or in PBO) create a container object ([cl_gui_custom_container|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=cl_gui_custom_container&adv=false&sortby=cm_rnd_rankvalue]) with container_name equal to the name of your Custom control then create an alv grid object ([cl_gui_alv_grid|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=cl_gui_alv_grid&adv=false&sortby=cm_rnd_rankvalue]), then use the method set_table_for_first_display on your alv grid object.
Look at
- [ALV Grid Control (BC-SRV-ALE)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf]
- [SAP Container|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIDOCK/BCCIDOCK.pdf]
Also don't hesitate to use the SAP demos program, look at transactions
- DEMO_SCREEN_FLOW Demonstration for Screen Sequences
- DEMO_TRANSACTION Demonstration Transaction
- DWDM Development Workbench Demos
- SE83 Reuse Library
Regards
‎2008 Aug 11 4:02 PM
Hi Sia,
I think there is a new ABAP ALV Class .. which doesn't require a screen to be created for display.. check the package.
SALV_OBJECTS.
With Regards,
Ranganathan.
‎2008 Aug 11 4:07 PM
That's right, there is. The ALV Object model was introduced in NetWeaver 2004, which is an encapsulation of the existing ALV tools, the REUSE functions, and the CL_GUI_ALV_GRID class. The new Object model is OO based, and still allows to you show your grid in either full screen mode, which does not require you to create a screen, and it also provides container support, which allows to you embed the ALV control into your screens. Here is a document to get your started, and there are example programs which start withe SALV*
Regards,
Rich Heilman
‎2008 Aug 12 4:28 AM
Hello
Please note that if you want to display your ALV list (CL_GUI_ALV_GRID) in fullscreen mode it is not required to have a custom container on the screen. Instead I usually use a docking container as parent for the grid control and simply LINK the docking container to the screen (see sample report ZUS_SDN_TWO_ALV_GRIDS in ).
Advantage of such a solution: you can easily re-link your docking container (including the control) to another screen if required.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements
CALL SCREEN '0100'.
* Flow logic of dynpro (does not contain any dynpro elements):
*
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
**
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
Regards
Uwe