HOW TO DEVELOP AN INTERACTIVE REPORT
HI,
How to Develop an interactive report to display sales orders for particular customer, items for particular order.
Hi,
Look at the below sample Program for the Interactive ALV report.
*& Report Z_INTERACTIVE_ALV3 *
report z_interactive_alv4 no standard page heading line-size 650
message-id zz_9838 .
type-pools: slis.
*type declaration for values from ekko
types: begin of i_ekko,
ebeln like ekko-ebeln,
aedat like ekko-aedat,
bukrs like ekko-bukrs,
bsart like ekko-bsart,
lifnr like ekko-lifnr,
end of i_ekko.
data: it_ekko type standard table of i_ekko initial size 0,
wa_ekko type i_ekko.
*type declaration for values from ekpo
types: begin of i_ekpo,
ebeln like ekpo-ebeln,
ebelp like ekpo-ebelp,
matnr like ekpo-matnr,
menge like ekpo-menge,
meins like ekpo-meins,
netpr like ekpo-netpr,
end of i_ekpo.
data: it_ekpo type standard table of i_ekpo initial size 0,
wa_ekpo type i_ekpo .
*variable for Report ID
data: v_repid like sy-repid .
*declaration for fieldcatalog
data: i_fieldcat type slis_t_fieldcat_alv,
wa_fieldcat type slis_fieldcat_alv.
data: it_listheader type slis_t_listheader.
declaration for events table where user comand or set PF status will
be defined
data: v_events type slis_t_event,
wa_event type slis_alv_event.
declartion for layout
data: alv_layout type slis_layout_alv.
declaration for variant(type of display we want)
data: i_variant type disvariant,
i_variant1 type disvariant,
i_save(1) type c.
*PARAMETERS : p_var TYPE disvariant-variant.
*Title displayed when the alv list is displayed
data: i_title_ekko type lvc_title value 'FIRST LIST DISPLAYED'.
data: i_title_ekpo type lvc_title value 'SECONDRY LIST DISPLAYED'.
initialization.
v_repid = sy-repid.
perform build_fieldcatlog.
perform event_call.
perform populate_event.
start-of-selection.
perform data_retrieval.
perform build_listheader using it_listheader.
perform display_alv_report.
*& Form BUILD_FIELDCATLOG
Fieldcatalog has all the field details from ekko
form build_fieldcatlog.
wa_fieldcat-tabname = 'IT_EKKO'.
wa_fieldcat-fieldname = 'EBELN'.
wa_fieldcat-seltext_m = 'PO NO.'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'IT_EKKO'.
wa_fieldcat-fieldname = 'AEDAT'.
wa_fieldcat-seltext_m = 'DATE.'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'IT_EKKO'.
wa_fieldcat-fieldname = 'BUKRS'.
wa_fieldcat-seltext_m = 'COMPANY CODE'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'IT_EKKO'.
wa_fieldcat-fieldname = 'BUKRS'.
wa_fieldcat-seltext_m = 'DOCMENT TYPE'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'IT_EKKO'.
wa_fieldcat-fieldname = 'LIFNR'.
wa_fieldcat-no_out = 'X'.
wa_fieldcat-seltext_m = 'VENDOR CODE'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
endform. "BUILD_FIELDCATLOG
*& Form EVENT_CALL
we get all events - TOP OF PAGE or USER COMMAND in table v_events
form event_call.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = v_events
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.
endform. "EVENT_CALL
*& Form POPULATE_EVENT
Events populated for TOP OF PAGE & USER COMAND
form populate_event.
read table v_events into wa_event with key name = 'TOP_OF_PAGE'.
if sy-subrc eq 0.
wa_event-form = 'TOP_OF_PAGE'.
modify v_events from wa_event transporting form where name =
wa_event-form.
endif.
read table v_events into wa_event with key name = 'USER_COMMAND'.
if sy-subrc eq 0.
wa_event-form = 'USER_COMMAND'.
modify v_events from wa_event transporting form where name =
wa_event-name.
endif.
endform. "POPULATE_EVENT
*& Form data_retrieval
retreiving values from the database table ekko
form data_retrieval.
select ebeln aedat bukrs bsart lifnr from ekko into table it_ekko.
endform. "data_retrieval
*& Form bUild_listheader
text
-->I_LISTHEADEtext
form build_listheader using i_listheader type slis_t_listheader.
data hline type slis_listheader.
hline-info = 'this is my first alv pgm'.
hline-typ = 'H'.
endform. "build_listheader
*& Form display_alv_report
text
form display_alv_report.
v_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_grid_title = i_title_ekko
I_GRID_SETTINGS =
IS_LAYOUT = ALV_LAYOUT
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'ZLAY1'
i_save = 'A'
is_variant = i_variant
it_events = v_events
tables
t_outtab = it_ekko
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.
endform. "display_alv_report
*& Form TOP_OF_PAGE
text
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = it_listheader
i_logo =
I_END_OF_LIST_GRID =
endform. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
case r_ucomm.
when '&IC1'.
read table it_ekko into wa_ekko index rs_selfield-tabindex.
perform build_fieldcatlog_ekpo.
perform event_call_ekpo.
perform populate_event_ekpo.
perform data_retrieval_ekpo.
perform build_listheader_ekpo using it_listheader.
perform display_alv_ekpo.
endcase.
endform. "user_command
*& Form BUILD_FIELDCATLOG_EKPO
text
form build_fieldcatlog_ekpo.
wa_fieldcat-tabname = 'IT_EKPO'.
wa_fieldcat-fieldname = 'EBELN'.
wa_fieldcat-seltext_m = 'PO NO.'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'IT_EKPO'.
wa_fieldcat-fieldname = 'EBELP'.
wa_fieldcat-seltext_m = 'LINE NO'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'I_EKPO'.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-seltext_m = 'MATERIAL NO.'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'I_EKPO'.
wa_fieldcat-fieldname = 'MENGE'.
wa_fieldcat-seltext_m = 'QUANTITY'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'I_EKPO'.
wa_fieldcat-fieldname = 'MEINS'.
wa_fieldcat-seltext_m = 'UOM'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
wa_fieldcat-tabname = 'I_EKPO'.
wa_fieldcat-fieldname = 'NETPR'.
wa_fieldcat-seltext_m = 'PRICE'.
append wa_fieldcat to i_fieldcat.
clear wa_fieldcat.
endform. "BUILD_FIELDCATLOG_EKPO
*& Form event_call_ekpo
we get all events - TOP OF PAGE or USER COMMAND in table v_events
form event_call_ekpo.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = v_events
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.
endform. "event_call_ekpo
*& Form POPULATE_EVENT
Events populated for TOP OF PAGE & USER COMAND
form populate_event_ekpo.
read table v_events into wa_event with key name = 'TOP_OF_PAGE'.
if sy-subrc eq 0.
wa_event-form = 'TOP_OF_PAGE'.
modify v_events from wa_event transporting form where name =
wa_event-form.
endif.
endform. "POPULATE_EVENT
*& Form TOP_OF_PAGE
text
form f_top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = it_listheader
i_logo =
I_END_OF_LIST_GRID =
endform. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
*retreiving values from the database table ekko
form data_retrieval_ekpo.
select ebeln ebelp matnr menge meins netpr from ekpo into table it_ekpo.
endform.
form build_listheader_ekpo using i_listheader type slis_t_listheader.
data: hline1 type slis_listheader.
hline1-typ = 'H'.
hline1-info = 'CHECKING PGM'.
endform.
form display_alv_ekpo.
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 = 'F_USER_COMMAND'
i_callback_top_of_page = '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_title_ekpo
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT =
i_save = 'A'
IS_VARIANT =
it_events = v_events
tables
t_outtab = it_ekpo
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.
endform.
Regards,
Ram
Reward points if helpful
Similar Messages
-
Hi gurur's how we do the interactive report in ALV
hi gurur's how we do the interactive report in ALV.
PLZ HELP MEHi Srivasu,
I will send a sample code along with Comments check it once ok.copy the below code and execute it and debug it ok..
*& Report YPURCHASEORDER_ALV_LISTDISP *
*& DEVELOPER : KIRAN KUMAR.G *
& PURPOSE : CREATING A PURCHASE ORDER BASED ON PURCHASE DOC NUMBER
*& CREATION DT: 22/11/2007 *
*& REQUEST : ERPK900035 *
REPORT YPURCHASEORDER_ALV_LISTDISP.
Tables
TABLES : ekko, "Purchasing Document Header
ekpo. "Purchasing Document Item
Type pools
TYPE-POOLS: slis.
Internal Tables
DATA: BEGIN OF gt_headerdat OCCURS 0,
ebeln LIKE ekko-ebeln, " Purchasing Document Number
bukrs LIKE ekko-bukrs, " Company Code
bstyp LIKE ekko-bstyp, " Purchasing Document Category
bsart LIKE ekko-bsart, " Purchasing Document LIKE
aedat LIKE ekko-aedat, " Date on which the recordwascreate
ernam LIKE ekko-ernam, " Name of Person who Created Object
lifnr LIKE ekko-lifnr, " Vendor's account number
spras LIKE ekko-spras, " Language Key
ekorg LIKE ekko-ekorg, " Purchasing Organization
ekgrp LIKE ekko-ekgrp, " Purchasing group
END OF gt_headerdat.
DATA: BEGIN OF gt_item OCCURS 0,
matnr LIKE ekpo-matnr, "Material Number
werks LIKE ekpo-werks, "Plant
lgort LIKE ekpo-lgort, "Storage location
matkl LIKE ekpo-matkl, "Material group
menge LIKE ekpo-menge, "Purchase order quantity
meins LIKE ekpo-meins, "Order unit
netpr LIKE ekpo-netpr, "Net price in purchasing document
kunnr LIKE ekpo-kunnr, "Customer Number 1
END OF gt_item.
Global Structures
DATA: gt_header TYPE slis_t_listheader, "For Headings
wa_header TYPE slis_listheader,
gt_fieldcat TYPE slis_t_fieldcat_alv, "Structure Defintion
wa_fieldcat TYPE slis_fieldcat_alv,
gt_fieldcat1 TYPE slis_t_fieldcat_alv,
wa_fieldcat1 TYPE slis_fieldcat_alv,
wa_layout TYPE slis_layout_alv, "Layout
gt_events TYPE slis_t_event, "For Events
wa_events TYPE slis_alv_event.
Selection Screen
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_ebeln FOR ekko-ebeln.
SELECTION-SCREEN: END OF BLOCK b1.
Initialization
INITIALIZATION.
PERFORM initial.
Fetch Data
START-OF-SELECTION.
PERFORM fetch_data.
END-OF-SELECTION.
Bulid fieldcatalog
PERFORM fieldcat.
Change fieldcatalog
PERFORM fieldcat_change.
Events Triggering
PERFORM place_events.
Layout.
PERFORM layout.
Display Data
SORT gt_headerdat BY ebeln.
PERFORM display_list.
*& Form initial
text
--> p1 text
<-- p2 text
FORM initial .
s_ebeln-sign = 'I'.
s_ebeln-option = 'BT'.
s_ebeln-low = '3000000090'.
s_ebeln-high = '3000000166'.
APPEND s_ebeln.
ENDFORM. " initial
*& Form fetch_data
text
--> p1 text
<-- p2 text
FORM fetch_data .
REFRESH gt_headerdat. "Clear the Body of Internal Table
CLEAR gt_headerdat. "Clear Header Line
SELECT ebeln
bukrs
bstyp
bsart
aedat
ernam
lifnr
spras
ekorg
ekgrp
FROM ekko
INTO TABLE gt_headerdat
WHERE ebeln IN s_ebeln.
ENDFORM. " fetch_data
*& Form display_list
text
--> p1 text
<-- p2 text
FORM display_list .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-cprog
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USERCOMMAND'
I_STRUCTURE_NAME =
is_layout = wa_layout
it_fieldcat = gt_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = gt_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 = gt_headerdat
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.
ENDFORM. " display_list
*& Form place_events
text
--> p1 text
<-- p2 text
FORM place_events .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_events
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.
CLEAR wa_events. "Clear Header Line
READ TABLE gt_events INTO wa_events WITH KEY name = 'TOP_OF_PAGE'.
IF sy-subrc = 0.
wa_events-form = 'HEADING'.
MODIFY gt_events FROM wa_events INDEX sy-tabix.
ENDIF.
CLEAR wa_events. "Clear Header Line
READ TABLE gt_events INTO wa_events WITH KEY name = 'END_OF_LIST'.
IF sy-subrc = 0.
wa_events-form = 'PAGEDOWN'.
MODIFY gt_events FROM wa_events INDEX sy-tabix.
ENDIF.
CLEAR wa_events. "Clear Header Line
READ TABLE gt_events INTO wa_events WITH KEY name = 'USER_COMMAND'.
IF sy-subrc = 0.
wa_events-form = 'USERCOMMAND'.
MODIFY gt_events FROM wa_events INDEX sy-tabix.
ENDIF.
ENDFORM. " place_events
*& Form layout
text
--> p1 text
<-- p2 text
FORM layout .
CLEAR wa_layout. "Clear Header Line
wa_layout-zebra = 'X'. "Zebra Lines in the Output
wa_layout-colwidth_optimize = 'X'. "Optimize the Column Width
ENDFORM. " layout
*& Form heading
text
FORM heading.
WRITE:/6 'THIS REPORT DISPLAYS THE PURCHASE ORDER DETAILS'.
WRITE:/6 'CLICK ON PURCHASE DOC NO FIELD(INTERACTIVE LIST)'.
ENDFORM. "heading
*& Form fieldcat
text
--> p1 text
<-- p2 text
FORM fieldcat .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = SY-CPROG
i_internal_tabname = 'GT_HEADERDAT'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = SY-CPROG
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = gt_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.
ENDFORM. " fieldcat
*& Form fieldcat_change
text
--> p1 text
<-- p2 text
FORM fieldcat_change .
LOOP AT gt_fieldcat INTO wa_fieldcat.
CASE wa_fieldcat-fieldname.
WHEN 'EBELN'.
wa_fieldcat-hotspot = 'X'.
ENDCASE.
MODIFY gt_fieldcat FROM wa_fieldcat INDEX sy-tabix.
ENDLOOP.
ENDFORM. " fieldcat_change
*& Form pagedown
text
FORM pagedown.
WRITE:/35 'HAVE A NICE DAY...' COLOR 4.
ENDFORM. "pagedown
*& Form usercommand
text
-->UCOMM text
-->SELFIELD text
FORM usercommand USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
READ TABLE gt_headerdat INDEX selfield-tabindex.
CASE selfield-sel_tab_field.
WHEN 'GT_HEADERDAT-EBELN'.
REFRESH : gt_item.
CLEAR : gt_item.
SELECT matnr
werks
lgort
matkl
menge
meins
netpr
kunnr
FROM ekpo
INTO TABLE gt_item
WHERE ekpo~ebeln EQ gt_headerdat-ebeln.
*Build a Field Catalog
PERFORM fieldcat1.
*For Heading in the Interactive List
PERFORM heading1.
*Display Interactive Data
PERFORM display_data1.
ENDCASE.
ENDFORM. "usercommand
*& Form fieldcat1
text
--> p1 text
<-- p2 text
FORM fieldcat1 .
REFRESH : gt_fieldcat1.
CLEAR : wa_fieldcat1.
wa_fieldcat1-col_pos = '1'. "Column Postion
wa_fieldcat1-fieldname = 'MATNR'. "Field Name
wa_fieldcat1-tabname = 'GT_ITEM'. "Internal Table
wa_fieldcat1-key = 'X'. "Blue Color
wa_fieldcat1-seltext_l = 'MATERIAL NO'. "Display Text Screen
APPEND wa_fieldcat1 TO gt_fieldcat1.
CLEAR wa_fieldcat1.
wa_fieldcat1-col_pos = '2'. "Column Postion
wa_fieldcat1-fieldname = 'WERKS'. "Field Name
wa_fieldcat1-tabname = 'GT_ITEM'. "Internal Table
wa_fieldcat1-seltext_l = 'PLANT'. "Display Text Screen
APPEND wa_fieldcat1 TO gt_fieldcat1.
CLEAR wa_fieldcat1.
wa_fieldcat1-col_pos = '3'. "Column Postion
wa_fieldcat1-fieldname = 'LGORT'. "Field Name
wa_fieldcat1-tabname = 'GT_ITEM'. "Internal Table
wa_fieldcat1-seltext_l = 'STORAGE LOCATION'."Display Text Screen
APPEND wa_fieldcat1 TO gt_fieldcat1.
CLEAR wa_fieldcat1.
wa_fieldcat1-col_pos = '4'. "Column Postion
wa_fieldcat1-fieldname = 'MATKL'. "Field Name
wa_fieldcat1-tabname = 'GT_ITEM'. "Internal Table
wa_fieldcat1-seltext_l = 'MATERIAL GRP'. "Display Text Screen
APPEND wa_fieldcat1 TO gt_fieldcat1.
CLEAR wa_fieldcat1.
wa_fieldcat1-col_pos = '5'. "Column Postion
wa_fieldcat1-fieldname = 'MENGE'. "Field Name
wa_fieldcat1-tabname = 'GT_ITEM'. "Internal TAble
wa_fieldcat1-seltext_l = 'PO QUANTITY'. "Display Text Screen
APPEND wa_fieldcat1 TO gt_fieldcat1.
CLEAR wa_fieldcat1.
wa_fieldcat1-col_pos = '6'. "Column Pos tion
wa_fieldcat1-fieldname = 'MEINS'. "Field Name
wa_fieldcat1-tabname = 'GT_ITEM'. "Internal TAble
wa_fieldcat1-seltext_l = 'BASE UNIT MEASURE'."Display Text Screen
APPEND wa_fieldcat1 TO gt_fieldcat1.
CLEAR wa_fieldcat1.
wa_fieldcat1-col_pos = '7'. "Column Postion
wa_fieldcat1-fieldname = 'NETPR'. "Field Name
wa_fieldcat1-tabname = 'GT_ITEM'. "Internal Table
wa_fieldcat1-seltext_l = 'NET PRICE'. "Display Text Screen
APPEND wa_fieldcat1 TO gt_fieldcat1.
CLEAR wa_fieldcat1.
wa_fieldcat1-col_pos = '8'. "Column Postion
wa_fieldcat1-fieldname = 'KUNNR'. "Field Name
wa_fieldcat1-tabname = 'GT_ITEM'. "Internal Table
wa_fieldcat1-seltext_l = 'CUSTOMER NO'. "Display Text Screen
APPEND wa_fieldcat1 TO gt_fieldcat1.
CLEAR wa_fieldcat1.
ENDFORM. " fieldcat1
*& Form heading1
text
--> p1 text
<-- p2 text
FORM heading1 .
REFRESH : gt_header.
CLEAR : wa_header.
wa_header-typ = 'H'.
wa_header-info = 'THIS IS AN INTERACTIVE LIST'.
APPEND wa_header TO gt_header.
ENDFORM. " heading1
*& Form top
text
FORM top.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_header
I_LOGO =
I_END_OF_LIST_GRID =
ENDFORM. "top
*& Form display_data1
text
--> p1 text
<-- p2 text
FORM display_data1 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = SY-CPROG
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_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 =
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = gt_fieldcat1
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
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 = gt_item
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.
ENDFORM. " display_data1
Reward points if helpful.
Kiran Kumar.G.A
Have a Nice Day.. -
How to customize an interactive report PDF using a BI Publisher template
Hi,
I am trying to figure out how to get an interactive report to work with BI Publisher. I want it so that I can create a custom RTF template with custom headings, and then apply this for the interactive report.
On the front end, when a user runs an interactive report, they are able to hide and show columns, and then click on Actions > Download > PDF. I want this to access the custom template and return a PDF based on this template, and also showing the columns that the user has selected in the interactive report.
I have already created a custom RTF Word Doc in BI Publisher, and have uploaded it into a report query created in Apex. I am not sure though how to apply this report query to an interactive report, or if that’s even what I’m supposed to do to get it to work the way I want it to.
When editing the Report Attributes, under Print Attributes, there is a section called Printing.
Under this, there is a "Print Server Overwrite". I thought this is where you can specify your report query. But I am not sure if I even need a report query because I don't understand why you have a report query that is based on a static query, when in an Interactive Report, the user can hide columns.
I have Apex 4.0.1.00.03 and Oracle BI Publisher 10.1.3.4.0d installed.
Thanks,
GageHi Gage,
Custom RTF and XSL-FO templates are currently only supported with classic report regions and report queries, but not with interactive reports. So you would need to create a report query based on the SQL statement you used for your interactive report and then associated your template with that report query. Unfortunately you won't be able to use any of your customizations, filters, or column selections this way. We're planing to support report layouts with interactive reports in the future.
Regards,
Marc -
Hi experts,
How to convert an interactive report to ALV report..plz suggest me an example...
thanks in advance,
Varsha.hi varsha,
chk this link.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
you will get good idea.
use this FM.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
I_callback_user_command = 'USER_COMMAND'
is_layout = gd_layout
it_fieldcat = fieldcatalog[] "create a field catlog.
i_save = 'X'
tables
t_outtab = it_tab "pass the final internal table.
exceptions
program_error = 1
others = 2.
Regards
Anver -
How to Develop the ABAP Reports in Business One
HI all;
am New to SAP Business One,
How to Develop the Z Reports in Business One ? like Normal ALV Reports and other??
Can we have the ABAP Editor and Other Transaction in Business One.
-RaviHi Sharma,
Thanks for Your Replay,
This is what my requirement !.
Hi Experts,
Here we are integrating SAP Business One with 3rd Party tool. !!
We need to Develop Customize Report in Business one and These Reports Out Put Will Convert into XML Files (Third Party System Can Understand Only XML files) and stored in Application Server/ Presentation Server.
How to Develop the u2018Z/Yu2019 Reports in Business one ? Can we use SE38 (R/3 ABAP Editor and other T-codes) in Business One.? Or is there any tools to develop the Business One Reports ? How to Convert the Report out put into XML File?
Thanks,
Upender. -
How to make an interactive report, non-interactive
Hi,
I have an interactive report. I have disabled every interactive control from the report by setting "include search bar" to NO and also at column level i didnt allow to sort or group or any other thing. Only problem is that when i click the column heading, i see a text box poping up and asks to enter some value so that it could filter the report and if i provide any value and pres enter, it returns message "ERR-1777: Page 1 provided no page to branch to. Please report this error to your application administrator."
How can i disable this text box from appearing and making report fully non interactive. I don't want to rebuild the page as not interactive report and want to disable this popup from my current interactive report.
Thanks
Salman
Edited by: Salman Qureshi on Aug 19, 2009 10:11 AMHi Salman,
You can "disable" the column links by hiding them.
The simplest method would be to change the column heading to something like:
</div>>div<EnameThe link is created on a DIV tag that contains no text. The above will close this DIV and open a new one for the heading. As there's no text in the first DIV, the user can't see it nor click on it.
Andy -
How to limit an Interactive Report Region from displaying.
I have a page which is an interactive report. When you call that page from another one it takes a while as it is selecting all rows (over 10k). Once those rows are retrieved and the user adds a filter criteria it's relatively fast. How do I limit the report from running when I call the page until the user adds a filter?
thanks
JohnI'm not sure how this works. If I set it to a really small number say 5 rows it shows only 5 rows upon rendering of that page. However, when I subsequently click on Go for all rows or any other larger number I don't get the larger number. How do I get that portion to work as well?
thanks -
Hi can anybody suggest me how to do classical interactive report
<<These are not training forums and there is plenty of material available. Try google ).
hi guys
i am new to oops
i want to do classical interactive report in oops with all events
can anybody suggest me how to do that
can if possible send one program on classical interactive report
thanks & regards
kals.
Edited by: Matt on Jan 18, 2010 9:46 AM203 (188 unresolved)
Outstanding numbers!!! With this statistic I would rather afraid of my next posts being locked by moderator.
Regards
Marcin -
How to create Updateable Interactive report in APEX 3.2.1.00.11
I have an interactive report and am asked to add few more user defined columns, some of them should be free text input box type and couple of others are dropdown list (with Y/N options). I can do that if that was just a SQL report but with interactive report, I am not much aware of if it can be done. I know a way to work around this though - like create a link to direct to a new form page and update there but that is not what I wanted. I need to have those columns in the interactive report itself and should be updateable as well. Is this possible?
Oracle DB 11g
Oracle APEX 3.2.1.00.11
Thanks,
SamHi,
This might help
http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:137800346674748
I hope this do not come too late
Regards,
Jari
My Blog: http://dbswh.webhop.net/htmldb/f?p=BLOG:HOME:0
Twitter: http://www.twitter.com/jariolai -
How to Print a interactive report without action button and search bar
Hello every one....
I am working on printing an interactive report. If there are 20 columns in that report i need to select some columns for printing. For this purpose i used actions button which is in the search bar of the interactive report. But i do not want to get that Actions button and search bar to get printed in the printing page. Can any one give a solution to sort out my problem
Thanks
Manoj.>
Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and ensure you have updated with your profile with a real handle instead of "886412".
You'll get a faster, more effective response to your questions by including as much relevant information as possible upfront. This should include:
<li>Full APEX version
<li>Full DB version and edition
<li>Web server architecture (EPG, OHS or APEX listener)
<li>Browser(s) and version(s) used
<li>Theme
<li>Template(s)
<li>Region/item type(s)
I am working on printing an interactive report. If there are 20 columns in that report i need to select some columns for printing. For this purpose i used actions button which is in the search bar of the interactive report. But i do not want to get that Actions button and search bar to get printed in the printing page. Can any one give a solution to sort out my problemSee +{message:id=2475831}+
Always search the forum thoroughly before posting a question: 98% of questions (like this one) have been answered before. -
How to dynamically disable interactive report filed in master detail page
I am using APEX 4.0 & very new to APEX. I am not able to make disable a filed in detail region (which is a interactive report) of a master detail Page.
I.e. want to disable field of a row based on value of another field for same record, just like set_item_instance_property of oracle forms. Please help me out.its working fine for tabular form. But not working for master detail form (for detail section). Can you please help me out
-
How instal developer (forms and reports ) on Apple Mac
I want to install oracle 6i forms and report on Apple Mac note book. how i and where i can download developer installer for MAC OS.
ThanksApple Mac is not a suitable platform to install oracle products. You can take a look at the Oracle Certify Matrix and you can build up your own conclusions.
In this case, use your Apple Mac for documentation, get a Microsoft Windows Based platform, and choose a certified platform.
~ Madrid
http://hrivera99.blogspot.com/ -
How to develop/print a report wider than 8.5 inches, why cant we landscape
Hi All Gurus,
I am new to Oracle Reports. I have a problem, I have a report that has rows longer than normal A4, A5, A6 paper width, so report lines either tend to go on next page or on next line of the same page. Also Oracle Report is not allowing me to print report in landscape mode, why this limitation ? I am wondering, cuz in older character based tools (Foxpro, Informix-4GL), we could easily print wider reports on a line printer which always had a capacity of 132 characters (and in condensed mode, 224 characters). So only small (and very simple) reports were printed on regular paper of 80 characters (8.5 inches wide), but for almost all real use reports we were able to use 132 (224 in condensed) characters paper.
How can we do this ith Oracle GUI report builder?. Why are we limited to 80 character paper size? why cant we print report in landscape mode? It is not, in any case, allowing me columns that go beyond 80 characters (8.5 inches) on a line. If this is an Oracle limitation, I would say Oracle Reports cannot be used for actual reporting, it is just a fancy with GUI and colors!!!!!
Can anybody answer my questions? please tell me an immediate solution.
Thanks in AdvanceYou can go to Object Navigator, under Layout Model, click the Main Section icon to open the property, change to Width from 8.5 to 11 and Height from 11 to 8.5. Do the same for Header/Trailer Sections if needed.
At report printing, choose Landscape Orientation.
DC -
How to Schedule an Interactive report in Background?
Hi Experts,
The existing program generates Pay-in-slip,in the selection screen i am giving
company code(Parameter) and Dates(select-option) as input,this gives me a list of records(ALV)
with check boxe's if i select the records and click on 'post' button in the basic list then the program prompts with dialouge box to set print parameters for samrt form.
The requiremnt is, in the basic list when we select the check box and click on 'Post' icon the rest of the program should sechdule the job in background and a spool & log has to be generated in SM37.
Would be thankful to one who can guide me regarding this.
Edited by: Prince on Jul 1, 2010 12:48 PMWhat I once did was set sy-batch = 'X' at the appropriate point in the code....not suggesting that as the best solution, but it worked for me at the time...
What I do today is present an SALV, when the user presses a particular function, I do (write statements in my program automatically create a spool for the userid specified in user):
call function 'JOB_OPEN'
exporting
jobname = lc_name "my job name
importing
jobcount = lv_number "hold this value.
exceptions
lv_sav_subrc = sy-subrc . "i use this value elsewhere...
if lv_sav_subrc eq 0.
submit <your program name>
using selection-set lv_variant "background only variant I created for the program
with <your parameter> eq somevalue
with <your_parameter2> eq somevalue
user <batchuserid> "use this to be sure background job can be executed
via job lc_name number lv_number
and return.
call function 'JOB_CLOSE'
exporting
jobcount = lv_number
jobname = lc_name
strtimmed = gc_x
importing
job_was_released = lv_job_released
exceptions
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
others = 8. -
Develop an interactive report which displays the list of purchase requtions
please give the related table and source code
Hi,
Please check this link for purchasing tables.
http://www.erpgenie.com/sap/abap/tables_mm.htm#Purchasing%20Tables
Regards,
Ferry Lianto
Maybe you are looking for
-
Hi , My IF statement dosnt seems to work in smartforms.I have the following code in window-text element . if &adrc-name1& ne ' '. &adrc-name1& endif. if &adrc-name2 ne ' '. &adrc-name2& endif But still its creating the blank lines on script output.I
-
Driver only for the HD 4110 webcam...do not install suite in Win 8.1
Dear Readers: I mistakenly installed the software suite for the 4110 webcam on a win 8.1 pc and the camera cannot deliver a good image. (I think this is due to the fact that the win 8 platform is not supported for this camera, unless in compatibility
-
Error when import ABAP stage for Database Instance Installation
I got error for DI Installation for ERP2005 (NW2004sSR2) on Windows 2003 R2, MSSQL2005 on IA64. Below is are logs. Please help. Thanks in advance. import_monitor.java.log [code] java version "1.4.2_13" Java(TM) 2 Runtime Environment, Standard Edition
-
My iphoto library has become unreadable. I am wondering if I shoudl delete iphoto and reinstall? Can I download iphoto from the web? I bought my computer in February of this year. Do I have to buy a new copy?
-
ok, so i have a vocal track, and the friend of mine who did it said some pretty vile things (and trust me, when i say vile, i mean viiiiiiiiiiiile! haha) so what id like to do is go in and cut out the small pieces of audio where those lovely words re