AGR_USERS - USLA04
After some deletion of roles from AGR_USERS we do not have sync between SU01, AGR_USERS and USLA04.
The roles are missing from AGR_USERS but not from USLA04. Is there a way to do this? (we have already tried PFUD.) How will the system react to deletion from the table USLA04 directly?
Hi,
It is not recommanded to perform user level changes directly from table level.
if mass user level change is identified, you can use Tcode SU10 or other script for making changes to user master record (i.e. ecatt or LSMW etc)
since you have already changed table data , you can syncronize it via User Master Data reconciliation program for the roles (transaction code PFUD).
it should sync user master record properly , if not you might reuqire to update master record to required status seperatly.
Regards
Similar Messages
-
AGR_USERS is out of sync with SU01
Hello!
Scenario:
So I'm having to replace roles for about 18 thousand users. We're delpoying the change a few thousand users at a time.
We created a couple of ecatts that first removes all the access and then adds all the new access. The ECATT is setup by placing the roles horizontally across for each user, which assigns all the roles in one change. The issue we've noticed, comes from a few workflow roles that require a confirmation. The ECATT doesn't know what to do and skips the process for that user which fails to delete all access, which in turn, fails to assign all access.
Issue:
When I looked up the AGR_USER table to validate the assignment I noticed the table indicates the user has access, but when I go to SU01for some users the role assignment is missing. From what I can tell, it seems if I reopen the user manually and save, it reflects the change in the AGR table. What I need to know is there a way to mass sync the table to reflect the actual assignments in SU01? Or is there an indicator on the AGR_USER table stating the user is not synced with SU01?
I need to find the users not synced between SU01 and AGR_USERS. Then assign the missing roles. Currently the AGR_USERS table is giving me false positives.
Thanks in advance!
AlexI would be very carefull of this behaviour and approach in a production system....
eCATT can create inconsistencies and leave temporary data in the buffered application server tables.
I am not logged on to check the field keys of AGR_USERS, but it sounds to me as if this workflow confirmation is not being skipped as you have described, but is rather stopping the process and leaving the roles you had wanted to assign in the application server memory.
When you then access SU01 soon enough afterwards and save, it writes this inconsistency to the DB tables. If you wait for long enough, the systems own memory invalidations will fix it for you. So you have actually commited an error by saving...
> What I need to know is there a way to mass sync the table to reflect the actual assignments in SU01?
In this case, your error will not only go "Bang"... it would go "Bang, bang, bang, bang, bang.... rrraaaatatatatatatatatatata..." or simply to nothing at other (slightly later) times...
Obviously that is not a reliable solution.
In higher releases, the buffering of these types of tables has (as a general trend) been removed to prevent these types of inconsistencies and strange behaviour when using such tools which are intended for test systems and sandboxes, where data intengrity is not the primary concern.
Cheers,
Julius -
Extract AGR_USERS into BI
Hi Gurus,
I am investigating around possibilities to extract data from the AGR_USERS table into BI. I am interested to know if there are any extractors / datasources available that allow for this. Anyone have any info?
Many thanks,
WillemHi,
Check this thread:
Segregation of Duties - source SAP tables with authorization data
I dont think there is a Standard Extractor outthere casue there are so many tables linked to this.Go with Custom extractor.
Best of luck!
@AK -
What is the difference between AGR_USERS and AGR_USERT
Hello,
In the table agr_user<b>s</b> one can find the roles a user has.
But there is also a similar table agr_user<b>t</b>, this table contains similar records, but there are only a few records and they do not correspond with the role attribution in the transaction PFCG.
Can anybody tell me what table AGR_USERT is for?Hi --
Only the User name varies...
I hope AGR_USERT is for any SAP sys user.. say if you want to assign a different SAP sys user to a Role from BW.
where as AGR_USERS is for local sys..
i hope so,
Regards,
vishwa.
"Saying THANKS In SDN is Thru Assigning Points ". -
AGR_USERS still shows deleted User IDs
Hi There,
Can someone kindly help me to understand how a few User IDs that have been deleted in the system still continues to show up in the table AGR_USERS ?
This table information is being extracted into BW and it ends showing non-existent IDs in the report.
Regards,
ManickHi Ravi,
Yes - the CUA is active in another system; the deleted IDs are in the child system. However, the User Role assignments are still being shown in the T-Code PFCG (in either of the systems).
Regards,
Manick -
AGR_USERS, but for users with reference user assigned
Hi...
How do I get a complete list is "Users By Role" when a large number of users only have roles via a reference user?
Table AGR_USERS does not list these roles!
/vitofavaHi,
S_BCE_68001400 (rsusr002) and select your users by the assigned reference user.(4th selection field)
b.rgds, Bernhard -
Hi all
I have seen quite a few forum entries about change history and tables to see the mapping of roles to users, such as:
Table AGR_USERS (actual assignments)
Table USLA04 (actual assignments in a CUA central system)
SUIM report RSSCD100_PFCG for viewing change documents of roles.
- but does anyone know of any reports / tables that show the change history of a user/what roles they have had assigned, for child system in a CUA set up?
SUIM and RSSCD100_PFCG only show the local client... we have lost our child systems user <-> roles mappings after a refresh and we want to see history of what roles where assigned to what user, but running these reports in the CUA system only shows local users, and running it in the child is no good as it's just been refreshed and is a copy of the CUA system now anyway!
Any help much appreciated... we have users in the child system shouting as the don't have the correct authorisations...
Thanks
RossSeems nobody knows.... Closing....
-
Finding out role assignments with CUA per system
Hello experts,
For user administration we use the CUA.
can anybody tell me were the role assignemts per user and per system are saved in the central system.
I have to find out which roles are assigned to an user in which system for reporting reasons and I cannot find this information in database tables.
Table AGR_USERS doesn't help me because it contains only the role assignments of the local system.
Thanks in advance
JohannesHi,
you can get this information in the transaction SUIM in your CUA system. Simply start this transaction an go to User -> Cross-System Information -> Users by Roles. Than you can make selections of usernames und roles in recieving systems.
The table, which has this information is USLA04.
Kind regards
Andrei
Message was edited by:
Andrei Borissov
null -
Hello friends,
I am developing a report in Sending system, based on role change information for user id. We configued CUA correctly and everything is working fine.
Is there any table or funciton module or report which shows Role modification history with timestamp for a user in Sending system.
Lets say if i change a user's role in SU01 roles tab in sending sytem, i can only find role modified date but i am unable to find time when was modified.
thanks.
MacsHi,
Tables USL04, USLA04, USZBVSYS gives changed date information only. But i am looking at time information.
Table USZBVSYS contains all information for whatever you change in SU01. So i dont know whether role has been changed or user data has been changed.
Table AGR_USERS gives date and time but it is only for local systems. In CUA sender system, user can have roles for different systems. So, i need to get information from the sender system about what roles has been changed with Date Time.
It would be too good for me to share any ideas if you have.
thanks,
Macs -
Hi Experts,
Do you know if it is possible to track the history of composite roles that have been assigned to a user.
For single roles there is a table ush04 which shows a history of assigned roles but I have not seen a similar table for composite roles only.Table USH04 shows the history of profile assignments which are stored in table USR04 and UST04. Assignements of single roles are somehow visible, too, because of their corresponding profiles.
But role assignments are stored in another place:
Table AGR_USERS (actual assignments)
Table USLA04 (actual assignments in a CUA central system)
The history of role assignments is stored in standard change documents.
Use the SUIM report RSSCD100_PFCG for viewing change documents of roles.
(The list shows all role assignments but does not mark the assignments for composite roles in a special way.)
However you need at least the Support Packages as describesd in note <a href="https://service.sap.com/sap/support/notes/621720">621720</a> and <a href="https://service.sap.com/sap/support/notes/606636">606636</a>
Kind regards
Frank Buchholz -
Urgant problem for the updating problem HELP
Dear sir/miss,On 2008.12.01 one of our partner company consultant,setup an update(SAPKH50016 AND SAPKH50017) page on our production system without and test in the test system.
Now our transaction code CV03N,CV02N,CV01N can not be used,jump out abap problems as below:
It's already give us very big impact to our SAP system,so please tell me how to deal with it.
"Runtime Errors MOVE_CAST_ERROR
Exceptn CX_SY_MOVE_CAST_ERROR
Date and Time 2008.12.02 08:23:43
ShrtText
A dynamic type conflict occurred during reference assignment.
What happened?
Error in ABAP application program.
The current ABAP program "CL_EX_DOCUMENT_MAIN02=========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?
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 is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_MOVE_CAST_ERROR', wa
neither
caught nor passed along using a RAISING clause, in the procedure
"IF_EX_DOCUMENT_MAIN02~D100_BEFORE_PAI" "(METHOD)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
A 'CAST' operation ('?=' or 'MOVE ?TO') tried to assign an object or
interface variable to a reference variable.
However, the contents of the source variable do not fit in the target.
Source type. "\CLASS=ZCL_IM_DOCUMENT_MAIN02"
Target type: "\INTERFACE=IF_EX_DOCUMENT_MAIN02"
How to correct the error
If the error occurred in one of your own programs or in an SAP program
that you modified, try to correct it yourself.
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:
"MOVE_CAST_ERROR" CX_SY_MOVE_CAST_ERRORC
"CL_EX_DOCUMENT_MAIN02=========CP" or "CL_EX_DOCUMENT_MAIN02=========CM007"
"IF_EX_DOCUMENT_MAIN02~D100_BEFORE_PAI"
If you cannot solve the problem yourself and you wish to send
an error message to SAP, include the following documents:
1. A printout of the problem description (short dump)
To obtain this, select in the current display "System->List->
Save->Local File (unconverted)".
2. A suitable printout of the system log
To obtain this, call the system log through transaction SM21.
Limit the time interval to 10 minutes before and 5 minutes
after the short dump. In the display, then select the function
"System->List->Save->Local File (unconverted)".
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, select the Editor function "Further Utilities->
Upload/Download->Download".
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
The exception must either be prevented, caught within the procedure
"IF_EX_DOCUMENT_MAIN02~D100_BEFORE_PAI"
"(METHOD)", or declared in the procedure's RAISING clause.
To prevent the exception, note the following:
System environment
SAP Release.............. "640"
Application server....... "ciserver"
Network address.......... "172.31.120.37"
Operating system......... "Linux"
Release.................. "2.6.9-11.19AXsmp"
Hardware type............ "x86_64"
Character length......... 16 Bits
Pointer length........... 64 Bits
Work process number...... 3
Short dump setting....... "full"
Database server.......... "diserver"
Database type............ "ORACLE"
Database name............ "PRD"
Database owner........... "SAPPRD"
Character set............ "C"
SAP kernel............... "640"
Created on............... "May 22 2006 19:43:51"
Created in............... "Linux GNU SLES-9 x86_64 cc3.3.3"
Database version......... "OCI_920 "
Patch level.............. "129"
Patch text............... " "
Supported environment....
Database................. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE
10.2.0.."
SAP database version..... "640"
Operating system......... "Linux 2.6"
Memory usage.............
Roll..................... 16192
EM....................... 12569568
Heap..................... 0
Page..................... 57344
MM Used.................. 2076240
MM Free.................. 2111024
SAP Release.............. "640"
User and Transaction
Client.............. 600
User................ "MENGQC001"
Language key........ "E"
Transaction......... "CV03N "
Program............. "CL_EX_DOCUMENT_MAIN02=========CP"
Screen.............. "SAPLCV110 0100"
Screen line......... 43
Information on where terminated
The termination occurred in the ABAP program "CL_EX_DOCUMENT_MAIN02=========CP"
in "IF_EX_DOCUMENT_MAIN02~D100_BEFORE_PAI".
The main program was "SAPLCV110 ".
The termination occurred in line 134 of the source code of the (Include)
program "CL_EX_DOCUMENT_MAIN02=========CM007"
of the source code of program "CL_EX_DOCUMENT_MAIN02=========CM007" (when
calling the editor 1340).
Processing was terminated because the exception "CX_SY_MOVE_CAST_ERROR"
occurred in the
procedure "IF_EX_DOCUMENT_MAIN02~D100_BEFORE_PAI" "(METHOD)" but was not
handled locally, not declared in the
RAISING clause of the procedure.
The procedure is in the program "CL_EX_DOCUMENT_MAIN02=========CP ". Its source
code starts in line 1
of the (Include) program "CL_EX_DOCUMENT_MAIN02=========CM007 ".
ource Code Extract
ine SourceCde
104 CLEAR data_ref.
105 GET REFERENCE OF OKCODE INTO data_ref.
106 CALL METHOD <flt_cache_line>-eo_object->set_parameter(
107 im_parmname = 'OKCODE'
108 im_value = data_ref ).
109
110 CLEAR data_ref.
111 GET REFERENCE OF DRAW INTO data_ref.
112 CALL METHOD <flt_cache_line>-eo_object->set_parameter(
113 im_parmname = 'DRAW'
114 im_value = data_ref ).
115
116 CALL METHOD <flt_cache_line>-eo_object->evaluate
117 IMPORTING
118 ex_exception = exc
119 EXCEPTIONS
120 raise_exception = 1
121 OTHERS = 2.
122 IF sy-subrc = 2.
123 MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
124 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
125 ELSEIF sy-subrc = 1.
126 CASE exc-exceptn_nm.
127 WHEN 'CANCEL'.
128 MESSAGE ID exc-msgid TYPE exc-msgty NUMBER exc-msgno
129 WITH exc-msgv1 exc-msgv2 exc-msgv3 exc-msgv4
130 RAISING CANCEL.
131 ENDCASE.
132 ENDIF.
133 WHEN OTHERS.
EXITINTF ?= <flt_cache_line>-OBJ.
135 CALL METHOD EXITINTF->D100_BEFORE_PAI
136 EXPORTING
137 TCODE = TCODE
138 CHANGING
139 OKCODE = OKCODE
140 DRAW = DRAW
141 EXCEPTIONS
142 CANCEL = 1.
143 case sy-subrc.
144 when 1.
145 raise CANCEL.
146 endcase.
147 ENDCASE.
148
149 CALL FUNCTION 'PF_ASTAT_CLOSE'
150 EXPORTING
151 OPENKEY = 'S61ZFJapGHhX00002X5BGm'
152 TYP = 'UE'.
153 ENDLOOP.
Contents of system fields
Name Val.
SY-SUBRC 0
SY-INDEX 0
SY-TABIX 14
SY-DBCNT 14
SY-FDPOS 1
SY-LSIND 0
SY-PAGNO 0
SY-LINNO 1
SY-COLNO 1
SY-PFKEY D100DISPLAY
SY-UCOMM BACK
SY-TITLE Display Document: Initial Screen
SY-MSGTY
SY-MSGID
SY-MSGNO 000
SY-MSGV1
SY-MSGV2
SY-MSGV3
SY-MSGV4
Active Calls/Events
No. Ty. Program Include Line
Name
3 METHOD CL_EX_DOCUMENT_MAIN02=========CP CL_EX_DOCUMENT_MAIN02=========CM007 134
CL_EX_DOCUMENT_MAIN02=>IF_EX_DOCUMENT_MAIN02~D100_BEFORE_PAI
2 FORM SAPLCV110 LCV110F19 124
D100_CONSUME_EVENTS
1 MODULE (PAI) SAPLCV110 LCV110I08 10
D100_FCODE
Chosen variables
Name
Val.
No. 3 Ty. METHOD
Name CL_EX_DOCUMENT_MAIN02=>IF_EX_DOCUMENT_MAIN02~D100_BEFORE_PAI
TCODE
CV03
45332222222222222222
36030000000000000000
00000000000000000000
00000000000000000000
OKCODE
BACK
4444222222222222222222222222222222222222222222222222222222222222222222
213B000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000
DRAW
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
SY-MSGV1
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
EXC-MSGV1
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
SY-MSGV2
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
EXC-MSGV2
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
SY-MSGV3
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
EXC-MSGV3
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
SY-MSGV4
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
EXC-MSGV4
22222222222222222222222222222222222222222222222222
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000
EXITINTF
F0000000
F0000000
<FLT_CACHE_LINE>-OBJ
E0001000
E0001000
SYST-REPID
CL_EX_DOCUMENT_MAIN02=========CP
4454554445444554444333333333334522222222
3CF58F4F35D5E4FD19E02DDDDDDDDD3000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
SY-REPID
CL_EX_DOCUMENT_MAIN02=========CP
4454554445444554444333333333334522222222
3CF58F4F35D5E4FD19E02DDDDDDDDD3000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
%_DUMMY$$
2222
0000
0000
0000
SY-SUBRC
0
0000
0000
No. 2 Ty. FORM
Name D100_CONSUME_EVENTS
LF_ACT_IMP_EXISTING
X
5
8
0
0
%_SPACE
2
0
0
0
SY-REPID
SAPLCV110
5454453332222222222222222222222222222222
310C361100000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
SEEX_TRUE
X
5
8
0
0
LF_EXIT
F0000000
0000F000
%_DUMMY$$
2222
0000
0000
0000
GF_OI_CALLED_DISPLAY
2
0
0
0
SYST-REPID
SAPLCV110
5454453332222222222222222222222222222222
310C361100000000000000000000000000000000
0000000000000000000000000000000000000000
0000000000000000000000000000000000000000
SCREEN
MCDOK-REFVR
4444425445522222222222222222222222222222222222222222222222222222222222222222222222222222222222
D34FBD2566200000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
GF_TRANSACTION
CV03
45332222222222222222
36030000000000000000
00000000000000000000
00000000000000000000
OK_CODE
BACK
4444222222222222222222222222222222222222222222222222222222222222222222
213B000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000
DRAW
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CL_WB_REQUEST=>TO_IMMEDIATE_START
PROP_STRING
360
6000
8100
BITMAP_STRETCH
2
0000
2000
SY-SUBRC
0
0000
0000
SS_CENTER
1
0000
1000
C_DMS_PHIO_MASTER_CLASS
DMS_PCD1
4455544322
4D3F034100
0000000000
0000000000
PROP_TABINDEX
230
E000
6000
SPACE
2
0
0
0
LF_FCODE
2222222222222222222222222222222222222222222222222222222222222222222222
0000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000
No. 1 Ty. MODULE (PAI)
Name D100_FCODE
TREEV_ITEM_CLASS_CHECKBOX
3
0000
3000
Internal notes
The termination occurred in the function "RxMoveCastErrorObj" of the SAP
Basis System, specifically in line 2995 of the module
"//bas/640_REL/src/krn/runt/abmove1.c#7".
The internal operation just processed is "CAST".
The internal session was started at 20081202082340.
Active Calls in SAP Kernel
Lines of C Stack in Kernel (Structure Differs on Each Platform)
(CTrcStack2+0x7a)0x63b29a
(CTrcStack+0xb)0x63b8db
(ab_rabax+0x2f02)0xa4b1e2
(_Z18RxMoveCastErrorObj4RUDIS_PKt+0xa5)0x7b7a45
(_Z8ab_jcastv+0x673)0x7bdec3
(_Z8ab_extriv+0x219)0x7ab4d9
(_Z9ab_xeventPKt+0x29a)0x8f9b4a
(ab_dstep+0x1a7)0xa5ec77
(dynpmcal+0x39a)0x69d84a
(dynppai0+0x933)0x69f393
(dynprctl+0x414)0x69e324
(dynpen00+0x444)0x693034
(Thdynpen00+0x2df)0x50a24f
(TskhLoop+0x307)0x514347
(tskhstart+0x1ae)0x522fae
(DpMain+0x28f)0x49b1bf
(nlsui_main+0x9)0x475159
(main+0x2e)0x47518e
/lib64/libc.so.6(__libc_start_main+0xa9)0x2a97124b49
List of ABAP programs affected
Index Ty. Program Group Date Time Size Lang.
0 Prg SAPLCV110 0 2008.12.01 10:13:43 671744 E
1 Prg SAPMSSYD 0 2008.12.01 02:17:53 21504 E
2 Prg SAPFSYSCALLS 0 2003.11.06 20:52:59 7168 E
3 Typ DRAW 0 2008.04.29 10:29:35 11264
4 Typ DRAT 0 1999.03.10 18:52:49 3072
5 Typ DMS_DB_DRAT 0 1999.03.10 18:36:01 3072
6 Typ TDWS 0 2003.09.10 16:46:37 6144
7 Typ TDWST 0 1997.05.12 16:50:34 2048
8 Typ AENR 0 2008.11.20 14:51:32 7168
9 Typ USR03 0 1997.05.12 16:51:23 6144
10 Typ T024X 0 1998.02.14 10:32:35 2048
11 Typ MCDOK 0 2004.12.08 17:17:49 28672
12 Prg SAPLCV121 12 2008.12.01 10:09:17 152576 E
13 Prg CL_GUI_CFW====================CP 13 2003.11.06 20:53:18 176128 E
14 Prg CL_GUI_PROPS_CONSUMER=========CP 14 2003.11.06 20:52:43 30720 E
15 Prg %_CCNTL 14 2003.11.06 20:52:41 16384 E
16 Prg SAPLTHFB 16 2008.12.01 02:18:03 368640 E
17 Prg SAPLOLEA 17 2008.12.01 02:00:50 93184 E
18 Prg SAPLSGUI 18 2008.12.01 02:18:03 76800 E
19 Prg SAPLSTTM 19 2006.09.21 08:17:23 86016 E
20 Prg SAPLSBDC 20 2006.09.21 08:24:43 45056 E
21 Prg SAPLSFES 21 2008.12.01 02:18:03 278528 E
22 Prg SAPLSPLUGIN 22 2003.11.06 21:28:25 8192 E
23 Prg SAPFGUICNTL 17 2003.11.06 20:57:18 24576 E
24 Typ DMS_FRONTEND_DATA 0 2001.06.07 17:41:14 2048
25 Typ ITDWA 0 1999.12.09 18:54:10 3072
26 Typ DNTAB 0 2000.11.09 14:07:14 6144
27 Typ DMS_AUDITS 0 1998.12.10 18:00:41 3072
28 Typ DRAD 0 1999.12.01 15:17:34 4096
29 Typ DRAZ 0 1998.04.01 02:05:08 4096
30 Typ DRAP 0 1995.04.04 16:53:07 3072
31 Typ DRAOZ 0 1995.04.04 16:53:05 6144
32 Typ DRAO 0 1995.04.04 16:53:03 6144
33 Typ TOAV0 0 1996.06.14 09:51:26 3072
34 Typ DMS_REC_FILE 0 2006.10.12 17:53:17 8192
35 Typ DMS_DOC_FILE 0 1999.04.21 13:22:51 12288
36 Prg SAPLCADM 36 2003.11.06 20:53:00 14336 E
37 Typ TDWA 0 2001.06.07 17:50:38 6144
38 Prg SAPLCV115 38 2008.12.01 10:13:43 220160 E
39 Prg SAPLCV118 39 2008.11.30 22:54:57 86016 E
40 Prg SAPLCV130 40 2008.12.01 09:57:54 342016 E
41 Prg SAPLCLO0 41 2006.09.21 11:31:12 55296 E
42 Typ API_CHAR 0 1997.07.09 23:48:05 2048
43 Typ API_VALI 0 1998.04.23 14:46:27 5120
44 Typ API_KSSK 0 1996.01.29 18:00:54 3072
45 Typ API_VALI 0 1998.04.23 14:46:27 5120
46 Prg SAPLCLFM 46 2008.12.01 03:27:54 711680 E
47 Typ RMCLF 0 2004.03.15 16:55:47 31744
48 Typ RMCLKSSK 0 2001.09.18 10:03:47 5120
49 Typ RMCLAUSP 0 2001.09.18 10:03:46 7168
50 Typ RMCLDEL 0 1997.08.13 12:51:45 3072
51 Typ AUSP 0 2001.09.18 10:02:23 6144
52 Prg SAPLCLSE 52 2008.11.20 14:51:39 188416 E
53 Prg SAPLCTMS 53 2008.12.01 03:28:16 985088 E
54 Prg SAPLCTCV 54 2008.12.01 03:27:56 197632 E
55 Prg SAPLCTCF 55 2008.12.01 03:27:07 20480 E
56 Typ USR01 0 1998.02.14 15:22:01 4096
57 Prg SAPLCLPR 57 2001.11.19 16:12:29 64512 E
58 Typ CLPROF 0 2001.06.07 17:40:33 12288
59 Typ RMCLPAR 0 2001.06.07 17:45:28 13312
60 Typ AGR_USERS 0 2003.01.20 16:27:01 3072
61 Prg SAPLCTCU 61 2008.05.18 09:34:46 189440 E
62 Prg %_CCXTAB 53 2003.11.06 21:51:14 7168 E
63 Typ SCXTAB_CONTROL 0 2003.11.06 20:31:00 6144
64 Prg SAPLCUDB 64 2008.11.30 22:48:18 332800 E
65 Prg SAPLCUD0 65 2008.12.01 09:57:54 196608 E
66 Prg SAPLCUEV 66 2001.06.07 18:26:56 12288 E
67 Prg SAPLSUNI 67 2008.05.18 09:44:54 151552 E
68 Typ TFDIR 0 1998.07.29 19:49:08 3072
69 Typ CABN 0 2001.09.18 10:02:26 12288
70 Typ CABN 0 2001.09.18 10:02:26 12288
71 Typ DDB_C05 0 1997.08.28 08:44:01 2048
72 Typ DDB_C02 0 1997.07.09 23:52:49 3072
73 Typ DDB_ITP 0 1997.08.28 08:44:01 2048
74 Typ DDB_C07 0 1997.07.09 23:52:50 2048
75 Prg SAPLCUTM 75 2006.09.21 11:40:39 68608 E
76 Prg SAPLCUPM 76 2008.05.18 11:52:42 472064 E
77 Prg SAPLSLG0 77 2003.11.06 20:53:05 64512 E
78 Prg SAPLSBAL_SERVICE 78 2008.05.18 09:48:19 172032 E
79 Typ BALOBJ 0 1997.08.13 13:16:25 2048
80 Typ BALSUB 0 1997.08.13 13:16:26 2048
81 Typ BAL_S_LFIL 0 2000.12.04 12:45:13 12288
82 Prg SAPLSBAL 82 2008.05.18 09:48:19 327680 E
83 Typ BAL_S_LOG 0 2000.12.04 13:04:00 7168
84 Typ BAL_S_CONT 0 1998.11.02 09:43:07 2048
85 Typ BAL_S_PARM 0 2000.12.04 12:45:14 3072
86 Typ BAL_S_CLBK 0 1998.11.02 09:43:07 2048
87 Typ BAL_S_SCNT 0 1998.11.30 15:52:33 3072
88 Typ BAL_S_SDEF 0 2000.12.04 12:45:15 2048
89 Prg CL_ABAP_CHAR_UTILITIES========CP 89 2004.11.12 14:02:13 14336 E
90 Prg SAPLSYGU 90 2003.11.06 20:55:40 29696 E
91 Prg SAPLCUXP 91 2008.12.01 10:09:15 147456 E
92 Typ CUXP_01 0 1995.04.10 15:58:58 3072
93 Typ T100 0 1997.08.28 09:04:45 2048
94 Typ CUXP_02 0 1995.04.10 15:58:59 2048
95 Typ CUXP_02 0 1995.04.10 15:58:59 2048
96 Typ TMS_JUST 0 1995.04.10 16:02:55 2048
97 Typ CUXP_02 0 1995.04.10 15:58:59 2048
98 Prg SAPLCUTC 98 2003.11.11 20:31:28 89088 E
99 Prg SAPLCUTRC 99 2008.12.01 02:26:11 87040 E
100 Typ CTMS_01 0 1997.08.13 12:25:20 3072
101 Typ INCL_BILD 0 1997.05.12 15:10:50 2048
102 Typ AUSP 0 2001.09.18 10:02:23 6144
103 Prg SAPLCCRL 103 2008.11.30 22:34:49 144384 E
104 Typ AEOIB 0 2001.09.18 10:02:18 7168
105 Typ TCC09 0 1999.03.17 16:24:37 2048
106 Typ AEOI 0 2001.09.18 10:02:17 5120
107 Prg SAPLCCCN 107 2008.11.20 14:51:39 293888 E
108 Typ AEOIT 0 2001.09.18 10:02:18 3072
109 Typ CCIN 0 2001.10.09 13:06:55 6144
110 Typ CCCN_XFACE 0 2001.10.09 13:06:55 7168
111 Prg SAPLCCBU 111 2008.11.20 14:51:39 33792 E
112 Prg SAPLCV150 112 2008.11.20 14:51:40 144384 E
113 Prg SAPFSPOR 0 2008.12.01 07:23:38 14336 E
114 Prg SAPLSCNT 114 2003.11.06 20:53:04 30720 E
115 Typ DYCBOX 0 1998.08.20 11:16:53 3072
116 Prg SAPLSVSM 116 2006.09.21 08:56:23 29696 E
117 Prg CL_DATAPROVIDER===============CP 117 2003.11.06 20:52:43 52224 E
118 Typ OBJ_RECORD 0 1998.02.14 08:30:43 2048
119 Prg SAPLSTUP 119 2006.09.21 08:34:57 75776 E
120 Prg SAPLCNDP 120 2006.09.21 09:10:54 208896 E
121 Prg SAPSHDTV 114 2003.11.06 20:57:23 33792 E
122 Typ SHDTVCIU 0 1998.12.14 23:15:37 3072
123 Typ SHDSTU 0 1998.12.14 23:15:34 2048
124 Typ SHDSTCIU 0 1998.12.14 23:15:34 2048
125 Typ ARFCRDATA 0 2000.11.09 14:04:16 6144
126 Prg SAPLGRFC 126 2003.11.06 20:53:02 16384 E
127 Typ SWCBCONT 0 2000.11.15 17:55:11 3072
128 Typ OLE_VERBS 0 1995.04.04 16:02:20 2048
129 Typ OLE_PA 0 1995.04.04 16:02:19 2048
130 Prg CL_DYNAMIC_GUI_EXTENSIONS=====CP 130 2003.11.06 20:52:43 37888 E
131 Prg CL_GUI_DATAMANAGER============CP 131 2006.09.21 09:11:48 77824 E
132 Prg CL_EXITHANDLER================CP 132 2008.12.01 02:24:29 34816 E
133 Prg SAPLSEXV 133 2008.12.01 02:05:16 124928 E
134 Prg CL_BADI_FLT_DATA_TRANS_AND_DB=CP 134 2008.12.01 02:24:26 44032 E
135 Typ SXS_ATTR 0 2001.08.20 12:23:27 4096
136 Typ V_EXT_ACT 0 2000.11.09 14:27:05 2048
137 Typ SXC_EXIT 0 2000.11.09 14:23:43 2048
138 Prg CL_EX_DOCUMENT_MAIN02=========CP 138 2008.04.29 10:29:37 80896 E
139 Prg IF_EX_DOCUMENT_MAIN02=========IP 132 2008.04.29 10:29:39 30720 E
140 Prg %_CSXRT 138 2004.11.12 13:45:31 16384 E
141 Prg CL_EXIT_MASTER================CP 141 2006.09.21 09:10:54 24576 E
142 Typ SXS_MLCO 0 2000.12.04 14:59:55 2048
143 Prg CL_EX_BADI_LAYER==============CP 143 2006.09.21 09:10:54 32768 E
144 Prg IF_EX_BADI_LAYER==============IP 132 2006.09.21 08:51:19 9216 E
145 Typ V_EXT_IMP 0 2003.11.06 20:40:20 3072
146 Typ V_EXT_IMP 0 2003.11.06 20:40:20 3072
147 Typ SXC_IMPSWH 0 2000.11.09 14:23:44 2048
148 Prg ZCL_IM_DOCUMENT_MAIN02========CP 148 2008.12.01 14:50:50 7168 E
149 Prg SAPLASTAT_TRIG 149 2003.11.06 20:53:00 13312 E
150 Typ ASTAT_TYP2 0 1998.11.10 05:35:18 2048
151 Typ ASTAT_TYP1 0 1998.11.30 15:54:16 2048
152 Prg CX_SY_MOVE_CAST_ERROR=========CP 152 2003.11.06 20:41:23 11264 E
153 Typ SCX_SRCPOS 0 2000.11.09 14:12:15 2048
154 Prg CX_DYNAMIC_CHECK==============CP 154 2003.11.06 21:33:04 10240 E
155 Prg CX_ROOT=======================CP 155 2003.11.06 21:56:05 12288 E
156 Prg CX_NO_CHECK===================CP 156 2003.11.06 21:33:04 10240 E
157 Prg CX_SY_NO_HANDLER==============CP 157 2003.11.06 21:33:04 10240 E
158 Typ SYST 0 2000.12.04 14:54:51 31744
159 Typ SFBM_XCPTN 0 2000.12.04 14:54:21 3072
160 Prg CL_WB_REQUEST=================CP 160 2008.12.01 02:25:56 71680 E
irectory of Application Tables
ame Date Time Lngth
Val.
rogram SAPLCV110
YST . . : : 00004608
\0\0\0\0\x0001\0\x000E\0\0\0\0\0\0\0\0\0\0\0\0\0\x000E\0
RAW 2008.04.29 10:29:35 00003196
RAT . . : : 00000236
MS_DB_DRAT . . : : 00000238
DWS . . : : 00000268
DWST . . : : 00000048
ENR . . : : 00000496
00 00000000 00000000
SR03 . . : : 00000876
T024X . . : : 00000074
MCDOK 2004.12.08 17:17:49 00013650
TDWA 2001.06.07 17:50:38 00000340
0000
Program CL_GUI_PROPS_CONSUMER=========CP
EUDB . . : : 00004068
%C002380004933B6098D9166C5E1000000AC1F7825 \0\0\0
Program SAPLCLFM
RMCLF . . : : 00003736
Program SAPLCTMS
RCTMS 2002.04.17 10:32:13 00002034
Program SAPLCTCF
USR01 . . : : 00000220
Program SAPLCLPR
RMCLPAR . . : : 00000418
SAPPROFILE
CLPROF . . : : 00000272
600BMENGQC001 X X XXX
AGR_USERS . . : : 00000164
0000000000000
Program SAPLSUNI
TFDIR . . : : 00000188
CUD0_CUSTOM_CONFIG_INITIALIZERSAPLCUD0
Program SAPLCCRL
AENR . . : : 00000496
00 00000000 00000000
AEOI . . : : 00000436
00
Program SAPLCCCN
CCIN . . : : 00000600
00 0
Program SAPSHDTV
SHDSTU . . : : 00000106
SHDSTCIU . . : : 00000100
ABAP Control Blocks (CONT)
Index Name Fl PAR0 PAR1 PAR2 PAR3 PAR4 PAR5 PAR6 SourceCde Line
409 DWRI 01 0042 CL_EX_DOCUMENT_MAIN02=========CM007 128
410 WRIT 00 C026 CL_EX_DOCUMENT_MAIN02=========CM007 128
411 PAR1 C0 0000 CL_EX_DOCUMENT_MAIN02=========CM007 128
412 JEND A6 0000 CL_EX_DOCUMENT_MAIN02=========CM007 128
413 DWRI 01 0043 CL_EX_DOCUMENT_MAIN02=========CM007 128
414 WRIT 00 C027 CL_EX_DOCUMENT_MAIN02=========CM007 128
415 PAR1 C0 0000 CL_EX_DOCUMENT_MAIN02=========CM007 128
416 JEND A6 0000 CL_EX_DOCUMENT_MAIN02=========CM007 128
417 FUNE 01 006E CL_EX_DOCUMENT_MAIN02=========CM007 128
418 ENDF 00 0000 CL_EX_DOCUMENT_MAIN02=========CM007 128
419 MESS 00 0000 CL_EX_DOCUMENT_MAIN02=========CM007 128
420 BRAX 00 0015 CL_EX_DOCUMENT_MAIN02=========CM007 133
CAST 00 0000 C006 C028 CL_EX_DOCUMENT_MAIN02=========CM007 134
423 METH 03 0003 0000 8001 0000 0000 0000 0000 CL_EX_DOCUMENT_MAIN02=========CM007 135
427 PAR1 01 C000 CL_EX_DOCUMENT_MAIN02=========CM007 135
428 PAR1 81 C001 CL_EX_DOCUMENT_MAIN02=========CM007 135
429 PAR1 81 C002 CL_EX_DOCUMENT_MAIN02=========CM007 135
430 PAR2 00 0000 0002 0000 CL_EX_DOCUMENT_MAIN02=========CM007 135
432 PAR2 00 0000 006E 0001 CL_EX_DOCUMENT_MAIN02=========CM007 135
434 BREL 04 0000 CL_EX_DOCUMENT_MAIN02=========CM007 143Hi,
As per your query, pls contact any abap consultant regarding this he will provide the solution. Because some times programe given some error then the abaper see the programe and take action accordingly.
Anil -
How to get all authorized Business area values
hi i am on bw 3.5.
users are assinged with Role1, role2, role3 etc.,
role1 assigns users with business area values 100..200
role2 assigns users with business area values 200..250
role3 assigns users with business area values 150..210
now i want to FIND any standard report or create any custom report/program which will output me
USER with all AUTHORIZED VALUES with BUSINESS AREA....
in this case its USER1 = 100.....250 basically...
maybe something like basically WHAT USERS ARE AUTHORISED FOR REPORTING ...
how to check this with specific characteristics...
or which table????PFB authorization related tables FYI.
USR02 Logon data
USR04 User master authorization (one row per user)
UST04 User profiles (multiple rows per user)
USR10 Authorisation profiles (i.e. &_SAP_ALL)
UST10C Composit profiles (i.e. profile has sub profile)
USR11 Text for authorisation profiles
USR12 Authorisation values
USR13 Short text for authorisation
USR40 Tabl for illegal passwords
USGRP User groups
USGRPT Text table for USGRP
USH02 Change history for logon data
USR01 User Master (runtime data)
USER_ADDR Address Data for users
AGR_1016 Name of the activity group profile
AGR_1016B Name of the activity group profile
AGR_1250 Authorization data for the activity group
AGR_1251 Authorization data for the activity group
AGR_1252 Organizational elements for authorizations
AGR_AGRS Roles in Composite Roles
AGR_DEFINE Role definition
AGR_HIER2 Menu structure information - Customer vers
AGR_HIERT Role menu texts
AGR_OBJ Assignment of Menu Nodes to Role
AGR_PROF Profile name for role
AGR_TCDTXT Assignment of roles to Tcodes
AGR_TEXTS File Structure for Hierarchical Menu - Cus
AGR_TIME Time Stamp for Role: Including profile
AGR_USERS Assignment of roles to users
USOBT Relation transaction to authorization object (SAP)
USOBT_C Relation Transaction to Auth. Object (Customer)
USOBX Check table for table USOBT
USOBXFLAGS Temporary table for storing USOBX/T* chang
USOBX_C Check Table for Table USOBT_C
Hope this would help you. Role related tables would help you resolve ur issue. -
Problems sending a PDF via mail
Hi !! I have a report, runs in background, which obtains some information from sap tables and then generates an ALV. As it is executed in background, the ALV creates an spool order. After this, I convert this spool into a PDF object . And then I need to send a mail to an specific user with some text in its body and this PDF as attach. If I don't attach the PDF, the mail is sent ok. The problem is when I try to attach the PDF.. Here is my code so anybody can help me please... REPORT zautorizaciones_spool . TABLES : usr02, agr_texts, agr_users, adr6, usr21, adrp, itcpo, tsp01. TYPE-POOLS : slis. DATA: BEGIN OF i_tabla OCCURS 0, agr_name LIKE agr_texts-agr_name, text LIKE agr_texts-text, uname LIKE agr_users-uname, name_text LIKE adrp-name_text, END OF i_tabla. * Spool IDs TYPES: BEGIN OF t_tbtcp. INCLUDE STRUCTURE tbtcp. TYPES: END OF t_tbtcp. DATA: fieldcat TYPE slis_t_fieldcat_alv, fieldcat_ln LIKE LINE OF fieldcat, sortcat TYPE slis_t_sortinfo_alv. DATA: col_pos TYPE i, spos TYPE i. DATA: v_buffer TYPE string. DATA: BEGIN OF it_email OCCURS 0, smtp_addr LIKE adr6-smtp_addr. DATA: END OF it_email. DATA: mi_rqident LIKE tsp01-rqident, mi_bytecount TYPE i, mtab_pdf LIKE tline OCCURS 0 WITH HEADER LINE. DATA: it_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE, objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, objhead LIKE solisti1 OCCURS 0 WITH HEADER LINE, objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE, objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE, doc_chng LIKE sodocchgi1, tab_lines LIKE sy-tabix, reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE, it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE. DATA: gd_eventid LIKE tbtcm-eventid, gd_eventparm LIKE tbtcm-eventparm, gd_external_program_active LIKE tbtcm-xpgactive, gd_jobcount LIKE tbtcm-jobcount, gd_jobname LIKE tbtcm-jobname, gd_stepcount LIKE tbtcm-stepcount, it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0, wa_tbtcp TYPE t_tbtcp. CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV'. *----
Pantalla de selección *----------------------------------------------------------------------
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001. SELECT-OPTIONS: s_ustyp FOR usr02-ustyp, s_nomrol FOR agr_texts-agr_name, s_uflag FOR usr02-uflag, s_class FOR usr02-class, s_line FOR agr_texts-line, s_todat FOR agr_users-to_dat, s_spras FOR agr_texts-spras, s_gltgb FOR usr02-gltgb, s_correo FOR adr6-smtp_addr. SELECTION-SCREEN END OF BLOCK b1. *----
INITIALIZATION *----------------------------------------------------------------------
INITIALIZATION. CLEAR i_tabla. REFRESH i_tabla. *----
START-OF-SELECTION *----------------------------------------------------------------------
START-OF-SELECTION. PERFORM obtener_datos. IF NOT i_tabla[] IS INITIAL. IF sy-batch IS INITIAL. PERFORM listado. SKIP. WRITE:/ 'Para que la orden spool pueda ser creada, el programa', 'se debe de ejecutar en fondo.'. ELSE. MESSAGE s000(z2) WITH 'batch'. PERFORM listado. PERFORM get_job_details. PERFORM get_spool_number USING SY-REPID sy-uname CHANGING mi_rqident. PERFORM conver_spool_pdf. PERFORM enviar_mail. PERFORM delete_spool. IF sy-sysid = c_dev. WAIT UP TO 5 SECONDS. SUBMIT rsconn01 WITH mode = 'INT' WITH output = 'X' AND RETURN. ENDIF. ENDIF. ENDIF. *----
END-OF-SELECTION *---------------------------------------------------------------------
END-OF-SELECTION. *&----
*& Form obtener_datos *&--------------------------------------------------------------------
FORM obtener_datos. SELECT agr_textsagr_name agr_textstext agr_usersuname adrpname_text APPENDING CORRESPONDING FIELDS OF TABLE i_tabla FROM ( agr_users INNER JOIN usr02 ON usr02bname = agr_usersuname INNER JOIN agr_texts ON agr_textsagr_name = agr_usersagr_name INNER JOIN usr21 ON usr21bname = usr02bname INNER JOIN adrp ON adrppersnumber = usr21persnumber ) WHERE agr_usersagr_name IN s_nomrol AND agr_usersto_dat IN s_todat AND usr02class IN s_class AND usr02gltgb IN s_gltgb AND usr02uflag IN s_uflag AND usr02ustyp IN s_ustyp AND agr_textsline IN s_line AND agr_textsspras IN s_spras. ENDFORM *&--------------------------------------------------------------------
*& Form listado *&--------------------------------------------------------------------
FORM listado. PERFORM crear_catalogo. PERFORM imprimir. ENDFORM. *&--------------------------------------------------------------------
*& Form crear_catalogo *&--------------------------------------------------------------------
FORM crear_catalogo. PERFORM build_fieldcat USING : 'AGR_TEXTS' 'AGR_NAME' '' '' '' '30' '' 'L' 'Papel', 'AGR_TEXTS' 'TEXT' '' '' '' '80' '' 'L' 'Denominación papel', 'AGR_USERS' 'UNAME' '' '' '' '12' '' 'L' 'Usuario', 'NAME_TEXT' 'NAME_TEXT' '' '' '' '80' '' 'L' 'Nombre completo'. ENDFORM. *&--------------------------------------------------------------------
*& Form build_fieldcat *&--------------------------------------------------------------------
FORM build_fieldcat USING tabname fieldname key no_out hotspot outputlen do_sum ddictxt seltext_l. ADD 1 TO col_pos. fieldcat_ln-ref_tabname = tabname. fieldcat_ln-fieldname = fieldname. fieldcat_ln-key = key. fieldcat_ln-col_pos = col_pos. fieldcat_ln-no_out = no_out. fieldcat_ln-hotspot = hotspot. fieldcat_ln-do_sum = do_sum. fieldcat_ln-ddictxt = ddictxt. fieldcat_ln-seltext_l = seltext_l. fieldcat_ln-seltext_m = seltext_l. fieldcat_ln-seltext_s = seltext_l. IF NOT outputlen IS INITIAL. fieldcat_ln-outputlen = outputlen. ENDIF. APPEND fieldcat_ln TO fieldcat. CLEAR fieldcat_ln. ENDFORM. *&--------------------------------------------------------------------
*& Form imprimir *&--------------------------------------------------------------------
FORM imprimir. DATA : prg LIKE sy-repid. prg = sy-repid. DATA : salida TYPE slis_exit_by_user. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = prg i_callback_user_command = 'ALV_USER_COMMAND' it_fieldcat = fieldcat it_sort = sortcat i_save = 'A' IMPORTING es_exit_caused_by_user = salida TABLES t_outtab = i_tabla EXCEPTIONS program_error = 1 OTHERS = 2. ENDFORM. *&--------------------------------------------------------------------
*& Form informar_cuerpo *&--------------------------------------------------------------------
FORM informar_cuerpo. objtxt-line = 'Estimado propietario de datos.'. APPEND objtxt. CLEAR objtxt. APPEND objtxt. CLEAR objtxt. CONCATENATE 'En el marco de la auditoría SOX, y para asegurar el cumplimiento' 'de uno de sus controles, le adjuntamos un/os informes para...' INTO objtxt-line SEPARATED BY space. APPEND objtxt. CLEAR objtxt. ENDFORM. " informar_cuerpo *&--------------------------------------------------------------------
*& Form enviar_mail *&--------------------------------------------------------------------
FORM enviar_mail. DATA: w_cnt TYPE i, t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE, cont type i. doc_chng-obj_name = 'Probando envio mail'. doc_chng-obj_descr = 'Probando asunto mail'. PERFORM informar_cuerpo. READ TABLE it_mess_att INDEX w_cnt. MESSAGE s000(z2) WITH 'w_cnt' w_cnt. MESSAGE s000(z2) WITH 'sy-subrc' sy-subrc. DESCRIBE TABLE objtxt LINES tab_lines. doc_chng-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_mess_att ). CLEAR t_attachment. REFRESH t_attachment. t_attachment[] = it_mess_att[]. CLEAR objpack-transf_bin. objpack-head_start = 1. objpack-head_num = 0. objpack-body_start = 1. objpack-body_num = tab_lines. objpack-doc_type = 'RAW'. objpack-obj_descr = doc_chng-obj_descr. DESCRIBE TABLE t_attachment LINES objpack-body_num. objpack-doc_type = 'PDF'. objpack-obj_descr = 'OBJ_Descr'. objpack-obj_name = 'obj_name'. objpack-doc_size = objpack-body_num * 255. APPEND objpack. objhead = 'Envio mail'. READ TABLE objtxt INDEX tab_lines. IF sy-subrc = 0. MESSAGE s000(z2) WITH 'objtxt' tab_lines. ENDIF. reclist-receiver = p_mail. reclist-rec_type = 'U'. reclist-express = 'X'. reclist-com_type = 'INT'. APPEND reclist. CLEAR reclist. CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = doc_chng TABLES packing_list = objpack object_header = objhead contents_bin = objbin contents_txt = objtxt receivers = reclist EXCEPTIONS too_many_receivers = 1 document_not_sent = 2 document_type_not_exist = 3 operation_no_authorization = 4 parameter_error = 5 x_error = 6 enqueue_error = 7 OTHERS = 8. MESSAGE s000(z2) WITH 'sy-subrc' sy-subrc. ENDFORM. " enviar_mail *&--------------------------------------------------------------------
*& Form get_spool_number *&--------------------------------------------------------------------
FORM get_spool_number USING f_repid f_uname CHANGING f_rqident. DATA: lc_rq2name LIKE tsp01-rq2name. CHECK NOT ( gd_jobname IS INITIAL ). CHECK NOT ( gd_jobcount IS INITIAL ). SELECT * FROM tbtcp INTO TABLE it_tbtcp WHERE jobname = gd_jobname AND jobcount = gd_jobcount AND stepcount = gd_stepcount AND listident <> '0000000000' ORDER BY jobname jobcount stepcount. CLEAR wa_tbtcp. READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1. IF sy-subrc = 0. f_rqident = wa_tbtcp-listident. MESSAGE s000(z2) WITH 'Se ha creado la orden spool' f_rqident. ELSE. MESSAGE s000(z2) WITH 'No se ha recuperado ninguna orden spool'. ENDIF. ENDFORM. " get_spool_number *&--------------------------------------------------------------------
*& Form informar_destinatario *&--------------------------------------------------------------------
FORM informar_destinatario USING p_correo. it_receivers-receiver = p_correo. it_receivers-rec_type = 'U'. it_receivers-express = 'X'. it_receivers-com_type = 'INT'. APPEND it_receivers. CLEAR it_receivers. ENDFORM. " informar_destinatario *&--------------------------------------------------------------------
*& Form get_job_details *&--------------------------------------------------------------------
FORM get_job_details. CALL FUNCTION 'GET_JOB_RUNTIME_INFO' IMPORTING eventid = gd_eventid eventparm = gd_eventparm external_program_active = gd_external_program_active jobcount = gd_jobcount jobname = gd_jobname stepcount = gd_stepcount EXCEPTIONS no_runtime_info = 1 OTHERS = 2. MESSAGE s000(z2) WITH 'job: ' gd_jobname. ENDFORM. " get_job_details *&--------------------------------------------------------------------
*& Form conver_spool_pdf *&--------------------------------------------------------------------
FORM conver_spool_pdf. CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF' EXPORTING src_spoolid = mi_rqident no_dialog = ' ' dst_device = 'LOCL' IMPORTING pdf_bytecount = mi_bytecount TABLES pdf = mtab_pdf EXCEPTIONS err_no_abap_spooljob = 1 err_no_spooljob = 2 err_no_permission = 3 err_conv_not_possible = 4 err_bad_destdevice = 5 user_cancelled = 6 err_spoolerror = 7 err_temseerror = 8 err_btcjob_open_failed = 9 err_btcjob_submit_failed = 10 err_btcjob_close_failed = 11 OTHERS = 12. CHECK sy-subrc = 0. LOOP AT mtab_pdf. TRANSLATE mtab_pdf USING ' '. CONCATENATE v_buffer mtab_pdf INTO v_buffer. ENDLOOP. TRANSLATE v_buffer USING ' '. DO. it_mess_att = v_buffer. APPEND it_mess_att. SHIFT v_buffer LEFT BY 255 PLACES. IF v_buffer IS INITIAL. EXIT. ENDIF. ENDDO. ENDFORM. " conver_spool_pdf *&--------------------------------------------------------------------
*& Form delete_spool *&----
FORM delete_spool. DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char, ld_status LIKE sy-subrc. CLEAR: ld_spool_nr, ld_status. ld_spool_nr = mi_rqident. CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ' EXPORTING spoolid = ld_spool_nr IMPORTING status = ld_status. ENDFORM. " delete_spool I don't know where the error can be and I've been working on it for 2 days... Do I have to download the PDF to a file ??? In that case, how do I attach then the file ?? Thanks a lot in advance, Regards !!Sorry, I wrote it as the code appears in SAP and didn't know I can format it..I hope I've done it ok now..
As I run the report through a job, I do it like this:
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS no_runtime_info = 1
OTHERS = 2.
Then I get the spool:
DATA: lc_rq2name LIKE tsp01-rq2name.
SELECT * FROM tbtcp INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident '0000000000'
ORDER BY jobname jobcount stepcount.
CLEAR wa_tbtcp.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
f_rqident = wa_tbtcp-listident.
After this I create the PDF:
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = mi_rqident
no_dialog = ' '
dst_device = 'LOCL'
IMPORTING
pdf_bytecount = mi_bytecount
TABLES
pdf = mtab_pdf.
LOOP AT mtab_pdf.
TRANSLATE mtab_pdf USING ' ~'.
CONCATENATE
v_buffer
mtab_pdf
INTO v_buffer.
ENDLOOP.
TRANSLATE v_buffer USING '~ '.
DO.
it_mess_att = v_buffer.
APPEND it_mess_att.
SHIFT v_buffer LEFT BY 255 PLACES.
ENDDO.
To send the mail..
DATA: w_cnt TYPE i
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
cont type i.
doc_chng-obj_name = 'Probando envio mail'.
doc_chng-obj_descr = 'Probando asunto mail'.
READ TABLE it_mess_att INDEX w_cnt.
DESCRIBE TABLE objtxt LINES tab_lines.
doc_chng-doc_size = ( w_cnt - 1 ) * 255 + STRLEN( it_mess_att ).
CLEAR t_attachment.
REFRESH t_attachment. t_attachment[] = it_mess_att[].
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
objpack-obj_descr = doc_chng-obj_descr.
DESCRIBE TABLE t_attachment LINES objpack-body_num.
objpack-doc_type = 'PDF'.
objpack-obj_descr = 'OBJ_Descr'.
objpack-obj_name = 'obj_name'.
objpack-doc_size = objpack-body_num * 255.
APPEND objpack. objhead = 'Envio mail'.
READ TABLE objtxt INDEX tab_lines.
reclist-receiver = p_mail.
reclist-rec_type = 'U'.
reclist-express = 'X'.
reclist-com_type = 'INT'.
APPEND reclist.
CLEAR reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_chng
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist .
Edited by: poketina on Nov 19, 2009 4:51 PM
Sorry, i don't know how to give format.... -
How to hide custom fields in Shopping cart depening on user role
Hi,
We have some custom fields in shopping cart for basic view. Every thing works fine. Now client is asking to hide all the custom fields based on user role.
I found some function module to fund roles. now my main problem is unable to find the cusotm filed screen field name.
When I tryed to find the screen field name using BBPSC02/03, its giving 'GT_DISPLAY_100-FIELD'. If I try to use this field, its not working.
Could you pls tell me how to find custom screen filed name to hide in shopping cart.
Thanks,
RamHi Ram,
As Laurent suggested,to hide the custom fields based on the user role,you need to implement the logic in BADi "BBP_CUF_BADI_2".
You have the importing parameter IV_USER in this BADI.
Pass this parameter to tables AGR_USERS and AGR_USERT to get the user role
OR
Use FM: BAPI_USER_GET_DETAIL
with USERNAME= user id and can retrieve Table: ACTIVITYGROUPS Field:AGR_NAME
if you want the otherway around
you can also use FM: RSRA_USERS_OF_AGR_GET
with I_AGR_NAME= role and you can retieve Table: ACTIVITY_GROUPS_USERS Field: UNAME(usr Id)
Then check the value for the User role as obtained using the above steps and accordingly set the property for the custom fields to hide them.
BR,
Deepti. -
How to Restrict the users from changing the Default variant of report.
Hello everybody,
The requirement is to restrict the users to save and overwrite the default layout variant (Layout for higher managenet)set for the report, but at the same time they should be able to change and save the other layouts for which they are having access.
I have written the logic in the program which is working fine for all the scenario when we execute the report. But the logic doesnt work if the user is selecting the layout on the output screen of the report.
for e.g if the user runs the report using the layout varaint for which he is having the authorization then he gets the all 4 options so he then he can select the layout for which he is not authorized and he can overwrite.
i have debugged and check as i have found that after the report output is shown all the layout paramater is controllled by the statndard SAP objects.
Can anyone help me out in this issue.
Thankyou in advance.
*to get the default layout variant.
w_save = 'A'.
if p_vari is initial.
clear disvariant.
disvariant-report = sy-repid.
w_variant = disvariant.
call function 'REUSE_ALV_VARIANT_DEFAULT_GET'
exporting
i_save = w_save
changing
cs_variant = w_variant
exceptions
not_found = 2.
if sy-subrc = 0.
p_vari = w_variant-variant.
endif.
endif.
*logic to check user authorization to change the layout setting.
if p_vari = c_layout.
if not sy-uname is initial.
select single * from agr_users
where agr_name = c_role
and uname = sy-uname.
if sy-subrc = 0.
w_save = 'A'.
else.
w_save = ' '.
endif.
endif.
endif.
Regards,
Satish.Hi Maine,
Thanks for your reply.
As you mentioned for your own program, you can control the parameter "I_SAVE", when calling "REUSE_ALV_GRID_DISPLAY".
so already i have use the same logic and control the parameter through I_SAVE and here i am calling method ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY instead of "REUSE_ALV_GRID_DISPLAY".
and it works fine when we execute the report but the logic doesnt work when the user tries to change and save the layout variant on the output screen of the report.
Regards,
Satish
Maybe you are looking for
-
SSL error in EBS R12.1.3
hi I configured SSL in my R12.1.3. I referred 376700.1 metalink id . First time it successful and again i did the same thing in another server but it shows error in firefox like Secure Connection Failed An error occurred during a connection to server
-
I recently updated my iPad 2 to iOS 5 beta 2 and updated iTunes to the second beta. Now whenever I connect my iPad toitunes,it instantly pops up with an error message saying "iTunes has stopped working. A problemcaused the program to stop working co
-
Any other options for load balancing
hello everyone, i have been unsuccessful to implement load balancing effectively. have you come across any such problems with load balancing not working as expected? are there any othner options to implement load balancing? thank you in advance
-
Long running onMessage() method
I have an application in which the onMessage() method implemented within an MDB would never complete. The onMessage() method calls a bean which executes in a while(TRUE) loop. If I were to use CMT to control my MDB, the message would not be dequeued
-
Hello Folks, We are having Some workgroup computers and DMZ servers to manage. We follwed the below procedure to install client agent in a Worgroup computer 1. Enabled WMI and Filesharing in client machine. 2. Copied client agent folder on Workgroup