How do you gracefully error/exit an ALV Grid Controls
I have a report that uses ALV grid controls. Inside the screens, I am opening a file, and need to give an error if the file does not successfully open. I do not have any problem doing this, BUT when I error, it takes me totally out of the program, and I really just want to get back to the report selection screen. I have not been successful in finding out how to do this. Any help is very much appreciated!! Thanks!
Here is how some of the code looks....this is the initial call into the first screen of the ALV grid. From the screen 100 of the ALV Grid, I want to be able to hit the green back arrow button and go back to the report selection criteria so that the user can easily change a file name in case they entered it wrong, etc. Here is the code:
START-OF-SELECTION.
IF NOT p_ofile IS INITIAL.
CONCATENATE p_opath p_ofile INTO p_ofile.
ENDIF.
IF NOT p_sfile IS INITIAL.
CONCATENATE p_spath p_sfile INTO p_sfile.
ENDIF.
IF NOT p_ifile IS INITIAL.
CONCATENATE p_ipath p_ifile INTO p_ifile.
ENDIF.
IF NOT p_ofile2 IS INITIAL.
CONCATENATE p_opath p_ofile2 INTO p_ofile2.
ENDIF.
IF NOT p_sfile2 IS INITIAL.
CONCATENATE p_spath p_sfile2 INTO p_sfile2.
ENDIF.
IF NOT p_ifile2 IS INITIAL.
CONCATENATE p_ipath p_ifile2 INTO p_ifile2.
ENDIF.
IF NOT p_ofile3 IS INITIAL.
CONCATENATE p_opath p_ofile3 INTO p_ofile3.
ENDIF.
IF NOT p_sfile3 IS INITIAL.
CONCATENATE p_spath p_sfile3 INTO p_sfile3.
ENDIF.
IF NOT p_ofile4 IS INITIAL.
CONCATENATE p_opath p_ofile4 INTO p_ofile4.
ENDIF.
IF NOT p_sfile4 IS INITIAL.
CONCATENATE p_spath p_sfile4 INTO p_sfile4.
ENDIF.
IF NOT p_ofile5 IS INITIAL.
CONCATENATE p_opath p_ofile5 INTO p_ofile5.
ENDIF.
IF NOT p_ofile6 IS INITIAL.
CONCATENATE p_opath p_ofile6 INTO p_ofile6.
ENDIF.
IF NOT p_ofile7 IS INITIAL.
CONCATENATE p_opath p_ofile7 INTO p_ofile7.
ENDIF.
IF NOT p_ofile8 IS INITIAL.
CONCATENATE p_opath p_ofile8 INTO p_ofile8.
ENDIF.
SELECT * FROM zgedwsostmg INTO TABLE xzgedwsostmg.
SELECT SINGLE delimiter_hex FROM zgedwflcnfg
INTO g_delimiter_hex
WHERE kappl = 'V1'.
g_hex_value = g_delimiter_hex.
END-OF-SELECTION.
PERFORM load_header_table.
SET SCREEN 100.
Screen 100 Code
PROCESS BEFORE OUTPUT.
MODULE status_0100.
MODULE create_objects.
PROCESS AFTER INPUT.
MODULE pai_100 at exit-command.
MODULE pai_100 INPUT.
CASE ok_code.
WHEN 'BACK'.
g_back = 'X'.
PERFORM exit_program.
exit.
WHEN 'EXIT'.
PERFORM exit_program.
WHEN 'CANC'.
PERFORM exit_program.
ENDCASE.
CLEAR ok_code.
ENDMODULE. " PAI INPUT
FORM exit_program.
CALL METHOD g_custom_container1->free.
IF NOT g_custom_container2 IS INITIAL.
CALL METHOD g_custom_container2->free.
ENDIF.
CALL METHOD cl_gui_cfw=>flush.
IF sy-subrc NE 0.
add your handling, for example
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = g_repid
txt2 = sy-subrc
txt1 = 'Error in Flush'(500).
ENDIF.
LEAVE PROGRAM.
set screen 0.
leave screen.
leave screen.
leave to screen 1000.
CALL SELECTION-SCREEN 1000.
leave to list-processing.
exit.
leave to screen 0.
ENDFORM. " exit_program
As you can see by all the commented lines, I have tried several ways to make this work, but without success. Thanks again for any help!!
Similar Messages
-
Urgent : how to select the rows in the ALV Grid Control
How to select the rows in the ALV Grid control,
I am facing the situation where i need to select the row/rows in the Grid control and then to lock the entries,
If anyone have the solution please help me out
<b>Its very Urgent</b>Hi Bharath,
Go through this hope u can understand.
SEL_MODE. Selection mode, determines how rows can be selected. Can have the following values:
A Multiple columns, multiple rows with selection buttons.
B Simple selection, listbox, Single row/column
C Multiple rows without buttons
D Multiple rows with buttons and select all ICON
Setting and getting selected rows (Columns) and read line contents
You can read which rows of the grid that has been selected, and dynamic select rows of the grid using methods get_selected_rows and set_selected_rows. There are similar methods for columns.
Note that the grid table always has the rows in the same sequence as displayed in the grid, thus you can use the index of the selected row(s) to read the information in the rows from the table. In the examples below the grid table is named gi_sflight.
Data declaration:
DATA:
Internal table for indexes of selected rows
gi_index_rows TYPE lvc_t_row,
Information about 1 row
g_selected_row LIKE lvc_s_row.
Example 1: Reading index of selected row(s) and using it to read the grid table
CALL METHOD go_grid->get_selected_rows
IMPORTING
et_index_rows = gi_index_rows.
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines = 0.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
textline1 = 'You must choose a valid line'.
EXIT.
ENDIF.
LOOP AT gi_index_rows INTO g_selected_row.
READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
ENDIF.
ENDLOOP.
Example 2: Set selected row(s).
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines > 0.
CALL METHOD go_grid->set_selected_rows
exporting
it_index_rows = gi_index_rows.
ENDIF.
Reward points if helpful.
Thanks
Naveen khan -
How to display three months data in ALV grid control
Hi
Thanks for all.I have tried now it is working but as per requirement month name and cumulative total will display like this format.cumulative total means month1amount+ month2amount+month3amount.And one more thing month range will change some times means sometimes i will give January date to march date and sometimes i will give July date to October date. but date range is same means between dates range is three months.
please tell me how to display.
GAS PRESSURE WELDING COST EFFECTIVENESS Dec-11 Cummulativetotal
Sr. No Item Unit Rate Qty Amount
GAS PRESSURE WELDING COST EFFECTIVENESS Jan-12
Sr. No Item Unit Rate Qty Amount
GAS PRESSURE WELDING COST EFFECTIVENESS Feb-12
Sr. No Item Unit Rate Qty Amount
Thanks & Regards,
Vasu.
Moderator message: only one thread per issue, please.
Edited by: Thomas Zloch on Feb 20, 2012Hi
Thanks for all.I have tried now it is working but as per requirement month name and cumulative total will display like this format.cumulative total means month1amount+ month2amount+month3amount.And one more thing month range will change some times means sometimes i will give January date to march date and sometimes i will give July date to October date. but date range is same means between dates range is three months.
please tell me how to display.
GAS PRESSURE WELDING COST EFFECTIVENESS Dec-11 Cummulativetotal
Sr. No Item Unit Rate Qty Amount
GAS PRESSURE WELDING COST EFFECTIVENESS Jan-12
Sr. No Item Unit Rate Qty Amount
GAS PRESSURE WELDING COST EFFECTIVENESS Feb-12
Sr. No Item Unit Rate Qty Amount
Thanks & Regards,
Vasu.
Moderator message: only one thread per issue, please.
Edited by: Thomas Zloch on Feb 20, 2012 -
How do you solve error "You can't use this version of the application Install Mac OS X.app with this version of Mac OS X" when trying to go back to leopard from lion?
Local Mac shop said to hold down "c" after inserting disk to get "disk utility" to come up in order to wipe hard drive. I can't seem to get it to do this.This W7 was purchased for using Fusion, as others did - per reviews from amazon. The technician today called their contact at VMWare - Fusion not officially for use with Lion - even though I read at the VMWare support site that others have made it work. Apparently my setup doesn't work.
Do you know how to do the proceedure for bringing up the disk utility when starting the disk?
BTW, some of the windows applications I want to continue using are Incredimail, Calendarscope, Stamps.com and a few others I have used over many years. What do you use for email and calendar?
Wow, sounds like another reason to not use MS Windows.
Regarding your Disk Utility question, please elablorate I'm not sure what you're trying to do. Disk Utilty is just that...a utility, it's something most users never have to use especially on a new computer. Let me know what you're trying to do there before I give you some instructions.
As for as your Windows apps I would recommend using Mail and iCal, both come as part of OS X and are very robust tools. Don't discount the software built right into OS X it's very robust and powerful not all like the bloatware most Windows boxes ship with. Stamps.com well I'd look for another alternative. It's clear they don't support OS X which makes me a little suspicious that they're so behind the times.
Also if you have not been exposed to these links before I'd strongly recommend bookmarking them and using them. They're extermely useful!
Switch 101
Mac 101
Find Out How Video tutorials -
How do you resolve error 213:11 for photoshop elements 9 and 8
how do you resolve error 213:11 for photoshop elements 9 and 8?
Hi,
Please refer to:
http://helpx.adobe.com/creative-suite/kb/error-store-does-not-allow.html
Thanks,
Anwesha -
how do you fix Error 2753. The File 'acrosup64.dll is not marked for installation. when trying to update?
i have trid from the adobe website and from the auto update notice, however
none have been successful. i am running windows 8.1 and i have another pc
running the same 8.1 and that one has successfully updated.
Philip P Copley
P.O.Box 3155
Norwood 5067
South Australia
[email protected]
(08) 8431 6885
0401 686 087 -
How do you fix error -3256 when trying to put ios 5 on my phone?
How do you fix error -3256 when trying to put ios 5 on my phone? I have a mac. I have backed up everything....?
I always get the same error 3256 (as Timothy98) when trying to download ios 5 on my upgraded iTunes in my macbook pro. Please help. I want to start using ios 5.
-
How do you fix Error: login keychain not found
How do you fix Error: login keychain not found
At some point, you reset your keychain to default in Keychain Access. That caused your login keychain to be renamed.
Back up all data.
In Keychain Access, delete the login keychain from the keychain list. Choose Delete References when prompted, not Delete References & Files.
In the Finder, select Go ▹ Go to Folder from the menu bar, copy the text on the line below into the box that opens, and press return:
~/Library/Keychains
A folder will open. Rename the file "login.keychain" in that folder to something like "login-old.keychain". Rename the file "login-renamed.keychain" to "login.keychain".
Back in Keychain Access, select File ▹ Add Keychain from the menu bar. Add back the file now named "login.keychain". If any of your needed keychain items are missing from it, also add back the file you named "login-old.keychain". I suggest you transfer any needed items from that keychain to the login keychain, then delete it. The transfers are made by drag-and-drop in Keychain Access. You'll need to enter your password for each item transferred. -
How do you resolve error code 36 when trying to restore an iPad that has been reset to original settings?
MB-
As far as I can tell, Error Code 36 is an "I/O Error". It may mean you have a bad USB cable between the iPad and your computer, or the cable was not plugged in firmly.
See if this helps with your Restore: <iOS: Unable to Update or Restore>.
Fred -
ALV Grid Control Double click error
Hi
In my Editable ALV Grid Control I input the data ,then click save, the program display error msg if any errors , then i double click in any field ,after that I exit from the program , here i dont want this after double click also the control should be on the same field.Pleace help me out this issue.
THXBut what you will do with the error data. you tell me that.
Don't update some error values to DB.
if you don't want error then check this sample code.
report ztest_alv_edit.
data: it_flight type standard table of sflight.
data: it_fcat type lvc_t_fcat,
wa_fcat type lvc_s_fcat.
data: grid type ref to cl_gui_alv_grid,
cont type ref to cl_gui_custom_container.
class lcl_event_receiver definition deferred.
data: g_handler type ref to lcl_event_receiver.
* CLASS lcl_event_receiver DEFINITION
class lcl_event_receiver definition.
public section.
methods:
handle_data_changed
for event data_changed of cl_gui_alv_grid
importing er_data_changed.
endclass. "lcl_event_receiver DEFINITION
* CLASS lcl_event_receiver IMPLEMENTATION
class lcl_event_receiver implementation.
method handle_data_changed.
"this is important
"this will stop poping the message
clear er_data_changed->mt_protocol.
endmethod. "handle_data_changed
endclass. "lcl_event_receiver IMPLEMENTATION
start-of-selection.
select * from sflight
into table it_flight
up to 20 rows.
end-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
* text
module status_0100 output.
set pf-status 'STATUS'.
if cont is initial.
call function 'LVC_FIELDCATALOG_MERGE'
exporting
i_structure_name = 'SFLIGHT'
changing
ct_fieldcat = it_fcat
exceptions
inconsistent_interface = 1
program_error = 2.
create object cont
exporting
container_name = 'CONT'
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6
if sy-subrc ne 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
wa_fcat-edit = 'X'.
wa_fcat-checktable = '!'.
modify it_fcat from wa_fcat transporting edit checktable
where fieldname = 'FLDATE'
create object grid
exporting
i_parent = cont
exceptions
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5
if sy-subrc ne 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call method grid->set_table_for_first_display(
changing
it_outtab = it_flight
it_fieldcatalog = it_fcat
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
if sy-subrc ne 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
"Important for editable grid
call method grid->register_edit_event
exporting
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
create object g_handler.
"setting the handler
set handler g_handler->handle_data_changed for grid.
endif.
endmodule. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
module user_command_0100 input.
"important method to trigger the DATA_CHANGED event
call method grid->check_changed_data.
case sy-ucomm.
when 'BACK'.
leave to screen 0.
endcase.
endmodule. " USER_COMMAND_0100 INPUT -
How to identify the modified rows in ALV grid in OO
Hello All,
I have strange problem and i don't know how to solve it?
I have ALV grid and in that ALV grid i have two buttons 'CONT' and 'ALLOC', when the user press 'ALLOC' button i will give a popup to make the user to enter some value.
After entering the value i will do some calicualtions and i will distribute the amount in the fields of ALV grid and i should update the ALVGRID.
Normally we can use CALL METHOD ME->REFRESH_TABLE_DISPLAY.( I have already checked by using this method and it worked fine)
Here is the way my program look like
ALVTREE1
ALVTREE2
|----
ALVGRID
The problem is when i press the other button CONT i am unable to know what values exist in ALVGRID.
How can i find these distributed amount in ALV?
I hope i am clear while explaining problem.
Here is the required code:
method handle_user_command.
data: lt_fields type table of sval,
ls_field type sval,
ls_fieldcatalog type lvc_s_fcat,
ls_merkpl type zvhf_merkpl,
lv_month(2) type n ,
lv_year(4) type n ,
lv_spmon type zvhf_allocation-spmon,
lv_value type p.
field-symbols: <fs> type any,
<ls_merkpl> type zvhf_merkpl.
case e_ucomm.
when 'CNT'.
call method gcl_gui_alv_grid->check_changed_data.
call method dailogbox_container->set_visible
exporting
visible = space.
call method gcl_gui_alv_tree2->frontend_update.
call method gcl_gui_alv_tree2->update_calculations.
clear: gt_merkpl.
when 'ALCT'.
Popup to get the values enterd by the user
ls_field-tabname = 'DD02V'.
ls_field-fieldname = 'DDTEXT'.
append ls_field to lt_fields.
call function 'POPUP_GET_VALUES'
exporting
popup_title = 'Enter value'
start_column = '1'
start_row = '1'
tables
fields = lt_fields
exceptions
error_in_fields = 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.
elseif sy-subrc = 0.
read table lt_fields into ls_field index 1.
if sy-subrc = 0.
gv_value = ls_field-value.
Read the table zvhf_allocation with nodekey in order to get percentages
select * from zvhf_allocation into table gt_allocation
where dvkbur = gs_node_info-nodename.
Read gt_merkpl in order to get existing line in ALV grid
loop at gt_merkpl into ls_merkpl.
*Read FCAT inorder to find the field and move proprtinate value
loop at gt_fieldcatlog3 into ls_fieldcatalog.
*Split is required to match ZVHF_ALLOCATION-SPMON with screen text and to proprtinate the value
split ls_fieldcatalog-scrtext_l at '.' into
lv_month lv_year.
concatenate lv_year lv_month into lv_spmon.
Check whether an entry exist or not in ZVHF_allocation
read table gt_allocation into gs_allocation
with key spmon = lv_spmon binary search.
*If an entry exist proprtinate the value as enterd in table
if sy-subrc = 0.
lv_value = gv_value * gs_allocation-prozent.
lv_value = lv_value / 100.
perform assign_value using ls_fieldcatalog-fieldname lv_value
changing ls_merkpl.
modify gt_merkpl from ls_merkpl.
endif.
endloop.
CALL METHOD gcl_gui_alv_grid->frontend_update.
call method gcl_gui_alv_grid->refresh_table_display
exceptions
finished = 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.
endloop.
endif.
endif.
endcase.
endmethod. "handle_user_command
If you have any further questions please let me know.
Regards,
LisaHello Vijay,
Thanks for you reply,
The event data_changed is not working because i called method refresh_table_display. So the event changed will not be raised after i press button CONT
If i didn't call this method then i can see the value enterd by the user in ALV grid.
So, do you have an more ideas.
Regards,
Lisa -
How to Edit the CheckBox in Classic ALV GRID Display
Hi,
I want to Edit the checkbox in Grid Display.
I have one checkbox field in my internal Table,
Code Of the Program,
Data :
Begin of itab occurs 0,
CHK type C,
MATNR like MARA-MATNR,
end of itab.
Iam building the fieldcatelog using Merge Funcion module.
After that I am chaning the properties of the field
catelog like below,
loop at I_FCAT assigning <FCAT>.
Case <FCAT>-Fieldname
When 'CHK'.
<FCAT>-Checkbox = 'X'.
<FCAT>-INPUT = 'X'.
I dont have edit option in fieldcatelog.
modify I_FCAT from <FCAT>.
endcase.
endloop.
In the Layout,
I_LAYOUT-box_fieldname = 'CHK'.
I_LAYOUT-box_tabname = 'ITAB'.
It is displaying the Checkbox field.but I couldnt edit the checkBox.
I can able to edit in REUSE_ALV_LIST_DISPLAY.
But I have to use REUSE_ALV_GRID_DISPLAY.How to edit the checkbox.
Thanks in Advance,
SumithraHi vasu,
The below procedure explains you to create a checkbox cloumn in the grid and allows you to edit i hope this will helps u.
The ALV Grid Control displays the cells of a column as checkboxes if the column is marked as a checkbox column in the field catalog.
Add another field to the output table in which you want to display checkboxes
OR
Define an existing field as a checkbox.
Procedure
1. Add a field to your output table:
Data: gt_fieldcat type lvc_t_fcat.
Types: begin of gs_outtab.
Types: checkbox type c. "field for checkbox
Include structure <ABAP Dictionary structure> .
Types: end of gs_outtab.
Data: gt_outtab type gs_outtab occurs 0 with header line.
2 * Add an entry for the checkbox to the field catalog
clear ls_fcat.
ls_fcat-fieldname = 'CHECKBOX'.
* Essential: declare field as checkbox and
* mark it as editable field:
ls_fcat-checkbox = 'X'.
ls_fcat-edit = 'X'.
* do not forget to provide texts for this extra field
ls_fcat-coltext = text-f01.
ls_fcat-tooltip = text-f02.
ls_fcat-seltext = text-f03.
append ls_fcat to gt_fieldcat.
regards,
venu. -
How to find the selected item in alv grid or table control
can any one tell me please
how to find the selected item in alv grid or table controlIn table control, If you goto screen painter and goto table control properties ( f2 ), there is one check-box w/selColumn check that and give column name. Then add that column to your internal table.
IN PAI
LOOP AT it_tkhdr.
FIELD it_tkhdr-sel_row
MODULE tab_tkhdr_mark ON REQUEST.
ENDLOOP.
MODULE tab_tkhdr_mark INPUT.
MODIFY it_tkhdr INDEX tc_tkhdr-current_line.
ENDMODULE. " tab_tkhdr_mark INPUT
here it_TKHDR is internal table sel_row is field for selection
After that, you can loop at it_tkhdr where sel_row is 'X' to get selected rows.
regards,
Gagan -
How to display an image in an alv grid in each corresponding row?
Hi,
please tell me how to display an image in an alv grid in each corresponding row, like;;
tony 23 newyork <image>
Mkitharyan 63 washington <image>
NOT BY HOTSPOTS/URL.you can put image in each cell you want:
data lo_cmp_usage type ref to if_wd_component_usage.
lo_cmp_usage = wd_this->wd_cpuse_alv( ).
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( ).
DATA lo_value TYPE ref to cl_salv_wd_config_table.
lo_value = lo_interfacecontroller->get_model( ).
data col type ref to CL_SALV_WD_COLUMN.
col = lo_value->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'IMAGE' ).
data image type ref to cl_salv_wd_uie_image.
CREATE OBJECT image.
image->SET_SOURCE_FIELDNAME( 'IMAGE' ).
COL->SET_CELL_EDITOR( image ). -
How to get Grand Total Text in ALV GRID
Hi Folks,
I am able to get the SUBTOTAL TEXT .....But i need...
How to get Grand Total Text in ALV GRID Display...
Can any one give a Solution for this...Hi Surendar,
Check out this code.. this is showing Total Text in Toal line in the very first column.
REPORT zsales_ord_det_1 .
TABLES: ztable_10.
TYPE-POOLS: slis.
DATA: BEGIN OF it OCCURS 0,
srno(6) type c,
name LIKE ztable_10-name,
age LIKE ztable_10-age,
END OF it.
DATA : BEGIN OF it_temp OCCURS 0,
name LIKE ztable_10-name,
age LIKE ztable_10-age,
END OF it_temp.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: v_repid LIKE sy-repid,
i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
gs_layout TYPE slis_layout_alv,
gd_layout TYPE slis_layout_alv,
i_sort TYPE STANDARD TABLE OF slis_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
START-OF-SELECTION.
v_repid = sy-repid.
SELECT * FROM ztable_10 INTO TABLE it_temp.
LOOP AT it_temp .
it-srno = 'Total'.
it-name = it_temp-name.
it-age = it_temp-age.
APPEND it.
ENDLOOP.
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'IT'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = v_repid
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = i_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'SRNO'.
wa_fieldcat-tabname = it.
append wa_fieldcat to i_fieldcat.
LOOP AT i_fieldcat INTO wa_fieldcat.
IF wa_fieldcat-fieldname = 'AGE'.
wa_fieldcat-do_sum = 'X'.
MODIFY i_fieldcat FROM wa_fieldcat.
ENDIF.
IF wa_fieldcat-fieldname = 'SRNO'.
Hide this field so that it can display it's content i.e.
Total text in Subtotal level
wa_fieldcat-tech = 'X'.
wa_fieldcat-no_out = 'X'.
MODIFY i_fieldcat FROM wa_fieldcat TRANSPORTING tech no_out.
ENDIF.
ENDLOOP.
wa_sort-spos = 1.
wa_sort-fieldname = 'SRNO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort.
gd_layout-no_totalline = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = gd_layout
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = i_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
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it
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.
Regards,
Seema
Maybe you are looking for
-
My office has a canon IR C2550 and our tech support is fairly useless, hoping to get some help from you all. Does anyone have any idea what error code -170 would be for the canon UFR, i.e. no matter what driver I try I get "an error occurred: -170" a
-
How to include field Internal order in the material master for SD orders
Hello, I would like to know how I can bring the field "Internal Order" to the material master, so I can create materials with assignments to internal orders. We want to create Sales Orders where when we enter on order item with a material, the intern
-
How to insert formatted text in a JTextPane component?
Hello, This is my first post in a java forum so i hope to get help :) Anyway, i am facing some problems in developping my project , the project consists of a tool to provide text editing allowing text formatting like MS Word , it allows different fon
-
How to transport BEX variants in BI?
Hi, after the bw-upgrade we have problems with the transport of our variants created in BEX. In BW 3.1 we used saplsvar ( with report-id and variantname) to create a transport. But this doesn't work with BI. Does anyone know which parameter saplsvar
-
Lack of timer services with EJB 2.0 dictated our design to implement MDB, since we really needed to use a timeout mechanism for the calling client. Client puts requests into the queue and after processing, the response object messages are put into th