Hierarchical ALV Report in webdynpro abap
Hi Experts,
I'm facing the trouble with requirement as below. Please help me to resolve this issue.
Output as:
Material Number Description Created Date
- 10001(Header data) abc 09-09-2013
1001 (item level data) abc 10-09-2013
1002 xyz 11-09-2013
1003 xyz 11-09-2013
- 10002(Header data) abc 09-09-2013
2001 (item level data) abc 10-09-2013
2002 xyz 11-09-2013
2003 xyz 11-09-2013
- 10003(Header data) abc 09-09-2013
3001 (item level data) abc 10-09-2013
3002 xyz 11-09-2013
3003 xyz 11-09-2013
.... and so on...
- when I expand on header Materail number, it has to be display with item level data with in alv report in webdynpro abap.
Looking forward your valuable comments.
Regards,
Venkat
Hi Venkat,
We can achieve the HIERARCHY through the following code.In this case I have used CARRID as the drill down column.
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_flight_tree( ).
if lo_cmp_usage->has_active_component( ) is initial.
lo_cmp_usage->create_component( ).
endif.
DATA lo_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
lo_INTERFACECONTROLLER = wd_this->wd_cpifc_flight_tree( ).
DATA lv_value TYPE ref to cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model(
lv_value->IF_SALV_WD_TABLE_SETTINGS~SET_DISPLAY_TYPE( IF_SALV_WD_C_TABLE_SETTINGS=>DISPLAY_TYPE_HIERARCHY ).
"Enable HIERARCHY structure
data lr_col type ref to CL_SALV_WD_COLUMN.
lr_col = lv_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'CARRID' )." Enable HIERARCHY for the col. specified
lr_col->IF_SALV_WD_COLUMN_HIERARCHY~SET_HIERARCHY_COLUMN( ABAP_TRUE ).
Regards,
Harsha
Similar Messages
-
Editing rows and columns in alv reports in webdynpro abap
how edit row and columns in webdynpro abap ?
can i add colors to salv repotrs for below and above range of values how ?
if possible send source code for it.............hi
check out this link for editing the columns of ALV
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b
check out for this thread as well for coloring ALV
Coloring of selected table cells: Ideas wanted
regards,
amit -
How can I change column name in ALV table in WebDynpro ABAP?
Hi Everyone,
I have created an ALV table in WebDynpro ABAP. I have created a context node and added the required attributes there - for the ALV display.
Now I want to change one columnn name of the ALV table.... Currently it is showing the description of the data element, which I don't want to show. I cannot create a new DE only for this purpose.
Please let me know how can I change the name of the column.
RegardsHi,
This may help you to define your own column text in the ALV Table of webdynpro.
see the below code.
Here 'STATUS_ICON' is the column of the the output display of the ALV Table of webdynpro.
"change the label of the report.
DATA: lr_weeknum TYPE REF TO cl_salv_wd_column.
CALL METHOD l_value->if_salv_wd_column_settings~get_column
EXPORTING
id = 'STATUS_ICON'
RECEIVING
value = lr_weeknum.
SET THE LABEL OF THE COLUMN
DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
CALL METHOD lr_weeknum->get_header
RECEIVING
value = hr_weeknum.
CALL METHOD lr_weeknum->set_resizable
EXPORTING
value = abap_false.
hr_weeknum->set_prop_ddic_binding_field(
property = if_salv_wd_c_ddic_binding=>bind_prop_text
value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
set the text of the column
CALL METHOD hr_weeknum->set_text
EXPORTING
value = 'C Form'.
regarads,
balu -
hi friendz,
can any one of u give an example, how to build alv report using oops abap ?
thanks in advance.
points for sure
regards,
VijayaHi Vijaya,
I hope the following code upto your requirement.
*& Report ZMAT_ALV_GRID *
REPORT ZCL_CLASS1.
TYPES: BEGIN OF T_MARA,
MATNR TYPE MARA-MATNR,
MAKTX TYPE MAKT-MAKTX,
WERKS TYPE MARD-WERKS,
LGORT TYPE MARD-LGORT,
LABST TYPE MARD-LABST,
END OF T_MARA.
*DATA: IT_MARA TYPE STANDARD TABLE OF T_MARA.
DATA: IT_MARA TYPE T_MARA OCCURS 0.
DATA: O_CONT TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
O_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: X_FLDCAT TYPE LVC_S_FCAT.
DATA: IT_FLDCAT TYPE LVC_T_FCAT.
DATA: I_LAYOUT TYPE LVC_S_LAYO.
DATA: X_SORT TYPE LVC_S_SORT.
DATA: I_SORT TYPE LVC_T_SORT.
TABLES: MARA.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
PARAMETERS: P_CHK AS CHECKBOX.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM GENERATE_FLDCAT.
PERFORM GENERATE_LAYOUT.
PERFORM DO_SORT.
SET SCREEN 100.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN'.
SET TITLEBAR 'xxx'.
PERFORM BUILD_ALV.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_ALV
text
FORM BUILD_ALV .
CREATE OBJECT O_CONT
EXPORTING
CONTAINER_NAME = 'MAT_CONTAINER'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6.
CREATE OBJECT O_GRID
EXPORTING
I_PARENT = O_CONT
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
others = 5.
CALL METHOD O_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = ' '
IS_LAYOUT = I_LAYOUT
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = IT_MARA
IT_FIELDCATALOG = IT_FLDCAT[]
IT_SORT = I_SORT
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4.
ENDFORM. " BUILD_ALV
*& Form GET_DATA
text
FORM GET_DATA .
SELECT A~MATNR
B~MAKTX
C~WERKS
C~LGORT
C~LABST
INTO TABLE IT_MARA
FROM MARA AS A
INNER JOIN MAKT AS B
ON BMATNR = AMATNR
INNER JOIN MARD AS C
ON CMATNR = AMATNR
WHERE A~MATNR IN S_MATNR
AND B~SPRAS = SY-LANGU.
ENDFORM. " GET_DATA
*& Form GENERATE_FLDCAT
text
FORM GENERATE_FLDCAT .
*CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
I_STRUCTURE_NAME = 'ZSMARA'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME = ' '
CHANGING
CT_FIELDCAT = IT_FLDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
X_FLDCAT-COL_POS = 1.
X_FLDCAT-FIELDNAME = 'MATNR'.
X_FLDCAT-OUTPUTLEN = '18'.
X_FLDCAT-REPTEXT = 'Material No'.
APPEND X_FLDCAT TO IT_FLDCAT.
X_FLDCAT-COL_POS = 2.
X_FLDCAT-FIELDNAME = 'MAKTX'.
X_FLDCAT-OUTPUTLEN = '48'.
X_FLDCAT-REPTEXT = 'Material Desc'.
X_FLDCAT-TOOLTIP = 'Material Desc'.
APPEND X_FLDCAT TO IT_FLDCAT.
X_FLDCAT-COL_POS = 3.
X_FLDCAT-FIELDNAME = 'WERKS'.
X_FLDCAT-OUTPUTLEN = '5'.
X_FLDCAT-REPTEXT = 'Plant'.
X_FLDCAT-TOOLTIP = 'Plant'.
APPEND X_FLDCAT TO IT_FLDCAT.
X_FLDCAT-COL_POS = 4.
X_FLDCAT-FIELDNAME = 'LGORT'.
X_FLDCAT-OUTPUTLEN = '5'.
X_FLDCAT-REPTEXT = 'S.Loc'.
X_FLDCAT-TOOLTIP = 'S.Loc'.
APPEND X_FLDCAT TO IT_FLDCAT.
X_FLDCAT-COL_POS = 5.
X_FLDCAT-FIELDNAME = 'LABST'.
X_FLDCAT-OUTPUTLEN = '20'.
X_FLDCAT-REPTEXT = 'Quantity'.
X_FLDCAT-TOOLTIP = 'Quantity'.
X_FLDCAT-DO_SUM = 'X'.
APPEND X_FLDCAT TO IT_FLDCAT.
ENDFORM. " GENERATE_FLDCAT
*& Form GENERATE_LAYOUT
text
FORM GENERATE_LAYOUT .
I_LAYOUT-ZEBRA = 'X'.
I_LAYOUT-FRONTEND = 'X'.
I_LAYOUT-GRID_TITLE = 'ALV GRID USING OOPS'.
I_LAYOUT-NUMC_TOTAL = 'X'.
ENDFORM. " GENERATE_LAYOUT
*& Form DO_SORT
text
FORM DO_SORT .
X_SORT-FIELDNAME = 'MATNR'.
X_SORT-UP = 'X'.
X_SORT-SUBTOT = 'X'.
IF P_CHK = 'X'.
X_SORT-EXPA = SPACE.
ELSE.
X_SORT-EXPA = 'X'.
ENDIF.
APPEND X_SORT TO I_SORT.
ENDFORM. " DO_SORT
inorder to execute this code perfectly, do the following things.
1. Create a Graphical Screen 100.
2. Place a Custom Control on that screen and give name as MAT_CONTAINER.
3. activate the screen.
and execute the program.
if this suits requirement award points.
satish -
Hi,
In my present project we have requirement for developing ALV tree output using ALV configuration model in WD4A. Please provide sample code or tutorial related to ALV Tree development in WebDynpro ABAP.
Best regards,
AlleiahThere is no hierarchy of nodes when building an ALV or Table Tree in WDA. You still provide a flat structure of a single node. What you do is specify certain columns to be hierarchy columns. The framework then builds a sorting/grouping around these columns and turns them into the "pesudo nodes" of the tree.
This can be done via configuration or via coding:
http://www.flickr.com/photos/tjung/2802287945/
For instanace, taking the same flat SFLIGHT structure I can just define certain columns and create two different hierarchies:
http://www.flickr.com/photos/tjung/2802287971/
http://www.flickr.com/photos/tjung/2802287989 -
How place an company logo in alv repots in webdynpro abap
in webdynpro how to place a image in alv reports at particular corner .
Hi,
Check out this link -
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/86/641b88c9034eebacb26ba7fbb17981/frameset.htm
Get the ALV header using the model(cl_salv_wd_config_table) object.
using this header object use the method to set the image SET_IMAGE_SOURCE.
Regards,
Lekha. -
Dear All
there is a report with an ALV Output. The requirement
is now to impelent this report as it is as
Abap WebDynrpo. Can give some hints what is easiest way
to convert it in a Abap WebDynrpo ?
Reagrds
sasHello Bindi,
You are saying :
If the report allows user input or actions then you'd have to reprogram them in WD as action handlers
Yes it does. Can you give me pls a little example how it works with
action handlers
Reagrds
sas -
How can we use business object (e.g. crystal report ) in webdynpro abap
Hi All,
We all know that business object has been part of sap products.
But even though in SAP, I really don't know much about business object.
and how can we use the great function of BO and integrate into our development to make
user have much better function and user experience.
Do we have some learning material of BO?
Could someone share some material here?
Thanks and Regards
Aaron.One of the main ways that you can integrate some Business Objects content with WDA is via FlashIslands. If you are on 7.01 or higher, you have the option to use FlashIslands UI element. There are many tutorials on FlashIslands available on SDN. FlashIslands work well with Xcelsius content, since the output of Xcelsius is a Flex component. It is pretty easy to set the Xcelsius interface to External Connection and then write a wrapper Flex Component around the generated output, so that it can be used in the FlashIslands interface.
For Crystal Reports integration you will need NetWeaver 7.02 (comming early next year). We have integrated Crystal Reports as an output option in the Web Dynpro ABAP ALV and the Classic Dynpro ALV. You don't need to do any development to enable this. You can use two different SAP delivered Crystal Reports templates for the ALV output, or create and add your own templates.
Some of ther BOBJ integration is still in prototype and demo phase within SAP. For instance we have a data interface to send data to Explorer onDemand from any ABAP application. We have a prototype FlashIsland for WebI to run in place within Web Dynpro ABAP. Over future enhancement packages you will see increased integration opportunties with the BOBJ capabilites. -
How to create multiple buttons in ALV Toolbar in Webdynpro ABAP
Hi all,
I am trying to create multiple buttons in Webdynpro ALV toolbar, please go through the code.
What happening is, second button is replacing the first one.
DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv_table( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
lo_interfacecontroller = wd_this->wd_cpifc_alv_table( ).
DATA lv_value TYPE REF TO cl_salv_wd_config_table.
lv_value = lo_interfacecontroller->get_model(
DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
DATA button1 TYPE REF TO cl_salv_wd_function.
DATA button2 TYPE REF TO cl_salv_wd_function.
**First button
CREATE OBJECT lr_buttonui1.
lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
button1->set_editor( lr_buttonui1 ).
**Second button
CREATE OBJECT lr_buttonui2.
lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
button2->set_editor( lr_buttonui2 ).
How can I overcome this??
Thanks
EshwarHi Eshwar,
The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
**First button
CREATE OBJECT lr_buttonui1.
lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
button1->set_editor( lr_buttonui1 ).
**Second button
CREATE OBJECT lr_buttonui2.
lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
button2->set_editor( lr_buttonui2 ). -
ALV Component in Webdynpro ABAP
Hi,
When ALV is in edit mode, there are four default actions (buttons) in the toolbar of ALV - 'Check', 'Append row', 'Insert row' and 'Delete row'. I just want to know that when 'Append row' is clicked, Which event is triggered.
I need this to set some default values in the cells of newly inserted row.
Regards,
Gauravtry this question in Webdynpro forum, you may get a quicker response.
Regards
Raja -
Hierarchical sequential display in ALV for webdynpro ABAP
Hello,
I am doing an ALV report WebDynpro for abap. I have a situation where I have to display Open Items and all the partial payments in the ALV report. In short. In summary, I have to display a Hierarchical Table of data which two different structures of data, but linked and displayed together.
The only information I have to go about this is [Table as Hierarchy|http://help.sap.com/saphelp_nw2004s/helpdata/EN/3e/904b2624534e0db707c7314a5e1e9d/frameset.htm] in SAP Help.
If you have any pointers for programming a Hierarchical Sequential report in Webdynpro alv that would be great. Any classes, methods etc I can use or , how I can do bindings to the context etc...
Thank you for all your help.
Sumit.Hello,
I am doing an ALV report WebDynpro for abap. I have a situation where I have to display Open Items and all the partial payments in the ALV report. In short. In summary, I have to display a Hierarchical Table of data which two different structures of data, but linked and displayed together.
The only information I have to go about this is [Table as Hierarchy|http://help.sap.com/saphelp_nw2004s/helpdata/EN/3e/904b2624534e0db707c7314a5e1e9d/frameset.htm] in SAP Help.
If you have any pointers for programming a Hierarchical Sequential report in Webdynpro alv that would be great. Any classes, methods etc I can use or , how I can do bindings to the context etc...
Thank you for all your help.
Sumit. -
Select Options use in ALV Report in ABAP Webdynpro
Hello Experts,
I Already Done ALV Report In webdynpro with use of view Container UI element.But i do not know ALV report with help of select option.so
Kindly Give Me simple Example of Use in select Option In ALV.
Reply ASAP.
Regards,
Ameya KaradkhedkarFirst you need to add the component WDR_SELECT_OPTIONS to the tab "Used components" of your Web Dynpro component and then also in the properties tab of your view. In the layout you need to create another view container and embed the view WND_SELECTION_SCREEN of the new used component to it.
Then in the WDDOINIT method of your view you can write this code (where SEL_OPT is the given name for the used component) in order to set the select option (This example is a select option for a date):
DATA: lo_cmp_usage TYPE REF TO if_wd_component_usage,
lo_interfacecontroller TYPE REF TO iwci_wdr_select_options,
lo_r_helper_class TYPE REF TO if_wd_select_options,
rt_range_date TYPE REF TO data.
* Instantiate used component WDR_SELECT_OPTIONS (SEL_OPT)
lo_cmp_usage = wd_this->wd_cpuse_sel_opt( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* Call method in used controller
lo_interfacecontroller = wd_this->wd_cpifc_sel_opt( ).
lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
* Create select option for the date
CALL METHOD lo_r_helper_class->create_range_table
EXPORTING
i_typename = 'DATS'
RECEIVING
rt_range_table = rt_range_date.
CALL METHOD lo_r_helper_class->add_selection_field
EXPORTING
i_id = 'DATS'
it_result = rt_range_date
i_read_only = ABAP_FALSE.
* Hide unnecessary buttons
CALL METHOD lo_r_helper_class->set_global_options
EXPORTING
i_display_btn_cancel = abap_false
i_display_btn_check = abap_false
i_display_btn_reset = abap_false
i_display_btn_execute = abap_false.
Finally you need to write the following code in the action of the button in order to fetch the range table selected by the user.
DATA: lo_cmp_usage TYPE REF TO if_wd_component_usage,
lo_interfacecontroller TYPE REF TO iwci_wdr_select_options,
lo_r_helper_class TYPE REF TO if_wd_select_options,
rt_date TYPE REF TO data.
FIELD-SYMBOLS: <fs_date> TYPE table.
* Instantiate used component WDR_SELECT_OPTIONS (SEL_OPT)
lo_cmp_usage = wd_this->wd_cpuse_sel_opt( ).
IF lo_cmp_usage->has_active_component( ) IS INITIAL.
lo_cmp_usage->create_component( ).
ENDIF.
* Call method in used controller
lo_interfacecontroller = wd_this->wd_cpifc_sel_opt( ).
lo_r_helper_class = lo_interfacecontroller->init_selection_screen( ).
* get selected range of inspections date
CALL METHOD lo_r_helper_class->get_range_table_of_sel_field
EXPORTING
i_id = 'DATS'
RECEIVING
rt_range_table = rt_date.
ASSIGN rt_date->* TO <fs_date>.
Then you can use the value that is assigned to the field symbol <fs_date> to continue with your ALV. -
Webdynpro ABAP ALV tutorial - simple update or use changelog ?
I was working through the alv tutorials for webdynpro abap, and while trying to complete the
"Editing ALV in Web Dynpro for ABAP", I got to page 8 of the pdf document where it explains how to do the ONDATACHECK event handler, and it comments out the portion for updating/saving the data (as noted below), and does not explain anything further about the save.
* save data to database
{* update... => only simlate, to not change the flight data model
* content!
Now, I am new to webdynpro abap, and don't know if I am supposed to utlize the changelog for this, or if a simple update will work.
Any Ideas ?Thank you for your answer - I am guessing from your response that a method would need to be built - similar to one which I found in the SWDP_DEMO_TUTORIALS for a webdynpro called WDT_TABLE (see below) - where a check of the table changes would need to be made before an update to the table - rather than a simple one line update statement placed at that point in the code.
METHOD save_changes.
DATA: table_node TYPE REF TO if_wd_context_node,
read_sbook TYPE
if_componentcontroller=>elements_sbook_node,
aux_read_sbook TYPE
if_componentcontroller=>elements_sbook_node,
wa_read_sbook TYPE LINE OF
if_componentcontroller=>elements_sbook_node,
context TYPE REF TO if_wd_context,
change_line TYPE LINE OF wdr_context_change_list,
changes TYPE wdr_context_change_list,
aux_changes TYPE wdr_context_change,
lv_change_tab_size TYPE sy-tfill,
aux_string TYPE string,
lv_node_size TYPE sy-tfill,
aux_div TYPE int4,
aux_index TYPE i,
l_current_controller TYPE REF TO if_wd_controller,
l_message_manager TYPE REF TO if_wd_message_manager,
text TYPE string,
it_int TYPE STANDARD TABLE OF i WITH KEY table_line.
* check whether context has changed
context = wd_context->get_context( ).
changes = context->get_context_change_log( ).
LOOP AT changes INTO aux_changes.
IF aux_changes-change_kind = 'A' AND aux_changes-node_name = 'SBOOK_NODE'.
INSERT aux_changes INTO TABLE wd_this->sbook_delta.
ENDIF.
ENDLOOP.
* get the complete context in 'read_sbook' table
table_node = wd_context->get_child_node( name = 'MY_BOOKING_NODE' ).
table_node = table_node->get_child_node( name = 'SBOOK_NODE' ).
table_node->get_static_attributes_table( IMPORTING table = read_sbook
* get the size of table and changes
DESCRIBE TABLE read_sbook LINES lv_node_size.
LOOP AT wd_this->sbook_delta INTO change_line.
APPEND change_line-element_index TO it_int.
ENDLOOP.
SORT it_int.
DELETE ADJACENT DUPLICATES FROM it_int.
DESCRIBE TABLE it_int LINES lv_change_tab_size.
* get message manager
l_current_controller ?= wd_this->wd_get_api( ).
CALL METHOD l_current_controller->get_message_manager
RECEIVING
message_manager = l_message_manager.
* decide which way to update databse
IF lv_change_tab_size <> 0.
aux_div = lv_node_size / lv_change_tab_size.
IF aux_div <= 3.
* write complete table to database
lv_change_tab_size = lv_node_size.
CL_WDT_FLIGHT_MODEL=>write_sbook_complete( read_sbook ).
ELSE.
* write only the changed records to database
LOOP AT it_int INTO aux_index.
READ TABLE read_sbook INDEX aux_index INTO wa_read_sbook.
APPEND wa_read_sbook TO aux_read_sbook.
ENDLOOP.
CL_WDT_FLIGHT_MODEL=>write_sbook_records_changed( aux_read_sbook )
ENDIF.
REFRESH wd_this->sbook_delta.
REFRESH it_int.
wd_this->sbook_changed = abap_false.
* report message
aux_string = lv_change_tab_size .
IF lv_change_tab_size = 1.
CONCATENATE aux_string 'record written to database' INTO text.
ELSE.
CONCATENATE aux_string 'records written to database' INTO text.
ENDIF.
CALL METHOD l_message_manager->report_success
EXPORTING
message_text = text.
ELSE.
* report message
CALL METHOD l_message_manager->report_success
EXPORTING
message_text = 'there are no changes to be written to database'.
ENDIF.
ENDMETHOD. -
Regarding ALV Reporting in ABAP
Hi All,
I have some clarifications related to <b>ALV Reporting</b> in ABAP.
<b>Actually i have to create ALV report with Structure Length/Each record length is around 300 characters.</b>
Is it possible to create a ALV Report with <b>300</b> length for each record!
If possible which is the best<b>[ALV]</b> method for the same!
Can anybody give me the solution!
Thanks in advance.
Thanks & Regards,
Prasad.Hai Prasad
Check with the code
*& Report ZALV_PRAKASH_SAMP *
REPORT ZALV_PRAKASH_SAMP .
TABLES: MARA.
TYPE-POOLS : SLIS.
Data declaration
DATA: BEGIN OF I_MARA OCCURS 0.
INCLUDE STRUCTURE MARA.
DATA: END OF I_MARA.
DATA: V_REPID LIKE SY-REPID.
selection-screen
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS : S_MATNR FOR MARA-MATNR.
PARAMETERS: P_MTART LIKE MARA-MTART DEFAULT 'ROH'.
SELECTION-SCREEN END OF BLOCK B1.
initialisation
INITIALIZATION.
S_MATNR-LOW = '1400'.
S_MATNR-HIGH = '1500'.
APPEND S_MATNR.
V_REPID = SY-REPID.
start-of-selection
START-OF-SELECTION.
SELECT * FROM MARA
INTO TABLE I_MARA
WHERE MATNR IN S_MATNR AND
MTART = P_MTART.
CHECK SY-SUBRC = 0.
end of selection
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME = 'MARA'
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = I_MARA
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at i_mara.
write:/ i_mara.
endloop.
Thanks & Regards
Sreenivasulu P -
How to intrigrate ALV report into Web Dynpro
Hi Experts,
I Done one ALV Report and the same thing should be developed on web dynpro also...so, i want to intigrate the alv in web dynpro is this possible..if so, pl. let me know..asap. Thanks & Rewards,
SatishHi
ALV in Web Dynpro ABAP is different from Dynpro ALV.
In WebDynpro ABAP ALV is SAP's standard component SALV_WD_TABLE
You have to use this component inside your component.
the following tutorial will help you
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/60ea94e5-0901-0010-c3bb-aad5ea9620d8 [original link is broken]
Abhi
Maybe you are looking for
-
How to create a Grand Total on a Multiple Page Document
I have created a form that is 4 pages long. I created the form in WordPerfect and then converted it to pdf. Then I opened it into Adobe Professional 8. I had it automatically converted into LiveCyle. I would like to just add the total of the four pag
-
How do I upgrade OSx 10.5.8 to newer or latest version?
Hi there. I have Mac Pro Dual Power PC G5 (3.0) 2.5 GHz processor, 6.5 SB DDR SDRAM and its currently running on OSx 10.5.8. I was ok with that but now I need to install few programs and they are not supported by current architecture((( looks like I
-
SO8 (Windows) Update 4 download
Been trying to download latest SO8 patch for weeks. Unfortunately, I am on dialup, and lose connection/download after several hours. Have tried using Sun Download Manager 1.3 (...."that makes downloading large software packages from the Sun Download
-
Forbidden/403 error when accessing OIF after install
Hi, I just installed OID+OVD+OIF on a Windows 2003 server. The Oracle database is on a separate machine. For the OID+OVD+OIF installation, I installed WebLogic 10.3.3, then ran the OID+OVD+OIF installer, and was able to do that successfully. I then r
-
Embedded images not working very well
I am creatnig a pdf from a publisher file. all images added via clipart are ok, but images i add myself that are large images do not seem to look clear when viewed in the created pdf file. i have been told that i need to embed them in the pdf documen