Checkbox at the out of interactive classical report
Hi Experts,
I have made a classical interactive report which displays a checkbox with every line item, also i have developed different button on
the toolbar, i want to check all line item by pressing the desired button.
Please suggest the required coding for selecting all line item if i press a button of shortcut key. As i want to check all check box on the output screen and i dont no the appropriate coding.
Please suggest.
Regards,
Varun Sharma
Hi,
for sy-lsind not to be changed subtract it when you click on the select pushbutton in the case.....
AT USER-COMMAND.
case sy-ucomm.
when 'SELECTALL'. " when selectall button is pressed....
sy-lsind = sy-lsind - 1. " This will not change the sy-lsind......
loop at i_vbak.
i_vbak-sel = 'X'.
modify i_vbak index sy-tabix..
WRITE: / sy-vline ,
i_vbak-sel AS CHECKBOX HOTSPOT
UNDER text-h01 , sy-vline .
WRITE: 5 sy-vline, 6 i_vbak-vbeln , 19 sy-vline, 20 i_vbak-vkorg,
29 sy-vline, 30 i_vbak-vtweg, 39 sy-vline, 40 i_vbak-knkli HOTSPOT ON,
52 sy-vline, 53 i_vbak-kunnr, 60 sy-vline, 61 i_vbak-name1(28),
90 sy-vline, 91 i_vbak-ort01(8), 100 sy-vline, 101 i_vbak-bukrs_vf,
110 sy-vline, 111 i_vbak-bldat1 , 122 sy-vline , 123 i_vbak-wrbtr,
145 sy-vline, 146 i_vbak-netwr RIGHT-JUSTIFIED, 167 sy-vline .
endloop.
WHEN 'ANYOTHERBUTTON'.
" PROCEED WITH YOUR CODE
Regards,
Siddarth
Similar Messages
-
Hi SAP gurus,
My requirement is to add a button on the Output of a Classical report. When any line is selected on the report and the changes have been made in the detail, after coming back to the main list, I should be able to refresh the data by clicking the refresh button.
I used PF-status to put the refresh button on the report but I am not able to drill down into the lines.
Could you help me with this.
Thanks,
Reeta.Go through the sample report.
REPORT YMS_INTERACTIVETEST LINE-SIZE 50 NO STANDARD PAGE HEADING.
TABLES: VBAP,KNA1,VBAK.
SELECT-OPTIONS: CUST FOR KNA1-KUNNR.
DATA: BEGIN OF ITAB OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
NAME1 LIKE KNA1-NAME1,
VBELN LIKE VBAK-VBELN,
AUDAT LIKE VBAK-AUDAT,
AUART LIKE VBAK-AUART,
POSNR LIKE VBAP-POSNR,
POSAR LIKE VBAP-POSAR,
END OF ITAB.
DATA: ITAB1 LIKE ITAB OCCURS 0 WITH HEADER LINE.
INITIALIZATION.
START-OF-SELECTION.
SELECT KNA1~KUNNR KNA1~NAME1 INTO CORRESPONDING FIELDS OF TABLE ITAB1
FROM KNA1 WHERE KNA1~KUNNR IN CUST.
LOOP AT ITAB1.
WRITE:/10 ITAB1-KUNNR HOTSPOT, 30 ITAB1-NAME1.
HIDE: ITAB1-KUNNR.
ENDLOOP.
AT LINE-SELECTION.
CASE SY-LSIND.
WHEN '1'.
SELECT KNA1~KUNNR VBAK~VBELN VBAK~AUDAT VBAK~ERDAT INTO CORRESPONDING FIELDS OF TABLE ITAB1
FROM KNA1 INNER JOIN VBAK ON KNA1~KUNNR = VBAK~KUNNR.
LOOP AT ITAB1.
WRITE:/ ITAB1-VBELN HOTSPOT, ITAB1-AUDAT, ITAB1-AUART.
HIDE: ITAB1-VBELN, ITAB1-AUDAT, ITAB1-AUART.
ENDLOOP.
WHEN '2'.
SELECT VBAK~VBELN VBAP~POSNR VBAP~POSAR
INTO CORRESPONDING FIELDS OF TABLE ITAB1 FROM VBAK INNER JOIN VBAP ON VBAK~VBELN = VBAP~VBELN.
LOOP AT ITAB1.
WRITE:/ ITAB1-POSNR, ITAB1-POSAR.
ENDLOOP.
ENDCASE.
TOP-OF-PAGE.
WRITE:/ SY-VLINE,TEXT-001 COLOR COL_NEGATIVE.
ULINE. -
Is it possible to export the out put of Crystal report into text file?
Hi All,
Is it possible to export the out put of Crystal report into text file?Hi
Yes, Go to File --> Export --> Export Report --> Under Format select TEXT & select the destination as "Disk file"(defaultly selected)
Give the proper details as per your requirement for "Characters per inch" & "Number of lines per page" & click on 'OK"
In "Choose Export file" window, select the destination folder & provide file name. click on "SAVE"
Regards
Ashwini -
How to display the text in a classical report before top-of-page?
Hi all,
I am developing a classical report with top-of-page because i want to display the texts of cloumns even users scroll down the output.
But here the problem is i have to display a text and selection screen values in the ouput ,Before this top-of-page. But i couldn't find the way to do it.
Please help me on solving this problem?
Thanks,
Vamshi.Hi Vamsi,
whenever there is write statement and you are going to display some thing the system checks for the TOP-OF-PAGE and we are helpless here
so declare your heading in the TOP-OF-PAGE only
THIS is SAP provided way of the SYSTEM bahaviour
Regards
ramchander Rao.k -
Decreasing the font size in a Classical report
Hi all,
i have to decrease the font size in the output of a classical report while printing. I have tried the following snippet:
NEW-PAGE PRINT ON LINE-SIZE zeichen_pro_zeile
LINE-COUNT zeilen_pro_seite
NEW LIST IDENTIFICATION rl04i-prnew
KEEP IN SPOOL rl04i-prrel
IMMEDIATELY rl04i-primm
LIST NAME rl04i-plist
DESTINATION drucker
NO DIALOG.
*PRINT-CONTROL LPI 6.
PRINT-CONTROL LPI 10.
but this is not working fine.
Can anybody suggest something about it?
Regards,
DivyaHi,
It is not possible to decrease the font-size in a classical report.
We don't have any option to format the output in the reports..
As per my knowledge, it is not possible to decrease or increase the font size in a classical report..
one thing u can do is to do some setings at the printer side...
Cheers,
Simha. -
How can a classic report be filtered using one select item and dynamic action?
APEX 4.2.1
DB 11g
I have a page with 4 reports on it. The top report is an interactive report and the following 3 are classic reports. The users would like to be able to use a select list to filter the 3rd report by PO line number without refreshing the entire page.
After verifying that the report is set to allow partial refreshes, I took the following steps
1. Created a PO Line select item (p_po_line_select) in the same report region
2. Added p_po_line_select to the report query
3. Created a dynamic action on p_po_line_select with 2 true actions
1. Set value (p_po_line_select)
2. Refresh report region.
The Set Value dynamic step was not working; I would get an out of memory error at line 2, memory stack error, or the value did not get saved to session state depending on the settings I selected. I was able to get it working with the following set:
1. Action = Set Value
2. Set type = PL/SQL Expression
3. PL/SQL Expression = :p_field_does_not_exist
4. Page items to submit = blank
5. Selection Type = Item(s)
6. Item(s) = p_field_does_not_exist
p_field_does_not_exist does not exist as a page or application item which leads me to believe that this is a bug and I am just lucky that it worked. I would rather know how to do this properly. Can someone please provide a link to a working example of how this should be done or state which settings are wrong?
I was able to reproduce the issue in the following app
http://apex.oracle.com/pls/apex/f?p=4500:1000
workspace = occam
user test/apex1
Thanks,STOP POSTING DUPLICATE THREADS.
If you have additional information, continue the discussion by posting it as a follow-up on the original thread: What is the proper way to filter classic report using just an LOV select field with dynamic action? -
Problem in getting previous screen in Classic report.
Hello everyone,
I am facing a serious problem in getting the previous screen in classical report.
let me tell you in detail.
When i run the report, i will have a selection screen with some checkboxes and select-options. Now in the report i have functionality to get some more select-options from user selection. Here i am calling the pop-up screen, wherein if user selects checkboxes, then those fields will be visible on the default selection screen.
To display them i am using Modif-id concept. Depending on the checkbox values, i am setting up the variables. Using those variables i am modifying screen.
Now suppose user has got some extra fields and run the report. It will get the output in the desired format.
Now the problem is when i am pressing 'BACK' button on the report output. The fields which are appended using modif-id are getting cleared. After that what i have is only the default selection-screen.
I want those fields to be restored. How do i go for it. Please help me out.
thanks in advance.Hi thanks for reply.
Actually code is too big to post. But have you understood my problem. Some part of code ia am sending.
AT SELECTION-SCREEN OUTPUT.
IF SY-UCOMM <> 'ONLI' AND SY-UCOMM <> 'FLDS' AND SY-UCOMM <> 'OK' AND
SY-DYNNR <> '0100' AND SY-UCOMM = ' '.
LEAVE TO SCREEN 1000.
ENDIF.
Now i want to know, whether i could get bcak those fields which which are appended using Modif-id,
how do i get the information about screen fiedls which was there after leaving the screen.
Thanks. -
How to insert a Grpahics logo in Classical report?
Hi Experts,
I need to insert a graphics logo in a classical report without using split screen or graphics control. The size of the logo is normal Company logo we use in Smartform. The difference here is : I need to print the logo in a classical report.
Regards,
Anid
Reward Points Guaranteed.Hi..
It is possbile only when u create ALV report. In normal report we cannot insert Logos.
In case of ALV:
Inserting Logo:
In the transaction OAOR, you should be able to insert your company Logo.
GOTO - OAOR (Business Document Navigator)
Give Class Name - PICTURES Class Type - OT..... then Execute
It will show you the list, then select ENJOYSAP_LOGO.
On that list, you will find one control with a "create" tab.
Click std. doc types.
Select SCREEN and double-click.
It will push FILE selection screen.
Select your company logo (.gif) and press OK.
It will ask for a description- for instance: "company logo".
It will let you know your doc has been stored successfully.
You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
<b>Reward if Helpful.</b> -
Download a classical Report output to excel
Hi All,
We have a requirement to download the output of a classical report into a Excel sheet and it should be in the same format as the report output.We don't just want to dump the internal table data into excel but need to display the classical report outputas it is in the excel sheet.
Regards,
AshishHi there,
I am not sure on your requirement, but if you want to write a program that manipulates Excel, you can choose to use OLE objects. Below is some sample code.
REPORT ZTEST_EXCEL.
INCLUDE ole2incl.
DATA: application TYPE ole2_object,
workbook TYPE ole2_object,
sheet TYPE ole2_object,
cells TYPE ole2_object.
CONSTANTS: row_max TYPE i VALUE 256.
DATA index TYPE i.
DATA: BEGIN OF itab1 OCCURS 0, first_name(10), END OF itab1.
DATA: BEGIN OF itab2 OCCURS 0, last_name(10), END OF itab2.
DATA: BEGIN OF itab3 OCCURS 0, formula(50), END OF itab3.
*START-OF-SELECTION
START-OF-SELECTION.
APPEND: 'Peter' TO itab1, 'Ivanov' TO itab2,
'=Sheet1!A1 & " " & Sheet2!A1' TO itab3,
'John' TO itab1, 'Smith' TO itab2,
'=Sheet1!A2 & " " & Sheet2!A2' TO itab3.
CREATE OBJECT application 'excel.application'.
SET PROPERTY OF application 'visible' = 1.
CALL METHOD OF application 'Workbooks' = workbook.
CALL METHOD OF workbook 'Add'.
* Create first Excel Sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 1.
CALL METHOD OF sheet 'Activate'.
SET PROPERTY OF sheet 'Name' = 'Sheet1'.
LOOP AT itab1.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Value' = itab1-first_name.
ENDLOOP.
* Create second Excel sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 2.
SET PROPERTY OF sheet 'Name' = 'Sheet2'.
CALL METHOD OF sheet 'Activate'.
LOOP AT itab2.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Value' = itab2-last_name.
ENDLOOP.
* Create third Excel sheet
CALL METHOD OF application 'Worksheets' = sheet
EXPORTING #1 = 3.
SET PROPERTY OF sheet 'Name' = 'Sheet3'.
CALL METHOD OF sheet 'Activate'.
LOOP AT itab3.
index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Formula' = itab3-formula.
SET PROPERTY OF cells 'Value' = itab3-formula.
ENDLOOP.
* Save excel speadsheet to particular filename
CALL METHOD OF sheet 'SaveAs'
EXPORTING #1 = 'c:\temp\exceldoc1.xls' "filename
#2 = 1. "fileFormat
* Closes excel window, data is lost if not saved
* SET PROPERTY OF application 'visible' = 0.
Edited by: Thung Yuen Yap on Aug 10, 2010 1:52 PM -
Need to filter the out put of iw38 reprort
hello Experts,
i have requirement like need to filter the out put of iw38 report and after that again i need to filter that output by using department and client code and oreder .ned to show out put with 3 push buttons .
dertails:
selection screen fields:
region
customer code
oreder
date range
from these 4 fields i need to pass two(order and date range) fields to iw38 report and then what ever output i am getting again that should filter by customer code and region which are there in my program
, need to display the out put with 3 push buttons .
plz suggest me with appraoach and sample code .
Note : i am using using submit and return export memory but its directly showing iw38 output and not coming back.Hi ananta,
The function module LIST_FROM_MEMORY loads the list from the ABAP Memory to an internal table of the row type ABAPLIST.
The function module WRITE_LIST inserts the content of an internal table of the row type ABAPLIST in the current list.
The function module DISPLAY_LIST displays the content of an internal table of the row type ABAPLIST in a separate list screen.
check the below program..
REPORT Z642_TEST2.
DATA list_tab TYPE TABLE OF abaplist.
SUBMIT riaufk20 EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = list_tab.
ENDIF.
write: ' This is calling program', sy-repid.
Edited by: Rammohan Nagam on Apr 8, 2009 4:05 PM -
hi,
how to increase the font size in the output of classical report..
Gowrihi,
its not possible to increase the font size in classical report.
regard,
madhuri. -
Can anyone show me the coding of the Basic Interactive ALV Report ?
Hi,
Following report is the sample for Interactive alv report.
REPORT YMS_ALVINTERSAMPLE 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.
Thanks,
Sankar M -
Dynamic Report Heading - Classical report
Hi,
Could you please let me know how do I change the heading of a classical report based on the user selection on selection screen. I want to display the selection text that the user has selected in the selection screen as the heading for the report.
Timely help is highly appreciatable.
Thanks in advance.
Regards,
Farhana.You will have to insert some WRITE instruction in the TOP-OF-PAGE. You may read the current selection via FM [RS_VARIANT_ADMIN_DATA|https://www.sdn.sap.com/irj/scn/advancedsearch?query=rs_variant_admin_data&cat=sdn_all] and print it using FM [PRINT_SELECTION|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=print_selection&adv=false&sortby=cm_rnd_rankvalue]. (Look at this sample in Code Gallery [how to print selection screen data in report |https://wiki.sdn.sap.com/wiki/display/Snippets/howtoprintselectionscreendatain+report])
Regards -
Background Color In Classical Report
Hi Experts,
I need to Highlight the entire row in classical report based on condition.
For Example:
I need to show the employee's detail in RED whose salary in less then 10000
and green to those who get more then 10000.
I tried using case and adding column and then editing report attribute's HTML Expression
<xmp>
<span style="color:#THE_COLOR#;font-weight:bold;">#SALARY#</span>
</xmp>
But this highlighting only text not the entire row.
please help me with this.
Animesh
Edited by: Animesh Tripathi on Jan 31, 2013 3:18 AM
Edited by: Animesh Tripathi on Jan 31, 2013 3:19 AM
Edited by: Animesh Tripathi on Jan 31, 2013 3:20 AMThe best way to do this is by creating a Named Column (row template) template report.
Here is a post of someone with a similar problem:
Template Condition based on PL/SQL Expression -
Is there any way to display the employee photo in classic report.
want to know whether " Dynamic Documents " is applicable for this.Hi,
Refer to this link..[LOGO IN CLASSICAL REPORT|LOGO IN CLASSICAL REPORT] this will tell you how to insert Logo in the Classical Report. Check this might help .
Maybe you are looking for
-
I just installed OS X Yosemite and now my WD My Book Live external hard drive won't re-connect. My Safari keeps kicking out and giving me error message after error message and my computer is really slow. How do I resolve? Can I uninstall this ?
-
Any Firewire 800 Hub recommendations?
So I have been thrilled with my new iMac. But of course the one limiting factor with the new iMac is the single FW800 port when having multiple FW drives. Daisy chaining of course works, but it also forces you to power up all drives in front of the d
-
How long will "extracting" take - and how do I delete this process if it's taking literally days???
-
Hi, Beforehand I know this is not the proper forum to post questions about hibernate, but I'm desperetly looking answers for this problem, so any help is welcome: My original Oracle SQL query looks like: select R.orden as Orden, Max(R.fichero) as Fic
-
Hi, I have a form and report on the same Apex page. Is there a way to only show the report when the user clicks on the "Submit" button. That way the report will only show up when the "Submit" button is clicked on with the form data. Thanks.