Uploading logo into interactive reports and ALV rerports
hi experts,
how to upload logo into interactive reports and ALV reports.
thank u.
hi for any thing in alv check these links,
chk out these links..
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
reward points if useful,
regards,
venkat.
Similar Messages
-
What is the difference between interactive report and alv interactive repor
what is the difference between interactive report and alv interactive report
could u plz explain clearly.Hi Rajesh,
interactive report or alv interactive report , both are same but except the viewer, Abap List Viewer (ALV).
Here in i am placing a sample simple ALV Interactive report.
Just double click on the customer number to go to the next screen.
*& Report ZKAL_ALV_INTERACTIVE_1 *
REPORT ZKAL_ALV_INTERACTIVE_1 .
TYPE-POOLS: SLIS.
TYPES: BEGIN OF TY_KNA1,
KUNNR TYPE KUNNR,
NAME1 TYPE NAME1,
ORT01 TYPE ORT01,
END OF TY_KNA1.
TYPES: BEGIN OF TY_VBAK,
VBELN TYPE VBELN,
ERNAM TYPE ERNAM,
ERDAT TYPE ERDAT,
NETWR TYPE NETWR,
WAERK TYPE WAERK,
END OF TY_VBAK.
&--WORK AREA & TABLE DECLARATION--
DATA: W_KNA1 TYPE TY_KNA1.
DATA: T_KNA1 TYPE STANDARD TABLE OF TY_KNA1 INITIAL SIZE 1.
DATA: W_VBAK TYPE TY_VBAK.
DATA: T_VBAK TYPE STANDARD TABLE OF TY_VBAK INITIAL SIZE 1.
&--FIELDCAT TABLE & WORK AREA--
DATA: W_FCAT TYPE SLIS_FIELDCAT_ALV.
DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: W_FCAT1 TYPE SLIS_FIELDCAT_ALV.
DATA: T_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.
&--EVENT TABLE AND WORK AREA--
DATA: W_EVENTS TYPE SLIS_ALV_EVENT.
DATA: T_EVENTS TYPE SLIS_T_EVENT.
DATA: W_EVENTS1 TYPE SLIS_ALV_EVENT.
DATA: T_EVENTS1 TYPE SLIS_T_EVENT.
&--COMMENT TABLE & WORK AREA--
DATA: W_COMMENT TYPE SLIS_LISTHEADER.
DATA: T_COMMENT TYPE SLIS_T_LISTHEADER.
DATA: W_COMMENT1 TYPE SLIS_LISTHEADER.
DATA: T_COMMENT1 TYPE SLIS_T_LISTHEADER.
&----APPENDING FCAT -
W_FCAT-COL_POS = 1.
W_FCAT-FIELDNAME = 'KUNNR'.
W_FCAT-SELTEXT_M = 'CUST. NO'.
W_FCAT-HOTSPOT = 'X'. "HOT SPOT HAND SYMBOL
W_FCAT-EMPHASIZE = 'C119'. "FOR COLORING THE COLUMN 1
APPEND W_FCAT TO T_FCAT.
CLEAR W_FCAT.
W_FCAT-COL_POS = 2.
W_FCAT-FIELDNAME = 'NAME1'.
W_FCAT-SELTEXT_M = 'CUST. NAME'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 3.
W_FCAT-FIELDNAME = 'ORT01'.
W_FCAT-SELTEXT_M = 'CITY'.
APPEND W_FCAT TO T_FCAT.
W_FCAT1-COL_POS = 1.
W_FCAT1-FIELDNAME = 'VBELN'.
W_FCAT1-SELTEXT_M = 'ORDER NO'.
W_FCAT1-EMPHASIZE = 'C519'.
APPEND W_FCAT1 TO T_FCAT1.
CLEAR W_FCAT.
W_FCAT1-COL_POS = 2.
W_FCAT1-FIELDNAME = 'ERNAM'.
W_FCAT1-SELTEXT_M = 'NAME OF PARTY'.
APPEND W_FCAT1 TO T_FCAT1.
W_FCAT1-COL_POS = 3.
W_FCAT1-FIELDNAME = 'ERDAT'.
W_FCAT1-SELTEXT_M = 'DATE'.
APPEND W_FCAT1 TO T_FCAT1.
W_FCAT1-COL_POS = 4.
W_FCAT1-FIELDNAME = 'NETWR'.
W_FCAT1-SELTEXT_M = 'ORDER VALUE'.
APPEND W_FCAT1 TO T_FCAT1.
W_FCAT1-COL_POS = 5.
W_FCAT1-FIELDNAME = 'WAERK'.
W_FCAT1-SELTEXT_M = 'CURRENCY'.
APPEND W_FCAT1 TO T_FCAT1.
&--APPEND COMMENTRY--
W_COMMENT-TYP = 'H'.
W_COMMENT-INFO = 'CUSTOMER DETAILS'.
APPEND W_COMMENT TO T_COMMENT.
CLEAR W_COMMENT.
&--APPEND EVENTS TABLE--
W_EVENTS-NAME = 'TOP_OF_PAGE'.
W_EVENTS-FORM = 'TOPPAGE'.
APPEND W_EVENTS TO T_EVENTS.
W_EVENTS-NAME = 'USER_COMMAND'.
W_EVENTS-FORM = 'SUB2'.
APPEND W_EVENTS TO T_EVENTS.
W_EVENTS1-NAME = 'TOP_OF_PAGE'.
W_EVENTS1-FORM = 'TOPPAGE1'.
APPEND W_EVENTS1 TO T_EVENTS1.
CLEAR W_EVENTS1.
W_EVENTS1-NAME = 'USER_COMMAND'.
W_EVENTS1-FORM = 'SUB3'.
APPEND W_EVENTS1 TO T_EVENTS1.
SELECT-OPTIONS: CUSTNO FOR W_KNA1-KUNNR.
SELECT KUNNR
NAME1
ORT01 FROM KNA1 INTO TABLE T_KNA1
WHERE KUNNR IN CUSTNO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'ZKAL_ALV_INTERACTIVE_12'
I_BACKGROUND_ID = 'BIKE'
I_GRID_TITLE = 'CUSTOMER DETAILS'
IT_FIELDCAT = T_FCAT
IT_EVENTS = T_EVENTS
TABLES
T_OUTTAB = T_KNA1 .
FORM TOPPAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_COMMENT
I_LOGO = 'LOGO_ALV'.
ENDFORM. "END OF TOPPAGE SUB.
FORM SUB2 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.
READ TABLE T_KNA1 INTO W_KNA1 INDEX FIELDS1-TABINDEX.
SELECT VBELN
ERNAM
ERDAT
NETWR
WAERK
FROM VBAK
INTO TABLE T_VBAK
WHERE KUNNR = W_KNA1-KUNNR.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'ZKAL_ALV_INTERACTIVE_12'
I_BACKGROUND_ID = 'KALEEM'
I_GRID_TITLE = 'LIST OF ORDERS'
IT_FIELDCAT = T_FCAT1
IT_EVENTS = T_EVENTS1
TABLES
T_OUTTAB = T_VBAK.
ENDFORM. "END OF SUB2.
FORM TOPPAGE1.
&--APPEND COMMENTRYOF SECONDRY SCREEN--
W_COMMENT1-TYP = 'H'.
W_COMMENT1-INFO = 'LIST OF ORDERS'.
APPEND W_COMMENT1 TO T_COMMENT1.
W_COMMENT1-TYP = 'S'.
W_COMMENT1-KEY = 'CUSTOMER'.
W_COMMENT1-INFO = W_KNA1-KUNNR.
APPEND W_COMMENT1 TO T_COMMENT1.
CLEAR W_COMMENT.
W_COMMENT1-TYP = 'A'.
W_COMMENT1-INFO = W_KNA1-NAME1.
APPEND W_COMMENT1 TO T_COMMENT1.
CLEAR W_COMMENT1.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_COMMENT1
I_LOGO = 'LOGO_ALV'
REFRESH T_COMMENT1.
ENDFORM. "END OF TOPPAGE1
FORM SUB3 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.
READ TABLE T_VBAK INTO W_VBAK INDEX FIELDS1-TABINDEX.
SET PARAMETER ID 'AUN' FIELD W_VBAK-VBELN.
CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
ENDFORM.
U can also find some of the useful codes on WIKI-SDN.
Reward helpful Answers.
Regds,
Kaleem. -
Interactive report and ALV s in HR ABAP.
hi all,
can any one tell , how to do Interactive reporting and alv's in HR ABAP. with some example reports..Hi Rao
Nothing changes for HR ABAP when it comes to ALV or Interactive Lists. Only the DATA fetching process is changed. To fetch HR data , you use Logical Database PNP or Clusters or just read a specific infotype using a method.
Here is a sample program for ALV 'BALVST02_GRID'. For interactive list , use this demo program
DEMO_LIST_INTERACTIVE_1. It is a series of Demo Programs which you can open in SE38.
Reward Points, if helpful.
Regards
Waz -
What i sthe diff b/w Interactive Report and ALV Interactive report
Hi All,
I want to know the basic diff b/w Interactive report and ALV interactive report.
Can any one tell me the exact diif.
Thanks in Advance,
Jdhi jagadish,
both are used for same purpose
interactive report means an output list which displays basic details & allows user to interact, so that a new list is populated based on user-selection. With interactive list, the user can actively control data retrieval and display during the session. a total no of 21 lists including main list are genearetd in interactive lists.
I suggest to use ALV.by using ALV we can display in Grid as well as list format.
Output format will be good . Sorting,Filtering facilities are provided by itself.We can have column headings also. using oops we can also do alv reporting.
if helpful reward some points.
with regards,
suresh babu aluri. -
Difference between Interactive report and ALV Interactive report.
What is the difference between Interactive report and ALV Interactive report.
i think there is no much difference the same Interactive report Events and functionality we will implement with ALV.
Experts guide me.Hi,
ALV interactive report gives many advantages than interactive report like sorting, summing and getting graphics.
An interactive report generally basic list displayed. User double clicks on any valid line or user selects a line and presses as button on the tool bar. Then the corresponding event is triggered
refer
http://www.sapgenie.com/abap/drill_down_reports.htm
You can find a interactive ALV report here
http://www.sap-img.com/abap/an-interactive-alv-report.htm
also refer
Below threads consist of number of interactive ALV codes:
interactive ALV code
ALV-INTERACTIVE.
Interactive ALV
Regards -
Diff between interactive report and interactive alv
Diff between interactive report and interactive alv? Suppose I have been given certain program then how I will diffrentiate that this prog should be done in interactive alv or interactive report.
hi
both are used for same purpose
interactive report means an output list which displays basic details & allow user to interact, so that a new list is populated based on user-selection. With interactive list, the user can actively control data retrieval and display during the session.
I suggest to use ALV.by using ALV we can display in Grid as well as list format.
Output format will be good . Sorting,Filtering facilities are provided by itself.We can have column headings also.
if helpful reward points -
How to generate interactive report in alv
hi,
how to generate interactive report in alv,for this what are the requirements,
give me one sample report.
thankyou.Hi,
Chk these helpful links..
ALV
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
Regards
Anversha -
How we can get an interactive report in alv grid display?
Hi experts
Plz tell me how we can get an interactive report in alv grid disply pls send me one sample code to understand this
thanks in advancehi,
check this one
*& Report ZALV_FIELD_GRID1
REPORT ZALV_FIELD_GRID1
NO STANDARD PAGE HEADING.
TABLES MARA.
type-pools :slis.
TYPES : BEGIN OF TMARA ,
MATNR LIKE MARA-MATNR,
MEINS LIKE MARA-MEINS,
ERSDA LIKE MARA-ERSDA,
color(4) type c,
SEL type c,
LIGHT TYPE C,
END OF TMARA.
TYPES: BEGIN OF TMAKT,
MATNR LIKE MAKT-MATNR,
MAKTX LIKE MAKT-MAKTX,
MAKTG LIKE MAKT-MAKTG,
SEL TYPE C,
COLOR(4),
END OF TMAKT.
DATA: ITAB TYPE TMARA OCCURS 0 WITH HEADER LINE,
ITAB1 TYPE TMAKT OCCURS 0 WITH HEADER LINE,
wa_fieldcat type slis_fieldcat_alv,
fieldcat type slis_fieldcat_alv occurs 0,
i_layout type slis_layout_alv,
WA_LISTHEADER TYPE SLIS_LISTHEADER,
i_LISTHEADER TYPE SLIS_LISTHEADER OCCURS 0,
V_EVENTS TYPE SLIS_T_EVENT ,
WA_EVENT TYPE SLIS_ALV_EVENT,
I_TITLE_MARA TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED',
I_TITLE_MAKT TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED',
SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE,
PRINT_CONT type slis_print_alv.
SELECTION SCREE
selection-screen begin of block screen1 with frame title TEXT-001.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN COMMENT /32(35) COMM1.
SELECTION-SCREEN ULINE /27(35).
SELECTION-SCREEN SKIP.
SELECT-OPTIONS MATNR FOR MARA-MATNR.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN ULINE.
SELECTION-SCREEN COMMENT /30(50) COMM2.
SELECTION-SCREEN ULINE /27(40).
SELECTION-SCREEN SKIP.
SELECT-OPTIONS ERSDA FOR MARA-ERSDA.
SELECTION-SCREEN SKIP.
selection-screen end of block screen1.
INITIALIZATION
INITIALIZATION.
MATNR-low = '23'.
MATNR-high = '1000'.
MATNR-option = 'BT'.
MATNR-sign = 'I'.
APPEND MATNR.
ERSDA-low = '20030124'.
ERSDA-high = '20050302' .
APPEND ERSDA.
PERFORM FILLFIELD.
PERFORM FILLLAYOUT.
PERFORM build_print_params.
PERFORM FILL_SORT.
PERFORM EVENT_CALL.
PERFORM POPULATE_EVENT.
SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
comm1 ='SELECT MATERIAL NUMBER RANGE'.
comm2 ='SELECT MATERIAL CREATION DATE'.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM READDATA.
PERFORM POPDATA.
*& Form READDATA
text
FORM READDATA .
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = MATNR-LOW
IMPORTING
OUTPUT = MATNR-LOW.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = MATNR-HIGH
IMPORTING
OUTPUT = MATNR-HIGH.
SELECT MATNR
ERSDA
MEINS
FROM MARA
INTO CORRESPONDING FIELDS OF
TABLE ITAB
WHERE MATNR IN MATNR AND ERSDA IN ERSDA.
LOOP AT ITAB.
data id_color type i VALUE 1.
data id_colors(2) type c.
IF ITAB-MATNR < '000000000000000100'.
ITAB-LIGHT = '1'.
ELSEIF ITAB-MATNR < '000000000000000150' AND ITAB-MATNR >
'000000000000000100' .
ITAB-LIGHT = '2'.
ELSE.
ITAB-LIGHT = '3'.
ENDIF.
id_color = id_color + 1.
if id_color > 7.
id_color = 1.
endif.
id_colors = id_color.
concatenate 'C' id_colors '10' into itab-color.
modify itab.
CLEAR ITAB.
endloop.
ENDFORM. " READDATA
Form FILLFIELD
FORM FILLFIELD .
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-KEY = 'X'.
WA_FIELDCAT-COL_POS = '1'.
WA_FIELDCAT-outputlen = 20.
WA_FIELDCAT-HOTSPOT = 'X'.
wa_fieldcat-seltext_m = 'MATERIAL NUMBER'.
*WA_FIELDCAT-EMPHASIZE = 'C210'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-COL_POS = '2'.
*WA_FIELDCAT-EMPHASIZE = 'C510'.
WA_FIELDCAT-outputlen = 10.
wa_fieldcat-seltext_m = 'UNIT'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
WA_FIELDCAT-FIELDNAME = 'ERSDA'.
WA_FIELDCAT-COL_POS = '3'.
WA_FIELDCAT-outputlen = 15.
*WA_FIELDCAT-EDIT_MASK = 'DD.MM.YYYY'.
*WA_FIELDCAT-EMPHASIZE = 'C710'.
wa_fieldcat-seltext_m = 'CREAT DATE'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
ENDFORM. "FILLFIELD
Setup print parameters
form build_print_params.
PRINT_CONT-reserve_lines = '3'. "Lines reserved for footer
PRINT_CONT-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
Form POPDATA
FORM POPDATA .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER-COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOPPAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE = I_TITLE_MARA
I_GRID_SETTINGS =
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = V_EVENTS
IT_EVENT_EXIT =
IS_PRINT = PRINT_CONT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
ENDFORM. " POPDATA
Form TOPPAGE
FORM TOPPAGE.
REFRESH I_LISTHEADER.
DATA: ld_lines type i,
ld_linesc(10) type c,
I_DATE(10) TYPE C,
I_INFO LIKE WA_LISTHEADER-INFO.
WA_LISTHEADER-TYP = 'H'.
WA_LISTHEADER-INFO = 'MATERIAL DETAIL'.
APPEND WA_LISTHEADER TO I_LISTHEADER.
CLEAR WA_LISTHEADER.
WA_LISTHEADER-TYP = 'S'.
WA_LISTHEADER-KEY = 'DATE :'.
CONCATENATE SY-DATUM+6(2) '.'
SY-DATUM+4(2) '.'
SY-DATUM(4) INTO I_DATE.
WA_LISTHEADER-INFO = I_datE.
APPEND WA_LISTHEADER TO I_LISTHEADER.
CLEAR WA_LISTHEADER.
describe table ITAB lines ld_lines.
ld_linesc = ld_lines.
concatenate 'TOTAL NUMBER OF RECORD SELECTED: ' ld_linesc
into I_INFO separated by space.
WA_LISTHEADER-TYP = 'A'.
WA_LISTHEADER-INFO = I_INFO.
append WA_LISTHEADER to I_LISTHEADER.
clear: WA_LISTHEADER , I_INFO.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = I_LISTHEADER
I_LOGO = 'ENJOYSAP_LOGO'.
ENDFORM. "TOPPAGE
Form FILLLAYOUT
FORM FILLLAYOUT .
i_layout-zebra = 'X'.
i_layout-info_fieldname = 'COLOR'.
i_layout-box_fieldname = 'SEL'.
I_LAYOUT-lights_fieldname = 'LIGHT'.
I_LAYOUT-EDIT ='X'.
I_LAYOUT-colwidth_optimize = 'X'.
I_LAYOUT-window_titlebar = 'EXAMPLE FOR ALV GRID'.
I_LAYOUT-no_totalline = 'X'.
ENDFORM. "FILLLAYOUT
Form FILL_SORT
FORM FILL_SORT .
SORT-DOWN = 'X'.
SORT-SPOS = 1.
SORT-FIELDNAME = 'MATNR'.
SORT-tabname = 'MARA'.
APPEND SORT.
ENDFORM. " FILL_SORT
Form EVENT_CALL
FORM EVENT_CALL .
DATA: I_EVENT LIKE V_EVENTS.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS.
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
FORM POPULATE_EVENT .
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.
READ TABLE V_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
INTO WA_EVENT.
IF SY-SUBRC = 0.
move 'END_OF_PAGE' to WA_EVENT-FORM.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
endif.
ENDIF.
ENDFORM. "POPULATE_EVENT
FORM END_OF_PAGE.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
ENDFORM.
*& Form USER_COMMAND
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
CASE RS_SELFIELD-FIELDNAME.
when 'MATNR'.
read table itab with key matnr = RS_SELFIELD-VALUE.
if sy-subrc = 0.
PERFORM DATA_RETRIEVAL_MAKT USING RS_SELFIELD-VALUE.
PERFORM BUILD_FIELDCATLOG_MAKT.
PERFORM FILLLAYOUT_MAKT.
PERFORM DISPLAY_ALV_MAKT.
CLEAR RS_SELFIELD.
ENDIF.
ENDCASE.
ENDCASE.
ENDFORM. "user_command
Form DATA_RETRIEVAL_MAKT
FORM DATA_RETRIEVAL_MAKT USING TMATNR .
SELECT MATNR
MAKTX
MAKTG
UP TO 100 ROWS
FROM MAKT
INTO TABLE ITAB1
WHERE SPRAS = 'EN' AND MATNR = TMATNR.
LOOP AT ITAB1.
data id_color type i VALUE 1.
data id_colors(2) type c.
id_color = id_color + 1.
if id_color > 7.
id_color = 1.
endif.
id_colors = id_color.
concatenate 'C' id_colors '10' into itab1-color.
modify itab1.
CLEAR ITAB1.
ENDLOOP.
ENDFORM. "DATA_RETRIEVAL_MAKT
Form FILLLAYOUT_MAKT
FORM FILLLAYOUT_MAKT .
CLEAR I_LAYOUT.
i_layout-zebra = 'X'.
i_layout-info_fieldname = 'COLOR'.
i_layout-box_fieldname = 'SEL'.
I_LAYOUT-EDIT ='X'.
I_LAYOUT-colwidth_optimize = 'X'.
I_LAYOUT-window_titlebar = 'EXAMPLE FOR ALV GRID'.
ENDFORM. " LAYOUT_MAKT
Form BUILD_FIELDCATLOG_MAKT
FORM BUILD_FIELDCATLOG_MAKT .
REFRESH FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-KEY = 'X'.
WA_FIELDCAT-COL_POS = '1'.
*WA_FIELDCAT-EDIT_MASK = 'DD.MM.YYYY'.
WA_FIELDCAT-EMPHASIZE = 'C510'.
wa_fieldcat-seltext_m = 'MATERIAL NUMBER'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
WA_FIELDCAT-FIELDNAME = 'MAKTX'.
WA_FIELDCAT-COL_POS = '2'.
WA_FIELDCAT-EMPHASIZE = 'C710'.
wa_fieldcat-seltext_m = 'MATERIAL DESCRIPTION'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
WA_FIELDCAT-FIELDNAME = 'MAKTG'.
WA_FIELDCAT-COL_POS = '3'.
WA_FIELDCAT-EMPHASIZE = 'C210'.
wa_fieldcat-seltext_m = 'MATERIAL DESCRIPTION'.
APPEND WA_FIELDCAT TO FIELDCAT.
clear wa_fieldcat.
ENDFORM. " BUILD_FIELDCATLOG_MAKT
Form DISPLAY_ALV_MAKT
FORM TOP-OF-PAGE.
REFRESH I_LISTHEADER.
DATA: ld_lines type i,
ld_linesc(10) type c,
I_DATE(10) TYPE C,
I_INFO LIKE WA_LISTHEADER-INFO.
WA_LISTHEADER-TYP = 'H'.
WA_LISTHEADER-INFO = 'MATERIAL DESCRIPTION FOR SELECTED NUMBER'.
APPEND WA_LISTHEADER TO I_LISTHEADER.
CLEAR WA_LISTHEADER.
WA_LISTHEADER-TYP = 'S'.
WA_LISTHEADER-KEY = 'DATE :'.
CONCATENATE SY-DATUM+6(2) '.'
SY-DATUM+4(2) '.'
SY-DATUM(4) INTO I_DATE.
WA_LISTHEADER-INFO = I_datE.
APPEND WA_LISTHEADER TO I_LISTHEADER.
CLEAR WA_LISTHEADER.
describe table ITAB1 lines ld_lines.
ld_linesc = ld_lines.
concatenate 'TOTAL NUMBER OF RECORD SELECTED: ' ld_linesc
into I_INFO separated by space.
WA_LISTHEADER-TYP = 'A'.
WA_LISTHEADER-INFO = I_INFO.
append WA_LISTHEADER to I_LISTHEADER.
clear: WA_LISTHEADER , I_INFO.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = I_LISTHEADER
I_LOGO = 'ENJOYSAP_LOGO'.
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM. "TOP-OF-PAGE
*& Form DISPLAY_ALV_MAKT
text
FORM DISPLAY_ALV_MAKT .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE'
I_GRID_TITLE = I_TITLE_MAKT
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = fieldcat
TABLES
T_OUTTAB = ITAB1
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_MAKT
Rewards points -
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.. -
Interactive report using alv.
Hello all,
I want to create an interactive report using alv grid display.I tried it using the normal method,as in using hide n sy-lsind but could not get the display.Canu please help me out with the problem.
Thanks and Regards.
Seema.hai Seema,
for interactivereporting u can use get cursor fieldstatement.
GET CURSOR FIELD <f> [VALUE <val>] .
or try this one using the user command function.
EXAMPLE:
DEFINE m_fieldcat.
add 1 to ls_fieldcat-col_pos.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = &2.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
TABLES : vbak. " Sales Document: Header Data
TYPE-POOLS: slis. " ALV Global types
SELECT-OPTIONS :
s_vkorg FOR vbak-vkorg, " Sales organization
s_kunnr FOR vbak-kunnr, " Sold-to party
s_vbeln FOR vbak-vbeln. " Sales document
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
DATA:
Data displayed in the first list
BEGIN OF gt_vbak OCCURS 0,
vkorg LIKE vbak-vkorg, " Sales organization
kunnr LIKE vbak-kunnr, " Sold-to party
vbeln LIKE vbak-vbeln, " Sales document
netwr LIKE vbak-netwr, " Net Value of the Sales Order
END OF gt_vbak,
Data displayed in the second list
BEGIN OF gt_vbap OCCURS 0,
vbeln LIKE vbap-vbeln, " Sales document
posnr LIKE vbap-posnr, " Sales document item
matnr LIKE vbap-matnr, " Material number
arktx LIKE vbap-arktx, " Short text for sales order item
kwmeng LIKE vbap-kwmeng, " Order quantity
netwr LIKE vbap-netwr, " Net value of the order item
END OF gt_vbap.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
PERFORM f_read_data_vbak.
PERFORM f_display_data_vbak.
Form f_read_data_vbak
FORM f_read_data_vbak.
SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_vbak
FROM vbak
UP TO p_max ROWS
WHERE kunnr IN s_kunnr
AND vbeln IN s_vbeln
AND vkorg IN s_vkorg.
ENDFORM. " F_READ_DATA_VBAK
Form f_display_data_vbak
FORM f_display_data_vbak.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
Build the field catalog
m_fieldcat 'VKORG' 'VBAK'.
m_fieldcat 'KUNNR' 'VBAK'.
m_fieldcat 'VBELN' 'VBAK'.
m_fieldcat 'NETWR' 'VBAK'.
Display the first list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_vbak.
ENDFORM. " F_DISPLAY_DATA_VBAK
FORM USER_COMMAND *
FORM user_command USING u_ucomm LIKE sy-ucomm
us_selfield TYPE slis_selfield. "#EC CALLED
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE gt_vbak INDEX us_selfield-tabindex.
CHECK sy-subrc EQ 0.
PERFORM f_read_data_vbap. " Read data from VBAP
PERFORM f_display_data_vbap.
ENDCASE.
ENDFORM. " USER_COMMAND
Form f_read_data_vbap
FORM f_read_data_vbap.
SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_vbap
FROM vbap
WHERE vbeln = gt_vbak-vbeln.
ENDFORM. " F_READ_DATA_VBAP
Form f_display_data_vbap
FORM f_display_data_vbap.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
Build the field catalog
m_fieldcat 'VBELN' 'VBAP'.
m_fieldcat 'POSNR' 'VBAP'.
m_fieldcat 'MATNR' 'VBAP'.
m_fieldcat 'ARKTX' 'VBAP'.
m_fieldcat 'KWMENG' 'VBAP'.
m_fieldcat 'NETWR' 'VBAP'.
Display the second list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = lt_fieldcat
TABLES
t_outtab = gt_vbap.
ENDFORM.
regards,
praba. -
hi experts ..
i has a query of how to do interactive reporting in alv,s what are the function modules i can use to attain interactiveness. .?
Regards,
sujathaHi,
Check the below code... u will get some idea...
REPORT zmms_alv_1 NO STANDARD PAGE HEADING
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid,
gt_events TYPE slis_t_event,
gd_prntparams TYPE slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM build_events.
PERFORM build_print_params.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
* Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
* There are a number of ways to create a fieldcat.
* For the purpose of this example i will build the fieldcatalog manualy
* by populating the internal table fields individually and then
* appending the rows. This method can be the most time consuming but can
* also allow you more control of the final product.
* Beware though, you need to ensure that all fields required are
* populated. When using some of functionality available via ALV, such as
* total. You may need to provide more information than if you were
* simply displaying the result
* I.e. Field type may be required in-order for
* the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-hotspot = 'X'.
* fieldcatalog-do_sum = 'X'.
* fieldcatalog-no_zero = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'.
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
FORM build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
* gd_layout-totals_only = 'X'.
* gd_layout-f2code = 'DISP'. "Sets fcode for when double
* "click(press f2)
* gd_layout-zebra = 'X'.
* gd_layout-group_change_edit = 'X'.
* gd_layout-header_text = 'helllllo'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
* i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
* it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
* is_variant = z_template
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 DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekko.
ENDFORM. " DATA_RETRIEVAL
* Form TOP-OF-PAGE *
* ALV Report Header *
FORM top-of-page.
*ALV Header declarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
t_line LIKE wa_header-info,
ld_lines TYPE i,
ld_linesc(10) TYPE c.
* Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
APPEND wa_header TO t_header.
CLEAR wa_header.
* Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
APPEND wa_header TO t_header.
CLEAR: wa_header.
* Total No. of Records Selected
DESCRIBE TABLE it_ekko LINES ld_lines.
ld_linesc = ld_lines.
CONCATENATE 'Total No. of Records Selected: ' ld_linesc
INTO t_line SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = t_line.
APPEND wa_header TO t_header.
CLEAR: wa_header, t_line.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header
i_logo = 'HCL'.
ENDFORM. "top-of-page
* FORM USER_COMMAND *
* --> R_UCOMM *
* --> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1' or '&NFO'.
* Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
* Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
* Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
* Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "user_command
*& Form BUILD_EVENTS
* Build events table
FORM build_events.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_events[].
READ TABLE gt_events WITH KEY name = slis_ev_end_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE 'END_OF_PAGE' TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
READ TABLE gt_events WITH KEY name = slis_ev_end_of_list
INTO ls_event.
IF sy-subrc = 0.
MOVE 'END_OF_LIST' TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
ENDFORM. " BUILD_EVENTS
*& Form BUILD_PRINT_PARAMS
* Setup print parameters
FORM build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
ENDFORM. " BUILD_PRINT_PARAMS
*& Form END_OF_PAGE
FORM end_of_page.
DATA: listwidth TYPE i,
ld_pagepos(10) TYPE c,
ld_page(10) TYPE c.
WRITE: sy-uline(50).
SKIP.
WRITE:/40 'Page:', sy-pagno .
ENDFORM. "END_OF_PAGE
*& Form END_OF_LIST
FORM end_of_list.
DATA: listwidth TYPE i,
ld_pagepos(10) TYPE c,
ld_page(10) TYPE c.
SKIP.
WRITE:/40 'Page:', sy-pagno .
ENDFORM. "END_OF_LIST
*& Form PF_STATUS_SET
* text
* -->RT_EXTAB text
FORM pf_status_set USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD'.
ENDFORM. "PF_STATUS_SET
Reward Points if it is Useful.
Thanks,
Manjunath MS -
Normal report and ALV report, where exactly both are differs?
For Normal report and ALV report, where exactly both are differs, I mean from which part the process / coding will differ, pls le me know..?
Akshitha.Hi Akshitha,
In Normal reports we use formatting techniques to display the report list. We define heading and size everything to display report list. But where as in alv we need not to use any formating there are some function modules which will automatically display output list in LIST and GRID format.
In Normal report we cannot make changes to the output list where in ALV report we can change the ALV output display dynamically. You can find lots of options for the ALV list such as you can download output list into Excel sheet and Sorting options Acending and decending order in ALV but in normal report We need to write syntax in the report to display output list in sorting order. The ALV report is very easy way to display the output compared to Ordinary report.
Check below some links which will help you to understand about ALV. If you know about Normal report you can campare by userself the difference.
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
<b>Please Reward if useful<b>
Regards,
sunil kairam. -
Interactive report and default-filter
ahoj!
i have a question regarding interactive reports and default-filter for a date: is it possible to use the current date for the default-filter? apex need 'dd.MM.yyyy' for the filter... already tried to_date(sysdate, 'dd.MM.yyyy')
thx in advance,
christianHi,
I've just been trying the "in the last" option and had no problems for any number that I entered. Are you just entering 1 into the box? What error do you get?
I've loaded the page with Debug switched on, and get:
select
null as apxws_row_pk,
"DATE_ID",
"ATD_DATE",
"CHECK",
count(*) over () as apxws_row_cnt
from (
select * from (
select
apex_item.checkbox(1, DATE_ID) "CHECK",
"DATE_ID",
"ATD_DATE"
from "#OWNER#"."ATD_DATES"
) r
where ("ATD_DATE" between systimestamp - (1 * :APXWS_EXPR_1) and systimestamp)
) r where rownum <= to_number(:APXWS_MAX_ROW_CNT):APXWS_EXPR_1 would contain the value 1 as that is what I've entered for the filter. My report's sql statement is just the innermost nested select statement, the rest has been added by the IR functionality and the filter.
Andy -
Can i upload logo in simple reports
hi experts,
please tell me can i upload logo in simple reports , if yes then how.
best regards.
subhasis.hi,
IT IS POSSIBL USING OOPS CONCEPT GO FOR THIS CODE:--
REPORT y_pic_show .
DATA:
docking TYPE REF TO cl_gui_docking_container,
picture_control_1 TYPE REF TO cl_gui_picture,
url(256) TYPE c .
DATA : sum(4) , num1(4) , num2(4).
PARAMETERS: p_dummy(4) DEFAULT '4' .
PARAMETERS: p_dummy1(4) DEFAULT '5' .
AT SELECTION-SCREEN OUTPUT.
PERFORM show_pic.
START-OF-SELECTION.
num1 = p_dummy.
num2 = p_dummy1.
sum = num1 + num2.
WRITE : / sum.
*& Form show_pic
FORM show_pic.
DATA: repid LIKE sy-repid.
repid = sy-repid.
CREATE OBJECT picture_control_1 EXPORTING parent = docking.
CHECK sy-subrc = 0.
CALL METHOD picture_control_1->set_3d_border
EXPORTING
border = 5.
CALL METHOD picture_control_1->set_display_mode
EXPORTING
display_mode = cl_gui_picture=>display_mode_stretch.
CALL METHOD picture_control_1->set_position
EXPORTING
height = 150
left = 700
top = 10
width = 138.
CALL METHOD picture_control_1->load_picture_from_url
EXPORTING
url = 'PIX PATHNAME'.
IF sy-subrc NE 0.
Fehlerbehandlung
ENDIF.
ENDFORM. "show_pic
you may refer to this document to know all about pictures in SAP.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIIMAGE/BCCIIMAGE.pdf
Re: Trying to send the alv's information to excel file
http://help.sap.com/saphelp_erp2004/helpdata/en/e3/41a138c4397a42e10000009b38f842/frameset.htm
How to download alv data to EXCEL using the standard icon -
What is the difference in Interactive reports and Drill down reports?
What is the difference in Interactive reports and Drill down reports? Are they same?
Hi FRD ,
Both are same .
as far as i know there is no difference .
bye .
Maybe you are looking for
-
How to use FTP_COMMAND to put a file in the target system
Hi All, I have the requirement to put an excel file from apllication server to another remote system for this i am using the function modules 1) FTP_CONNECT to connect to the sourece as well as the destination systems --- Here i am able to hit the b
-
Mouse issue after ML upgrade...
Hi, I recently upgraded to Mountain Lion via the App Store and now the Finder does not respond to mouse gestures (I have a 'Magic Mouse'). In web browsers the gestures work (swiping between pages with a single finger)...but now the Finder no long
-
Correlated subquery execution problem
Hi In correlated subqueries which query executed first whether the inner query or outer query i.e while oracle processing the query give me example thanx asp
-
After installing iOS 7 camera stopped working normally. I can't take pictures with the back camera only the front camera. All was good before the update. Please fix this bug.
-
All three of my coworkers and I have a problem with our colors when we save a Word document as a PDF. The greens come out hatched or yellow, as with other colors. We have all recently been upgraded to Windows 7, but I don't know if that's the reason