F4 help in ALV grid by using function module?
Hi,
I need to get f4 search help in ALV grid for a certain fields by using function module method.
Please guide me.
Thank You.
Hi
F4IF_INT_TABLE_VALUE_REQUEST use this fm to get f4 search help for a certain fields .
Regards
Divya
Similar Messages
-
F4 help in ALV Grid Control (using classes)
Hi All,
I have created a report using ALV Grid control (using classes). I need to provide F4 help for some of the fields in the Grid control. I couldn't understand the standard demo program BCALV_GRID_F4_HELP. So Can anyone please provide me sample code for the same.
Regards
Jaker.hi check this..programs also
BCALV_GRID_EDIT_DELTA
BCALV_TEST_GRID_F4_HELP
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/how%2bto%2bimplement%2bf4%2bsearch%2bhelp%2bin%2boo%2balv%2bgrid
Struggling with f4 handling in ALV grid - Minisap 46D
regards,
venkat -
How to create a secondary list of alv grid inside the function module
Hi All,
My requirement is to create a RFC function module to display the alv grid of one table.
i have created that.
while clicking on the records of the alv it should open the secondary list of another table.
My problem is it is not fetching the records of the internal table of the primary list since it is created inside the function module(FUNCTION...ENDFUNCTION).
pls help me on this.
Thanks in Advance.hi,
READ TABLE sel_sheet INTO wa_sheet INDEX rs_selfield-tabindex.
here sel_sheet is the internal table for the primary list..
i called the function module "reuse_lav_grid_display" inside Function...Endfunction.
so when i am using READ TABLE sel_sheet INTO wa_sheet INDEX rs_selfield-tabindex.
inside the user command perform therecords in this internal table is not populating..
pls help me on this.
thanks in advance. -
Printing ALV Report output through Function Modules
Hi All,
I want to print my ALV Grid output through function modules/statement (not through print option in menu).
This is because, i am generating a PDF from spool when user clicks on a button. If any changes happened in the ALV output layout, they will be captured in spool through printing it.
So can you please tell me how to print the ALV Output through FMs or sending the ALV output to spool.
Thanks & Regards,
Senthil.
Edited by: senthil nathan on May 17, 2010 2:49 PMHi Dev,
Thanks for the reply.
I want to print the ALV when the user clicks on a button in toolbar. Lets say the user has made some changes to the layout, (E.g hiding a field) and when i print that output it should use the changed layout, If i use the FM suggested by you, i cant acheive this.
If you try to print this manually, the system uses the changed layout and not the original. Thats why i want to know FMs/statement to print.
Regards,
Senthil. -
Error message when using function module HRIQ_TESTRESULTS_CREATE
Hi,
I need your help, I'm trying to use function module HRIQ_TESTRESULTS_CREATE to create external test results, I've used this function before without subscores, now I need to create subscores, but I get the message: "Grading scale UBID applies".
The test type EXAM_UB_ING has assigned the UBID academic scale, which has a range from 1 to 677. Test type EXAM_UB_ING has 3 subtests (grammar, listening and reading) which also have the UBID academic scale assigned.
I think this isn't a customizing problem because I can create test results with subscores using the PIQST00 transaction, the error message happens just when using the function module.
I'm using this import parameters:
STUDENT:
PL: 01
OT: ST
OBJID: Student ID
TESTRESULTS_HEADER:
ISSUEDATE 08.02.2010
VALIDDATE 30.04.2010
TEST_GUID
TESTEO 50000269
TRANSEO 00000000
TESTTYPE EXAM_UB_ING
SESSIONID T1
SESSIONYEAR 2010
ENTRYDATE 08.02.2010
TESTPASSFAIL
TESTTOTRES 458
TESTSCALE_ID
TOTALPERCENT1 0,00
TOTALPERCENT2 0,00
ENTRYMODE
SUBTY
Table TESTRESULTS_SUBSCORES:
SUBTESTID GRAMMAR
SUBTESTTRES GRAMMAR
SUBT 203
SUBTESTID READING
SUBTESTTRES READING
SUBT 120
Does anybody know which could be the error? Or any other function module which I can use? (with HRIQ_TESTRESULTS_PROCESS_DATA I get the same error message).
Thanks in advance!
AraceliAraceli,
I just noticed. You are populating SUBTESTSCALE_ID in subtest result structure.That's the reason it's throwing this error. it is trying to match Scale ID from test with value in sub test result scale ID.
Prabhat Singh -
Alv grid using function module
hi all,
i am using editable alv grid. but i need to add a functionality by adding a button on toolbar on click on button a new blank row should be appended below where user can enter the new records. please suggest on this i am using alv grid using function module.Hi
check this program
BCALV_TEST_GRID_EDITABLE
when u execute the program, there is an alv which displays a set of records.
where we have a option to add new row to the alv.check it.
Hope this helps you. -
How to make a field of ALV Grid to use a Search Help?
Hi;
I have a ALV grid with a field catalog. Say the field is 'USR000'.
F4availabl = 'X' . for the field in the field catalog.
I have prepared search help named ZEV_PROTYPE that uses tha table ZEV_PROTYPES.(two fields in the table :ProType and Text).
Is it possible to make the field in ALV grid to use this search help if F4 is pressed on the field. ?
Which structure of the ALV must be used for that ? Is it Field Catalog ?
Would you please help me ?
erk.Hi,
If you have a Z data element and the search help is attached to it, you can just give the reference table and field in the field catalog for the editable ALV field, and the search help should appear.
Regards,
Sagar -
F4 help in ALV grid using existing search help
Hi All,
It would be appreciable , if some help on problem. Thanks in advance.
How to provide user defined F4 help in ALV grid using existing search help?
ALV grid has developed using OOPS concept.
Thanks,
Sudhakar.Hi,
if you already developed using OO concept, it should be possible to:
create a handler for event ONF4
The interface will tell you actual field name and value where F4 is pressed. This will enable you to call your own routine (see FM F4-IF....).
Please check how the standard handles F4 - if you have standard and customer-F4 mixed you shouldtake care that the standard handling is triggered.
Regards,
Clemens -
One editable cell in alv grid using function module
Hello all,
Any one have an idea how to make a single editable cell in alv grid using function module, i mean to say
with out using object oriented programming.
Regards,
PrakashHi,
Using ALV List display it is possible.
Try this.
TYPE-POOLS:SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA:IT_EVENTS TYPE SLIS_T_EVENT.
data: begin of it_chg occurs 0,
index type sy-tabix,
end of it_chg.
DATA: X_EVENTS TYPE SLIS_ALV_EVENT.
DATA: BEGIN OF ITAB OCCURS 0,
NAME(10) TYPE C,
ZTERM TYPE C,
END OF ITAB.
PERFORM FILL_TABLE.
loop at itab where zterm = 'A'.
it_chg-index = sy-tabix + 3.
" addition 3 IS FOR FIELD LABELS
append it_chg.
clear it_chg.
endloop.
DATA:L_POS TYPE I VALUE 1.
CLEAR: L_POS.
L_POS = L_POS + 1.
**fieldcatalog
X_FIELDCAT-FIELDNAME = 'NAME'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '10'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-FIELDNAME = 'ZTERM'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '10'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
**events
REFRESH:IT_EVENTS.
CLEAR:X_EVENTS,IT_EVENTS.
X_EVENTS-NAME = SLIS_EV_END_OF_LIST.
X_EVENTS-FORM = 'MODIFY_LIST'.
APPEND X_EVENTS TO IT_EVENTS.
CLEAR X_EVENTS.
END-OF-SELECTION.
data lv_repid type sy-repid.
lv_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = lv_REPID
IT_FIELDCAT = IT_FIELDCAT
IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = ITAB
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.
*& Form FILL_TABLE
text
FORM FILL_TABLE.
ITAB-NAME = 'AAA'.
ITAB-ZTERM = 'A'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'ABC'.
ITAB-ZTERM = 'B'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'TEST'.
ITAB-ZTERM = 'C'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'BBB'.
ITAB-ZTERM = 'D'.
APPEND ITAB.
clear itab.
ITAB-NAME = '123'.
ITAB-ZTERM = 'E'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'GEN'.
ITAB-ZTERM = 'A'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'ALV'.
ITAB-ZTERM = 'F'.
APPEND ITAB.
clear itab.
ITAB-NAME = 'ALVTEST'.
ITAB-ZTERM = 'A'.
APPEND ITAB.
clear itab.
ENDFORM. "FILL_TABLE
*& Form MODIFY_LIST
text
FORM MODIFY_LIST.
data: l_lines type i.
describe table itab lines l_lines.
L_LINES = L_LINES + 3.
"because we have 3 lines extra occupied by lables.
"if we have header,i mean top of page add the no.of lines
"how many ever top of page have + 3 for labels.
DO L_LINES TIMES.
read table it_chg with key INDEX = sy-index.
if sy-subrc = 0.
**This code is for reading the out put line
**and modify accordinlg to our requiremnet.
**don't chnage this.
READ LINE SY-INDEX INDEX SY-LSIND.
IF SY-SUBRC = 0.
MODIFY LINE SY-INDEX INDEX SY-LSIND
FIELD FORMAT ITAB-NAME INPUT.
ENDIF.
ENDIF.
ENDDO.
ENDFORM. "MODIFY_LIST -
Adding a color to row of a alv grid using function modules
Can anybody clearly explains me how to add a color to a row to an alv grid using function module reuse_alv_grid_display.
thanks in advance
regards
anil.hi,
chk this ample pgm
report zxyz_0004
no standard page heading.
type-pools slis.
data: fieldcat type slis_t_fieldcat_alv.
data: begin of imara occurs 0,
matnr type mara-matnr,
mtart type mara-mtart,
maktx type makt-maktx,
color_line(4) type c,
tcolor type slis_t_specialcol_alv, "cell
end of imara.
data: xcolor type slis_specialcol_alv.
start-of-selection.
perform get_data.
perform write_report.
Get_Data
form get_data.
imara-matnr = 'ABC'.
imara-mtart = 'ZCFG'.
imara-maktx = 'This is description for ABC'.
append imara.
imara-matnr = 'DEF'.
imara-mtart = 'ZCFG'.
imara-maktx = 'This is description for DEF'.
append imara.
imara-matnr = 'GHI'.
imara-mtart = 'ZCFG'.
imara-maktx = 'This is description for GHI'.
append imara.
loop at imara.
if sy-tabix = 1.
imara-color_line = 'C410'. " color line
endif.
if sy-tabix = 2. "color CELL
clear xcolor.
xcolor-fieldname = 'MTART'.
xcolor-color-col = '3'.
xcolor-color-int = '1'. "Intensified on/off
xcolor-color-inv = '0'.
append xcolor to imara-tcolor.
endif.
modify imara.
endloop.
endform.
WRITE_REPORT
form write_report.
data: layout type slis_layout_alv.
layout-coltab_fieldname = 'TCOLOR'.
layout-info_fieldname = 'COLOR_LINE'.
perform build_field_catalog.
CALL ABAP LIST VIEWER (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
is_layout = layout
it_fieldcat = fieldcat
tables
t_outtab = imara.
endform.
BUILD_FIELD_CATALOG
form build_field_catalog.
data: fc_tmp type slis_t_fieldcat_alv with header line.
clear: fieldcat. refresh: fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material Number'.
fc_tmp-fieldname = 'MATNR'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '18'.
append fc_tmp to fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material Type'.
fc_tmp-fieldname = 'MTART'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '4'.
append fc_tmp to fieldcat.
clear: fc_tmp.
fc_tmp-reptext_ddic = 'Material'.
fc_tmp-fieldname = 'MAKTX'.
fc_tmp-tabname = 'IMARA'.
fc_tmp-outputlen = '40'.
fc_tmp-emphasize = 'C610'. " color column
append fc_tmp to fieldcat.
endform.
<b>anil , pls chk this link also.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm
very hlpful.</b>
rgds
anver
<b>pls mark points if ur issue solved</b>
Message was edited by: Anversha s
Message was edited by: Anversha s -
Set cursor alv grid (not using objects)
I got a question on ALV GRID (not using objects), please let me know if you have pointers. Thanks.
Output has 2 screens both has different contents. The output is generated using internal table1 and 2 and using FM 'REUSE_ALV_GRID_DISPLAY_LVC' (both screen use same FM).
First screen has multiple pages of output (say 10 pages). User scrolled page 5 and line 10 of first screen and then double clicked it takes to screen #2. After completion of screen #2, the back arrow should get back to page 5 and line 10 of screen #1. Currently the back arrow gets to screen#1 page 1 and line 1. How to remember the cursor position in alv grid and instruct the cursor to go there?
Appreciate the input.
Note: I tried "set cursor line n" with "Scroll" command but no luck. http://help.sap.com/saphelp_nw70/helpdata/EN/9f/dba47e35c111d1829f0000e829fbfe/content.htmThanks for the inputs.
FYI, I got it implemented using method CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->set_current_cell_via_id
The method is called by 'REUSE_ALV_GRID_DISPLAY_LVC' form 'PF_STATUS_SET' when the ALV grid output is presented each time.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_bypassing_buffer = 'X'
i_callback_program = gc_repid
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
is_layout_lvc = lwa_layout
it_fieldcat_lvc = git_fc_lvc
i_default = ' '
TABLES
t_outtab = git_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
FORM alv_event_pf_status_set USING rt_extab
TYPE slis_t_extab.
DATA lo_ref1 TYPE REF TO cl_gui_alv_grid.
*Get the reference to class "lo_ref1" for the ALV report
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = lo_ref1.
*set the focus of cursor in ALV
CALL METHOD lo_ref1->set_current_cell_via_id
EXPORTING
is_row_no = gv_row. "row number where you want to focus the cursor
ENDFORM. -
Example of a Simple ALV Report using Function Modules (not OO)
Hi,
I am new to ABAP. Where can I get a proper Example of a Simple ALV Report using Function Modules? I searched the forum but did not find a proper solution. Kindly help.
Smruthi.
Edited by: Smruthi Acharya on Jan 29, 2009 7:13 PMHi,
Use this demo code:-
REPORT z_alv01 MESSAGE-ID zmsg.
* TABLES
TABLES : ekpo.
* TYPE POOLS
TYPE-POOLS : slis.
* TYPE DECLARATION
TYPES : BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
matnr TYPE ekpo-matnr,
werks TYPE ekpo-werks,
menge TYPE ekpo-menge,
END OF t_ekpo.
* PARAMETERS
PARAMETERS : s_var TYPE disvariant-variant.
* DATA DECLARATION
*VARIABLES
DATA : check(1),
rep_id TYPE sy-repid.
*INTERNAL TABLE TYPE OF ZEKPO
DATA : it_ekpo TYPE STANDARD TABLE OF t_ekpo WITH HEADER LINE.
*FIELD CATALOG
DATA : it_field TYPE slis_t_fieldcat_alv,
wa_field TYPE slis_fieldcat_alv.
*SORTING
DATA : it_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
*FOR TOP OF THE PAGE
DATA : it_top TYPE slis_t_listheader,
wa_top TYPE slis_listheader.
*FOR END OF THE PAGE
DATA : it_end TYPE slis_t_listheader,
wa_end TYPE slis_listheader.
*TO CAPTURE EVENTS AND HANDLE
DATA : it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event.
*FOR GRID TITLE
DATA : wa_title TYPE lvc_title.
*FOR LAYOUT
DATA : wa_layout TYPE slis_layout_alv.
*FOR EXCLUDING STANDARD BUTTON FROM ALV TOOLBAR
DATA : it_exclude TYPE slis_t_extab,
wa_exclude TYPE slis_extab.
*FOR VARIANT
DATA : wa_variant TYPE disvariant.
* INITIALIZATION
INITIALIZATION.
check = 'X'.
rep_id = sy-repid.
wa_variant-report = sy-repid.
*GET DEFUALT ON THE SELECTION SCREEN FOR DEFAULT DISPLAY
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = wa_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc = 0. " IF DEFAULT VARIANT FOUND
s_var = wa_variant-variant. " PASS THE DEFAULT VARIANT TO THE SELECTION SCREEN FIELD
ENDIF.
* AT-SELECTION SCREEN ON VALUE REQUEST
* TO GET THE F4 HELP FOR VARIANT
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_var.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = wa_variant
* I_TABNAME_HEADER =
* I_TABNAME_ITEM =
* IT_DEFAULT_FIELDCAT =
i_save = 'A'
* I_DISPLAY_VIA_GRID = ' '
IMPORTING
* E_EXIT =
es_variant = wa_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
s_var = wa_variant-variant. " PASS THE SELECTED VARIANT TO THE SELECTION SCREEN FIELD
ENDIF.
* AT-SELECTION SCREEN
* TO CHECK THE EXISTENCE FOR VARIANT
AT SELECTION-SCREEN.
wa_variant-variant = s_var.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = wa_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE w001.
ENDIF.
* START OF SELECTION
START-OF-SELECTION.
SELECT ebeln
ebelp
matnr
werks
menge
FROM ekpo
INTO TABLE it_ekpo.
* FIELD CATALOG
wa_field-fieldname = 'EBELN'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 10.
wa_field-seltext_l = 'PO #'.
APPEND wa_field TO it_field.
CLEAR wa_field.
wa_field-fieldname = 'EBELP'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 10.
wa_field-seltext_l = 'Line Item'.
APPEND wa_field TO it_field.
CLEAR wa_field.
wa_field-fieldname = 'MATNR'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 15.
wa_field-seltext_l = 'Material'.
* wa_field-input = check.
* wa_field-edit = check.
APPEND wa_field TO it_field.
CLEAR wa_field.
wa_field-fieldname = 'WERKS'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 6.
wa_field-seltext_l = 'Plant'.
* wa_field-input = check.
* wa_field-edit = check.
APPEND wa_field TO it_field.
CLEAR wa_field.
wa_field-fieldname = 'MENGE'.
wa_field-tabname = 'IT_TAB'.
wa_field-outputlen = 10.
wa_field-seltext_l = 'Qty.'.
* wa_field-input = check.
* wa_field-edit = check.
wa_field-do_sum = check.
APPEND wa_field TO it_field.
CLEAR wa_field.
* SORT W.R.T. PURCHASE ORDER NUMBER
wa_sort-spos = 1.
wa_sort-fieldname = 'EBELN'.
wa_sort-tabname = 'IT_EKPO'.
wa_sort-up = check.
wa_sort-subtot = check.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
* FOR GRID TITLE
wa_title = 'Hello'.
* FOR LAYOUT
wa_layout-zebra = check.
* FOR EXCLUDING STANDARD BUTTONS FROM ALV TOOLBAR
wa_exclude-fcode = '&OUP'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
wa_exclude-fcode = '&ODN'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
wa_exclude-fcode = '&OAD'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
* wa_exclude-fcode = '&AVE'.
* APPEND wa_exclude TO it_exclude.
* CLEAR wa_exclude.
wa_exclude-fcode = '&INFO'.
APPEND wa_exclude TO it_exclude.
CLEAR wa_exclude.
* POPULATE ALL EVENTS INTO INTERNAL TABLE
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_event
EXCEPTIONS
list_type_wrong = 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.
READ TABLE it_event INTO wa_event WITH KEY name = 'END_OF_LIST'.
wa_event-form = 'END'.
MODIFY it_event FROM wa_event INDEX sy-tabix.
CLEAR wa_event.
* DISPLAY RECORDS IN ALV GRID
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = rep_id
* i_callback_pf_status_set = 'PF'
i_callback_user_command = 'COMMAND'
i_callback_top_of_page = 'TOP'
* I_CALLBACK_HTML_TOP_OF_PAGE = ' '
* I_CALLBACK_HTML_END_OF_LIST = ' '
* I_STRUCTURE_NAME =
* I_BACKGROUND_ID = ' '
i_grid_title = wa_title
* I_GRID_SETTINGS =
is_layout = wa_layout
it_fieldcat = it_field
it_excluding = it_exclude
* IT_SPECIAL_GROUPS =
it_sort = it_sort
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
is_variant = wa_variant
it_events = it_event
* 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
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_ekpo
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*& Form top
* TO WRITE THE HEADER
FORM top.
REFRESH it_top.
wa_top-typ = 'S'.
wa_top-key = text-001.
wa_top-info = rep_id.
APPEND wa_top TO it_top.
CLEAR wa_top.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_top
* I_LOGO =
* I_END_OF_LIST_GRID =
* I_ALV_FORM =
ENDFORM. "top
*& Form end
* TO WRITE THE FOOTER
FORM end.
REFRESH it_end.
wa_end-typ = 'S'.
wa_end-key = text-001.
wa_end-info = rep_id.
APPEND wa_end TO it_end.
CLEAR wa_end.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_end
* I_LOGO =
* I_END_OF_LIST_GRID =
* I_ALV_FORM =
ENDFORM. "end
*& Form pf
* FOR PF-STATUS WITH USER DEFINED BUTTONS
* -->RT_EXTAB text
FORM pf USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZTG_PF_ALV'.
ENDFORM. "pf
*& Form command
* TO HANDLE USER ACTIONS AGAINST PF-STATUS
* -->UCOMM text
* -->SELFIELD text
FORM command USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
DATA : ok_code TYPE sy-ucomm.
ok_code = ucomm.
CASE ok_code.
WHEN 'T_DOWN'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'HELLO'
txt1 = 'USER COMMAND'
txt2 = 'TOTAL DOWN'.
WHEN 'DOWN'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'HELLO'
txt1 = 'USER COMMAND'
txt2 = 'DOWN'.
WHEN 'UP'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'HELLO'
txt1 = 'USER COMMAND'
txt2 = 'UP'.
WHEN 'T_UP'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'HELLO'
txt1 = 'USER COMMAND'
txt2 = 'TOTAL UP'.
ENDCASE.
ENDFORM. "command
Hope this helps you.
Thanks & Regards,
Tarun Gambhir -
Comparing OO ALV and ALV using Function modules
Hi All,
Please provide me what are the advantages of developing ALV using Objects compared to creation using function modules. What are the disadvantages of creating using the conventional FM way.
I have not worked much on ALV using Function modules, have been developing using standard abap classes. I wanted to have an detailed understanding and differences between the two.
Please provide your views on the same.
I have searched SDN forum, but didnt find much information, so it will be of great help if you provide some inputs.
Thanks & Regards,
Navneeth K.Hi, Navneeth,
With ALV functions, you can everything that you would do otherwise with the OOPS ALV. However , I don't think you can possibily have more controls in case of alv function because it occupies the entire screen and the function only calls 2 screens internally ( screen numbers 500 and 700 (for popup alv)).
But with OOPS on the other hand, you can have many controls on one screen, for example, you can have 2 ALV lists, or a splitter control with one of them having a Tree control and the other alv grid/list, pictures etc.
So the sole motive of the function is if you want to display a list, but when developing a serious application, I would go for OOPs ALV.
regards,
Advait -
Comparing ALV using Function modules and OO ALV
Hi All,
Please provide me what are the advantages of developing ALV using Objects compared to creation using function modules. What are the disadvantages of creating using the conventional FM way.
I have not worked much on ALV using Function modules, have been developing using standard abap classes. I wanted to have an detailed understanding and differences between the two.
Please provide your views on the same.
I have searched SDN forum, but didnt find much information, so it will be of great help if you provide some inputs.
Thanks & Regards,
Navneeth K.Hello,
Check this link
ALV FUNCTION MODULE AND OBJECT ORIENTED ?
Example programs
http://saplab.blogspot.com/2007/10/sample-abap-program-of-alv-grid-control.html
http://www.abapcode.info/2007/06/object-oriented-alv-using-two.html -
F4 Help in ALV GRID class based
hi
you have any idea about how to invoke the F4 help in ALV GRID Class based program.,
if u have any other related document or program using F4 function in ALV GRId please send to me for reference
Thanks & Regards
K.Ghi for what kind of fields you need to give f4.
are they std or custom...
please let me know about the fields..
try to check my logic which i gave in the below post..
it will give f4 help to the fields(if thet are standard table fieldS)
Message was edited by: Vijay Babu Dudla
Maybe you are looking for
-
How to Read from multiple channels
Dear Sir I am acquiring data using FP-RTD-122 using OPC Client software. I ahve made one socket for that and i am using command CWDataSocket1.AccessMode = cwdsReadAutoUpdate CWDataSocket1.URL = "opc://localhost/National Instruments.OPCFieldPoint/FP R
-
Haven't seen definitive answer... Hyperlinks don't work
I am using iWeb 08 and I have created a links page (http://web.mac.com/a_arredondo/HarmonicesGaudi/Links.html) and for the life of me I can't get the links to work. They work just fine in iWeb but not on the published site. The underlined titles are
-
Where do I install the after_effects_cs5_help.pdf so it will function in help within the program? CS5 Master Collection on a Mac with OS X 10.6.4 (Offline Only! The registration was done by our IT Dept. while breifly online for that purpose). Thanks
-
Using iPod Classic with Real Player
I recently received an 80GB iPod Classic. This is my first portable media player. I have purchased music from the Real Store using RealPlayer. This music is rights protected, and I do have the proper rights to use the downloads. In Real Player, these
-
I have some SR's that have been "awaiting Novell" for quite some time (and it seems neither the technician is getting the SLA alerts, nor are the managers--or they're just ignoring them). 10609776201 - awaiting Novell since April 23 10630781151 - awa