Dump analysis in Hierarchical ALV
Hi Experts,
I am creating an output in hierarchical ALV list display, where I get runtime error. error comes in the statement of standard program.
read table t_outtab_master with key ( rs_layout-expand_fieldname ) = 'X'.
This is the standard code which raises the runtime error. here rs_layout-fieldname = employee id which is a number. As it is compared with the character 'X', dump comes. But why this statement is executed? Where may be the error. I checked the fieldcat, keyinfo fields completely. Internal table contents are also proper.
Kindly help me to find out where the error is.
Thank and regards,
Venkat.
Hi Experts,
I am creating an output in hierarchical ALV list display, where I get runtime error. error comes in the statement of standard program.
read table t_outtab_master with key ( rs_layout-expand_fieldname ) = 'X'.
This is the standard code which raises the runtime error. here rs_layout-fieldname = employee id which is a number. As it is compared with the character 'X', dump comes. But why this statement is executed? Where may be the error. I checked the fieldcat, keyinfo fields completely. Internal table contents are also proper.
Kindly help me to find out where the error is.
Thank and regards,
Venkat.
Similar Messages
-
Getting a program Dump Error in Herarchial ALV
Hello All,
I am getting a dump error when I am executing the below program. Kindly help as I am not getting the output. However all the subroutines are getting properly populated with data. Getting a dump error while calling the function : REUSE_ALV_HIERSEQ_LIST_DISPLAY
Pasted below are both the question and solution. Copy the solution in SE38 and execute it to check out the dump error.
Kindly help.
Thanks,
Vinod.
QUESTION :-
Objective
Hierarchical ALV for displaying Sales documents per customer
Design
Create a program that will allow the user to display all customers that have placed Sales Orders in the given date range. The user will have an ability to drill-down to see the sales order items per customer.
Selection screen fields
Sales order creation date (range)
Customer number (range)
Output
Header
Customer Number
Customer Name
Total Order value (sum of order values from items below)
Details
Sales order number
Material number
Order quantity
Order value
Reference
Tables: KNA1, VBAK, VBAP
Transaction VA03 (Sales order)
SOLUTION :-
*& Report Z_HALV_32722 *
REPORT Z_HALV_32722 .
TYPE-POOLS: slis.
TABLES : kna1,
vbak.
SELECT-OPTIONS: s_cst_no FOR kna1-kunnr.
SELECT-OPTIONS: s_cr_dt FOR vbak-erdat.
DATA : BEGIN of ty_hdr,
kunnr TYPE vbak-kunnr,
name1 TYPE kna1-name1,
netwr TYPE vbak-netwr,
END of ty_hdr,
gt_hdr LIKE TABLE OF ty_hdr,
gs_hdr LIKE LINE OF gt_hdr.
DATA : BEGIN of ty_ln,
kunnr TYPE vbak-kunnr,
vbeln TYPE vbap-vbeln,
matnr TYPE vbap-matnr,
kwmeng TYPE vbap-kwmeng,
netwr TYPE vbap-netwr,
END of ty_ln,
gt_ln LIKE TABLE OF ty_ln,
gs_ln LIKE LINE OF gt_ln.
DATA : BEGIN of ty_hdr1,
kunnr TYPE vbak-kunnr,
END of ty_hdr1,
gt_hdr1 LIKE TABLE OF ty_hdr1,
gs_hdr1 LIKE LINE OF gt_hdr1.
DATA : gt_fc TYPE slis_t_fieldcat_alv,
gs_fc LIKE LINE OF gt_fc,
gs_k_fld TYPE slis_keyinfo_alv,
gt_layout TYPE slis_layout_alv,
gv_repid TYPE sy-repid.
START-OF-SELECTION.
gv_repid = sy-repid.
perform fetch_data.
perform prepare_fc.
perform prepare_layout.
perform show_output.
*& Form fetch_data
text
--> p1 text
<-- p2 text
form fetch_data .
SELECT kunnr
INTO CORRESPONDING FIELDS OF TABLE gt_hdr1
FROM vbak
WHERE vbak~kunnr IN s_cst_no
AND vbak~erdat IN s_cr_dt.
DELETE ADJACENT DUPLICATES FROM gt_hdr1 COMPARING kunnr.
LOOP AT gt_hdr1 INTO gs_hdr1.
SELECT SINGLE vbakkunnr kna1name1 SUM( vbak~netwr )
INTO (gs_hdr-kunnr, gs_hdr-name1, gs_hdr-netwr)
FROM vbak INNER JOIN kna1
ON vbakkunnr = kna1kunnr
WHERE vbak~kunnr = gs_hdr1-kunnr
GROUP BY vbakkunnr kna1name1.
APPEND gs_hdr TO gt_hdr.
SELECT vbakkunnr vbapvbeln vbapmatnr vbapkwmeng vbap~netwr
INTO CORRESPONDING FIELDS OF TABLE gt_ln
FROM vbap INNER JOIN vbak
ON vbapvbeln = vbakvbeln
WHERE vbak~kunnr = gs_hdr1-kunnr.
ENDLOOP.
endform. " fetch_data
*& Form prepare_fc
text
--> p1 text
<-- p2 text
form prepare_fc .
CLEAR gs_k_fld.
gs_k_fld-header01 = 'KUNNR'.
gs_k_fld-item01 = 'KUNNR'.
CLEAR gs_fc.
gs_fc-fieldname = 'KUNNR'.
gs_fc-tabname = 'GT_HDR'.
gs_fc-seltext_l = text-001.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'NAME1'.
gs_fc-tabname = 'GT_HDR'.
gs_fc-seltext_l = text-002.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'NETWR'.
gs_fc-tabname = 'GT_HDR'.
gs_fc-seltext_l = text-003.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'VBELN'.
gs_fc-tabname = 'GT_LN'.
gs_fc-seltext_l = text-004.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'MATNR'.
gs_fc-tabname = 'GT_LN'.
gs_fc-seltext_l = text-005.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'KWMENG'.
gs_fc-tabname = 'GT_LN'.
gs_fc-seltext_l = text-006.
APPEND gs_fc TO gt_fc.
CLEAR gs_fc.
gs_fc-fieldname = 'NETWR'.
gs_fc-tabname = 'GT_LN'.
gs_fc-seltext_l = text-007.
APPEND gs_fc TO gt_fc.
endform. " prepare_fc
*& Form prepare_layout
text
--> p1 text
<-- p2 text
form prepare_layout .
gt_layout-colwidth_optimize = 'X'.
gt_layout-expand_fieldname = 'TST'.
endform. " prepare_layout
*& Form show_output
text
--> p1 text
<-- p2 text
form show_output .
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = gv_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
IS_LAYOUT = gt_layout
IT_FIELDCAT = gt_fc
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
i_tabname_header = 'GT_HDR'
i_tabname_item = 'GT_LN'
I_STRUCTURE_NAME_HEADER =
I_STRUCTURE_NAME_ITEM =
is_keyinfo = gs_k_fld
IS_PRINT =
IS_REPREP_ID =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
tables
t_outtab_header = GT_HDR[]
t_outtab_item = GT_LN[]
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. " show_outputEverything looks fine with the gt_layout, it is not an internal table, so no need to append to it, it is simply a structure, but you do tell it that TST is the expand field, but there is no field of this name in your internal for the header, so add it like this.
DATA : BEGIN of ty_hdr,
kunnr TYPE vbak-kunnr,
name1 TYPE kna1-name1,
netwr TYPE vbak-netwr,
<b>TST type c,</b>
END of ty_hdr,
Doing so should make you program work correctly.
Regards,
Rich Heilman
Message was edited by:
Rich Heilman -
ABAP dump when running an ALV report in a portal
Hi,
I have an ABAP report created in SAP R/3 4.7. Am using the ALV function module REUSE_ALV_GRID_DISPLAY to display the output. The programs runs correctly when run in R/3 using the SAP GUI.
When the report is run in the portal, I get a runtime error 'MESSAGE_TYPE_X'.
Please let me know if anybody has faced such issues.
I checked the OSS note 702732 which talks about increasing the threshold value of the start parameter. But this is not agreed by the BASIS team.
Thanks,
Best regards,
Ajith
The ST22 error log is as follows:
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
Error analysis
Short text of error message:
Data volume (84.550.400 bytes) is too large. (abap/alvgrid/size_nodod_mb
Technical information about the message:
Diagnosis
You tried to send a data record to the front-end that contains
84.550.400 bytes. However, the data volume is restricted to
52.428.800 bytes.
System Response
The running application program was terminated with a runtime
error.
Procedure
Restrict the data selection if possible or contact your system
administrator.
Procedure for System Administration
You can set the maximum size of these data volumes using the kernel
parameter 'abap/alvgrid/size_nodod_mb' (in megabytes).
Message classe...... "S>"
Number.............. 890
Variable 1.......... "84.550.400"
Variable 2.......... "52.428.800"
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"MESSAGE_TYPE_X" C
"SAPLAWRT" or "LAWRTU22"
"ITS_CHECK_ALV_DATA_SIZE"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in the editor or
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
Information on where terminated
The termination occurred in the ABAP program "SAPLAWRT" in
"ITS_CHECK_ALV_DATA_SIZE".
The main program was "Z_BW_RECON_INV_RPT ".
The termination occurred in line 25 of the source code of the (Include)
program "LAWRTU22"
of the source code of program "LAWRTU22" (when calling the editor 250).
Source code extract
000010 FUNCTION ITS_CHECK_ALV_DATA_SIZE.
000020 *"
000030 ""Lokale Schnittstelle:
000040 *" IMPORTING
000050 *" REFERENCE(DATA_TABLE) TYPE TABLE
000060 *"
000070
000080 data n type i.
000090 data currsize type i.
000100 statics maxsize type i.
000110 data par_value(56).
000120 if maxsize is initial.
000130 sy-subrc = 0.
000140 CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'abap/alvgrid/size_nodod_MB'
000150 id 'VALUE' field par_value.
000160 if sy-subrc ne 0.
000170 maxsize = 52428800. " Default 50 MB
000180 else.
000190 maxsize = 1048576 * par_value.
000200 endif.
000210 endif.
000220 describe table data_table lines n.
000230 currsize = sy-tfill * sy-tleng.
000240 if currsize gt maxsize.
> message x890(s>) with currsize maxsize.
000260 endif.
000270 ENDFUNCTION.HI,
This is a Memory problem.
System is allocated with a Max Memory of 50 MB,(see the dump code, in the last it is hardcoded in the std code)
The data of your report is coming around 83 MB.
Restrict your selection criteria of the Object and run the same report and see. it will work.
Regards,
Anji -
Hi, In ST22 dump analysis, we are getting the following columns...
Date, Time, Host, User,Client, Error ID....Is there any way to get also the program name (which is usually available on double clicking any row) in it...
Because dump analysis report if needed to do program wise it is very difficult to do so....Hi Soumen,
the reportname is already available in the dump overview.
You can see the information, if you scroll the alv to the right end. If you don't see the column 'Reportname', then you have to adjust the layout of the alv with the layout button. There you have also the possibility to rearrange the sequence of the columns and/or to (un-)hide several columns, which are unnecessary for you.
Save your changes as user-specified layout.
Greetings
Joerg -
What is Short Dump Analysis and secendry index ?
Dear Experts .
1.) What is purpose of T-codes SE30 and ST22 ?
What is Short Dump Analysis ?
2.) What is secendry index , How to use it ? How it effects the Performance of a report ?
Please it is urgent ...
Regards : RajneeshHi
A dump analysis is a comprehensive list that should enable you to identify the causes and possible solutions of program errors. The ABAP Workbench generates a short dump whenever a report or transaction terminates due to a serious error. The system enters the error in the system log and writes a snapshot of the program at the moment when it terminated into a special database table called SNAP.
Dump analyses give the user or programmer information about the causes of the error that has caused the program to terminate. Experienced users can use them to identify very quickly where and why this occurred. He or she can them solve the problem.
The snapshot contains the following information:
Why the program has terminated
What caused the program termination
Where in the program code the termination occurred
What you can do to correct the error
The values of the relevant system fields when the program terminated
The calls or events that were active when the program terminated
Any other programs that are affected.
http://help.sap.com/saphelp_nw70/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/content.htm
Index: Technical key of a database table.
Primary index: The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
Secondary index: Additional indexes could be created considering the most frequently accessed dimensions of the table.
Structure of an Index
An index can be used to speed up the selection of data records from a table.
An index can be considered to be a copy of a database table reduced to certain fields. The data is stored in sorted form in this copy. This sorting permits fast access to the records of the table (for example using a binary search). Not all of the fields of the table are contained in the index. The index also contains a pointer from the index entry to the corresponding table entry to permit all the field contents to be read.
When creating indexes, please note that:
An index can only be used up to the last specified field in the selection! The fields which are specified in the WHERE clause for a large number of selections should be in the first position.
Only those fields whose values significantly restrict the amount of data are meaningful in an index.
When you change a data record of a table, you must adjust the index sorting. Tables whose contents are frequently changed therefore should not have too many indexes.
Make sure that the indexes on a table are as disjunctive as possible.
(That is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.)
Accessing tables using Indexes
The database optimizer decides which index on the table should be used by the database to access data records.
You must distinguish between the primary index and secondary indexes of a table. The primary index contains the key fields of the table. The primary index is automatically created in the database when the table is activated. If a large table is frequently accessed such that it is not possible to apply primary index sorting, you should create secondary indexes for the table.
The indexes on a table have a three-character index ID. '0' is reserved for the primary index. Customers can create their own indexes on SAP tables; their IDs must begin with Y or Z.
If the index fields have key function, i.e. they already uniquely identify each record of the table, an index can be called a unique index. This ensures that there are no duplicate index fields in the database.
When you define a secondary index in the ABAP Dictionary, you can specify whether it should be created on the database when it is activated. Some indexes only result in a gain in performance for certain database systems. You can therefore specify a list of database systems when you define an index. The index is then only created on the specified database systems when activated -
Urgent:Grand total in hierarchical alv
I am printing a hierarchical alv with subtotals. I want to print the grand total for the whole numeric columns ...
Can anyone explain me how i can do this.
Thanks and regards,
SubhakarHi,
In this case you not only require the totals but the subtotals also.
For achieving this output you will have to sort the alv on the first column and also give subtotals there.
use
data: SORTF TYPE SLIS_SORTINFO_ALV,
TSORT TYPE SLIS_T_SORTINFO_ALV.
in the function module reuse_alv_grid_display give
it_sort = tsort.
eg:
FORM ALV_SHOW.
LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
LAYOUT-BOX_TABNAME = 'IT_DISPLAY'.
LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
LAYOUT-ZEBRA = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IS_LAYOUT = LAYOUT
IT_FIELDCAT = TCATALOG
IS_VARIANT = VAR1
I_SAVE = 'A'
IT_SORT = TSORT
IT_EVENTS = TEVENT[]
TABLES
T_OUTTAB = IT_DISPLAY.
ENDFORM . "ALV_SHOW
and write a subroutine for sort...
form sort.
CLEAR SORTF.
SORTF-spos = 1.
SORTF-fieldname = 'column_1'.
SORTF-tabname = 'IT_table used for display in alv'.
SORTF-up = 'X'.
SORTF-subtot = 'X'.
APPEND SORTF TO TSORT.
endform.
If this doesn't help I will send you the whole source of a sample program..
Abdullah -
Date Field in Hierarchical ALV
Hello Friends,
I have a few fields in my Hierarchical ALV output which are initially hidden.
When I choose to display these fields by changing the Layout the date fields come out in the form
MMDDYYYY
I need those fields as
MM/DD/YYYY
The date fields which are NOT hidden initially are in the format MM/DD/YYYY. No problem there.
When I go to settings and choose column width optimize I am then able to see these date fields as MM/DD/YYYY.
In My code I already set this col width to optimize. It is also working . But for fields which are hidden initially I have to explicitly set the width optimize again .
This problem is not there in GRID ALV.
Why is the HIER ALV not putting the date fields in MM/DD/YYYY format.Hi,
Just pass the Edit option of the fieldcatalog for those specific fields...
fcat-edit = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND' "<---- pass this
i_callback_top_of_page = 'TOP'
is_layout = it_layout
it_fieldcat = it_fcat
i_default = 'X'
i_save = 'A'
it_events = it_event
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
*& Form USER_COMMAND
* text
* -->R_UCOMM text
* -->RS_SELFIELD text
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&DATA_SAVE'. "<-------check this
PERFORM save_data.
ENDCASE.
ENDFORM. "USER_COMMAND -
Changing totals value in hierarchical alv for a particular level/row
Hi,
I am displaying a hierarchical ALV having 4 levels.
Using field catalog, totals for all dynamic columns are found out.
I have a requirement not to display totals value for first and second levels.
And if possible, to display another value.
Tried using CL_GUI_ALV_TREE->change_node.
But it not updating.
Please suggest a solution.
Thanks,
Nisha Vengal.Hi Ten Mariga,
I wonder why the second select Query is needed at all instead you can use
---> Not Needed
FORM DATA_RETRIEVAL1.
SELECT * FROM zcontact INTO TABLE it_zcontact WHERE id EQ wa_zcontact-id.
ENDFORM.
----> Instead you can do
READ TABLE it_zcontact INTO wa_zcontact INDEX p_seltab-tabindex.
Append wa_zcontact to Second_table.
And you can use the Second_table to display the second ALV. The second Select Query will affect the performance too.
Cheers,
Krishnakumar B. -
Switching between Hierarchical ALV and List/Grid ALV
Hello!
I was checking out the List of GR/IR Balances report (tcode MB5S), which uses Hierarchical ALV. I noticed that there's a button in the output toolbar that enables you to switch from Hierarchical ALV to Grid ALV. Is there a specific setting in the ALV that you need to define in order to use this feature?
Thanks in advance.Hi,
there is no need of any specific settings.
those properties will came when u use the related function module.all the code for this will exist in the function module u r using for creating the hierarchial display.
regards,
bharat. -
Error in HRPAD31 ( Short dump Analysis )
Hi friends,
When i am changing the existing qualification or adding new qualification it is showing this error in short dump
Pls advise me if there is some relationship i am missing in 031 ?
here is the description of short dump
Runtime Error DBIF_RSQL_SQL_ERROR
Exception CX_SY_OPEN_SQL_DB
Occurred on 10.09.2008 at 10:48:39
An SQL error occurred when accessing a table.
What happened?
What can you do?
Make a note of the actions and input which caused the error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', wasneither
caught nor passed along using a RAISING clause, in the procedure"ADATA_DB" "FORM)"
Since the caller of the procedure could not have expected this exception to occcur, the running program was terminated.
The reason for the exception is:
How to correct the error
The exception must either be prevented, caught within the procedure "ADATA_DB"
"(FORM)", or declared in the procedure's RAISING clause.
To prevent the exception, note the following:
Database error text........: "ORA-01653: unable to extend table SAPR3.HRPAD31 by 80 in tablespace PSAPSTABD"
Internal call code.........: "RSQL/INSR/HRPAD31"
Please check the entries in the system log (Transaction SM21).
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself, use the following search criteria:
"DBIF_RSQL_SQL_ERROR" CX_SY_OPEN_SQL_DBC
"SAPLRHAP" or "LRHAPF1K"
"ADATA_DB"
System environment
SAP Release.............. "620"
Application server....... "Development"
Network address.......... "200.200.200.10"
Operating system......... "Windows NT"
Release.................. "5.2"
Hardware type............ "2x IA64 Level 3"
Character length......... 8 Bits
Pointer length........... 64 Bits
Work process number...... 1
Short dump setting....... "full"
Database server.......... "Development"
Database type............ "ORACLE"
Database name............ "VC3"
Database owner........... "SAPR3"
Character set............ "English_United State"
SAP kernel............... "640"
Created on............... "Aug 16 2007 23:23:39"
Created in............... "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
Database version......... "OCI_920_SHARE "
Patch level.............. "196"
Patch text............... " "
Supported environment....
Database................. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE
User, transaction...
Client.............. 600
User................ "HUSER"
Language key........ "E"
Transaction......... "PP01 "
Program............. "SAPLRHAP"
Screen.............. "MP100100 6000"
Screen line......... 16
Information on where terminated
The termination occurred in the ABAP program "SAPLRHAP" in "ADATA_DB".
The main program was "MP100100 ".
The termination occurred in line 57 of the source code of the (Include) program LRHAPF1K"
of the source code of program "LRHAPF1K" (when calling the editor 570).
Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in
the procedure "ADATA_DB" "(FORM)" but was not handled locally, not declared in the RAISING clause of the procedure.
The procedure is in the program "SAPLRHAP ". Its source code starts in line 8 of the (Include) program "LRHAPF1K ".
PLS LET ME KNOW IF I NEED TO CHECK ALL MY CONFIGURATION ?Hi Ted,
It is working, i just logged off and logged in. Now there is no error.
Thanks for all your support. I am struggling on this isse from 3 days and could not sort it out.
I appreciate on more time for your knowledge.
I have rewarded the points also....
Regards
HR user -
Get the header in centre,make bold, change font in hierarchical alv list
Hi all
I need to get the following header in the centre for hierarchical alv list:
ex:
General Ledger -
want it to be bold
July 2009 -
want to change font to be less than 1st line
Please help me to achieve this.
I have got the header in the middle using write statements in top of page.
But am not able to get it bold and change the font.
Thanking in advance.Hi all
I need to get the following header in the centre for hierarchical alv list:
ex:
General Ledger ( want it to be bold)
July 2009 (want to change font to be less than 1st line )
Please help me to achieve this.
I have got the header in the middle using write statements in top of page.
But am not able to get it bold and change the font.
Thanking in advance. -
How to create space between Header text of Hierarchical ALV List.
hi,
I am display data using Hierarchical ALV List.
In Perform of field catalog, I am writing this code:
PERFORM fill_catalogue USING :
'CHKBX' 'T_HEADER' 20 'Sess Decision Box'(t19) 'X',
'SESS_NO' 'T_HEADER' 11 'Session'(t20) ' ' ,
'SESS_STAT' 'T_HEADER' 4 'Status'(t39) ' ',
'HOLD_STAT' 'T_HEADER' 4 'HOLD'(t52) ' ',
'ICON' 'T_HEADER' 9 'Tracking'(t21) ' ' ,
'CREATE_DT' 'T_HEADER' 10 'Archiving Date'(t22) ' ' ,
'AGING' 'T_HEADER' 50 'Aging'(t23) ' ',
'OBJECT' 'T_HEADER' 12 'Archive Obj'(t24) ' ',
'HOLD_INFO' 'T_HEADER' 100 'Hold Reason' ' ' ,
'YFY_DATA' 'T_HEADER' 4 'Data Fiscal Year'(t48) ' ' ,
'COMMENTS' 'T_HEADER' 50 'Session Notes'(t26) ' ' ,
'DATATYPE' 'T_HEADER' 50 'Archive Object Description'(t25) ' ',
'APPR_STAT' 'T_ITEM' 16 'Approval Status'(t29) ' ',
'DESTR_DT_REV' 'T_ITEM' 10 'New Date'(t30) ' ',
'REJCT_REASON' 'T_ITEM' 60 'Rejection Reason'(t31) ' ' .
At output of this program , there are two rows in HEADER details.
I want text 'Session notes' of 2nd row under 'Archiving Date' of 1st row.
For this i have to create space between 'Data Fiscal Year' & 'Session notes' text.
How i can do this.
Regards,
MamtaHi,
You can use TOP-OF-PAGE event and pass this event to Hierarchical ALV FM.
Thanks,
Kartavya Kaushik. -
Need information regarding Hierarchical ALV display
How to total sub items in an Heirarchical ALV List display?
Hi,
I have one Hierarchical alv example .. please see it. Also check B*ALV in se38.
*& Report ZLAXMI_ALVEXER4 *
REPORT ZLAXMI_ALVEXER4 MESSAGE-ID ZZ .
*& TABLES DECLARATION *
TABLES: VBAK, VBAP.
*& TYPE POOLS DECLARATION *
TYPE-POOLS: SLIS.
DATA DECLARATIONS *
DATA: V_FLAG TYPE C. "Flag to display the header
DATA: V_REPID TYPE SY-REPID.
*& INTERNAL TABLE DECLARATION *
DATA: BEGIN OF IT_VBAK OCCURS 0,
VBELN LIKE VBAK-VBELN,
AUDAT LIKE VBAK-AUDAT,
AUART LIKE VBAK-AUART,
NETWR LIKE VBAK-NETWR,
EXPAND(1),
END OF IT_VBAK.
DATA: BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
MATNR LIKE VBAP-MATNR,
PSTYV LIKE VBAP-PSTYV,
CHARG LIKE VBAP-CHARG,
END OF IT_VBAP.
DATA: IT_FLDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FLDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
*events
IT_EVENTS TYPE SLIS_T_EVENT WITH HEADER LINE,
V_CALL TYPE C,
X_USER TYPE SLIS_EXIT_BY_USER,
IT_VARIANT LIKE DISVARIANT OCCURS 0 WITH HEADER LINE,
X_KEYINFO TYPE SLIS_KEYINFO_ALV,
*layout
X_LAYOUT TYPE SLIS_LAYOUT_ALV,
*sort
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT LIKE LINE OF IT_SORT,
X_CAT TYPE SLIS_FIELDCAT_ALV,
V_TABIX LIKE SY-TABIX.
Selection screen Declaration
*--BLOCK1
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN,
S_AUART FOR VBAK-AUART.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN *
*- Validations
AT SELECTION-SCREEN.
PERFORM VALIDATE_SCREEN.
START OF SELECTION *
START-OF-SELECTION.
*- To get data from VBAK
PERFORM GET_DATA.
*to get data from VBAP
PERFORM GET_DATA_VBAP.
PERFORM PREPARE_ALV.
END OF SELECTION *
END-OF-SELECTION.
PERFORM DISPLAY_REPORT.
*& Form VALIDATE_SCREEN
text
--> p1 text
<-- p2 text
FORM VALIDATE_SCREEN .
DATA: LV_VBELN LIKE VBAK-VBELN,
LV_AUART LIKE VBAK-AUART.
IF NOT S_VBELN[] IS INITIAL.
SELECT VBELN
INTO LV_VBELN
FROM VBAK
WHERE VBELN IN S_VBELN.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'INVALID SALES DOC'(002).
ENDIF.
ENDIF.
IF NOT S_AUART[] IS INITIAL.
SELECT AUART
INTO LV_AUART
FROM VBAK
WHERE AUART IN S_AUART.
ENDSELECT.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'INVALID SALES DOC TYPE'(003).
ENDIF.
ENDIF.
ENDFORM. " VALIDATE_SCREEN
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM GET_DATA .
SELECT VBELN
AUDAT
AUART
NETWR
FROM VBAK
INTO TABLE IT_VBAK
WHERE VBELN IN S_VBELN
AND AUART IN S_AUART.
IF SY-SUBRC = 0.
SORT IT_VBAK BY VBELN.
ENDIF.
ENDFORM. " GET_DATA
*& Form GET_DATA_VBAP
text
--> p1 text
<-- p2 text
FORM GET_DATA_VBAP .
SELECT VBELN
POSNR
MATNR
PSTYV
CHARG
INTO TABLE IT_VBAP
FROM VBAP
FOR ALL ENTRIES IN IT_VBAK
WHERE VBELN = IT_VBAK-VBELN.
IF SY-SUBRC = 0.
SORT IT_VBAP BY VBELN POSNR.
ENDIF.
ENDFORM. " GET_DATA_VBAP
*& Form prepare_alv
text
--> p1 text
<-- p2 text
FORM PREPARE_ALV .
Prepare field catalog .
PERFORM PREPARE_CATALOG.
Modify catalog
PERFORM CHANGE_ATTR_OF_CATALOG.
Modify Layout
PERFORM MODIFY_LAYOUT.
Sort Catalog
PERFORM SORT_CATALOG.
ENDFORM. " prepare_alv
*& Form prepare_catalog
text
--> p1 text
<-- p2 text
FORM PREPARE_CATALOG .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_VBAK'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = IT_FLDCAT1[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
APPEND LINES OF IT_FLDCAT1 TO IT_FLDCAT.
CLEAR: IT_FLDCAT1[].
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_VBAP'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = IT_FLDCAT1[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
APPEND LINES OF IT_FLDCAT1 TO IT_FLDCAT.
ENDFORM. " prepare_catalog
*& Form change_attr_of_catalog
text
--> p1 text
<-- p2 text
FORM CHANGE_ATTR_OF_CATALOG .
LOOP AT IT_FLDCAT INTO X_CAT.
V_TABIX = SY-TABIX.
CASE X_CAT-FIELDNAME.
WHEN 'EXPAND'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-NO_OUT = 'X'.
ENDIF.
when 'VBELN'.
if x_cat-tabname = 'IT_VBAK'.
x_cat-no_out = 'X'.
endif.
WHEN 'VBELN'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-COL_POS = '1'.
X_CAT-SELTEXT_M = 'SALES DOC'.
X_CAT-SELTEXT_L = 'SALES DOC'.
X_CAT-SELTEXT_S = 'SALES DOC'.
X_CAT-OUTPUTLEN = '10'.
ENDIF.
WHEN 'AUDAT'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-COL_POS = '2'.
X_CAT-SELTEXT_M = 'DOC DATE'.
X_CAT-SELTEXT_L = 'DOC DATE'.
X_CAT-SELTEXT_S = 'DOC DATE'.
X_CAT-OUTPUTLEN = '8'.
ENDIF.
WHEN 'AUART'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-COL_POS = '3'.
X_CAT-SELTEXT_M = 'ORDER REASON'.
X_CAT-SELTEXT_L = 'ORDER REASON'.
X_CAT-SELTEXT_S = 'ORDER REASON'.
X_CAT-OUTPUTLEN = '5'.
ENDIF.
WHEN 'NETWR'.
IF X_CAT-TABNAME = 'IT_VBAK'.
X_CAT-COL_POS = '4'.
X_CAT-SELTEXT_M = 'NET PRICE'.
X_CAT-SELTEXT_L = 'NET PRICE'.
X_CAT-SELTEXT_S = 'NET PRICE'.
X_CAT-OUTPUTLEN = '15'.
ENDIF.
ENDCASE.
MODIFY IT_FLDCAT FROM X_CAT.
CLEAR X_CAT.
ENDLOOP.
ENDFORM. " change_attr_of_catalog
*& Form modify_layout
text
--> p1 text
<-- p2 text
FORM MODIFY_LAYOUT .
X_LAYOUT-DEFAULT_ITEM = 'X'.
X_LAYOUT-ZEBRA = 'X'.
X_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.
ENDFORM. " modify_layout
*& Form sort_catalog
text
--> p1 text
<-- p2 text
FORM SORT_CATALOG .
CLEAR WA_SORT.
WA_SORT-SPOS = '01'.
WA_SORT-FIELDNAME = 'VBELN' .
WA_SORT-TABNAME = 'IT_VBAP'.
WA_SORT-UP = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-SPOS = '02'.
WA_SORT-FIELDNAME = 'POSNR' .
WA_SORT-TABNAME = 'IT_VBAP'.
WA_SORT-UP = 'X'.
APPEND WA_SORT TO IT_SORT.
ENDFORM. " sort_catalog
*& Form DISPLAY_REPORT
text
--> p1 text
<-- p2 text
FORM DISPLAY_REPORT .
IT_VARIANT-REPORT = SY-REPID.
SORT IT_VBAK BY VBELN.
SORT IT_VBAP BY VBELN POSNR.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = X_LAYOUT
IT_FIELDCAT = IT_FLDCAT[]
IT_SORT = IT_SORT
IS_VARIANT = IT_VARIANT
IT_EVENTS = IT_EVENTS[]
I_TABNAME_HEADER = 'IT_VBAK'
I_TABNAME_ITEM = 'IT_VBAP'
IS_KEYINFO = X_KEYINFO
IMPORTING
E_EXIT_CAUSED_BY_CALLER = V_CALL
ES_EXIT_CAUSED_BY_USER = X_USER
TABLES
T_OUTTAB_HEADER = IT_VBAK
T_OUTTAB_ITEM = IT_VBAP
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_REPORT
Regards,
Laxmi. -
Hi Experts, oo hierarchical alv, how to add checkbox on every header?
Hi Experts,
I am working on oo hierarchical alv, how can I add checkbox on every header? thanks in advance!
Kind regards
DawsonHi Dawson,
Just refer the below program & pass the check box functionality (mentioned in bold) in REUSE_ALV_HIERSEQ_LIST_DISPLAY in your program.
TYPE-POOLS : slis.
Data
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE t001.
DATA : flag tyPE c,
END OF itab.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvly TYPE slis_layout_alv.
Select Data
SELECT * FROM t001 INTO TABLE itab.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
Display
alvly-box_fieldname = 'FLAG'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid "<-------Important
i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
is_layout = alvly
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
CALL BACK FORM
FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
LOOP AT itab.
itab-flag = 'X'.
MODIFY itab.
ENDLOOP.
IMPORTANT.
WHATROW-REFRESH = 'X'.
ENDFORM. "ITAB_user_command
Regards
Abhii... -
How to do DUMP Analysis ?
How to do DUMP Analysis ?Can anybody explain me the steps to solve the dump step by step ?
thanks
NareshHi
A dump analysis is a comprehensive list that should enable you to identify the causes and possible solutions of program errors. The ABAP Workbench generates a short dump whenever a report or transaction terminates due to a serious error. The system enters the error in the system log and writes a snapshot of the program at the moment when it terminated into a special database table called SNAP.
Dump analyses give the user or programmer information about the causes of the error that has caused the program to terminate. Experienced users can use them to identify very quickly where and why this occurred. He or she can them solve the problem.
The snapshot contains the following information:
Why the program has terminated
What caused the program termination
Where in the program code the termination occurred
What you can do to correct the error
The values of the relevant system fields when the program terminated
The calls or events that were active when the program terminated
Any other programs that are affected.
http://help.sap.com/saphelp_nw70/helpdata/en/c6/617d0ce68c11d2b2ab080009b43351/content.htm
Index: Technical key of a database table.
Primary index: The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
Secondary index: Additional indexes could be created considering the most frequently accessed dimensions of the table.
Structure of an Index
An index can be used to speed up the selection of data records from a table.
An index can be considered to be a copy of a database table reduced to certain fields. The data is stored in sorted form in this copy. This sorting permits fast access to the records of the table (for example using a binary search). Not all of the fields of the table are contained in the index. The index also contains a pointer from the index entry to the corresponding table entry to permit all the field contents to be read.
When creating indexes, please note that:
An index can only be used up to the last specified field in the selection! The fields which are specified in the WHERE clause for a large number of selections should be in the first position.
Only those fields whose values significantly restrict the amount of data are meaningful in an index.
When you change a data record of a table, you must adjust the index sorting. Tables whose contents are frequently changed therefore should not have too many indexes.
Make sure that the indexes on a table are as disjunctive as possible.
(That is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.)
Accessing tables using Indexes
The database optimizer decides which index on the table should be used by the database to access data records.
You must distinguish between the primary index and secondary indexes of a table. The primary index contains the key fields of the table. The primary index is automatically created in the database when the table is activated. If a large table is frequently accessed such that it is not possible to apply primary index sorting, you should create secondary indexes for the table.
The indexes on a table have a three-character index ID. '0' is reserved for the primary index. Customers can create their own indexes on SAP tables; their IDs must begin with Y or Z.
If the index fields have key function, i.e. they already uniquely identify each record of the table, an index can be called a unique index. This ensures that there are no duplicate index fields in the database.
When you define a secondary index in the ABAP Dictionary, you can specify whether it should be created on the database when it is activated. Some indexes only result in a gain in performance for certain database systems. You can therefore specify a list of database systems when you define an index. The index is then only created on the specified database systems when activated
Maybe you are looking for
-
In "development" i can no longer see the "basic" option. how can i get it back
In "development" I can no longer see the "Basic" option. How can I get it back?
-
Why does Mozilla allow virus manufacturers to compromise their browser?
I've been using Firefox for about a decade now, and I've always preferred it to the built in IE software. However, for the last year (or more) I have suffered more and more issues with your browser than ever before (being redirected from trusted page
-
8350i: Changing the font size results in screen redraw problems
Hey everyone. BlackBerry 8350i v4.6.1.204 (3.0.0.73) BBAlpha Sans, size 8 When the screen redraws to account for a change in font or font size, there is a redraw problem that overwrites portions of the menu. Steps to repro and some supporting dial
-
Macbook Pro Keyboard shortcuts are not working
Hi there, In the last week or so my keyboard shortcuts for volume control are no longer working - even the mute button has no effect. when I press the shortcuts the volume adjustment image pops up and the computer makes the clicking noise, but the vo
-
Outlook 2011 for mac iCloud issues
THis is crazy I have been using entorage and outlook for years now that i upgraded to Icloud no email or configuration will work. I dont care for the mail app i have all my mail in outlook. tried all posted settings still does not work. I wish i coul