How to activate or deactivate a user-exit based a specific condition
hi all,
i want to activate or deactivate(make it trigger) a particular user-exit based in a condition.
can i do that. if yes please tell me how.
can we use COMMIT in user-exits or BADI's.
Thanks & Regards,
Saroja.
Hello Saroja
The solution provided by Rich should be used for testing purposes only in the the reverted sense:
IF ( syst-uname ne '<specific user>' ).
RETURN.
ENDIF.
" Execute user-exit for specific user
However, for serious programming you should use a a better strategy. In principle, user-exits are either ON or OFF and, if they are ON, they are ON for <b>all </b>user which is usually not intended.
The following example shows a (possible) strategy how to execute user-exits based on specific conditions.
The SAP extension CATS0001 contains the component EXIT_SAPLCATS_001 with the following interface:
FUNCTION EXIT_SAPLCATS_001.
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(SAP_TCATS) LIKE TCATS STRUCTURE TCATS
*" VALUE(SAP_PERNR) LIKE CATSFIELDS-PERNR
*" VALUE(SAP_DATELEFT) LIKE CATSFIELDS-DATELEFT
*" VALUE(SAP_DATERIGHT) LIKE CATSFIELDS-DATERIGHT
*" VALUE(SAP_DATEFROM) LIKE CATSFIELDS-DATEFROM OPTIONAL
*" VALUE(SAP_DATETO) LIKE CATSFIELDS-DATETO OPTIONAL
*" TABLES
*" SAP_ICATSW STRUCTURE CATSW
*" SAP_ICATSW_FIX STRUCTURE CATSW OPTIONAL
INCLUDE ZXCATU01.
ENDFUNCTION.
The include ZXCATU01 contains only the following coding:
CALL FUNCTION 'Z_EXIT_SAPLCATS_001'
EXPORTING
sap_tcats = sap_tcats
sap_pernr = sap_pernr
sap_dateleft = sap_dateleft
sap_dateright = sap_dateright
SAP_DATEFROM = SAP_DATEFROM
SAP_DATETO = SAP_DATETO
tables
sap_icatsw = sap_icatsw
SAP_ICATSW_FIX = SAP_ICATSW_FIX.
This function module is just a copy of the exit function module in the customer namespace.
Let us assume that your condition at which the user-exit should be executed is that the employee (SAP_PERNR) belongs to a specific controlling area. Thus, we make another copy of the original exit function module and call this fm within the "general" customer-specific exit function module:
FUNCTION z_exit_saplcats_001.
*"*"Local Interface:
*" IMPORTING
*" VALUE(SAP_TCATS) LIKE TCATS STRUCTURE TCATS
*" VALUE(SAP_PERNR) LIKE CATSFIELDS-PERNR
*" VALUE(SAP_DATELEFT) LIKE CATSFIELDS-DATELEFT
*" VALUE(SAP_DATERIGHT) LIKE CATSFIELDS-DATERIGHT
*" VALUE(SAP_DATEFROM) LIKE CATSFIELDS-DATEFROM OPTIONAL
*" VALUE(SAP_DATETO) LIKE CATSFIELDS-DATETO OPTIONAL
*" TABLES
*" SAP_ICATSW STRUCTURE CATSW
*" SAP_ICATSW_FIX STRUCTURE CATSW OPTIONAL
" User-Exit specific for employees (SAP_PERNR)
" belonging to controlling area 1000
CALL FUNCTION 'Z_EXIT_SAPLCATS_001_1000'
EXPORTING
sap_tcats = sap_tcats
sap_pernr = sap_pernr
sap_dateleft = sap_dateleft
sap_dateright = sap_dateright
sap_datefrom = sap_datefrom
sap_dateto = sap_dateto
TABLES
sap_icatsw = sap_icatsw
sap_icatsw_fix = sap_icatsw_fix.
" User-Exit specific for employees (SAP_PERNR)
" belonging to controlling area 2000
CALL FUNCTION 'Z_EXIT_SAPLCATS_001_2000'
EXPORTING
sap_tcats = sap_tcats
sap_pernr = sap_pernr
sap_dateleft = sap_dateleft
sap_dateright = sap_dateright
sap_datefrom = sap_datefrom
sap_dateto = sap_dateto
TABLES
sap_icatsw = sap_icatsw
sap_icatsw_fix = sap_icatsw_fix.
ENDFUNCTION.
Finally, within the specific exit function module we define the condition when the exit should be executed:
FUNCTION z_exit_saplcats_001_1000.
*"*"Local Interface:
*" IMPORTING
*" VALUE(SAP_TCATS) LIKE TCATS STRUCTURE TCATS
*" VALUE(SAP_PERNR) LIKE CATSFIELDS-PERNR
*" VALUE(SAP_DATELEFT) LIKE CATSFIELDS-DATELEFT
*" VALUE(SAP_DATERIGHT) LIKE CATSFIELDS-DATERIGHT
*" VALUE(SAP_DATEFROM) LIKE CATSFIELDS-DATEFROM OPTIONAL
*" VALUE(SAP_DATETO) LIKE CATSFIELDS-DATETO OPTIONAL
*" TABLES
*" SAP_ICATSW STRUCTURE CATSW
*" SAP_ICATSW_FIX STRUCTURE CATSW OPTIONAL
IF ( <user BELONGS to CONTROLLING area 1000> ).
" execute user-exit
ELSE.
RETURN.
ENDIF.
ENDFUNCTION.
The alternative would be to place the entire coding including the conditions in the include ZXCATU01. However, in this case you can test the user exit <b>only in the context of the transaction</b> in which the user-exit is passed.
Using the strategy I have devised you are able to test the user-exit in general and the specific user-exits <b>independent </b>of the transaction. For example, if you are already working on 6.40 or higher then you could use ABAP Unit Testing for this purpose.
The same logic can be applied for BAdI where we can have only a single active implementation.
Finally, I hope to convince that it makes sense to spend some time into a reasonable strategy for implementing user-exits.
Regards
Uwe
Similar Messages
-
How to find user exits for a specific field
hi,
How can we find a user exit for a specific fields .
as i know Three ways to search user-exits
1. SE80 look includes in a packages with name user-exits
2. by zreport which will fetch user-exit in a T-CODE
3. SMOD
but what if we have to find a user-exit for particular field for e.g bupla(bussiness place) in MIRO.
Please suggest me.
Thanks and Regards ,
Rahul Singh.Hi Rahul,
Here is the procedure to create field exits.
Step by step procedure for creating Field Exits
There are eight steps to creating a field exit:
Step 1: Determine Data Element
Step 2: Go To Field Exit Transaction
Step 3: Create Field Exit
Step 4: Create Function Module
Step 5: Code Function Module
Step 6: Activate Function Module
Step 7: Assign Program/Screen
Step 8: Activate Field Exit
Step 1: Determine Data Element
u2022 Before you can begin adding the functionality for a field exit, you must know the corresponding data element.
Step 2: Go To Field Exit Transaction
u2022 The transaction to create field exits is CMOD.
u2022 You can use the menu path Tools -> ABAP/4 Workbench -> Utilities -> Enhancements -> Project management.
u2022 From the initial screen of transaction CMOD, choose the Text enhancements -> Field exits menu path.
u2022 After choosing this menu path, you will be taken to the field exits screen. From here, you can create a field exit.
NOTE : Even though you use transaction CMOD to maintain field exits, you do not need to create a project to activate field exits.
Step 3: Create Field Exit
u2022 From the field exit screen of transaction CMOD, choose the Field exit -> Create menu path.
u2022 After choosing this menu path, a dialog box will prompt you for the appropriate data element .
u2022 Enter the data element name and click the u2018Continueu2019 pushbutton.
u2022 Now, you will be able to create the function module associated to the data elementu2019s field exit.
Step 4: Create Function Module
u2022 You will automatically be taken to the Function Library (SE37) after entering a data element name and clicking the u2018Continueu2019 pushbutton.
u2022 In the u2018Function moduleu2019 field, a function module name will be defaulted by the system based on the data element specified. This name will have the following convention:
FIELD_EXIT_<data element>
u2022 You can add an identifier (an underscore followed by a single character ).
u2022 The first function module for a data elementu2019s field exit must be created without an identifier.
u2022 To create the function module, click on the u2018Createu2019 pushbutton, choose menu path Function module -> Create, or press u2018F5u2019.
u2022 After choosing to create the function module, you will get the warning: "Function module name is reserved for SAP". This message is just a warning so a developer does not accidentally create a function module in the field exit name range. By pressing u2018Enteru2019, you will be able to go ahead and create the function module.
u2022 Before coding the function module, you will have to specify the function modules attributes -- function group, application, and short text.
Step 5: Code Function Module
u2022 From the function moduleu2019s attributes screen, click on the u2018Source codeu2019 pushbutton or choose the Goto -> Function module menu path to the code of the function module.
u2022 Here you will add your desired functionality for the field exit.
u2022 Remember that field exitu2019s function module will have two parameters -- one importing parameter called "INPUT" and one exporting parameter called "OUTPUT". These parameters will be set up automatically by the system.
u2022 You must remember to assign a value to the OUTPUT field. Even if the value does not change, it must be moved from the INPUT field to the OUTPUT field.
Step 6: Activate Function Module
u2022 After coding the function module, you must remember to activate it.
u2022 Use the Function module -> Activate menu path to activate the function module.
u2022 At this point, you can return to the field exit transaction.
u2022 You should be able to 'green arrow' back to this transaction.
u2022 When you return to the field exit transaction, you will see an entry for the newly created field exit.
u2022 At this point, the field exit is global. That is, it applies to all screens that use a particular data element. On any screen that uses the data element, the corresponding field exit function module will be triggered, once it is active.
u2022 Also, the field exit will not be triggered yet because it is inactive.
Step 7: Assign Program/Screen
u2022 This step is only needed if you want to make a field exit local.
u2022 To make a field exit local, select the field exit and click on the u2018Assign prog./screenu2019 pushbutton.
u2022 In the dialog box , indicate the appropriate program name and screen number.
This information indicates that the field exit is local to the specified screen in the specified program.
u2022 In the dialog box, you determine which function module gets executed for the field exit by specifying the identifier in the u2018Fld. Exitu2019 field.
u2022 If this field is left blank, the function module triggered will be 'FIELD_EXIT_<data element>'.
u2022 If a single-character identifier is entered into the field, the function module triggered will be 'FIELD_EXIT_<data element>_<identifier>'.
Step 8: Activate Field Exit
u2022 The field exit must be active for it to be triggered by the system.
u2022 Activate the field exit by choosing the Field exit -> Activate menu path.
u2022 After assigning the field exit to a change request, its status will change to u2018Activeu2019 and it will be triggered automatically on the appropriate screen(s).
NOTE : In order to activate the field exit the profile parameter abap/fieldexit = YES must be set on all application servers
Execute the transaction SE38 with PROGRAM NAME - RSMODPRF
Then give the Data Element Name for which field you want to create the exit(Just cross check with your field data element) and execute.
then it takes you to SE37 with the function module name FIELD_EXIT_<DATA ELEMENT NAME> and then create the same function module.
and in the coding part, You can write your logic to display the output of that field. and activate it.
once you complete the above,
Again execute SE38 transaction with program RSMODPRF and again click on Execute button without any Data Element Name. Now you select the data element which you have created and click on Assign prog/ Screen button and assign the program name and screen number of the filed and click on the menu Field Exit and Activate.
Hope it helps.
Regards
Radhika
Edited by: Radhika Pande on Nov 26, 2009 7:58 AM -
How can i do a variable User exit that present the values before execute
Hi Gurus,
How can i do a variable User exit that present the values before execute, i need this:
a variable that calculate SYS-DATUM until 30 days before (I got the code) but this variable run automatic because is user exit, i want this variable but first present the values, not execute automatic, this is because the users want the report that automatic present the values , helpHi,
Refer the below links,
http://documentation.softwareag.com/natural/nat424mf/pdf/ops_mf/conf_usrex.pdf
http://www.erpgenie.com/component/content/article/1097
http://www.apentia-online.at/UP/Apentia/files/Article/SAP_BW_User_Exits_and_BAdIs.pdf
Hope it helps you,
Regards,
Ravindra. -
How to activate and deactivate the text fields in subscreens
Hi All,
I have one requirement to activate and deactivate the fields in Sub screen.
The requirement is initially the all screen fields are output field with some value .Suppose user want to edit the value, they choose the check box then automatically the sub screen fields are changed to input modeu2026
How to validate these settings in the sub screens..
Thanks & Regards,
SamantulaHi,
if it is report then use the both at-selection screen.
if it is in dialog program AT SELECTION-SCREEN OUTPUT instead of PBO and AT SELECTION-SCREEN instead of PAI
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_chk <> 'X' AND screen-name = 'FLATFILE'.
screen-required = 0.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
AT SELECTION-SCREEN.
LOOP AT SCREEN.
IF p_chk <> 'X' AND screen-name = 'FLATFILE'.
screen-required = 0.
screen-input = 0.
MODIFY SCREEN.
ELSEIF p_chk = 'X' AND screen-name = 'FLATFILE'.
screen-input = 1.
MODIFY SCREEN.
ENDIF.
Thanks & Regards,
Vallamuthu.M -
How to activate or deactivate screen painters element through program?
i am using module pool programming ,
i want to activate or deactivate the screen painters elements through programming how i can do it?Hi,
You can perform active and deactive the fileds in the selection screen using AT SELECTION-SCREEN OUTPUT event. Loop the screen table and modify the content of a screen field inside the loop based on requirements.
Check this code.
selection-screen begin of block b1 with frame.
parameters: p_g1 radiobutton group gp1 default 'X' user-command chk,
p_g2 radiobutton group gp1.
selection-screen end of block b1.
selection-screen begin of block b2 with frame.
parameters: p_gltrp type afko-gltrp modif id g1.
parameters: p_werks type aufk-werks modif id g1.
parameters: p_datum type afko-gltrp modif id g2.
parameters: p_uzeit type aufk-werks modif id g2.
selection-screen end of block b2.
at selection-screen output.
loop at screen.
if p_g1 = 'X' and screen-group1 = 'G2'.
screen-active = 0.
modify screen.
endif.
if p_g2 = 'X' and screen-group1 = 'G1'.
screen-active = 0.
modify screen.
endif.
endloop.
Also try the below code to get some idea
report zsample.
TABLES:lfm1.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_lifnr FOR lfm1-lifnr .
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS:
r_asn RADIOBUTTON GROUP rad1 USER-COMMAND uc1 DEFAULT 'X',
r_ers RADIOBUTTON GROUP rad1 ,
r_830 RADIOBUTTON GROUP rad1,
r_850 RADIOBUTTON GROUP rad1,
r_862 RADIOBUTTON GROUP rad1,
r_810 RADIOBUTTON GROUP rad1,
r_820 RADIOBUTTON GROUP rad1,
r_824 RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
SELECT-OPTIONS: s_bstae FOR lfm1-bstae MODIF ID sd1.
PARAMETERS:
p_ekorg TYPE lfm1-ekorg MODIF ID md1,
p_evcode TYPE edp21-evcode MODIF ID md2,
p_kappl TYPE nach-kappl MODIF ID md3,
p_parvw TYPE nach-parvw MODIF ID md4,
p_kschl TYPE nach-kschl MODIF ID md5,
p_vakey TYPE nach-vakey MODIF ID md6,
p_werks TYPE werks_d MODIF ID md7,
p_bukrs TYPE lfb1-bukrs MODIF ID md8.
SELECTION-SCREEN END OF BLOCK b3.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF r_asn EQ 'X'
AND ( screen-group1 = 'MD3' OR screen-group1 = 'MD4'
OR screen-group1 = 'MD5' OR screen-group1 = 'MD6'
OR screen-group1 = 'MD7' OR screen-group1 = 'MD8' ) .
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_ers EQ 'X'
AND ( screen-group1 = 'SD1' OR screen-group1 = 'MD1'
OR screen-group1 = 'MD2' OR screen-group1 = 'MD3'
OR screen-group1 = 'MD4' OR screen-group1 = 'MD5'
OR screen-group1 = 'MD6' OR screen-group1 = 'MD7'
OR screen-group1 = 'MD8' ) .
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_830 EQ 'X'
AND ( screen-group1 = 'SD1' OR screen-group1 = 'MD1'
OR screen-group1 = 'MD2' OR screen-group1 = 'MD6'
OR screen-group1 = 'MD7' OR screen-group1 = 'MD8' ) .
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_850 EQ 'X'
AND ( screen-group1 = 'SD1' OR screen-group1 = 'MD1'
OR screen-group1 = 'MD2' OR screen-group1 = 'MD6'
OR screen-group1 = 'MD7' OR screen-group1 = 'MD8' ) .
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_862 EQ 'X'
AND ( screen-group1 = 'SD1' OR screen-group1 = 'MD1'
OR screen-group1 = 'MD2' OR screen-group1 = 'MD8' ) .
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_810 EQ 'X'
AND ( screen-group1 = 'MD3' OR screen-group1 = 'MD4'
OR screen-group1 = 'MD5' OR screen-group1 = 'MD6'
OR screen-group1 = 'MD7' OR screen-group1 = 'MD8' ) .
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_820 EQ 'X'
AND ( screen-group1 = 'SD1' OR screen-group1 = 'MD1'
OR screen-group1 = 'MD2' OR screen-group1 = 'MD3'
OR screen-group1 = 'MD4' OR screen-group1 = 'MD5'
OR screen-group1 = 'MD6' OR screen-group1 = 'MD7' ).
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ELSEIF r_824 EQ 'X'
AND ( screen-group1 = 'SD1' OR screen-group1 = 'MD1'
OR screen-group1 = 'MD2' OR screen-group1 = 'MD3'
OR screen-group1 = 'MD4' OR screen-group1 = 'MD5'
OR screen-group1 = 'MD6' OR screen-group1 = 'MD7'
OR screen-group1 = 'MD8' ) .
screen-active = '0'.
screen-invisible = '1'.
screen-input = '0'.
screen-output = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
Regards,
Chandru -
How to find out the 'z' user exit used in a Particular Transaction
Hi,
I have requirement to analyse all the user exits used in a transaction say 'VA01' . How can i find the user exits in a VA01 transaction. Can anyone suggest how to find the User exits
Thanks in Anticipation.
With Best Regards
mamathayou can execute the following program , give the transaction name and execute
*& Report YCHATEST *
REPORT z_find_userexit NO STANDARD PAGE HEADING.
*& 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. -
FM in update task - How do you debug for a user exit (IW32)
Hi,
I am working on user exit IWO10009, fm EXIT_SAPLCOIH_009, transaction IW32.
The user-exit should be called any time an order is saved with parts added to the component tab.
The import structure of the user exit is CAUFVD, which doesnu2019t contain the items in the component. Instead, I have to go into table RESB and get the components.
However, when I go into RESB from inside the user-exit, the added components have not yet been added to the table.
As such, I was thinking of creating a Z function module in update task to process this code after the order is saved & RESB is updated.
2 questions
1 u2013 Is this the best way of accomplishing this?
2 u2013 How do you debug FMu2019s in update task? I have set a breakpoint & have switched system debugging on from inside the debugger, but it doesnu2019t stop inside the fm.
Please help.
Thanks,
JohnHi,
to debug update task you need to switch on "update debugging" not the "system debugging" from the menu Settings->update debugging.
-Ramesh -
How to lock the program in User exits
Hi Guru's
I have a problem with user exits. for suppose I am doing enhancement for particular TCODE, the other user is doing some changes to the same TCODE. My problem is where should i use the lock. Is it possible to lock the TCODE? How it can be done? please do needful............
Regards,
KrisnaHi Shiva,
What do you exactly mean by locking the T-COde.
Do you want that the other person should not be able to see the changes you have made. Then you can use your code in the Condition for "SY-UNAME = your user id".
Or do you want that the other person should not made the change. Then you need not worry because the User Exit does not have multiple instances.
Please let us know, if you have any query.
Hope it helps.
Regards,
Manish -
How to implement user-exit based changes for incompletion status?
Hi,
I have to implement changes to incompletion procedure using user exit. I have found the following user exit for controlling header status.
User exit in Program RV45PFZA
In this user exit you can store a specification for the reserve fields in VBUK (header status). Reserve field UVK01 could, for example, be used for an additional order status (as for rejections status, etc.).
The following workareas are available for this user exit:
VBUK (header status)
FXVBUP (item status)
FXVBUV (Incompletion)
Please help, how to implement changes to incompletion procedure using user exit?
Regards,
ChamandeepDear,
Go to CMOD and enter the enhacement number there. U can find the enhancement number through table MODSAP. here u can enter the enhancement object which is in ur case is Program name. Then you can use the enchacement number in CMOD and create a project and export it.
RG,
VM -
How to find user exit for a specific function
Hello Gurus,
I have some question about user exit:
(1) how can I know which user exit can be used to implement my specific requirement ?
(2) I think user exit is active subroutine in the main program. so if I know the name of some user exit, how can I get the program code for it ? ( ie. how to get name of main program, name of include file ? )
thanks very much!Hi friend,
thanks for your suggestion. I have read that book. but this question is not clear in that book . I'd like to repeat may question again:
(1) if I want to implement a tailored function by user exit, how can I know which userexit
should I use ?
(2.) I wonder if there is a document which shows which userexit corresponds which
program?
in fact, if I know the place where I can put my own abap subroutine in , everything will be done.
thanks very much! -
How to call custom screen from User exit?
Hai,
I have to call a custom screen from user exit include after the delivery save.
Depends on the data in the delivery,
if the data satisfies certain conditions I will call the screen otherwise no.
Could any one please tell me how to do this?where to create screen & how to link it here?
Regards,
Bhaskar.Hi,
Please check with the following Enhancements -
V50PSTAT - Delivery: Item Status Calculation
V50Q0001 - Delivery Monitor: User Exits for Filling Display Fields
Rewards if it helps
Regard
Goutham -
How to find Tables Associated with User Exit
Hi All,
I have an User Exit userexit_availabilty_out in RV03Vfzz.
How do i know the tables and feilds associated with taht exist.
In case of a Function exit i can find out from import Parameters, but how can i find in this case.
Pl Do reply.
Cheers,
ManoharYou need to find out which SAP program uses this as include. You can do that by doing WhereUsed on Abap include RV03VFZZ in transaction SE38.
After you found out the main program, use transaction SE80 and display that program. Then click on Fields object and you will see all global variables that are accessible in your user exit. -
How to pass parameter in Validation User Exit
Hi All,
We need to create a Validation to match USER ID with PERSON RESPONSIBLE (that is maintained in Funds Center master record). This is required to ensure that only person responsible can release budget.
How can I pass "Funds Center" as a parameter to the User Exit so that I can run database query to find person responsibel of that Funds Center.
Regards,
HanifHi Alex,
I belive i could not explain the problem properly... let me write it again.
1. I maintained Validation using FMVABD.
2. In PREREQUISITE I checked budget release operation using BPJA_VALID-VORGA = 'KBFR'
3. In CONDITION I used a user exit U100.
4. Made a copy of RGGBR000 as ZRGGBR000 and assigned it using GCX2.
5. Added following ABAP Code in FORM U100.
<CODE>
b_result = B_FALSE.
SELECT SINGLE * FROM FMFCTR WHERE BOSSID = SY-UNAME AND FICTR = '??????'.
IF SY-SUBRC = 0.
b_result = B_TRUE.
ENDIF.
</CODE>
'??????' In the second condition of WHERE CLUASE I want to mention Fund Center for which Budget is being released.
Another point is while maintaining validation using FMVABD, under TABLE FIELDS tab, one can find BPJA_VALID-FISTL (means Funds Center) but but I can not use in my ABAP Code.... it gives error message "BPJA_VALID" is unknown.
My appolgies for lengthy explanation... but hope it will help understanding the issue.
Regards,
Hanif -
Hi all, How can i write logic in user exit?
i have user exit exit_saplmgmu_001.How can i write in user exit? in which t-code.
Hi Murali,
I mean you are looking for the fields that has to be populated to the database table. So, go through this link you will have clear picture of MM01 Screen exit where you can populate the field in the database also.
I think this is the link that exactly suits your requirement.
Here all the details are given in detail with screen shots.
Please go through this.
http://www.****************/Tutorials/ExitsBADIs/MM/MM01.htm
Reward points if it helps.
Cheers,
Swamy Kunche -
How do I SUBMIT from a user exit which is called in an update task?
I want to send an idoc each time there is a goods movement. So, in the user exit of MB_POST_DOCUMENT I am calling IDOC_OUTBOUND_WRITE_TO_DB. This creates an idoc of status 30. However, in order to send the idoc I want to SUBMIT RSEOUT00. I get an ABAP dump on the SUBMIT because MB_POST_DOCUMENT is called in the update task, where SUBMIT is not allowed. Do you know any other way I can execute RSEOUT00 at this moment without having to call it later in batch?
Thanks!!
JoyHi Naren,
Your reply is VERY helpful!! Thank you so much.
I added CALL FUNCTION 'RSAP_IDOC_EINBUCHEN_VOM_BIW_4' IN BACKGROUND TASK. I am no longer getting the dump, but my idoc is still a status 03 and not a status 30. Should I expect to see it turn to a status 30? I ran this function directly in SE37 -> Test with the same parameters and it ran perfectly and turned the idoc to a status 03. Is there anything else I need to do in the code?
Thanks again,
Joy
Maybe you are looking for
-
Adobe Reader 11 stopped working and now will not install
For some reason my Adobe Reader 11 stopped working today when I tried to use it so I figured I would try to re-install it. Well, re-installing it helped none. The same error keeps re-occuring. Here is a screenshot of the error message I keep getting:
-
Remove parked invoices from FBL1N
Hello Guru's, We are on SAP ECC 6.0 and we have a problem with the FBL1N report. We have a lot of parked invoices on the FBL1N which should not be on there anymoren is they are deleted. Is there a way to remove those invoices form the FBL1N if they c
-
Dreamweaver CS6 crashes after Mountain Lion Upgrade
I'm on a 2012 Macbook Air and recently upgraded to Mountain Lion, now my Dreamweaver won't start, it crashes right after displaying the startup menu. I have tried all suggestions I could find on the forums however without success. To confirm the belo
-
After opgrade several months ago
-
I am having trouble updating my ipod. when i plug it into the computer nothing shows up. i thought it might be a problem with itunes but when i plugged in my friends nano to check to see if his showed up, it showed up on the side of itunes, so obviou