Field Catelog Issue for ALV Grid
Hi,
I have generated the ALV Dynamically based on the Date Range entered on the selection screen, now I am able to fill the values into the structure also, here my problem is date is like S858-spbup ( mm/yyyy format), what ever the values I have moved is S858-umwavwr(Currency values), now I want to sub total these values. Since my field catelog is date format that is why it is not doing subtotals.
code is
gs_fc-seltext_l = date.
gs_fc-seltext_m = date.
gs_fc-seltext_s = date.
gs_fc-ref_fieldname = 'umwavwr'.
gs_fc-ref_tabname = 'S858'.
gs_fc-do_sum = 'X'.
gs_fc-outputlen = 20.
APPEND gs_fc TO gt_fc.
it is doing subtotal but the issue is in ALV header it is not displaying like date (for example 06/2005),instead it is displaying the name as ref_fieldname text. How to resolve this issue. Please help me.
Thanks & Regards,
Sivaram Kandula
Hi Rich,
Thanks for your speedy reply. But in my case scenario is different.
if i remove the ref_fieldname = date means it is dumping bcz,
output is like this
suppose my input is 06/2005 to 08/2005
CSR District 06/2005 07/2005 08/2005 totals
xxx newyork 30.00 3.00 5.00 38.00
xxx newyork 40.00 5.00 6.00 20.00
xxx 70.00 8.00 11.00 58.00
now I am able to display the output like this, but the problem here is i am unable to subtotal these, bcz my field catelog is date type that is why do_sum is not working, that is why I took ref_feield name as UMWAVWR and S858, it is subtotaling but I am unable to see the header like above, instead it is displaying like
CSR District invoice:Cost invoice:Cost Invoice:cost tot
so please advise me how to proceed further.
Thanks & Regards,
Sivaram Kandula
Similar Messages
-
Issue with ALV grid print preview/spool
Hello everyone,
I am working on a report and I am having some issues with ALV grid. Currently in our DEV and QA environments the user can run the report, view the ALV grid, and print the grid without any issues.
However this isn't the case in the Prod environment. The user is able to run the report and view the grid without any issues. But when they click print preview or click print, the spool is incorrect. It shows the proper values from the grid, but the first field is reduced in length. Rather than showing a numeric field of length 10 it shows 99999999# or 99999999...
The programs are identical through every environment, including user parameters, formats, and spool settings. I have been told printing grids may have some issues, does anyone have any advice or dealt with this issue before?
I appreciate the help.
Thanks,
CI was waiting to hear from the functional team on the matter and no one has mentioned any more issues. I am assuming the problem is solved. I just noticed the thread was still un-answered and wanted to give an update.
Thank you for you help Vijay.
Regards
C -
F.01 Summary Report for ALV grid
Hi all,
We have defined our financial statement version (FSV). We have been running tests in transaction F.01, when we choose ALV Tree output the transaction works perfectly.
However, if we choose ALV grid output and then choose "1" in the Summary Report field (highest summary level, only main points of Balance sheet P&L statement should be displayed) the output is not summarized at all.
In short, no matter what number we put in the Summary Report field we always get the same output.
What needs to be done in order to be able to use this summarization control?
Any help will be appreciated.
Juan
Edited by: Juan Carlos Mier Giraud on Jul 8, 2008 4:50 PMRenata,
Thanks for your help. I am going to need a bit of help to develop the solutions described in the notes you pointed out.
Have you successfully created a summarization for ALV grid output?
I just want to know if it is worthy to devote time to it or just use classic list or ALV tree when appropiate.
Regards -
I need simple example for alv grid
hi
i need code for simple example for alv grid.
thanks.hi bharat,
this is report with most of the functionality.
report zus_alv_demo_grid .
tables: ekko.
type-pools: slis.
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,
line_color(4) type c, "Used to store row color
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.
Data declaration for EVENT and PRINT PARAMETER.
data: gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
data declaration for sorting.
data : it_sortcat type slis_sortinfo_alv occurs 1,
wa_sort like line of it_sortcat.
data : i_list_comments type slis_t_listheader.
start-of-selection.
perform data_retrieval.
perform user_command.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform build_sortcat.
perform display_alv_report.
end-of-selection.
*TOP-OF-PAGE.
PERFORM top-of-page.
end-of-page.
*& Form build_fieldcatalog
text
--> p1 text
<-- p2 text
form build_fieldcatalog.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = '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.
fieldcatalog-do_sum = 'X'.
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-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
text
--> p1 text
<-- p2 text
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
Set layout field for row attributes(i.e. color)
gd_layout-info_fieldname = 'LINE_COLOR'.
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for
*when double
"click(press f2)*
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
endform. " build_layout
*& Form data_retrieval
text
--> p1 text
<-- p2 text
form data_retrieval.
data: ld_color(1) type c.
select ebeln ebelp statu aedat matnr menge meins netpr
peinh from ekpo into table it_ekko.
*Populate field with color attributes
loop at it_ekko into wa_ekko.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
i.e. wa_ekko-line_color = 'C410'
ld_color = ld_color + 1.
Only 7 colours so need to reset color value
if ld_color = 8.
ld_color = 1.
endif.
concatenate 'C' ld_color '10' into wa_ekko-line_color.
wa_ekko-line_color = 'C410'.
modify it_ekko from wa_ekko.
endloop.
endform. " data_retrieval
*& Form display_alv_report
text
--> p1 text
<-- p2 text
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
is_layout = gd_layout
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'SET_PF_STATUS'
it_event = gt_events
is_print = gd_prntparams
it_fieldcat = fieldcatalog[]
it_sort = it_sortcat
i_save = 'X'
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 user_command
text
--> p1 text
<-- p2 text
*& Form top-of-page
text
--> p1 text
<-- p2 text
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 = 'GANESH_LOGO'.
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.
case r_ucomm.
when '&IC1'.
if rs_selfield-fieldname = 'EBELN'.
read table it_ekko into wa_ekko index rs_selfield-tabindex.
set parameter id 'BES' field wa_ekko-ebeln.
call transaction 'ME23N' and skip first screen.
endif.
when 'ULHAS'.
if rs_selfield-fieldname = 'EBELN'.
read table it_ekko into wa_ekko index rs_selfield-tabindex.
set parameter id 'BES' field wa_ekko-ebeln.
call transaction 'ME23N' and skip first screen.
endif.
endcase.
endform.
FORM set_pf_status *
--> RT_EXTAB *
form set_pf_status using rt_extab type slis_t_extab.
set pf-status 'ZNEWSTATUS'.
endform.
*& Form build_events
text
--> p1 text
<-- p2 text
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[]
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.
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
text
--> p1 text
<-- p2 text
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.
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.
*& Form build_sortcat
text
--> p1 text
<-- p2 text
form build_sortcat.
wa_sort-spos = 1.
wa_sort-fieldname = 'EBELN'.
append wa_sort to it_sortcat.
wa_sort-spos = 2.
wa_sort-fieldname = 'EBELP'.
append wa_sort to it_sortcat.
endform. " build_sortcat
Rewards if helpfull
regards
vijay dwivedi -
Field catalog update in ALV grid
Hi All,
When you're changing an existing field catalog in an ALV grid, there's a possibility this change will not appear immediately in the list display.
Can anyone explain this,
Kind regards,
Rob Makelaar.
The NetherlandsHi Rob
ALV as an encapsulated object uses some kind of buffer for the field catalog. You can switch buffer capabilities with the parameter <b>"I_BUFFER_ACTIVE"</b> of the method <b>"set_table_for_first_display"</b>.
The use of this parameter is explained as follows:
<i>Flag to be set by the application if the method call is static. This means the method is always called with the same field catalog. In this case, the field catalog can be held in a special buffer. This accelerates the display of small lists, in particular.</i>
And as an additional point, you should have marked this thread as a question thread since you require some answer. If you want so, you can do this by editing your original post and check relevant checkbox under the editbox. This way you can reward points to helpful posts using the scala at the left of each particular post and you can mark a question as solved to save SDNers's times.
Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a> -
Need a perfect example program for ALV GRID LIST
first hi to all,i am new to this community.i am still in learning process of SAP.one of my friend suggeted this community and i think this is the perfect place to learn and excel my skill in SAP.so my requirement is a perfect example program for ALV GRID LIST DISPLAY.while i am trying another program,the sysntax is ok but i am not getting any output and it is not showing any error also.hope i will get an answer asap.thank you.
Check [OO ALV Guide Simple|http://wiki.sdn.sap.com/wiki/display/ABAP/OBJECTORIENTEDALV+Guide] and [Easy Reference to ALV|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907]
-
Average value for a Date Field in an OO Alv Grid.
Hi Abapers.
I've been searching for some info about averages in OO Alv grid lists but cannot find an answer to what I'm really need. The question is that, for getting an average, a 'C' value must be set in the field DO_SUM of the fieldcatalog structure for a field.
Now, the problem is that I need the average of a date field (in 'normal' date format). I've tried it several times and read a lot of things but cannot find a real answer: Could it be done the average of a date field (e.g. for dates 01.05.2009, 02.05.2009 and 03.05.2009 the average is 02.05.2009).
Best Regards.Hi,
It will come along with the standard tool bar.For number fields, you can see it(Mean). -
F1 Documentation for ALV grid Field
Hi All,
I am working on ALV grid.I am able to dispaly the ALV grid.
It is working perfectly.
But client needs if i click on the 'F1' on field he needs the documentation of that field.
I have field documentaion.But i am not able to display.
Anybody please let me know how to make it.
Thanks,
Swapna.
Edited by: tarangini katta on Mar 12, 2009 12:43 PMHi,
Refer:
f1 help in alv grid
Re: Display F1 help in ALV
Hope this helps you.
Regards,
Tarun -
I am displaying the table in ALV Grid format. I have 4 fields in the table. The filter works for the first 3 fields, but doesnot work for the last field.
Please let me know what might be the issue.
Find the table declaration and the table population as in the below code
TYPES : BEGIN OF ty_message,
avm_nr TYPE avm_nr,
motiv TYPE motiv_nr,
text TYPE t100-text,
msg TYPE merep_orderstat,
END OF ty_message.
DATA: gt_message TYPE STANDARD TABLE OF ty_message,
gs_message TYPE ty_message.
gs_message-avm_nr = gs_upload-avm_nr.
gs_message-motiv = gs_upload-motiv.
gs_message-text = 'Order Successfully Changed'.
gs_message-msg = 'Success'.
APPEND gs_message TO gt_message.
CLEAR gs_message.
Regards,
SalilSince the field MSG refer to MEREP_ORDERSTAT which is CHAR10, it will convert the content to UpperCase.
So, try like:
gs_message-avm_nr = gs_upload-avm_nr.
gs_message-motiv = gs_upload-motiv.
gs_message-text = 'Order Successfully Changed'.
gs_message-msg = 'SUCCESS'.
APPEND gs_message TO gt_message.
CLEAR gs_message.
Regards,
Naimesh Patel -
Colwidth_optimize not working for alv grid report
Hi friends,
I have developed an ALV grid report using 'REUSE_ALV_GRID_DISPLAY'. The field catalog field columns are having the heading size more than 30 characters. So, to optimize the size of the headings, I am using SLIS_LAYOUT_ALV and passing the value 'X' to colwidth_optimize.
but still the column heading is not getting fully display. Rather it is display first 20 characters only.
For your reference please find the code snippet
*bold* **************** declarations ************************ *bold*
DATA : fieldcat TYPE slis_fieldcat_alv,
t_fieldcat TYPE slis_t_fieldcat_alv,
ws_layout TYPE slis_layout_alv.
*bold* **************** field catalogue ********************** *bold*
CLEAR fieldcat.
fieldcat-fieldname = 'RFWRT_PD_MTRL'.
fieldcat-seltext_m = 'Pending Quotation Spares Value'. {quote} this heading not getting fully displayed {quote}
fieldcat-tabname = 'IT_FNL'.
*** FIELDCAT-REF_TABNAME = 'VBFA'.
fieldcat-col_pos = col_pos.
APPEND fieldcat TO t_fieldcat.
ADD 1 TO col_pos.
CLEAR fieldcat.
fieldcat-fieldname = 'RFWRT_PD_SERV'.
fieldcat-seltext_m = 'Pend Quot-JobWorkVal'.
fieldcat-tabname = 'IT_FNL'.
fieldcat-col_pos = col_pos.
APPEND fieldcat TO t_fieldcat.
ADD 1 TO col_pos.
ws_layout-colwidth_optimize = 'X'.
*bold* ****************************** alv grid function call ******************** *bold*
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* i_buffer_active = space
i_callback_program = sy-repid
i_callback_user_command = 'USER_COMMAND'
*** i_callback_pf_status_set = 'PF_STATUS'
* I_STRUCTURE_NAME =
it_fieldcat = t_fieldcat[]
is_layout = ws_layout
TABLES
t_outtab = it_fnl
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.
CLEAR wa_fnl.
Please look into it.
Searched the forum for the similar issue. but didnt got any solution.
Thanks and regards,
Murali KrishnaHi DaveL,
Thanks alot for your help. My problem solved.
Can you please suggest me how we can optimize the column based on the total amount which is summed up (fieldcat-do_sum)
Regards,
Murali. -
Field Length issue in ALV Report
Hi,
I am using FM REUSE_ALV_GRID_DISPLAY to display few fields. Among them I have a field with length 200 characters text.
During ALV report display I am able to see only 128 characters, But when I download it and see the field, the it is showing complete text.
Can anybody help me out?
Thanks,
RamakrishnaCheck out the last answer of this post.
Re: ALV Grid Display - 255 characters
<i>I found a SAP document called "Using ALV for list display.pdf" that says the following:
"Size of data fields: While the list-based ALVList can display only tables of up to 90 columns, the control-based ALVGrid and ALVFullscreen have the limitation of 128 characters per data cell."</i>
Please make sure to award point for helpful answers and mark the post as solved. Thanks.
Regards,
Rich HEilman -
How to Restrict the values of Field TASKTYPE on a ALV Grid.?
Hi;
Let me explain my problem. I have report written by another abap developer who has gone now.
On the ALV Grid there is a field called "Activity Process". By F1 F9 I can read that field depends on table TCATX_TASKTYPES and field TASKTYPE . From se11 I can see that there is no search help related with the field.
When the user press F4 all the data in the table is listed . The user want to filter some of the listed data according to same logic .
When I debug the code after F4 on the field I found that the system finds Search Help: TCATX_TASKTYPES of type 'CT'. But unfortunately SE11 says that there in no search help such as TCATX_TASKTYPES.
The previous abap developer used BADI NETW_USER_FIELDS_F4 AT_F4 with class ZCL_IM_NETW_USER_FIELDS_F4 and interface IF_EX_NETW_USER_FIELDS_F4 for the transaction cj20n to filter the same field but this is not triggered by the F4 on the ALV Grid.
What can I do ?
Would you please help me ?I know i can do this using ADF Business Components as the business service but the problem is that the initial value for that attribute will be changed depending on the screen ... ill give u a simple example : lets say that I have employee table ( which include dept column) and under that table I have a table called "Emp_dept_movements" now in the main ADF page "employee entry" I have two blocks Employee data ( master view) employee dept data ( detail view ) now when the user press the create-insert button on the employee dept view the system should copy the dept no from the employee view to the dept no on the emp_dept_movements view... and the "Emp_dept_movements" will be used in another screen called " employee departement movements" without any initial value for the DeptNo
I dont want to create more than one view and cant set the initial value for that attribute in the view , Can this be done through the UI by adding set action listener on that button and specifying from ( binding master_view.dept ) - to (binding of detail_view.dept) ..
hope that am clear this time,
Edited by: Delta on Jul 5, 2010 11:21 PM -
How to make a field mendatory input in ALV grid
Hi All,
I am using CALL METHOD g_alv_grid_0200->set_table_for_first_display for diplay in an ALV Grid.
I have made few fields in the ALV grid as EDITABLE. Now I want to make them as MENDATORY FOR INPUT.
Can somebody please suggest me how can I do it using any field of field catalogue or any other way !
Timely inputs will be highly appreciated.
Thanks in Advance!!
Chandanhi
we the option of making the field as not mandatory or making the field ready for input or edit
but dont have the option to make the edited field as mandatory.
types: begin of slis_fieldcat_alv_spec,
key_sel(1) type c, " field not obligatory
input(1) type c, " input
edit(1) type c, " internal use only
end of slis_fieldcat_alv_spec.
Regards -
Time out error in production server for alv grid report
hi. i have developed alv grid report using nested select statments. when i testing in development server it is giving the output but in production server if i give 4 months then it is showing time out error.please help me out..its urgent.
Thanks in advance.Hi Manu,
Don't use Nested selected statements.
Use the Following Performance Tuning Options that i have given below so that your problem can be solved.
1) Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
2) Avoid for all entries in JOINS
3) Try to avoid joins and use FOR ALL ENTRIES.
4) Try to restrict the joins to 1 level only ie only for tables
5) Avoid using Select *.
6) Avoid having multiple Selects from the same table in the same object.
7) Try to minimize the number of variables to save memory.
8) The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
9) Avoid creation of index as far as possible
10) Avoid operators like <>, > , < & like % in where clause conditions
11) Avoid select/select single statements in loops.
12) Try to use 'binary search' in READ internal table. Ensure table is sorted before using BINARY SEARCH.
13) Avoid using aggregate functions (SUM, MAX etc) in selects ( GROUP BY , HAVING,)
14) Avoid using ORDER BY in selects
15) Avoid Nested Selects
16) Avoid Nested Loops of Internal Tables
17) Try to use FIELD SYMBOLS.
18) Try to avoid into Corresponding Fields of
19) Avoid using Select Distinct, Use DELETE ADJACENT
<b>
Reward Points for sure if you find it useful. </b>
Regards
Babu -
Two Internal Tables for ALV Grid
Hi Gurus,
I have a little problem here. I have a report to display cost of production. The rows is about 50 displaying amount in dollars (currency fields). I have this in ALV Grid. But my problem is that the last 4 lines of the report are not currency fields like the others, they are quantity fields.
How can i go about to display this last 4 lines in this ALV Grid. They are from different internal tables off course because of the data type.
In short. I just want to display these 2 internal tables in an ALV Grid.
Thanks in Advance.Hi,
u can use ALV Block list to display 2 ALV.
Reffer to the below code.
DATA: v_layout TYPE slis_layout_alv.
DATA: ls_print TYPE slis_print_alv.
PERFORM build_fieldcatalog.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-repid
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* IT_EXCLUDING =
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = v_layout
it_fieldcat = it_fcat_nlei
i_tabname = 'IT_NLEI_ALV'
it_events = it_event_nlei
* IT_SORT =
* I_TEXT = ' '
TABLES
t_outtab = it_nlei_alv
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = v_layout
it_fieldcat = it_fcat_vbrp
i_tabname = 'IT_VBRP_ALV'
it_events = it_event_vbrp
* IT_SORT =
* I_TEXT = ' '
TABLES
t_outtab = it_vbrp_alv
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
ls_print-no_print_selinfos = 'X'. " Display no selection infos
ls_print-no_print_listinfos = 'X'. " Display no listinfos
ls_print-reserve_lines = 2. " Lines reserved for end of page
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
is_print = ls_print
* 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 =
EXCEPTIONS
program_error = 1
OTHERS = 2
Maybe you are looking for
-
Excise is not calculate in invoice verification
Dear All, I have one issue. We have create purchase order for project with account assignment category Q. We put excise (10.30) & Vat 15% in purchase order. In purchase order all value calculate properly. Good Receipt created against purchase order.
-
Custom BIOS for GS60 2PC (029AU)
I'm looking for unlocked BIOS settings for the MSI GS60 2PC (029AU) BIOS Version: E16H2IMS.10B Paypal Confirmation: 6P072738P6456162F Thankyou
-
Lenovo monitor connected to Mac mini
I have a Lenovo LI2223s monitor connected to Mac mini - and works fine when from full start up. But when has been in 'sleep' mode overnight, does not display any longer upon wake-up. Is there something I can do to correct this problem? (waking the
-
SRM XI Content for Shopping Cart model (Extended Classic)
We've loaded the XI content for SRM (XI7_0_SRM_SERVER_7.xxxx) from the sap marketplace and reviewed the data types, messages, and interfaces. It appears there are no pre-built integration scenarios associated with a Shopping Cart model (Purchase Orde
-
I am unable to open and read an IBook I purchased-Help??