Runtime Error:STRING_OFFSET_TOO_LARGE in TCODE:SAAB
Using Tcode:SAAB,I create a Checkpoint Group:ZTEST.
In the Activation tab,I made the following settings for ZTEST.
[Breakpoints: Break
Logpoints: Log
Assertions(Foreground):Log
Background Processing:Log]
In a Report program,I wrote the following code:
REPORT z_1.
DATA: TEST TYPE char13 VALUE '123'.
ASSERT ID ZTEST SUBKEY 'init'
FIELDS TEST
CONDITION 1 NE 1 .
I executed the program, and then found the log of ZTEST in the Log tab by TCode:SAAB.
It was weird.when I used [Display Details] menu to view the variable ZTEST's content,the SAP
system showed a short dump.The following infomation is something about the short dump.
Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code
|
Edited by: Rob Burbank on Jun 6, 2010 4:36 PM
Hello Manasa,
Thanks for your sugggestion but I did a debug in the method convert_xstr2cstr of class CL_RTM_SERVICES where the dump is beeing raised and I discovered that my problem is related with the server_codepage. I don't know how the system is calculating this, but in my HR enviorment the dump does not happen since the following code is not executed (in HR server_codepage EQ codepage).
IF server_codepage NE codepage AND codepage IS NOT INITIAL.
TRY.
cp_converter = cl_abap_conv_x2x_ce=>create( in_encoding = codepage
out_encoding = server_codepage
input = xstr ).
cp_converter->convert_c( n = len ).
xstring = cp_converter->get_out_buffer( ).
CATCH cx_root. "#EC CATCH_ALL
xstring = xstr.
ENDTRY.
ELSE.
xstring = xstr.
ENDIF.
I need to find what is the server_codepage and how it is calculated.
Anyway, thanks!
Sérgio Fraga
Similar Messages
-
Runtime error while executing Tcode FAGLL03
Hello experts
we have 2 clients in PRD
100,200
In 100 if i execute the tcode FAGLL03 it is showing the line items within 100 sec.
where as in 200 if i execute FAGLL03 it is showing runtime error.
if this executed in background it takes 1300 sec and finished successfully.
From basis perspective what would be the issue.
Regards
RaviHello srini
Thanks for ur input
Details
Recording at local and central time........................ 06.05.2009 14:03:30
Task................ 07522 / Dialog work process No. 00
User................ DEVAKUMAR
Client.............. 200
Terminal............ H2SBASIS
Session............. 1
Transaction code.... FAGLL03
Program name........ FAGL_ACCOUNT_ITEMS_GL
Problem class....... T Transaction Problem
Development class... SABP
Further details for this message type
Module name......... abinit
Line................ 1890
Error text.......... ab_chstat
Documentation for system log message AB 0 :
The specified runtime error has occurred in the system.
Parameter
a.. TIME_OUT
Technical details
File................ 000989
Position............ 0000261540
Entry type.......... l ( Error (Module, Row) )
Message ID.......... AB 0
Variable parts...... ab_chstat abinit 1890
this is the log got from SM21.
The runtime error is time out error
Regards
Ravi -
Runtime Error While in Tcode KES1
Hello Team,
We are using ECC6 EhP6.
I am getting a Runtime error while working with Tcode KES1:
Short text
Syntax error in program "SAPL0KEA ".
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLSVIM" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
The following syntax error occurred in program "SAPL0KEA " in include "L0KEAT00
" in
line 225:
"The Dictionary structure or table "*T2580" is either not active or doe"
"s not exist."
The include has been created and last changed by:
Created by: "GAURILAD "
Last changed by: "SAP* "
Error in the ABAP Application Program
The current ABAP program "SAPLSVIM" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
The following syntax error was found in the program SAPL0KEA :
"The Dictionary structure or table "*T2580" is either not active or doe"
"s not exist."
Please help me resolve this issue
Thanks
SaheliHi Dnyaneshwar,
Please execute report RKEAGENV and regenerate operating concern and check if the issue is resolved.
If not run report RKEAGENF with your operating concern, type of COPA = 1 (costing based) and flag the 'Refill' option. Regenerate the operating concern.
If running report RKEAGENV will cause another error concerning operating concern E_B1,then please follow the steps in KBA note 1514122
Operating concern should be E_B1 even though you may not be using this operating concern.
regards
Waman -
Runtime error on the tcode: ik07
hello everyone,
i am getting this runtime error on ik07(plz see images). all i know that this is a standard program. i can't understand what's wrong. plz help me if you can.
regards,
santanu nayek.Hi Santanu,
First start investigating functionally.
Start executing with one equipment. If no error you increase the span until you find the equipment which triggers this error. Means the measuring point/s which trigger this error. If this is the case and you've arrived at a measuring point, then there might be a problem of characteristics used. Even you should look into this equipment master also, whether anything went wrong while creating MPs on this.
If you've confirmed that this is not the case, then this has to be addressed technically.
Jogeswara Rao K -
"CALL_FUNCTION_CONFLICT_TYPE" runtime error while running tcode BPS0 in BW
Hi ,
Can anybody have any idea about this dump error in BW quality system while user running tcode BPS0 and getting this dump repeatedly please help me out on this.
Error in the ABAP Application Program
The current ABAP program "SAPLZBSV_BPS_E_PLA_VARIABLES" had to be terminated
because it has
come across a statement that unfortunately cannot be executed.
A function module was called incorrectly.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE'
not caught in
procedure "CHECK_FILE_ENTRIES2" "(FORM)", nor was it propagated by a RA
clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
The call to the function module "RSD_CHKTAB_GET_FOR_CHA_BAS" is incorre
The function module interface allows you to specify only
fields of a particular type under "E_CHNTAB".
The field "L_TABNM" specified here is a different
field type
How to correct
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"CALL_FUNCTION_CONFLICT_TYPE" "CX_SY_DYN_CALL_ILLEGAL_TYPE"
"SAPLZBSV_BPS_E_PLA_VARIABLES" or "LZBSV_BPS_E_PLA_VARIABLESF01"
"CHECK_FILE_ENTRIES2"
Thanks & Regards
RiturajHello,
I get the answer. In program personal_data is associated with bapip0002 structure.
where as in function personal_data is associated with BAPIP0002B. and the structure of BAPIP0002 is differ to BAPIP0002B.
minaxi shah -
Runtime error while running Tcode KES1
Hi,
We are upgrading our systems from 4.7EE to ECC6. Our FI people are testing the Tcode KES1,
it is showing the following dump. << removed >>
Short text
Syntax error in program "SAPL0KEA ".
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLSVIM" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
The following syntax error occurred in program "SAPL0KEA " in include "L0KEAT00
" in
line 225:
"The Dictionary structure or table "*T2580" is either not active or doe"
"s not exist."
The include has been created and last changed by:
Created by: "GAURILAD "
Last changed by: "SAP* "
Error in the ABAP Application Program
The current ABAP program "SAPLSVIM" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
The following syntax error was found in the program SAPL0KEA :
"The Dictionary structure or table "*T2580" is either not active or doe"
"s not exist."
Please anyone help me resolve this issue <removed by moderator>.
Thanks & Regards,
Tanuja.
Edited by: Thomas Zloch on Jan 14, 2011 1:17 PM - normal priority please
Edited by: Rob Burbank on Jan 14, 2011 9:25 AMHi,
Please check in SPDD whether this table T2580 is present or not.
Clear SPDD list if required.
If not then activate the table using SE11 it will solve your problem.
Thanks,
Dhiraj. -
Runtime error while executing SE30 Tcode as CREATE_DATA_ILLEGAL_LENGTH
Hi Guys,
when I am executing a TCode SE30 I am getting following Runtime error .
Runtime Errors CREATE_DATA_ILLEGAL_LENGTH
Except. CX_SY_CREATE_DATA_ERROR
Date and Time 23.07.2010 12:28:30
Short text
CREATE DATA: Illegal value for the length of an object of the type "X"
What happened?
Error in the ABAP Application Program
The current ABAP program "CL_ABAP_TRACE_FILE============CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_CREATE_DATA_ERROR', was not
caught in
procedure "READ_INFO" "(METHOD)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
A data object of the type "X" with length 0 was to be created using
CREATE DATA. The value 0 is not within the allowed range.
Allowed range for the length specification:
Typ C, N, X: 1 .. 65535
TYP P: 1 .. 16
Missing RAISING Clause in Interface
Please suggest me the solution .You have to check that in the object(source code) which you are analysing via SE30 .
-
Runtime Error SYNTAX_ERROR with MIGO tcode
Hi Gurus,
I got a new issue now. while executing MIGO tcode getting SYNTAX_ERROR dump, please check below dump details..
Category ABAP Programming Error
Runtime Errors SYNTAX_ERROR
ABAP Program SAPLVBDOCUBATCH_DM
Application Component LO-BM
Date and Time 09.01.2012 16:27:51
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLMIGO" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
The following syntax error occurred in program "SAPLVBDOCUBATCH_DM " in include
"LVBDOCUBATCH_DM$39 " in
line 8:
""RL034" must be a flat structure. You cannot use internal tables, stri"
"ngs, references, or structures as components."
The include has been created and last changed by:
Created by: "SAP "
Last changed by: "SAP "
Error in the ABAP Application Program
The current ABAP program "SAPLMIGO" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
The following syntax error was found in the program SAPLVBDOCUBATCH_DM :
""RL034" must be a flat structure. You cannot use internal tables, stri"
"ngs, references, or structures as components."
i have tried to check syntax of program SAPLVBDOCUBATCH_DM and it is giving error, please help me solve this issue.
Additional Information:ECC6.0 EHP5(recently upgraded from ECC6.0) nd DB:Oracle 10.2.0.2 OS:windows
Thanks,
VenkatHello Team,
This is Solved..
As per dump when we go n check table RL034 through SE11 there one Object type is wrong so with Abaper help it got corrected then the problem was solved.
Thanks all for your time.
Venkat -
triggering a Runtime error screen when i execute tcode: crmd_order
please give the solution......may it is a program error....Although you are getting your dump, this is for CRM version below 2006s(52). CRMD_ORDER hasn't been technically supported on any of the newer releases of CRM for a long while.
In fact if you made AET extensions to business transactions in CRM, you can't view that data at all in that transaction code.
That being said, if SAP really wants to offer unofficial support for this transaction be my guest.
Take care,
Stephen -
ABAP RunTime Error for tcode : TS01
Hi Friends,
Actually we are getting the run time error while creating the standard security transaction using TS01.
After entering the data in the first screen -- click on the enter -- enter the details inside & click on save button--then it will go run time error.
Here while calling the method, we are getting the run time error.
call method cl_class_position_op_trs=>trs_flows_calculate_tax
exporting
im_tab_flow = L_TAB_FLOWS
im_company_code = l_company_code
im_security_account = l_security_account
im_security_id = l_security_id
receiving
re_tab_flow = RE_TAB_FLOWS
exceptions
failed = 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
RAISING FAILED.
endif.
Actuallly here the problem with the class becuase the class cl_class_position_op_trs itself has error.
In the class , in the local classes they are calling again the class cl_class_position_op_trs. becasue of this reason it was going to run time error.
So we are getting the run time error.
We have OSS note for the same problem.But i am unable to implement that.
Please guide me how to implement the OSS note 751947.(Note 751947 - TRS: Syntax error due to ABAP Compiler)
please find the error details:
Runtime Errors SYNTAX_ERROR
Occurred on 03/12/2008 at 00:26:57
Syntax error in program "CL_CLASS_POSITION_OP_TRS======CP ".
What happened?
The following syntax error occurred in the program
CL_CLASS_POSITION_OP_TRS======CP :
"Components of classes declared using "CLASS CL_CLASS_POSITION_OP_TRS D"
Error in ABAP application program.
The current ABAP program "CL_CLASS_POSITION_TRS=========CP" had to be
terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
What can you do?
Please eliminate the error by performing a syntax check
(or an extended program check) on the program "CL_CLASS_POSITION_OP_TRS======CP
You can also perform the syntax check from the ABAP/4 Editor.
If the problem persists, proceed as follows:
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
The following syntax error was found in the program
CL_CLASS_POSITION_OP_TRS======CP :
"Components of classes declared using "CLASS CL_CLASS_POSITION_OP_TRS D"
Regards.
Lakshmi
Edited by: lakshmi podile on Mar 14, 2008 8:08 AMDid you go through the steps in the note?
Use transaction SE24 to distribute the local classes into new include structures as follows:
Call transaction SE24 for the class CL_CLASS_POSITION_OP_TRS.
Select the following menu option:
Goto --> Class-local types --> Local Class Definitions/Types
Confirm the message that proposes conversion into the new structures.
Choose Utilities --> Regenerate sections from the menu.
Activate the class and all changed objects.
Try and do this, and see what happens.
Good luck. -
Refresh Runtime Error in TCODE DB02
Hello Experts!
Was just trying to refresh the statistics that I have for my DB Spaces in DB02, but I suddenly come up with this error. Can anyone tell me what this means and why this is suddenly happening (As I had no problems using this functionality just last week). Thanks!
ST22 Error Log:
Runtime Errors DBIF_DSQL2_SQL_ERROR
Exception CX_SY_NATIVE_SQL_ERROR
Occurred on 03/30/2009 at 11:11:51
SQL error "-727" occurred when executing EXEC SQL.
What happened?
The error occurred in the current database connection "DEFAULT".
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.
is especially useful if you want to keep a particular message.
Error analysis
An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_NATIVE_SQL_ERROR', was not
caught, which
led to a runtime error. The reason for this exception is:
How to correct the error
Database error text........: "INF-727: Invalid or NULL TBLspace number given to
dbinfo(dbspace)."
Triggering SQL statement...: "FETCH NEXT "
Internal call code.........: "[DBDS/NEW DSQL]"
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_DSQL2_SQL_ERROR" CX_SY_NATIVE_SQL_ERRORC
"RSINFTD1 " or "RSINFTD1 "
"START-OF-SELECTION"
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.
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
SM21 Error Log:
BY2 Database error -727 at FET
BY0 > INF-727: Invalid or NULL TBLspace number given to
BY0 > dbinfo(dbspace).
R68 Perform rollback
AB0 Run-time error "DBIF_DSQL2_SQL_ERROR" occurred
AB1 > Short dump "090330 111151 gtbwspd 10002568 " generatedHi.
I already had this issue and I solved by this way:
My issue happened in the following SQL statement:
94 EXEC SQL.
SELECT MAX(A.NEXTSIZE)
96 FROM SYSTABLES A, SYSFRAGMENTS B
97 WHERE DBINFO('DBSPACE',B.PARTN) = :TS_CHECK-DBSNAME
98 AND A.PARTNUM = 0
99 AND A.TABID = B.TABID
100 INTO :MAXEXT
101 ENDEXEC.
1) Please run the following sql query:
select fragtype, tabid, partn from sysfragments where partn = 0
2) Figure out which table it is:
select tabname from systables where tabid =<tabid>
3) Check the indexes of that table with oncheck -cI.
4) If you found indexes DISABLED, then you should enable them again.
5) To solve the problem you can:
-enable dropped indexes:
set indexes,constraints for <table> enabled;
-rebuild the indexes
Afterwards this operation should be corrected.
I hope I could be helpful.
Thanks,
Walter Oliveira. -
ABAP Runtime Error at the time of saving of Document Through CV01N tcode
Dear Experts
We have install seprate DMS Server for storing various documents of different module.
While saving of Document through Transaction CV01N one small screen gets pop up.Which is as follows
Check in Document:KPro
Storage Category Description
ZCITY123 DMS
I am selecting above line from Kpro, then when i click on save system gives ABAP Runtime Error.
Runtime Errors CALL_FUNCTION_NOT_FOUND
Except. CX_SY_DYN_CALL_ILLEGAL_FUNC
Date and Time 21.10.2008 18:35:26
Short text
Function module "PROJECT SYSTEM" not found.
What happened?
The function module "PROJECT SYSTEM" is called,
but cannot be found in the library.
Error in the ABAP Application Program
The current ABAP program "SAPLSDCE" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
I am not understanding why this dump is coming.
How i can come up from this issue.Pls guide me.If any customizing is required pls give the steps
Thanks in Advance.
Regards,
Sandeep TheurkarThere is a programming error somewhere.To get a solution quickly, do as follows:
1. Turn off all badi's, user exits and whatever you have changed in standard SAP.
2. Rerun - if it still fails - search in SAP notes for relevant notes
3. If it doesnt fail - you have an error in your own programming
4. If you are on relevant Support packages etc, send a message to SAP.
Regards,
Espen Leknes -
Tcode SM52 shows Runtime error.
Hi,
This is newly installed CRM server on windows 2003, oracle 10i, basis rel 701, kernel patch level 55
Runtime error shows once executing SM52 FOR VIRTUAL MACHINE CONTAINer. Please check the below runtime error.
Runtime Errors COMPUTE_FLOAT_ZERODIVIDE
Exception CX_SY_ZERODIVIDE
Date and Time 28.07.2010 16:37:46
Short text
Divide by 0 (type F) In program "RSM52000_ALV"
What happened?
Error in the ABAP Application Program
The current ABAP program "RSM52000_ALV" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
What can you do?
Note down which actions and inputs caused the error.
To process the problem further, contact you SAP system
administrator.
Using Transaction ST22 for ABAP Dump Analysis, you can look
at and manage termination messages, and you can also
keep them for a long time.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_ZERODIVIDE', was not caught in
procedure "CREATE_HEADER" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In the current program "RSM52000_ALV", an arithmetic operation ('DIVIDE',
'/', 'DIV' or 'MOD') attempted to use operands of type F to divide
by 0.
The operands involved were:
1. Operand: 100
2. Operand: 0
(If "?" is output, the value of the operand can no longer be
determined).
How to correct the error
If the error occurred in your own ABAP program or in an SAP
program you modified, try to remove the error.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"COMPUTE_FLOAT_ZERODIVIDE" "CX_SY_ZERODIVIDE"
"RSM52000_ALV" or "RSM52000_ALV"
"CREATE_HEADER"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
The exception must either be prevented, caught within proedure
"CREATE_HEADER" "(FORM)", or its possible occurrence must be declared in the
RAISING clause of the procedure.
To prevent the exception, note the following:
Thanks
ChidamHi Alejandro,
if you are using Windows 2003 server please consider SAP note 1357247 as there are issues within the memory management of the operating system.
Best Regards,
Michael -
How to delete the runtime error in st22
Hi all,
How to delete the runtime error in ST22. I want to clear
the list of short dump in st22
is there any T.code or any table to clear?
thanks in advance
sundar.cHi
you cannot delete the dumps through any tcode.
All the dumps are stored in table called SNAP, If there are more dumps the table gets filled therefore u have to reorganize the table.
Run the report RSSNAPDL in SE38.
or
You have the default SAP background jobs, SAP_REORG_ABAPDUMPS which deletes the past dumps raised in the system.
Scheduling the jobs in regular is very important
For more information
http://help.sap.com/saphelp_nw04/helpdata/en/c4/3a7ede505211d189550000e829fbbd/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/d8/a58b4275160d53e10000000a155106/frameset.htm
Regards
Bhaskar -
Regarding Runtime error in ALV List Display.
am using following to display data in ALV List.
but after executing of program am getting runtime error called 'Field Symbol has Not been assigned' .
please tell me how to correct the error.
Very urgent
Suitable answers rewarded with Maximum Ponits...
REPORT zmatrix.
TYPE-POOLS: slis.
TABLES: agr_define, sza5_d0700.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-006.
SELECT-OPTIONS: s_role FOR agr_define-agr_name OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
D A T A *
TYPES: BEGIN OF ty_agr_1251_inf,
agr_name TYPE agr_1251-agr_name,
object TYPE agr_1251-object,
field TYPE agr_1251-field,
low(20) TYPE c,
high TYPE agr_1251-high,
infty TYPE t582s-infty,
itext TYPE t582s-itext,
END OF ty_agr_1251_inf.
TYPES: BEGIN OF ty_agr_1251_tcode,
agr_name TYPE agr_1251-agr_name,
object TYPE agr_1251-object,
field TYPE agr_1251-field,
low(20) TYPE c,
high TYPE agr_1251-high,
tcode TYPE tstct-tcode,
ttext TYPE tstct-ttext,
END OF ty_agr_1251_tcode.
TYPES: BEGIN OF ty_t582s,
infty TYPE agval,
itext TYPE t582s-itext,
END OF ty_t582s.
TYPES: BEGIN OF ty_code,
tcode TYPE tstct-tcode,
ttext TYPE ttext_stct,
END OF ty_code.
TYPES: BEGIN OF ty_inf,
infty TYPE t582s-infty,
itext TYPE t582s-itext,
END OF ty_inf.
TYPES: BEGIN OF ty_role,
agr_name TYPE agr_1251-agr_name,
END OF ty_role.
TYPES: BEGIN OF tys_role_dtls,
agr_name TYPE agr_name,
value TYPE c,
property TYPE c,
END OF tys_role_dtls.
TYPES: BEGIN OF tys_infotype_final,
text(60),
text1(60),
value(4),
END OF tys_infotype_final.
I N T E R N A L T A B L E S *
DATA: wa_infotyp_final TYPE tys_infotype_final.
DATA: t_infotyp_final TYPE TABLE OF tys_infotype_final.
DATA: BEGIN OF wa_infotyp_dtls,
infty TYPE infty,
itext TYPE intxt,
role_dtls TYPE TABLE OF tys_role_dtls,
END OF wa_infotyp_dtls.
DATA: BEGIN OF wa_tcode_dtls,
tcode TYPE tcode,
ttext TYPE ttext_stct,
role_dtls TYPE TABLE OF tys_role_dtls,
END OF wa_tcode_dtls.
DATA: t_infotyp_dtls LIKE TABLE OF wa_infotyp_dtls,
t_tcode_dtls LIKE TABLE OF wa_tcode_dtls,
t_role_dtls TYPE TABLE OF tys_role_dtls,
wa_role_dtls TYPE tys_role_dtls.
DATA: wa_inf TYPE ty_inf,
t_inf TYPE STANDARD TABLE OF ty_inf.
DATA: wa_role TYPE ty_role,
t_role TYPE STANDARD TABLE OF ty_role.
DATA: wa_tcode TYPE ty_code,
t_tcode TYPE TABLE OF ty_code.
DATA: wa_agr_1251_inf TYPE ty_agr_1251_inf.
DATA: wa_agr_1251_tcode TYPE ty_agr_1251_tcode.
DATA: t_agr_1251_inf TYPE STANDARD TABLE OF ty_agr_1251_inf.
DATA: t_agr_1251_tc TYPE STANDARD TABLE OF ty_agr_1251_tcode.
DATA: wa_582s TYPE ty_t582s.
DATA: t_582s TYPE STANDARD TABLE OF ty_t582s.
DATA: t_range_tcode TYPE RANGE OF tcode.
DATA: t_range_inf TYPE RANGE OF infotyp.
DATA: wa_range_inf LIKE LINE OF t_range_inf.
DATA: wa_range_tcode LIKE LINE OF t_range_tcode.
DATA: wa_field TYPE slis_fieldcat_alv.
DATA: t_field TYPE slis_t_fieldcat_alv.
VARIABLES FOR OLE *
DATA: text(20),
count(20).
DATA: text1(30).
DATA: agr_name TYPE agr_1251-agr_name.
DATA: flag TYPE i VALUE '0'.
DATA: string1 TYPE string.
DATA: str TYPE string VALUE 'SAP%'.
DATA: count1 TYPE i VALUE '0'.
*& Event START-OF-SELECTION
START-OF-SELECTION.
PERFORM f100_get_inf_data.
PERFORM f200_process_inf_data.
count1 = 1.
PERFORM f300_prepare_field_catalog.
PERFORM f110_main_data.
PERFORM f400_display_data.
PERFORM f100_get_trans_data.
*& Form f110_main_data
text
FORM f110_main_data.
wa_infotyp_final-text = 'Access to Infotypes'.
APPEND wa_infotyp_final TO t_infotyp_final.
wa_infotyp_final-text = 'Infotype'.
wa_infotyp_final-text1 = 'Description'.
APPEND wa_infotyp_final TO t_infotyp_final.
wa_infotyp_final-text = '*'.
wa_infotyp_final-text1 = 'Acess to all Infotypes'.
LOOP AT t_role INTO wa_role WHERE agr_name <> ' '.
READ TABLE t_agr_1251_inf INTO wa_agr_1251_inf
WITH KEY agr_name = wa_role-agr_name field = 'INFTY' low = '*'.
IF syst-subrc = 0.
wa_infotyp_final-value = 'X'.
ENDIF.
ENDLOOP.
APPEND wa_infotyp_final TO t_infotyp_final.
LOOP AT t_inf INTO wa_inf WHERE infty <> ' '.
wa_infotyp_final-text = wa_inf-infty.
wa_infotyp_final-text1 = wa_inf-itext.
LOOP AT t_role INTO wa_role WHERE agr_name <> ' '.
Role Name
CLEAR wa_role_dtls.
flag = 1.
wa_role_dtls-agr_name = wa_role-agr_name.
For Value D & F
READ TABLE t_agr_1251_inf INTO wa_agr_1251_inf
WITH KEY agr_name = wa_role-agr_name field = 'AUTHC'..
IF syst-subrc EQ 0.
IF wa_agr_1251_inf-low = 'R'.
wa_infotyp_final-value = 'D'.
ELSE.
wa_infotyp_final-value = 'F'.
ENDIF.
ENDIF.
APPEND wa_role_dtls TO t_role_dtls.
APPEND wa_infotyp_final TO t_infotyp_final.
ENDLOOP.
ENDLOOP.
ENDFORM. "f110_main_data
*& Form f100_get_inf_data
text
FORM f100_get_inf_data.
Logic for Infotypes *
SELECT aagr_name aobject
afield alow a~high
INTO TABLE t_agr_1251_inf
FROM agr_1251 AS a INNER JOIN agr_define AS b
ON aagr_name EQ bagr_name
WHERE ( ( aobject EQ 'P_ORGIN' OR aobject EQ 'P_PERNR' )
AND ( aagr_name IN s_role ) AND ( bagr_name NOT LIKE str ) ).
ENDFORM. "f100_get_inf_data
*& Form f200_get_inf_process_data
text
FORM f200_process_inf_data.
LOOP AT t_agr_1251_inf INTO wa_agr_1251_inf.
IF wa_agr_1251_inf-high IS INITIAL.
CLEAR wa_range_inf.
wa_range_inf-sign = 'I'.
wa_range_inf-option = 'EQ'.
wa_range_inf-low = wa_agr_1251_inf-low.
APPEND wa_range_inf TO t_range_inf.
ELSE.
CLEAR wa_range_inf.
wa_range_inf-sign = 'I'.
wa_range_inf-option = 'BT'.
wa_range_inf-low = wa_agr_1251_inf-low.
wa_range_inf-high = wa_agr_1251_inf-high.
APPEND wa_range_inf TO t_range_inf.
ENDIF.
ENDLOOP.
SORT t_range_inf.
DELETE ADJACENT DUPLICATES FROM t_range_inf.
IF t_range_inf IS NOT INITIAL.
SELECT infty itext FROM t582s
INTO TABLE t_582s
WHERE sprsl = 'EN' AND infty IN t_range_inf.
IF syst-subrc EQ 0.
ENDIF.
ENDIF.
LOOP AT t_agr_1251_inf INTO wa_agr_1251_inf.
IF wa_agr_1251_inf-high IS INITIAL.
READ TABLE t_582s INTO wa_582s
WITH KEY infty = wa_agr_1251_inf-low.
IF syst-subrc EQ 0.
wa_agr_1251_inf-infty = wa_582s-infty.
wa_agr_1251_inf-itext = wa_582s-itext.
MODIFY t_agr_1251_inf FROM wa_agr_1251_inf
TRANSPORTING infty itext.
IF syst-subrc EQ 0.
ENDIF.
ENDIF.
ELSE.
CLEAR count.
LOOP AT t_582s INTO wa_582s
WHERE infty GE wa_agr_1251_inf-low
AND infty LE wa_agr_1251_inf-high.
IF count LE 1.
wa_agr_1251_inf-high = space.
wa_agr_1251_inf-infty = wa_582s-infty.
wa_agr_1251_inf-itext = wa_582s-itext.
MODIFY t_agr_1251_inf FROM wa_agr_1251_inf
TRANSPORTING infty itext.
IF syst-subrc EQ 0.
CLEAR wa_582s.
ENDIF.
ELSE.
wa_agr_1251_inf-high = space.
wa_agr_1251_inf-infty = wa_582s-infty.
wa_agr_1251_inf-itext = wa_582s-itext.
APPEND wa_agr_1251_inf TO t_agr_1251_inf.
ENDIF.
CLEAR wa_agr_1251_inf.
count = count + 1.
ENDLOOP.
ENDIF.
ENDLOOP.
wa_role-agr_name = ' '.
APPEND wa_role TO t_role.
wa_role-agr_name = ' '.
APPEND wa_role TO t_role.
LOOP AT t_agr_1251_inf INTO wa_agr_1251_inf.
IF wa_agr_1251_inf IS NOT INITIAL.
wa_role-agr_name = wa_agr_1251_inf-agr_name.
wa_inf-infty = wa_agr_1251_inf-infty.
wa_inf-itext = wa_agr_1251_inf-itext.
APPEND wa_role TO t_role.
APPEND wa_inf TO t_inf.
ENDIF.
ENDLOOP.
SORT t_role BY agr_name.
DELETE ADJACENT DUPLICATES FROM t_role.
SORT t_inf BY infty.
DELETE ADJACENT DUPLICATES FROM t_inf.
ENDFORM. "f200_get_process_inf_data
*& Form f100_get_trans_data
text
FORM f100_get_trans_data.
Logic for Transaction Codes *
SELECT aagr_name aobject
afield alow a~high
INTO CORRESPONDING FIELDS OF TABLE t_agr_1251_tc
FROM agr_1251 AS a
INNER JOIN agr_define AS b ON aagr_name EQ bagr_name
WHERE a~agr_name IN s_role
AND a~object EQ 'S_TCODE'.
ENDFORM. "f100_get_trans_data
*& Form f200_process_trans_data
text
FORM f200_process_trans_data.
LOOP AT t_agr_1251_tc INTO wa_agr_1251_tcode.
IF wa_agr_1251_tcode-high IS INITIAL.
CLEAR wa_range_tcode.
wa_range_tcode-sign = 'I'.
wa_range_tcode-option = 'EQ'.
wa_range_tcode-low = wa_agr_1251_tcode-low.
APPEND wa_range_tcode TO t_range_tcode.
ELSE.
CLEAR wa_range_tcode.
wa_range_tcode-sign = 'I'.
wa_range_tcode-option = 'BT'.
wa_range_tcode-low = wa_agr_1251_tcode-low.
wa_range_tcode-high = wa_agr_1251_tcode-high.
APPEND wa_range_tcode TO t_range_tcode.
ENDIF.
ENDLOOP.
SORT t_range_tcode.
DELETE ADJACENT DUPLICATES FROM t_range_tcode.
IF t_range_tcode IS NOT INITIAL.
SELECT tcode
ttext
FROM tstct
INTO TABLE t_tcode
WHERE sprsl EQ 'E'
AND tcode IN t_range_tcode.
IF sy-subrc EQ 0.
ENDIF.
ENDIF.
SORT t_agr_1251_tc BY agr_name.
LOOP AT t_agr_1251_tc INTO wa_agr_1251_tcode.
IF wa_agr_1251_tcode-high IS INITIAL.
READ TABLE t_tcode INTO wa_tcode
WITH KEY tcode = wa_agr_1251_tcode-low.
IF syst-subrc EQ 0.
wa_agr_1251_tcode-tcode = wa_tcode-tcode.
wa_agr_1251_tcode-ttext = wa_tcode-ttext.
MODIFY t_agr_1251_tc FROM wa_agr_1251_tcode
TRANSPORTING tcode ttext.
IF syst-subrc EQ 0.
ENDIF.
ENDIF.
ELSE.
CLEAR count.
LOOP AT t_tcode INTO wa_tcode
WHERE tcode GE wa_agr_1251_tcode-low
AND tcode LE wa_agr_1251_tcode-high.
IF count LE 1.
agr_name = wa_agr_1251_tcode-agr_name.
wa_agr_1251_tcode-high = space.
wa_agr_1251_tcode-tcode = wa_tcode-tcode.
wa_agr_1251_tcode-ttext = wa_tcode-ttext.
MODIFY t_agr_1251_tc FROM wa_agr_1251_tcode
TRANSPORTING tcode ttext high.
IF syst-subrc EQ 0.
CLEAR wa_tcode.
ENDIF.
count = 1.
ELSE.
wa_agr_1251_tcode-high = space.
wa_agr_1251_tcode-agr_name = agr_name.
wa_agr_1251_tcode-low = wa_tcode-tcode.
wa_agr_1251_tcode-tcode = wa_tcode-tcode.
wa_agr_1251_tcode-ttext = wa_tcode-ttext.
APPEND wa_agr_1251_tcode TO t_agr_1251_tc.
ENDIF.
CLEAR wa_agr_1251_tcode.
count = count + 1.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT t_agr_1251_tc INTO wa_agr_1251_tcode.
wa_role-agr_name = wa_agr_1251_tcode-agr_name.
APPEND wa_role TO t_role.
ENDLOOP.
SORT t_role BY agr_name.
DELETE ADJACENT DUPLICATES FROM t_role.
SORT t_tcode BY tcode.
DELETE ADJACENT DUPLICATES FROM t_tcode.
ENDFORM. "f200_process_trans_data
*& Form f100_prepare_field_catalog
text
FORM f300_prepare_field_catalog.
LOOP AT t_role INTO wa_role.
wa_field-col_pos = count1.
wa_field-fieldname = wa_role-agr_name.
APPEND wa_field TO t_field.
count1 = count1 + 1.
ENDLOOP.
ENDFORM. "f100_prepare_field_catalog
*& Form f100_display_data
text
FORM f400_display_data.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-cprog
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT =
it_fieldcat = t_field[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_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
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = t_infotyp_final[]
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. "f100_display_datathis are the wasy u can build a field catalog...
1.----
FORM fill_fieldcat .
DATA: fld(30),
idx(2) TYPE n.
DEFINE no_output.
fieldcatalog-fieldname = &1.
fieldcatalog-no_out = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
END-OF-DEFINITION.
DEFINE catalog.
fieldcatalog-fieldname = &1.
fieldcatalog-seltext_s = &2.
if not &3 is initial.
fieldcatalog-seltext_m = &3.
else.
fieldcatalog-seltext_m = fieldcatalog-seltext_s.
endif.
if not &4 is initial.
fieldcatalog-seltext_l = &4.
else.
fieldcatalog-seltext_l = fieldcatalog-seltext_m.
endif.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
END-OF-DEFINITION.
catalog 'AVAIL_BASE'
'Base Qty.'
'Base Qty. Available'
'Base Quantity Available'.
catalog 'AVAIL_SALES'
'Sales Qty.'
'Sales Qty. Available'
'Sales Quantity Available'.
LOOP AT t_char_data.
idx = sy-tabix.
CONCATENATE 'CHR' idx INTO fld.
catalog fld
t_char_data-atbez
t_char_data-atbez
t_char_data-atbez.
ENDLOOP.
ADD 1 TO idx.
WHILE idx LE 15.
CONCATENATE 'CHR' idx INTO fld.
no_output fld.
ADD 1 TO idx.
ENDWHILE..
fieldcatalog-fieldname = 'EXACT'.
fieldcatalog-checkbox = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
2.----
FORM fieldcatalog.
REFRESH fc. CLEAR fc.
fc-tabname = 'HEADER'.
fc-fieldname = 'KUNNR'.
fc-ref_tabname = 'MSKU'.
APPEND fc. CLEAR fc.
fc-tabname = 'HEADER'.
fc-fieldname = 'NAME1_K'.
fc-ref_tabname = 'KNA1'.
fc-ref_fieldname = 'NAME1'.
APPEND fc. CLEAR fc.
fc-tabname = 'HEADER'.
fc-fieldname = 'TOTAL'.
fc-ref_tabname = 'MBEW'.
fc-ref_fieldname = 'SALK3'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'MATNR'.
fc-ref_tabname = 'MSKU'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'MAKTX'.
fc-ref_tabname = 'MAKT'.
fc-no_out = 'X'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'CHARG'.
fc-ref_tabname = 'MSKU'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'WERKS'.
fc-ref_tabname = 'MSKU'.
fc-no_out = 'X'.
APPEND fc. CLEAR fc.
fc-tabname = 'LIST'.
fc-fieldname = 'NAME1_W'.
fc-ref_tabname = 'T001W'.
fc-ref_fieldname = 'NAME1'.
fc-no_out = 'X'.
APPEND fc. CLEAR fc.
Maybe you are looking for
-
How to re-activate Photoshop CS2 after my hard drive was replaced
Help! My hard drive had to be replaced, and now my computer will not allow me to use my Photoshop CS2. I purchased this years ago, and have all of the verification codes. I have several things I am working on that I can't finish until I get it reacti
-
Kernal Panic - iMac G5 - 10.3
Hi, On my iMac G5, running panther I get this When using Apple Mail sometimes when I open it the screen goes fuzzy and after a minute or so a kernal panic occurs. When I reboot all my mail is set to unread! Any suggestions on what to do? Thanks a lot
-
How to use Native SQL in Toplink
I am using toplink in my project, can you please some one help me how to create native sql using toplink. I have seen EntityManager interface having method createNativeQuery, but how to create instance of EntityManager
-
Apples vs Oranges which is faster??
A new 20" iMac with the 2.8GHz Intel Core 2 Duo and 3Gb of ram vs. a Dual 2.0Ghz Power PC G5 and 3Gb of ram.
-
Startup display flashes Apple logo, circle w/ line ,question mark folder
I attempted to install OS 10.6 SL and during initial install and restart my MBP display started flashing the grey Apple logo, circle with angle line thru it, and file folder icon with question mark in center. I can not get my MBP to restart. It just