How to access variables outside user exit
Hi,
I'm working with a user exit and my problem is that in a particular moment I have to access variables located outside the scope of the user exit (they are in a standard program)
How can I reach these variables?
thanks in advance
Hi,
If they are global variables then you can access them using Global assign technique,
For example,
FIELD-SYMBOLS: <fs_value> TYPE ANY.
ASSIGN ('(SAPMV45A)XVBAK') TO <fs_value>.
It is basically,
ASSIGN ('(<Std. Program Name>)<Variable name>') TO <field symbol>.
NOTE: To make sure they are accessible in your user exit, just put a break-point in the user exit and once you are there in debugging, type in,
(<Std. Program Name>)<Variable name> in the Field names section and if it does not show it in RED then it is accessible..
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
Similar Messages
-
Accessing variable across User Exit (i.e. across function pools)
Hi,
I have writen a user exit for MB31 transaction. Which uses following function modules...
EXIT_SAPLIPW1_001
EXIT_SAPLIPW1_004
EXIT_SAPLIE01_005
EXIT_SAPMM07M_001
First three functions belongs to XQSM function group and last function fuction belong to XMBC function group.
I have two top includes, ZXQSMTOP for first 3 and
ZXMBCTOP for the last one.
I am not able to access the variables declared in ZXMBCTOP in the first 3 functions...
(I am using EXIT_SAPMM07M_001 only to get the posting date.)
How to do it?
Advance thanks.
Regards,
Balaji Viswanath.Hi,
there are several ways to achieve this.
a) export the variables to a parameter using set/get parameter
b) export the variables to a memory using export/import to/from memory
c) create your own fm and pass the values to the fm, post it to the global memory of your fm and in the other exits, get from the global memory of your fm.
Hope this helps
regards
Siggi -
How to find out the user-exits?
hi.
how to find out the user-exits?
regards
eswar.Hi,
*& Report ZEXITFINDER
*report zexitfinder.
*& Enter the transaction code that you want to search through in order
*& to find which Standard SAP User Exits exists.
*& Tables
tables : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
*& Selection Screen Parameters
selection-screen begin of block a01 with frame title text-001.
selection-screen skip.
parameters : p_tcode like tstc-tcode obligatory.
selection-screen skip.
selection-screen end of block a01.
*& Start of main program
start-of-selection.
Validate Transaction Code
select single * from tstc
where tcode eq p_tcode.
Find Repository Objects for transaction code
if sy-subrc eq 0.
select single * from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir
where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir
where pname = tstc-pgmna.
select single * from enlfdir
where funcname = tfdir-funcname.
select single * from tadir
where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name = enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
Find SAP Modifactions
select * from tadir
into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct
where sprsl eq sy-langu
and tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
Take the user to SMOD for the Exit that was selected.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
Regards -
How can I find the USer Exit...
Hi,
How can I find the USer Exit...
I need to do changes for this User Exit :EXIT_SAPLKEII_002
In which T-code I can open this Exit
Ex: Go to some Transcation code and then give the name of the Exit ato access this Exit
...any sugesstions will be apprecaited!
Thanks & Regards,
KittuHi,
the EXIT : EXIT_SAPLKEII_002 is the exit,in this SAPLKEII is the standard Program.Copy this program and go to transactio SE38 and press Enter and then go for the option Where used list and check the check box Transaction. It displays the possible Transactions that the Exit triggers
Regards,
Vijaya Lakshmi.T -
Questions about authorization variable customer user exit
Dear all,
To reduce the authorization maintenance effort, I found from the web that we can use authorization variable with customer user exit RSR00001.
When I use the transaction CMOD to display the maintain the user exit RSR00001, the user exit does not found. I would like to know how can I use thie user-exit?
My SAP version is R/3 4.7
The information of authorization variable from web is as follow:
http://help.sap.com/saphelp_nw04/helpdata/en/6d/58f438114ee836e10000000a114084/frameset.htm
Would anyone have some ideas to solve my questions?
Many thanks
Sunny
Edited by: LI Sunny on Aug 3, 2010 12:08 PMDear Bala Duvvuri,
Firstly, many thanks of your reply.
Actually, what I want to do is to call some user-exit when performing authorization checking. I want to add some logic to the authorization checking and the user exit can be called automatically when performing authorization checking.
I mainly use this checking in the FI module.
Are there any ways I can perform this checking?
One more findings, I have another machine containing SAP XI, I can search the user exit RSR00001. but it doesn't exit in SAP R/3 4.7. Is it version issue or my SAP R/3 4.7 doesn't contain the BI module?
Many Thanks again.
Sunny -
How to find out appropriate user exit
Hi,
I want to know how to find out the user exit that matches to the requirement. Suppose for a material master program, there are so many include programs hence im unable to find call custer-function and even unable to debug an appropriate include. Please help me out how to learn user exits in a rightious way.
Thanks
BasuLook for program SAPICSS_ in your system and run it. This program can also be found under CMOD menu: Utilities -> SAP enhancements.
This will only give you the CMOD user exits.
There is a program someone made that searches for all sorts of user-exits (including BADI's etc.). I remember that it was posted on sapfans.com
Edited by: Maen Anachronos on Apr 6, 2009 3:22 PM -
How to find the exact user exit for our requirement?
Dear Mr. keerthi,
can you please explain me how to find the exact user exit for our requirement?Hi sandip
There is more than one method in which you can check for user-exits.The following method is used very often.
<b>How to find the exact user-exit for your requirement.</b>
1. You can check the user exists using transaction SE85.
2. Repository Information System -> Enhancements -> Customer exits
3. You can search the user-exits by package name.
4. Double click on each exit name to check the function module exits.
<b>The procedure to find the package name.</b>
Execute transaction SE93
Enter the tcode of the transaction for which you want to check the user exit.
Example: if you want to find the user-exit for purchase orders while changing, enter ME22n and press display.
You will get to see the package name
But you need to confirm that the user exit will get triggered at the appropriate event.
( example: you might want some validations to be done ON SAVE of a purchase order)
<b>Checking if the user-exit is getting triggered or not.</b>
1. Open the user exit function module (that you have got in step 4) in Tcode SE37.
2. Click on where used button. In the pop up that immediately appears choose only programs .
3. You will get a list of programs. Double click on the program name.
4. You will get the list of location where this function module user exit is used.
5. Place session break points at each of these location ( at each CALL FUNCTION statement)
6. Now go to your transaction ( say change purchase order tcode:Me22n) and check if the user exit is getting triggered on appropriate event.
regards,
Prasad -
How to find the ME29N 'USER EXIT' when our save the release PO after.
How to find the ME29N 'USER EXIT' when our save the release PO after.
which user exit will be used?
thanks.
alex.Hi,
process :
go to tranx code : ME29N ,
System---->Status , here copy the program name (SAPLMEGUI),
go to abap editor and specify the program name SAPLMEGUI and find the package "ME".
tranx code : CMOD , Utilites--->Sap Enanchement,
specify the package name : ME
and execute, displays a list of exits ,
and find out our suitable exit based on requirement.
check these : EXIT_SAPMM06E_021
reg
Siva -
How to find a correct User-Exit
Hi All
I need to make changes in the user exit and there are many user-exits in the standard program here my question is how to find the correct user-exit which suits our requirement.
Thanks
srinirun this program by giving ur t code...and click the exit it will go to SMOD there u read the documentation of that exit..if ur requirement satisfies try to use that one..
REPORT ZUSEREXIT.
*report zuserexit no standard page heading.
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : devclass like tadir-devclass.
parameters : tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname = tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to devclass.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen. -
How to find the appropriate user exit for invoic02 idoc in idoc_output_invo
Hi all,
I am new to this community p
i have issue regarding the How to find the appropriate user exit for invoic02 idoc in idoc_output_invoic function module.........
thanks,Hi ,
welcome to SDN.
You can select the appropriate Customer exit accrding to the available parameters .
The list of exits available are
EXIT_SAPLVEDF_001
EXIT_SAPLVEDF_002
EXIT_SAPLVEDF_003
EXIT_SAPLVEDF_004
For Example , if you want to modify the Idoc data(EDIDD) you have to use the EXIT_SAPLVEDF_002. accodingly you can select the user exit according to the avaialable parametres.Use Table MODSAP fto get the Enhancement name.
Hope this Helps
Rgds
Sree
Edited by: Sree on Jul 23, 2010 12:11 PM -
How to find out all user exits edited
Hi All,
Would you know how to find out all user exits have been ever edited?
Can we find out those user exit by some tcode or table?
Thank you very much
Best Regards,
Calvin
Edited by: Sam Sum on Mar 2, 2009 5:09 AMHi,
Just try this in your system.
Go to SE38 and give ZX* and press F4.
Have a look at table MODATTR to find the active projects in your system.
Regards
Edited by: Rajvansh Ravi on Mar 2, 2009 5:17 AM -
Formula variable with User Exit
Hi,
Can we create a Formula Variable of processing type USER EXIT...which will display a constant Value Y
Any syntax would be helpful
ThanksHi,
check this for formula variables with user exits;
http://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
http://sap.ittoolbox.com/groups/technical-functional/sap-bw/customer-exit-to-derive-formula-variable-to-text-variable-sap-bw-35-3030684
Also Check the issues and solution :
Formula Variable with User Exit....Problem
Thanks
Hemav -
Formula Variable with User Exit....Problem
Hi
My requirment is to create a Formula Variable on User Exit that will give me Current Cal Year...so that i can use that vale in Formulas
Created Formula Variable with processing Type Customer Exit single Value,Mandator and Unchecked the Variable input ready
The below code in CMOD
WHEN 'XXXXXXX'.
Year = sy-datum(4).
CLEAR L_S_RANGE.
L_S_RANGE-LOW = Year.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND l_s_range TO e_t_range.
But when i execute the query i am getting the below error
No value could be determined for variable xxxxxxx.
Incorrect call of OLAP layer CL_RSR_OLAP; error in BW-BEX-ET
Diagnosis
This error diagnosis is specific only to the variables 0P_FVAEX or 0P_CTPCA !
Termination message BRAIN 632 appears:
Could not determine value for variable 0P_FVAEX (or 0P_CTPCA).
WHAT WRONG I AM DOING...please update meUse the code:
WHEN 'XXXXXXX'.
IF i_step = 2.
Year = sy-datum(4).
CLEAR L_S_RANGE.
L_S_RANGE-HIGH = Year.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDIF.
Let me know, if it is work or not!
- Balajee Kannan -
Accessing the Logon User Exit from the Internet using an ITS Service
I can access the Logon User Exit (EXIT_SAPLSUSF_001) from R/3, but not from the Web using an ITS service. What am I missing in order to access the Logon User Exit from the Web. The ITS service was created from an ABAP screen program.
Thanks
david yeeThe SAPGui logon exit is called after successfull authentication has been completed and after a SAPGui session has been attached.
If you logon via RFC, WebGui, ICM or the Wgate then this exit does not trigger.
What are you wanting to add to your code after the logon ?
An solution I have used is to create a wrapper RFC for a BAPI and create a webservice for the wrapper. Before calling the BAPI you can do whatever you want to from a security perspective.
But for that you need to have an appropriate BAPI...
Please explain what you want to do and what you would have wanted in the exit. Often there is a better way.
Cheers,
Julius
ps: I moved this to the security forum. -
How can I define global variable in user exit whic I can use anywhere.
Hi all,
How can I define global variable( Table ) which I can use when it come back to same user exit where I defined and stored some data.
What I mean is I want to define 1 global table.
In user exit when it comes I store some information. and again when it will come I will have that stored information so I can use it.
Thanks a lot in advance.You can use EXPORT TO MEMORY ID and IMPORT FROM MEMORY ID Statement for this.
EXPORT T_ITAB FROM T_ITAB TO MEMORY ID 'ABC'.
IMPORT T_ITAB TO T_ITAB FROM MEMORY ID 'ABC.'
Maybe you are looking for
-
Problem With Designing a Report that Contains a Subreport
Tools: SQL Server 2012 , Report Builder 3.0 I am having an issue creating a report that has a tablix with the main set of data all in a group and within a cell of that tablix I have a subreport that goes based on the previous data within that tabli
-
HT1923 The program can't start because MSVCR80.dll is missing.
Is there a fix for this message which suddenly appeared after I installed the latest update to Itunes? The program can't start because MSVCR80.dll is missing from your computer. Try reinstalling the program to fix this problem. Then I get Itunes w
-
Help with Security - please!
I have an applet whose codebase is http://www.our_site.com:7777/web_reports/graph/sExcelWriterApplet.jar that needs to do two things normally prohibited in Java: Run Excel (located at C:\Program Files\Microsoft Office\Office10\excel.exe) Store and re
-
How do I extract an iPhoto slideshow on my MAC so it can be run on standard DVD player?
How do I extract an iphoto slideshow on my MAC so it can be run on a standard DVD player?
-
Will there ever be an update to the iPod touch
I would really like a new iPod touch, but not one that is already 2-3 years old right out of the box!