Create Change Layout in ALV list report
Hi,
i have create my own change layout button at my alv list report, my problem is i don't know what coding can be used to activate the change layout function in my own button. Who have sample programming for this function please share it....
tq.
Hi,
By default if you're using the ALV List Display function module, there's no need for you to code the 'Change Layout' function, the standard function will be there, unless there's something you want and the standard 'Change Layout' function could not provide.
Go to Abap Editor and look for program with 'BALV*'. You'll get a whole list of DEMO program on ALV.
Similar Messages
-
Change the Layout for Create Change Display and Alv List
Hi All,
I am working on Custom Development WD Application for Maintain Employee.
I need to Get help/advice to hadle the two Problems.
1) In my application I have to provide Create,Change & display Employee.
Customer needs seperate Link/Application for all Create , Change and Display in Portal.
I thought I am planning to Create Three Application in the WD Component(Create,Change & Display) while Pressing the Application I have to find out what is the Application They Pressed in the Componenet Controller to Change the Layout/Field (Edit/Display/Visisble) according to Create/Change/Display Employee.
For this How to Find the Application name of the WD Componenet.
2) To show the Employee List I am having using ALV LIst.
But my List consuists of 35 Fields. Customer not ready for scrolling the List to see all columns.
I thought I am planning to provide Visible/Invisble columns after providing one button.
If they pressed this button It will next set of Columns with out scrollibng.
How to handle this ?
Kindly help/advise me for both the Problems to proceed further.
Thanks in advance.
Dav1.For this How to Find the Application name of the WD Componenet.
DATA:
l_api type ref to if_wd_component,
l_application_api type ref to if_wd_application,
l_application_info type ref to if_wd_rr_application,
lv_name type string.
l_api = wd_this->wd_get_api( ).
l_application_api = l_api->get_application( ).
l_application_info = l_application_api->get_application_info( ).
lv_name = l_application_info->get_name( ).
> 2) To show the Employee List I am having using ALV LIst.
>
> But my List consuists of 35 Fields. Customer not ready for scrolling the List to see all columns.
Are they planning to buy Wide Screen monitor ??
I am not really fan of the solution you propose, at the same time i am not having better idea. I would get the customer on table and see how they would like to have the presentation of 35 columns without scrolling.
ALV provides customization, in that way users can select their own list of columns. -
SAVE Layout Option in ALV list Report
Hi Experts,
Is it possible to SAVE the layout option for Block ALV list Reports?
Thanks in Advance,
Sivak.Hi,
It is not possible to save layout in BLock ALV display but possible to change layout. There is no parameter to save. It is not possible to store the layout as it has several structure.
Thanks & Regards
Rocky -
Keeping alv list report layout
when i run my alv list report using the saved layout and then change the layout of the report and then go into one of the items, i want the report to keep the changed layout when i save and go back to the report. at the moment its reverting back to the standard layout when go out of the transaction
Make the Default Layout as your Changed Layout it'll work. It Can be done in the properties i guess.
Regards,
Sai -
How To Create Header in ALV List Report
Hi All,
I want to create a Header for <b>MY ALV List Report</b>!
How can i achieve the same. It should come above <b>ALV</b>.
ALV report i had already written and it is coming correctly.
Heading should look like this:
<i>1st Line</i>
<b>PROGRAM NAME: XXXXXX CLIENT: XXXXXXXXXX PAGE:XX</b>
<i>2nd Line</i>
<b>RUN DATE/TIME: XXXXX - XXXX REPORT NAME/HEADER</b>
How can i acheive the same in <b>ALV List Report</b>!
I am amking use of <b>REUSE_ALV_LIST_DISPLAY</b> Function module.
Thanks in advance.
Thanks & Regards,
Prasad.Hi Prasad,
Use the sample code specified below as the guideline. For more info. refer to the documentation of the FM 'REUSE_ALV_COMMENTARY_WRITE'.
DATA: first(01) type c,
events type slis_t_event,
gt_list_top_of_page type slis_t_listheader,
ls_event type slis_alv_event.
initialization.
call function 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = events
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2.
read table events with key name = 'TOP_OF_PAGE'
into ls_event.
if sy-subrc = 0.
move: 'TOP_OF_PAGE' to ls_event-form.
append ls_event to events.
clear ls_event.
endif.
End of additions
Start-of-selection
START-OF-SELECTION.
Top-of-page
TOP-OF-PAGE.
PERFORM TOP_OF_PAGE.
FORM TOP_OF_PAGE .
data: ls_line type slis_listheader.
if first is initial.
ls_line-typ = 'S'.
ls_line-key = 'Run Date :'.
write: sy-datum to ls_line-key+10 mm/dd/yyyy.
ls_line-info = 'Billing Date:'.
write: s_fkdat-low to ls_line-info+15 mm/dd/yyyy.
ls_line-info+28 = 'To'.
write s_fkdat-high to ls_line-info+32 mm/dd/yyyy.
append ls_line to gt_list_top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
first = 'N'.
else.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
endif.
ENDFORM. " top_of_page
<b>Please mark helpful answer.</b>
Regards,
Amit Mishra -
Issue Regarding ALV List Report
Hi,
I have prepared a ALV List report.
I have made use of <b>REUSE_ALV_LIST_DISPLAY</b>.
I have put a <b>check box</b> in the output at the begining of every Record.
Now what i want is to put a <b>SELECT ALL</b> & <b>DESELECT ALL Buttons</b> on Application Tool Bar & If i hit on them i should be able to <b>SELECT & DE-SELECT</b> all the <b>Records/Check Boxes</b> in the output.
Can anybody tell me the logic for both <b><b>SELECT & DE-SELECT</b></b> functionalities.
Thanks in advance.
Thanks & Regards,
Prasad.
<b></b>Hi,
<b>Call to F.M is as below:</b>
FORM f_display_alv_report .
DATA: l_valid,
l_params LIKE pri_params.
SET PF-STATUS c_alv.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
mode = 'BATCH'
report = v_repid
no_dialog = c_x
IMPORTING
out_parameters = l_params
valid = l_valid.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = c_command
i_callback_pf_status_set = c_alv
is_layout = i_gd_layout
it_fieldcat = i_fieldcatalog[]
it_events = i_events
is_print = i_params
i_save = c_x
TABLES
t_outtab = i_display_data
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. " f_display_alv_report
<b>Then User Command Call is as below:</b>
FORM f_user_command USING p_ucomm LIKE sy-ucomm
p_selfield TYPE slis_selfield.
CLEAR: v_field, v_index, v_line, v_value.
IF p_ucomm EQ c_select.
LOOP AT i_display_data.
i_display_data-selected = c_x.
MODIFY i_display_data TRANSPORTING selected.
CLEAR i_display_data.
ENDLOOP.
ELSEIF p_ucomm EQ c_deselect.
LOOP AT i_display_data.
i_display_data-selected = space.
MODIFY i_display_data TRANSPORTING selected.
CLEAR i_display_data.
ENDLOOP.
ENDIF.
Get cursor field, value and Line
GET CURSOR FIELD v_field
VALUE v_value
LINE v_line.
v_line = v_line - 3.
CLEAR: i_display_data,
i_mem,
v_mem_kschl,
v_mem_printer,
v_ucomm,
v_mem_print.
REFRESH: i_mem.
LOOP AT i_display_data
WHERE selected EQ c_x.
i_mem-v_mem_vbeln = i_display_data-vbeln.
i_mem-v_mem_posnr = i_display_data-posnr.
APPEND i_mem.
CLEAR i_mem.
ENDLOOP.
READ TABLE i_display_data INDEX v_line.
IF sy-subrc EQ 0.
v_mem_kschl = p_kschl.
v_mem_printer = p_print.
v_ucomm = sy-ucomm.
EXPORT i_mem TO MEMORY ID 'MEM'.
EXPORT v_mem_kschl TO MEMORY ID 'KSCHL'.
EXPORT v_mem_printer TO MEMORY ID 'PRINTE'.
EXPORT v_ucomm TO MEMORY ID 'UCOM'.
ENDIF.
CASE p_ucomm.
To Print SAP Script Output
WHEN c_print.
v_mem_print = c_x.
EXPORT v_mem_print TO MEMORY ID 'PRINT'.
v_return_code = c_999.
v_screen = c_x.
IF ( v_field EQ c_mark OR
v_field EQ c_selected OR
v_field EQ c_vbeln OR
v_field EQ c_posnr OR
v_field EQ c_kschl ) AND
NOT v_value IS INITIAL.
PERFORM f_entry IN PROGRAM zasdf0012_sales_order
USING v_return_code v_screen.
ENDIF.
Display SAP Script Output
WHEN c_pripreview.
v_return_code = c_999.
v_screen = c_x.
IF ( v_field EQ c_mark OR
v_field EQ c_selected OR
v_field EQ c_vbeln OR
v_field EQ c_posnr OR
v_field EQ c_kschl ) AND
NOT v_value IS INITIAL.
PERFORM f_entry IN PROGRAM zasdf0012_sales_order
USING v_return_code v_screen.
ENDIF.
WHEN c_back.
BACK.
WHEN c_exit.
CALL METHOD cl_gui_cfw=>flush.
LEAVE TO SCREEN 0.
WHEN c_cancel.
CALL METHOD cl_gui_cfw=>flush.
LEAVE TO SCREEN 0.
WHEN c_others.
ENDCASE.
ENDFORM. " F_USER_COMMAND
<b>The Field Catalog Build up is :</b>
i_fieldcatalog-fieldname = 'KSCHL'.
i_fieldcatalog-tabname = 'I_DISPLAY_DATA'.
i_fieldcatalog-seltext_m = 'Output Type'.
i_fieldcatalog-col_pos = 1.
i_fieldcatalog-outputlen = 11.
APPEND i_fieldcatalog.
CLEAR i_fieldcatalog.
i_fieldcatalog-fieldname = 'VBELN'.
i_fieldcatalog-tabname = 'I_DISPLAY_DATA'.
i_fieldcatalog-seltext_m = 'Sales Document No'.
i_fieldcatalog-col_pos = 2.
i_fieldcatalog-outputlen = 17.
APPEND i_fieldcatalog.
CLEAR i_fieldcatalog.
i_fieldcatalog-fieldname = 'POSNR'.
i_fieldcatalog-tabname = 'I_DISPLAY_DATA'.
i_fieldcatalog-seltext_m = 'Sales Item No'.
i_fieldcatalog-col_pos = 3.
i_fieldcatalog-outputlen = 14.
APPEND i_fieldcatalog.
CLEAR i_fieldcatalog.
<b>Events Build Up:</b>
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = i_events.
READ TABLE i_events
INTO wa_events
WITH KEY name = slis_ev_top_of_page.
IF sy-subrc = 0.
MOVE c_top_of_page TO wa_events-form.
MODIFY i_events FROM wa_events INDEX sy-tabix.
ENDIF.
READ TABLE i_events WITH KEY name = c_user_command
INTO wa_events.
IF sy-subrc = 0.
MOVE c_command TO wa_events-form.
MODIFY i_events FROM wa_events INDEX sy-tabix.
ENDIF.
<b>Layout Buil up is as:</b>
i_gd_layout-no_input = space.
i_gd_layout-colwidth_optimize = c_x.
i_gd_layout-totals_text = 'Totals'(201). "#EC *
i_gd_layout-box_fieldname = 'SELECTED'.
i_gd_layout-box_tabname = 'I_DISPLAY_DATA'.
i_gd_layout-edit = c_x.
Here one thing we need to take care id i am combining Check Box with & another field Output Type [KSCHL] like in Std. TCode VL71.
Can anybody solve this issue!
Thanks for reply.
Thanks & Regards,
Prasad. -
Alv list report-problems while printing
hai,
i get following dump error when tryign to print a alv list report.
'Illegal interruption of the event LOAD-OF-PROGRAM.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLSZA12" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
During the flow of the event LOAD-OF-PROGRAM (event for the
initialization of an ABAP program), a condition occurred under which
the event was to be left early. This is not permitted as it would
result in an inconsistent status in the ABAP program.'
the problem resolves for a particular output(when i restrict the list to lesser rows) by changing FORMAT from
X_65_255 to X_90_120 in the print dialog properties option..
however this restricts the coloumn width..
anycase i will have to print the output for all conditions.
the problem seems to be centred around number of rows in the list output..is somethign wrong with the values in this internal table gt_comtypes_tab...
this is where the dump is pointing..at LAOD OF PROGRAM EVENT
1 FUNCTION addr_get_conversion_table.
2 *"----
3 ""Lokale Schnittstelle:
4 *" EXPORTING
5 *" VALUE(COMTYPES_TAB) TYPE ADCOMTYPES_TAB
6 *" EXCEPTIONS
7 *" INTERNAL_ERROR
8 *"----
9
10 comtypes_tab = gt_comtypes_tab.
11
12 ENDFUNCTION.
values of gt_comtypes_tab.
2 TEL ADTEL
3 FAX ADFAX
4 TTX ADTTX
5 TLX ADTLX
6 INT ADSMTP
7 RML ADRML
8 X40 ADX400
9 RFC ADRFC
10 PRT ADPRT
11 SSF ADSSF
12 URI ADURI
13 PAG ADPAG -
Font is small while printing alv list report
Hi,
while printing ALV list report font is too small, can you tell me where i can increase the font size. I tried in GUI font ,In which i can increase the font for GUI, not for ALV priniting . Can any body help me to solve this problem?
Regards,
siva kumarHI Kushboo,
I think You are talking about header text in ALV , while printing ALV list i need to increase all the font size.. In fieldcatlog there is no option called Style...for increasing ALV font line item details. Can you tell me which style you are talking about?
Regards,
siva kumar -
Editable column in ALV list report
Hi,
I developed a ALV list block report. I want to make some of column editable in my alv list report.I set WA_FIELDCAT-EDIT = 'X' in fieldcatalog but it's not working.
Could you please sugest.
Regards,
MohitHi Mohit ,
please check WA_FIELDCAT-EDIT = 'X' fieldcat which you are passing to ALV grid function module is same or different .
or use in this way
perform get_fieldcat using 'QUANTITY' 'Enter.Qty' 12 'R' 'N' '000' 'N' 'N' 'N' 'N' 'N' 'N' .
get_fieldcat using p_fieldname
p_txtname
p_length
p_justfy
p_keyfld
p_color
p_hotspt
p_total
p_sort
p_subtot
p_para1
p_zero .
clear ms_fieldcat .
ms_fieldcat-fieldname = p_fieldname .
ms_fieldcat-seltext_l = p_txtname .
ms_fieldcat-ddictxt = 'L' .
ms_fieldcat-outputlen = p_length .
ms_fieldcat-just = p_justfy .
ms_fieldcat-lzero = 'X' .
ms_fieldcat-checkbox = 'X' .
ms_fieldcat-edit = 'X' .
if p_fieldname = 'CHK' .
ms_fieldcat-checkbox = 'X'.
ms_fieldcat-edit = 'X'.
else.
ms_fieldcat-checkbox = ' '.
ms_fieldcat-edit = ' '.
endif.
if p_fieldname = 'QUANTITY' .
ms_fieldcat-edit = 'X'.
endif.
regards
Deepak. -
How to keep track of the changes done in ALV GRID Report
Hi Experts,
how to keep track of the changed record in ALV GRID Report. how to set the field to be editable even for the entire row also. Can anybody guide along with code also?...
Valuable answers will be rewarded.
Thanks,
Satish.Hi,
Access the table through SM30. It comes blank as standard. Click "New Entries" and make entries for changes to be tracked. For example, whenever an org. unit changes 002 and 003 relationship, you will make entries like:
01 O 1001 B002 Activate box checked
01 O 1001 B003 Activate box checked
Here, 01 is your active plan version, O is org. unit, 1001 is infotype and B002 and B003 are the subtypes. You can also use * for infotype and subtype which means every change will be logged.
If you then run the report RHCDOC_DISPLAY through SA38, it will pick up all the changes pertaining to B002 and B003 relationship for org. units (in the above example).
Similarly, you can set up this table for other object types.
For more information, follow SPRO>Personnel Management>OM>Basic Settings>Activate change documents and go through the documentation for that node. Also, read up the documentation for the report.
Hope this helps.
Donnie -
How to create/change layout grid in MIR7/MIRO
Dear all,
How to create/change layout grid in MIR7/MIRO??I want to change the order of the items table.
Thx.
Icuk HertantoCheck SAP Note 315586 - MIRO: Creating and changing display variants for Step by Step guidance.
-
Changing layout of ALV to excel and displaying the data there
Dear All,
My requirement is that I have to develop an ALV report, and also plot the graphs for the same.
I need different types of graphs, so I have searched on SDN, and I found out a blg:-
"Report with a Graph.. An Approach!"
Here is what the person has done:-
I developed a simple ABAP report using ALV and just dumped all my data on it.
After this I downloaded the Standard Excel template available in the ALV.
Defined my own worksheets in this template, wrote some macros to pick up the data from the RawHeader sheet, which is available by default and will contain the ALV data.
I inserted 1 chart in this Excel template. In this chart I used the same chart type as was being used by the user for his graph. Just right clicked on the Graph area and made the changes in the source data and made it point to the sheet containing the final data.
Thats it my job is almost done.
After this uploaded this template back into the report output through
the layout settings->Change Layout Tab.
Save it as a variant and made it a default. (Do not default it if you have more than 1 user and more than 1 template . Select the appropriate variant for the appropriate user and then display)
Well, this also was not that easy as I had thought. I landed up into 1 trouble.
In my report the number of columns displayed was not constant and kept changing based on the input. This fact was taken care by designing a variable field catalogue. But now I had gone past the simple ALV display and was giving the output in an Excel sheet using a pre-defined template. Well, I immediately found a solution to this with the set_frontend_fieldcatalogue method of CL_GUI_ALV_GRID class and fixed the field catalogue every time after calling the set_table_for_first_display method. This solved most of my problems, which were not many though.
Now here are my issues:-
I have developed the ALV report, and I have also changed the layout to excel.
But, I am unable to get the ALV Report data in the RawHeader Sheet, which is available by default.
Could anyone please guide me through this method??
It is urgent.
Points are assured for helpful answers.
Thanks and regards,
PrernaHi Satya Priya,
Do I have to create my own template, or the Standard ones available will do?
HEre is what I do:-
Once I get my ALV output, I goto Change LAyout->View tab.->Prefered view->Microsoft Excel.
Here I get a list of available excel templates There are 2:-
sap_mm.xls, and sap_om.xls
I select one of these, and the excel spreadsheet is displayed on the ALV screen.
But the re is another button, "Upload Document to BDS".
Do I have to upload one of the above templated to BDS?
And please tell me in detail, what is BDS???
Thanks for your help, and waiting for reply,
Prerna -
Problem in changing layout of ALV to excel
Hello everyone,
I have developed an ALV program, wherein I need to show the graphs for the same.
For this, I need my data in excel format, so that I can write some macros ,and do the further processing on it(I am using an appraoch I found on SDN, "Report with graph").
I got to know, that I need <b>SAP R/3: Add On:Interactive Excel</b>.
I asked the BASIS guys to install it, but even after installing it, I am unable to view the data in Excel layout, when I do Change LAyout->View->Microsoft Excel.
Could anyone let me know if there is any other setting which is required to view the data in excel?On the excel side, we can change the security level(Tools->Macro->Security) to either low, medium or high.
Is there any such provision in SAP?
Kindly suggest your answers, as it is important for me to get the data in excel.
Points will be rewarded.
Thanks and regards,
PrernaHi,
I have already tried what you have just mentioned.
I searched the entire SDN, for this, and this was one of the replies
But still we don't get the data(Even you didn't get it, right?).
when we change the layout to excel(Excel Inplace), there are 2 sheets by default:-
Rawheader and Rawdata.The data comes in RAwheader sheet.
But there is some setting on the BASIS side, which need to be done, in order for it to work.
I have asked my BASIS colleagues and some of my senior consultants to look into the same.
They will let me know.
I would also suggest you try your program on another PC.
I will let you know as soon as I get any replies from my colleagues.
Thanks and regards,
Prerna -
Hello All,
I am using the class 'cl_salv_table' to create an ALV. In the application toolbar I have the option to change the layout displayed in tha ALV but I am not able to save my changed layout. Please suggest how do I enable the save layout button in the toolbar.
Thanks,
AnjuThis demo example creates a PF status for displaying the buttons, Can I not get the buttons using the standard functions available with the ALV. I am getting the change layout on its own I am not reqd to create a PF status for it. Can I not enable the button save layout also. Also if I create the PF status I would have to add all the buttons reqd in the ALV in the PF status manually
thanks,
Anju -
From where can we give the details of change layout in alv
Hi,
I am executing an ALV Grid report, and output is coming fine , if i see the print preview for some particular fields some digits or missing
so i used the button change layout there i can see that length is not sufficient i have changed that and its working fine but each and every
time i need to change the layout and then take the print............if i wanted to save my changes in chnage layout or else pls tell me from where we are getting all those details in change layout so that i can go there and change.........
thanksHi,
You can save the changes done in the layout.
First you change the layout , then save it by giving a name. Use / as first character if you want to make the changes global, otherwise for a user specific layout save it with A-Z as first character. Make it default so you need not have to change/choose the layout each time you print.
Regards,
Alok
Maybe you are looking for
-
IMac is not bringing up websites/not air printing
I'll start by saying I've turned everything off and on and restarted the router, printer, computer etc... Still having issues. With that being said here's what's going on: I have a 2009 iMac and I cannot connect to my wireless printer anymore and can
-
Announcing Oracle interMedia Clipboard release 2.0
The Oracle interMedia team is pleased to announce the availability of the Oracle interMedia Clipboard release 2.0. Kits for release 2.0 can be found in the standard OTN location for Oracle interMedia Utility and Plugin Downloads. Look for the "Update
-
I have a very simple SharePoint 2013 setup, 2 web servers, 2 app servers, and one SQL 2012 SP1 server. I have been asked to integrate SSRS into the farm. My DBA has installed SSRS in integrated mode on the SQL server. However when I run Install-SPRSS
-
Hello, Can someone resolve this problem, like you can see, I am using RH_UPDATE_INFTY to update an infotype and I always have the same error message : REPID_FORM_INITIAL what that mean ? What is the solution ? Thanks experts. DATA: li_schedule LIKE
-
Win 7 64 bit issues building 32 bit app
I am using LV2012 SP4(32 bit) on a win 7 (64 bit) system. I have a program that uses a 32 bit PCMCIA card and I have built an application. There are no 64 bit drivers for my PCMCIA card, so I can only use it on XP or Win 7 (32 bit) system. When I lau