Alv report...excel view
Hi All,
The standard full screen function highlighted below is not working. The report is a grid display and when want to use this button to convert to excel format i get a blank excel sheet.
Application Toolbar STANDARD_FULLSCREEN
Items 1 - 7 &ETA &EB9 &REFRESH &ALL &SAL
Items 8 -14 &OUP &ODN &ILT &ILD &UMC &SUM
Items 15 - 21 &RNT_PREV &VEXCEL &AQW %
PC %SL
etc...........
please help me out?
Thanks
Hi Sagar,
Please check in the path tools->macro->security. If the Security level is high the data will not displayed in Excel in place from ALV. Recheck your Security Setting for displaying Excel in Place.
Now on the same path open tab -> Trusted Publishers and Check the checkbox for Trust Access to VB Project.
Pls reward if useful.
Thanks,
Sirisha.
Similar Messages
-
How to automate ALV to Excel View selection?
How to automate ALV to Excel View selection?
I'd like to view ALV data in Excel sheet. The standard way is to select "View" tab in "Change Layout" window, then click "Excel" radio button, then I should select document template from list, then I should select it again, then I need to press "Copy" button.
This is very long way! Is it possible to do it automatically, without multiple selection and pressing lots of buttons.Hello Vladimir,
Use FM 'XXL_SIMPLE_API ' or XXL_FULL_API .
Also go thru the link :
http://www.sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm -
ALV for excel view version 2003
Hi Experts,
I am using FM 'REUSE_ALV_GRID_DISPLAY' for ALV reports. In my system I am using Excel 97 version and I could see the output in excel format when I press Microsoft Excel (ctrlShiftF7). But my user is using version 2003. He couldn't see the data but only empty sheet.
How can I solve this..?
Regds,
Vinsa.RHi Vinsar,
My solution is based on Oss Note 853821
Try this:
In Excel:
Tools -> Macro -> Security;
select the Security Level tab;
ensure that the radiobutton Medium is selected
click OK.
Exit Excel.
Try this first. If it doesnot work then try these additional changes as well keeping the first set of changes to Macros intact.
Tools -> Macro -> Security;
select the Trusted Sources tab;
ensure that the box Trust access to Visual Basic Project is checked;
click OK.
Exit Excel.
Regards.
Ruchit. -
Hi,
How I can use the Excel View correctly?. I have a User that want to see this view from an ALV Report. The user clicks on "Views" -> "Microsoft Excel" then in the ALV area appears the excel workarea but all the cells are blank.
Is there an option or previous configuration than make the data appear?
Regards,
CLcarlos,
Check this out.
1) To change the current layout, show additional information, or hide unnecessary information, choose next to and then Change Layout.
The Define Layouts dialog box appears. All of the fields displayed in the report are listed in the left column. All of the available information you can display is listed in the right column. This information is grouped. Through the list box, you can select a certain field group and display the available fields in the right column.
Make the desired changes and select Enter.
2) Select the desired fields and use the arrow keys to transfer the selected fields or all fields. These fields are now shown in the left column.
3) End your selection with Enter. The layout you have defined is applied to the report immediately.
4) To save this selection, select Save. Name your layout. The name of the layout must begin with a slash (/) or with a letter (user-specific).
5) Decide whether you want to save the layout as a user-specific layout. If you save it as a user-specific layout, it is only available to you. If you dont save the variant as a user-specific layout, it is also available to other users.
Hope this helps u,
Regards,
Nagarajan. -
Excel option problem in ALV report output.
Hi,
In the output of the ALV report, if I click the Microsoft excel button, the following error is occured.
"View cannot be switched: Product is not installed or integration is not active".
We are using SAP GUI 7 and patch level 12.
Please advice what shall be done to overcome this.Hi
Try this.....
Open Excel, go to Tool->Macros-->Security
And you will see a window, Make sure that the two options at the bottom of the window are checked. Save all, close window and try again.
And when excel asks about enable or not macros always select enable macros.
Hope this helps..... -
Download the alv report in excel
dear experts
I am creating ALV report and working fine, i want the report sould be viewed in excel format when i click the icon on AlV display
with regards.
Ajay Kumar.Hi Ajay,
SAP has provided the user interface for downloading the data into an excel file in the tool bar there is an option for downloading into excel.
Another way is to write a code using the function module alsm_excel and then downloading into the excel,
please tell me whether this reply was useful or for further clarification revert back
Thanks in advance
Srikanth -
Hi,
I want to open the ALV Report o/p in excel formate I have serch in SDN but not getting the excel optin in view tab as per given reply is SDN the setting s required r
open office excel -> tools -> macro -> security
security level -> medium
trusted sources -> check trust access to visual basic project.
but I am not getting the EXCEL option in change layout view tab, how to activate it.
regards,
zafarHi Zafar,
Which version of excel is installed in your system ?
Below is for 2007
1. Open a blank excel sheet
2. Click on the "Office Button".
3. Choose "Excel Options" button on the bottom right panel
4. Click on "Trust Center" on the left panel
5. Click on "Trust Center setting" in right panel
6. Click on "Macro settings"
7. Choose "Enable all Macros" and the check box "Trust access to VBA project object model"
Something similar should be there for other versions of excel
Regards -
Excel view in ALV Grid---- Urgent
Hi,
On executing sample porgram BCALV_FULLSCREEN_DEMO, we get ALV grid display. After that, on Clicking "<b>Microsoft Excel View(controlshiftF7)</b>" we are getting blanck Excel screen view instead of the field values.
I have the same scenario requirement in real time. I want the excel screen with values from ALV Grid.
Thanks in Advance.
-Mohan.Hi Mohan,
Try this:
Download Data in EXCEL from ALV list display
1) Once you have alv report displayed in the screen.
2) Click button 'View' ( next to print button) on application toolbar
3) Select Excel in Place
4) This will download the same format as of Report
I hope your ALV have all the Standard functions in Toolbar. If not copy the status from and get the function as mentioned above.
<b>Program - SAPLSALV
Status - STANDARD</b>
Reward points if this Helps.
Manish -
Can we adjust ROW height in ALV report as like of Excel ?
Dear all,
Can we adjust ROW height in ALV report as like of Excel sheet ?
Can we increase/decrease the row height in the output display ?
How ?kps204020 wrote:
Thanks a lot for your response.
I've tried your proposal, but it has no affect. The report cells show all their content using as much lines as necessary for this.This is the default behaviour for HTML table data (tables and cells expand to fit their content).
So I still have rows with lots of lines and rows with only a few lines mixed in my IR dependant on the cell content. Because some rows filling nearly the whole screen, it is difficult to get an overview with regard to adjacent rows.
I'm using Application Express 4.1.1.00.23. with Theme 21. Scarlet and Firefox 17.0.1.Are all users using Firefox?
Actually I'm working on my first APEX Solution for usage in my company and the customers demanding a solution for this topic . So I'm very keen to find a solution.
I'm very much looking forward to your response.I've been involved with similar issues in the past. My first response is simple: Does this data have to be shown in the report? Can the offending column(s) be removed from the primary report? They will still be visible in the single row view, and the detail view if there is one.
The second option is to create a detail view for the report with a structure that is better suited to the data involved, and make this the default view. (For an example of this, see the treatment of the PRODUCT_DESCRIPTION column in the detail view of the Products report in the Sample Database Application: click on the View Detail button on the Products page.)
The third possibility is some kind of customization of the presentation of the data. This will involve using some combination of HTML/CSS/Dynamic Actions/Plug-ins/JavaScript that you may not be familiar with: do you have experience of these? To go down that route you need to describe in detail how you want to present the data, or what behaviour is required when the data is too long, and share an example of the report on apex.oracle.com that we can work with. -
ALV Excel view missing data on last row
Hi all,
I'm having a bug using ALV report.
I've created a report using "REUSE_ALV_GRID_DISPLAY" FM with the standard user command "USER_COMMAND".
In this menu, there is the bouton "Microsoft Excel" (CtrlShiftF7) that allows to switch the ALV to an excel view.
My report has 21 columns.
If I'm displaying 38 rows, the excel view is fine.
But if I'm displaying 39 rows, the last 5 cells are empty...
Does somebody has any idea of what could be the reason ?
Thanks for your help.
PierreHi Andreas,
I didn't apply the note you mentionned because it was already done on my system.
But I've found another one that was related to "your" note and it fix my issue.
The note is 1115435.
Thanks for your help.
Best regards,
Pierre -
Hi All,
I have a problem with the ALV display problem.
When I click on the 'Microsoft Excel View' button at the top of the ALV display, I can view the data in Excel View.
However, when my user click it on his computer, he saw the excel view is blank without data (even there are data at the initial ALV display screen).
May I know what is the root cause of this problem? I've no idea of how to investigate it or solve it.
Many Thanks.HI try with this code------
*& Report ZTEST_DOWNLOAD1
report ztest_download1.
tables : trdir.
type-pools: slis.
types: begin of gt_output,
progname type progname,
strct_type(14) type c,
strct_name(50) type c,
serial(8) type c,
mainfieldname(50) type c,
offset(17) type c,
leng(8) type c,
decimals(8) type c,
inttype(15) type c,
datatype(9) type c,
scrtext_m type scrtext_m,
tabname type tabname,
fieldname type fieldname,
rollname type rollname,
domname type domname,
default(100) type c,
end of gt_output.
types: begin of gt_header,
name(300) type c,
end of gt_header.
data : gi_output type standard table of gt_output,
wa_output type gt_output,
gi_header type standard table of gt_header.
data: d_filename like ibipparms-path,
gi_fieldcat type slis_t_fieldcat_alv,
wa_fieldcat type slis_fieldcat_alv,
wa_header type gt_header.
selection-screen:
begin of block b1 with frame title text-001.
parameter: program(150) type c default 'ZTOOL_TEST'.
select-options so_incl for trdir-name default 'ztool_test' no intervals .
selection-screen begin of line.
parameters :pa_check as checkbox default 'X'.
selection-screen comment (29) text-t01.
parameters :pa_path type rlgrap-filename default 'D:\TRIAL.XLS'.
selection-screen end of line.
selection-screen end of block b1.
at selection-screen.
perform download_excel_template.
at selection-screen on value-request for pa_path.
perform f4_file_help.
*& Form F4_file_help
text
--> p1 text
<-- p2 text
form f4_file_help .
call function 'KD_GET_FILENAME_ON_F4'
exporting
program_name = sy-repid
dynpro_number = syst-dynnr
field_name = pa_path
changing
file_name = d_filename
exceptions
mask_too_long = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID gv_msgid TYPE 'I' NUMBER 000.
endif.
endform. "f4_file_help
form download_excel_template .
refresh gi_header.
wa_header-name = text-t01.
append wa_header to gi_header.
wa_header-name = text-t02.
append wa_header to gi_header.
wa_header-name = text-t03.
append wa_header to gi_header.
wa_header-name = text-t04.
append wa_header to gi_header.
wa_header-name = text-t05.
append wa_header to gi_header.
wa_header-name = text-t06.
append wa_header to gi_header.
wa_header-name = text-t07.
append wa_header to gi_header.
wa_header-name = text-t08.
append wa_header to gi_header.
wa_header-name = text-t09.
append wa_header to gi_header.
wa_header-name = text-t10.
append wa_header to gi_header.
wa_header-name = text-t11.
append wa_header to gi_header.
wa_header-name = text-t12.
append wa_header to gi_header.
wa_header-name = text-t13.
append wa_header to gi_header.
wa_header-name = text-t14.
append wa_header to gi_header.
wa_header-name = text-t15.
append wa_header to gi_header.
wa_header-name = text-t16.
append wa_header to gi_header.
wa_output-strct_name = 'abc'.
append wa_output to gi_output.
call function 'MS_EXCEL_OLE_STANDARD_DAT'
exporting
file_name = pa_path
data_sheet_name = 'Structure details'
tables
data_tab = gi_output
fieldnames = gi_header
exceptions
file_not_exist = 1
filename_expected = 2
communication_error = 3
ole_object_method_error = 4
ole_object_property_error = 5
invalid_pivot_fields = 6
download_problem = 7
others = 8.
if sy-subrc <> 0.
MESSAGE ID gv_msgid TYPE 'E' NUMBER 002.
endif.
endform. " DOWNLOAD_EXCEL_TEMPLATE
regards
prashant -
Avoid splitting of columns ALV report while download output to Excel sheet
Hi friends,
I have 170 columns in my ALV report
while downloading the report to Excel sheet
the column descriptions and values are splitting in two lines.
How can i avoid the problem.
before calling REUSE_ALV_GRID_DISPLAY function module in my code
for the Layout i assigned LS_LAYOUT-MAX_SIZE = 1023.
but still the problem is not solved.
Please help me in this Issue.
Thanks in Advance,
GaneshHi friends,
I dont want to use and Keyboard shiftcntrl....
or dont want to change any code in ALV report
by simply assigning some value to any of the export parameter in ALV function module
can we achieve the functionality
Thanks in Advance,
Ganesh -
Hi Gurus,
is der any way to download data from ALV report to excel sheet depending on layout set dyanmically.
I mean to say that if I choose a layout then data has to transfer to excel sheet according to layout fields automaticaly.I think this can be done by oops ALV , are u using reusealv F.M to call output in ALV ?
Try the below kind of ALV
IN PBO -
>
SET PF-STATUS 'PROJREP'.
SET TITLEBAR text-046.
DATA: g_container TYPE scrfname VALUE 'ALV',
g_grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container. (Name of the container )
CREATE OBJECT g_grid1
EXPORTING i_parent = g_custom_container.
PERFORM create_field_catalog_ce
CALL METHOD g_grid1->set_frontend_fieldcatalog
EXPORTING
it_fieldcatalog = t_fcat_ce.
ALL METHOD g_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'ST_DISPLAY'
CHANGING
it_outtab = t_display_io
it_fieldcatalog = t_fcat_ce.
->Create Object to receive events and link them to handler methods.
When the ALV Control raises the event for the specified instance
the corresponding method is automatically called.
CREATE OBJECT g_event_receiver.
SET HANDLER g_event_receiver->handle_double_click FOR g_grid1.
ENDIF.
CALL METHOD cl_gui_control=>set_focus
EXPORTING
control = g_grid1.
IN PAI -->
CALL METHOD cl_gui_cfw=>dispatch. -
No column heading in second page in alv report when save in excel file
Hi Expert,
How can i remove the column header from Alv report when program execute in background and save in excel file right now
its comming column header in each page. Client dont want header column in excel from second page. is this possible?
with regards
chandan_vijiHi Ravi,
thanks for reply i have solved this problm throug line count and NEW-PAGE LINE COUNT 10000 bcoz client want output in excel file only one page header.
with regards
chandan_viji -
Problem in ALV report o/p to Excel
Hi to all
I have developed an ALV report, which is showing correct display and out put.
But when I am downloading it to excel, o/p is not coming in proper way. Fields are misplaced from there actual place and not in readable condition.
Please guide me..
Regards
AnubhavHello Lakshmiraj
I am sending you the coding of my ALV report program.
Please check.
REgards
Anubhav
*& Report YRMR033_AMENDMENT_ORDER_LIST
*& DEVELOPER : ANUBHAV GUPTA
*& DATE : 21.03.2008
*& REPORT DESCRIPTION : REPORT TO DISPLAY AMENDMENTS IN PURCDHASE ORDERS
WITH OLD VALUES AND NEW VALUES.
REPORT YRMR033_AMENDMENT_ORDER_LIST LINE-SIZE 132 NO STANDARD PAGE HEADING
LINE-COUNT 065(001)
MESSAGE-ID VR.
TABLES: DD04T,
CDHDR,
CDPOS,
DD03L,
DD41V,
T685T,
VBPA,
TPART,
KONVC,
EKKO.
TABLES : NAST, LFA1,ekpo.
SELECT-OPTIONS: "XUDATE FOR nast-erdat OBLIGATORY, "Created on date
XUDATE FOR CDHDR-UDATE OBLIGATORY, "Amendment date
S_EKGRP FOR EKKO-EKGRP,
s_lifnr for ekko-lifnr.
SELECTION-SCREEN SKIP.
DATA: WFLAG,
WCHANGENR LIKE CDHDR-CHANGENR.
DATA: INDTEXT(60) TYPE C.
DATA: BEGIN OF ICDHDR OCCURS 50.
INCLUDE STRUCTURE CDHDR.
DATA: END OF ICDHDR.
DATA: BEGIN OF ICDSHW OCCURS 50.
INCLUDE STRUCTURE CDSHW.
DATA: END OF ICDSHW.
DATA: BEGIN OF EKKEY,
EBELN LIKE EKET-EBELN,
EBELP LIKE EKET-EBELP,
ETENR LIKE EKET-ETENR,
END OF EKKEY.
DATA: BEGIN OF ITAB OCCURS 50,
BEGIN OF EKKEY,
EBELN LIKE EKET-EBELN,
EBELP LIKE EKET-EBELP,
ETENR LIKE EKET-ETENR,
END OF EKKEY,
ebeln like ekko-ebeln,
ebelp like ekpo-ebelp,
CHANGENR LIKE CDHDR-CHANGENR,
UDATE LIKE CDHDR-UDATE,
UTIME LIKE CDHDR-UTIME,
USERNAME LIKE CDHDR-USERNAME,
CHNGIND LIKE CDSHW-CHNGIND,
FNAME LIKE CDSHW-FNAME, "ADDED BY ANUBHAV
FTEXT LIKE CDSHW-FTEXT,
OUTLEN LIKE CDSHW-OUTLEN,
F_OLD LIKE CDSHW-F_OLD,
F_NEW LIKE CDSHW-F_NEW,
END OF ITAB.
DATA : BEGIN OF ITAB1 OCCURS 0,
EBELN LIKE EKET-EBELN,
bedat like ekko-bedat,
EBELP LIKE EKET-EBELP,
txz01 like ekpo-txz01,
lifnr like ekko-lifnr,
name1 like lfa1-name1,
UDATE LIKE CDHDR-UDATE,
FTEXT LIKE CDSHW-FTEXT,
F_OLD LIKE CDSHW-F_OLD,
ekgrp like ekko-ekgrp,
F_NEW LIKE CDSHW-F_NEW,
CHANGENR LIKE CDHDR-CHANGENR,
UTIME LIKE CDHDR-UTIME,
USERNAME LIKE CDHDR-USERNAME,
CHNGIND LIKE CDSHW-CHNGIND,
FNAME LIKE CDSHW-FNAME, "ADDED BY ANUBHAV
OUTLEN LIKE CDSHW-OUTLEN,
AMDNO TYPE CHAR4,
END OF ITAB1.
DATA: OLD_OBJECTID LIKE CDHDR-OBJECTID.
INTERNAL TABLES
----"modification
DATA: BEGIN OF I_NAST OCCURS 0,
OBJKY TYPE NAST-OBJKY,
ERDAT TYPE NAST-ERDAT,
KAPPL TYPE NAST-KAPPL,
KSCHL TYPE NAST-KSCHL,
PARVW TYPE NAST-PARVW,
PARNR TYPE NAST-PARNR,
ERUHR TYPE NAST-ERUHR,
AMDNO TYPE CHAR4,
EBELN TYPE EKKO-EBELN,
END OF I_NAST.
DATA : I_NAST1 LIKE TABLE OF I_NAST WITH HEADER LINE.
DATA: BEGIN OF I_TAB OCCURS 0,
OBJKY TYPE NAST-OBJKY,
ERDAT TYPE NAST-ERDAT,
KAPPL TYPE NAST-KAPPL,
KSCHL TYPE NAST-KSCHL,
PARVW TYPE NAST-PARVW,
PARNR TYPE NAST-PARNR,
ERUHR TYPE NAST-ERUHR,
END OF I_TAB.
DATA: INDEX TYPE I.
TYPE-POOLS : SLIS.
ALV Declarations *
DATA: W_REPID LIKE SY-REPID,
P_I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
P_I_HEADING TYPE SLIS_T_LISTHEADER,
I_LAYOUT TYPE SLIS_LAYOUT_ALV,
I_EVENTS TYPE SLIS_T_EVENT,
I_HEADING TYPE SLIS_T_LISTHEADER.
DATA: WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
SR TYPE I.
INITIALIZATION----
INITIALIZATION.
CLEAR I_NAST.
CLEAR I_TAB.
REFRESH I_NAST.
REFRESH I_TAB.
AT SELECTIN SCREEN----
AT SELECTION-SCREEN.
PERFORM DATA_VALIDATION.
TOP OF PAGE----
TOP-OF-PAGE.
PERFORM TOP_OF_PAGE.
END OF PAGE----
END-OF-PAGE.
START OF SELECTION----
START-OF-SELECTION.
PERFORM BUILD_COMMENT USING I_HEADING.
PERFORM EVENT_BUILD CHANGING I_EVENTS.
SELECT * FROM EKKO . " WHERE EBELN IN XEBELN AND
*LIFNR IN XLIFNR.
CLEAR CDHDR.
CLEAR CDPOS.
CDHDR-OBJECTCLAS = 'EINKBELEG'.
CDHDR-OBJECTID = EKKO-EBELN.
PERFORM GETCHGDOCS.
ENDSELECT.
DELETE ITAB WHERE ( FNAME NE 'NETPR'
AND FNAME NE 'NETWR'
AND FNAME NE 'MENGE' ).
loop at itab.
read table itab.
itab-ebeln = itab-ekkey+0(10).
itab-ebelp = itab-ekkey+11(4).
modify itab.
endloop.
LOOP AT ITAB.
MOVE-CORRESPONDING ITAB TO ITAB1.
APPEND ITAB1.
ENDLOOP.
LOOP AT ITAB1.
SELECT OBJKY ERDAT KAPPL KSCHL PARVW PARNR ERUHR
FROM NAST
INTO CORRESPONDING FIELDS OF TABLE I_NAST
WHERE OBJKY = ITAB1-EBELN
AND KAPPL = 'EF'
AND KSCHL = 'ZNEU'
AND PARVW = 'LF'
AND SPRAS = SY-LANGU.
IF SY-SUBRC NE 0.
DELETE ITAB1.
ENDIF.
LOOP AT I_NAST.
MOVE-CORRESPONDING I_NAST TO I_NAST1.
APPEND I_NAST1.
ENDLOOP.
ENDLOOP.
SORT I_NAST1 BY OBJKY ASCENDING ERDAT DESCENDING ERUHR DESCENDING.
DELETE ADJACENT DUPLICATES FROM I_NAST1 COMPARING OBJKY.
* Select data from TABLE NAST to get ebeln before selected date
IF I_NAST1[] IS NOT INITIAL.
SELECT OBJKY ERDAT KAPPL KSCHL PARVW PARNR ERUHR
FROM NAST
INTO CORRESPONDING FIELDS OF TABLE I_TAB
FOR ALL ENTRIES IN I_NAST1
WHERE OBJKY = I_NAST1-OBJKY
AND ERDAT <= I_NAST1-ERDAT
AND PARNR = I_NAST1-PARNR
AND KAPPL = 'EF'
AND KSCHL = 'ZNEU'
AND PARVW = 'LF'
AND SPRAS = SY-LANGU.
ENDIF.
Logic to get no of amendments for one po
LOOP AT I_NAST1.
CLEAR INDEX.
LOOP AT I_TAB WHERE OBJKY = I_NAST1-OBJKY.
INDEX = INDEX + 1.
ENDLOOP.
I_NAST1-AMDNO = INDEX - 1.
I_NAST1-EBELN = I_NAST1-OBJKY.
MODIFY I_NAST1 TRANSPORTING AMDNO EBELN.
ENDLOOP.
*LOOP AT I_NAST1.
*READ TABLE ITAB1 WITH KEY EBELN = I_NAST1-EBELN.
*IF SY-SUBRC = 0.
*ITAB1-AMDNO = I_NAST1-AMDNO.
*MODIFY ITAB1 TRANSPORTING AMDNO .
*ENDIF.
*ENDLOOP.
DELETE I_NAST1 WHERE AMDNO = 0. "ADDED BY ANUBHAV
LOOP AT ITAB1.
READ TABLE I_NAST1 WITH KEY EBELN = ITAB1-EBELN.
IF SY-SUBRC NE 0.
DELETE ITAB1.
ENDIF.
ENDLOOP.
loop at itab1.
select single *
from ekko
into ekko
where ebeln = itab1-ebeln.
if sy-subrc = 0.
itab1-bedat = ekko-bedat.
itab1-lifnr = ekko-lifnr.
itab1-ekgrp = ekko-ekgrp.
modify itab1.
endif.
endloop.
DELETE ITAB1 WHERE EKGRP NOT IN S_EKGRP.
DELETE ITAB1 WHERE LIFNR NOT IN S_LIFNR.
loop at itab1.
select single *
from lfa1
into lfa1
where lifnr = itab1-lifnr.
if sy-subrc = 0.
itab1-name1 = lfa1-name1.
modify itab1.
endif.
endloop.
loop at itab1.
select single *
from ekpo
into ekpo
where ebeln = itab1-ebeln
and ebelp = itab1-ebelp.
if sy-subrc = 0.
itab1-txz01 = ekpo-txz01.
modify itab1.
endif.
endloop.
sort itab1 by udate descending ebeln ebelp.
building field catelogue
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'Itab1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_L = 'PO NO '.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'Itab1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'BEDAT'.
WA_FIELDCAT-SELTEXT_L = 'PO DATE '.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'Itab1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'EBELP'.
WA_FIELDCAT-SELTEXT_L = 'Item No '.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'Itab1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'TXZ01'.
WA_FIELDCAT-SELTEXT_L = 'Item Description'.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'Itab1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'LIFNR'.
WA_FIELDCAT-SELTEXT_L = 'Vendor NO '.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'Itab1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'NAME1'.
WA_FIELDCAT-SELTEXT_L = 'Vendor Name'.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'ITAB1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'UDATE'.
WA_FIELDCAT-SELTEXT_L = 'Amendment Date'.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'ITAB1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'FTEXT'.
WA_FIELDCAT-SELTEXT_l = 'Change Field Description'.
WA_FIELDCAT-just = 'L'.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'ITAB1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'F_OLD'.
WA_FIELDCAT-SELTEXT_L = 'Old Value '.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
ADD 1 TO SR.
WA_FIELDCAT-COL_POS = SR.
WA_FIELDCAT-ROW_POS = 1.
WA_FIELDCAT-TABNAME = 'ITAB1'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-FIELDNAME = 'F_NEW'.
WA_FIELDCAT-JUST = 'L' .
WA_FIELDCAT-SELTEXT_L = 'New Value '.
APPEND WA_FIELDCAT TO P_I_FIELDCAT.
CLEAR WA_FIELDCAT.
DATA : L_REPID TYPE SYREPID,
L_REPID1 LIKE DISVARIANT.
L_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = 'X'
I_CALLBACK_PROGRAM = L_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = I_LAYOUT
IT_FIELDCAT = P_I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'X'
IS_VARIANT = L_REPID1
IT_EVENTS = I_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
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = 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.
*& Form GETCHGDOCS
text
FORM GETCHGDOCS.
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
DATE_OF_CHANGE = CDHDR-UDATE
OBJECTCLASS = CDHDR-OBJECTCLAS
OBJECTID = CDHDR-OBJECTID
TIME_OF_CHANGE = CDHDR-UTIME
USERNAME = CDHDR-USERNAME
TABLES
I_CDHDR = ICDHDR
EXCEPTIONS
NO_POSITION_FOUND = 1
OTHERS = 2.
CHECK SY-SUBRC EQ 0.
DELETE ICDHDR WHERE CHANGE_IND EQ 'I'.
CHECK NOT ICDHDR[] IS INITIAL.
LOOP AT ICDHDR.
CHECK ICDHDR-UDATE IN XUDATE.
CHECK ICDHDR-USERNAME IN XNAME.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
CHANGENUMBER = ICDHDR-CHANGENR
IMPORTING
HEADER = CDHDR
TABLES
EDITPOS = ICDSHW
EXCEPTIONS
NO_POSITION_FOUND = 1
OTHERS = 2.
CHECK SY-SUBRC EQ 0.
DELETE ICDSHW WHERE ( CHNGIND NE 'U' OR TABNAME NE 'EKPO' ).
LOOP AT ICDSHW.
CHECK ICDSHW-TEXT_CASE EQ SPACE.
MOVE-CORRESPONDING ICDSHW TO ITAB.
MOVE-CORRESPONDING ICDHDR TO ITAB.
MOVE ICDSHW-TABKEY+3 TO ITAB-EKKEY.
APPEND ITAB.
ENDLOOP.
ENDLOOP.
ENDFORM. "GETCHGDOCS
*& Form BUILD_COMMENT
text
-->P_I_HEADING text
FORM BUILD_COMMENT USING P_I_HEADING TYPE SLIS_T_LISTHEADER.
DATA: WA_LINE TYPE SLIS_LISTHEADER,
TEXT1(50) TYPE C,
TEXT2(40) TYPE C,
W_DATE1(10) TYPE C,
W_DATE2(10) TYPE C.
CONCATENATE ' CHAMBAL FERTILISERS AND CHEMICALS LIMITED' ' ' INTO TEXT1.
WA_LINE-TYP = 'H'.
WA_LINE-INFO = TEXT1.
APPEND WA_LINE TO P_I_HEADING.
CLEAR TEXT1.
CONCATENATE ' AMENDED ORDERS' ' ' INTO TEXT1.
WA_LINE-TYP = 'S'.
WA_LINE-INFO = TEXT1.
APPEND WA_LINE TO P_I_HEADING.
write xudate-low to w_date1 DD/MM/YYYY .
write xudate-high to w_date2 DD/MM/YYYY .
concatenate 'PERIOD FROM : ' W_DATE1 ' TO ' W_DATE2 INTO TEXT2 SEPARATED BY SPACE.
WA_LINE-TYP = 'S'.
WA_LINE-INFO = TEXT2.
APPEND WA_LINE TO P_I_HEADING.
ENDFORM. " build_comment
*& Form EVENT_BUILD
text
-->P_I_EVENTS text
FORM EVENT_BUILD CHANGING P_I_EVENTS TYPE SLIS_T_EVENT.
DATA: W_EVENT TYPE SLIS_ALV_EVENT.
CONSTANTS:
GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = P_I_EVENTS.
READ TABLE P_I_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO W_EVENT.
IF SY-SUBRC = 0.
MOVE GC_FORMNAME_TOP_OF_PAGE TO W_EVENT-FORM.
APPEND W_EVENT TO P_I_EVENTS.
ENDIF.
ENDFORM. " event_build
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = I_HEADING
I_LOGO = 'CFCLLOGO'.
ENDFORM. " top_of_page -
ALV Report output in Excel format
Hi ,
I am facing a different behaviour in two computers , while trying to take an Excel format of an ALV report output. After generating the ALV output ,in one , when I click on the Excel Format button - the Excel spreadsheet opens with the output data. In the second computed , under the same action , a blank Excel sheet opens .
Could someone tell me a solution . What aspect is responsible for this ?
Regards ,
SujataReduce the MACRO security settings in the Excel to Medium.
Open an execl sheet, Chose from menu Tootls->Macro->Security.
Chose the radio-buton medium. Close the file and all excel applications.Then try downloading again.
Regards,
Ravi
Maybe you are looking for
-
Running FF9 beta on Windows XP. Starting a few beta updates ago (two weeks or so, I think), my bookmark and session-restore functions started acting weird. When I click on "Bookmark" in the menu bar, the page just gets thrown onto the bottom of the b
-
Combo box visible and loaded but cant interact with it
I have two swf files onSiteSearch and onSiteReg. Both work as expected when used alone but when onSiteReg is loaded from onSite Search the comboBox on onSiteReg cannot be interacted with. It is visible and has the correct data in it but there is no a
-
Hi, I'm performing a system copy. Export got succesfully finished but noticed that Java SDM migration export is missing under JAVA directory. I only got DB, JDMP, TOOLS. Any ideas, please advise?! Thanks, Parthi
-
Burning MP3 disc rearranged the songs
Greetings, OK, I took 4 albums by the same group and made a playlist of the songs I wanted and jumbled them so they were no longer in their original order and all one album was together. I put them in the order I wanted. I burned an MP3 disc and on t
-
Scanning with Adobe Acrobat Pro X using a Espon Workforce 630
I have a Mac Pro with Lion OS and a epson workforce 630 both working fine. But Adobe CS6 -Acrobat Pro X does not see the scanner. I can print without problems, just can't see scanner. I've downloaded the latest epson drivers. Adobe doesn't show anyth