User exit structure
I have to add some custom fields to a structure of an user exit ... can any one suggest me what is the best way to do this??
Thanks!
Hi ,
See the following steps ;
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
- Before you can begin adding the functionality for a field exit, you must know the corresponding data element.
- An easy way to determine the data element associated to a particular screen field is to:
Go the appropriate screen.
Position the cursor in the appropriate field.
Press F1 for field-level help.
Click on the Technical info pushbutton (or press F9) on the help dialog box.
On this Technical Information dialog box, the data element will be specified if the field is 'painted' from the ABAP/4 Dictionary.
Step 2: Go To Field Exit Transaction
- The transaction to create field exits is CMOD.
- You can use the menu path Tools -> ABAP/4 Workbench -> Utilities -> Enhancements -> Project management.
- From the initial screen of transaction CMOD, choose the Text enhancements -> Field exits menu path.
- 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
- From the field exit screen of transaction CMOD, choose the Field exit -> Create menu path.
- After choosing this menu path, a dialog box will prompt you for the appropriate data element .
- Enter the data element name and click the Continue pushbutton.
- Now, you will be able to create the function module associated to the data elements field exit.
Step 4: Create Function Module
- You will automatically be taken to the Function Library (SE37) after entering a data element name and clicking the Continue pushbutton.
- In the Function module 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>
- You can add an identifier (an underscore followed by a single character ).
- The first function module for a data elements field exit must be created without an identifier.
- To create the function module, click on the Create pushbutton, choose menu path Function module -> Create, or press F5.
- 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 Enter, you will be able to go ahead and create the function module.
- 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
- From the function modules attributes screen, click on the Source code pushbutton or choose the Goto -> Function module menu path to the code of the function module.
- Here you will add your desired functionality for the field exit.
- Remember that field exits 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.
- 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
- After coding the function module, you must remember to activate it.
- Use the Function module -> Activate menu path to activate the function module.
- At this point, you can return to the field exit transaction.
- You should be able to 'green arrow' back to this transaction.
- When you return to the field exit transaction, you will see an entry for the newly created field exit.
- 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.
- Also, the field exit will not be triggered yet because it is inactive.
Step 7: Assign Program/Screen
- This step is only needed if you want to make a field exit local.
- To make a field exit local, select the field exit and click on the Assign prog./screen pushbutton.
- 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.
- In the dialog box, you determine which function module gets executed for the field exit by specifying the identifier in the Fld. Exit field.
- If this field is left blank, the function module triggered will be 'FIELD_EXIT_<data element>'.
- 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
- The field exit must be active for it to be triggered by the system.
- Activate the field exit by choosing the Field exit -> Activate menu path.
- After assigning the field exit to a change request, its status will change to Active 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
Reward points if hhelpful.
Regards.
Srikanta Gope
Similar Messages
-
USER EXIT- Structure or View as well?
Hello friends i have a quick question.
I created a User exit by adding the ZZfields in the Structure.When i replicated into BW i couldnt see those 3 zz fields.When i went back to the Generic Datasource and checked in 'Display Field List' i see my fields as hide field and field only boxes checked and greyed out.When i actually save the generic datasource it shows me all the fields i can edit but not the ZZ fields.I fi need to unhide them then where from and/or do they need to be added to my View aswell.
Thanks.hi,
to see the field in bw u have to uncheck the hide column for that field and only field only column is checked.
now if u are using view/table for extraction u have to add the field to the view.
and it will automaticlay come in extract structure and u do not have to append it.
if function module than u have to append the field and write user exit for it.
regards
pls assign popints if helpful. -
User Exit EXIT_SAPLMGMU_001 doesn't work with all MM views
Hello,
I'm using user exit EXIT_SAPLMGMU_001 in MM02/MM01 tcode to check if valuation class is correctly filled and i've a problem when i select all views for material. In MM02, when i select Accounting View, i can make the validation because in user exit, structure wmbew is filled, but if i select all views, only structure wmara is filled, all others structure are empty.
does anyone can help me in this?
ThanksHI
CHECK WITH THESE USER EXITS
MGA00001 Material Master (Industry): Checks and Enhancements
MGA00002 Material Master (Industry): Number Assignment
MGA00003 Material Master (Industry and Retail): Number Display
Hope this helps !!!
Cheers
Alfred -
User Exit in Credit Card Authorization
Is there a user exit that can be invoked whenever a Credit Card Authorization is performed?
hi
refer to the link below.. list of user exits
http://www.easymarketplace.de/userexit.php
http://www.planetsap.com/userexit_main_page.htm
====================
User Exit structural authorizations: http://help.sap.com/erp2005_ehp_02/helpdata/en/17/8b7f409cd50a1ae10000000a155106/frameset.htm
Chk Authorizations: http://help.sap.com/erp2005_ehp_02/helpdata/en/2b/fe26406f2c185de10000000a1550b0/frameset.htm
http://help.sap.com/erp2005_ehp_02/helpdata/en/41/f7c8380ef2c707e10000000a11402f/frameset.htm
http://help.sap.com/erp2005_ehp_02/helpdata/en/fc/75e43a744ebe14e10000000a11402f/frameset.htm
http://help.sap.com/erp2005_ehp_02/helpdata/en/51/778838d4687e0ce10000009b38f8cf/frameset.htm
http://help.sap.com/erp2005_ehp_02/helpdata/en/46/51f0b794b85e40e10000000a11466f/frameset.htm
Reward if Useful
Thanx & regards..
Naren.. -
Name of the structure needed for sales order user exit
Hi,
I am planning to write a user exit which will insert the data into my ztable the moment the new sales order is created and is saved.
I have identified FORM USEREXIT_SAVE_DOCUMENT as the necessary user exit. But the problem is that while inserting the data into the ztable I cannot insert the data from vbak as the data will be inserted into this table after the SO is saved.
Thus I need to identify a structure which is used to populate the vbak table so that it simultaneously inserts the data in the ztable as well. Can anyone help me with the name of the structure so that these fields i.e. vbeln, vkorg, vtweg, spart are inserted into my ztable?
Also need to know how to convert the net value i.e. vbak-netwr in Indian Rupees as it gets stored as Dollars ....
Thanks,
Vinod.Hi,
One of the structure being used is RV45A, there are several other str's being used as well for various calculations,
check out program SAPMV45A for the same.
& in order to convert vbak-netwr to rupees use the below statemetnt,
WRITE vbak-netwr TO zvbak-netwr CURRENCY INR.
Regards,
Raghavendra
Message was edited by:
raghavendra ay -
How to find the structure in this user exit
My requirement is add new field to Delivery due list ALV report(VL10G).For enhance this report i will append one field(LIKP-SDABW) in this structure SHP_VL10_ITEM.This structure is not showing in the include LV50R_VIEWG05
USEREXIT_PREPARE_LAYOUT_FILL .Where i have to find this structure,and internal tables?
Please help me.
Thanks & Regards,
sairamHi Sairam,
Goto the program for transaction VL10G.In that u make a seach for the user-exit
USEREXIT_PREPARE_LAYOUT_FILL.Then write the logic inside tht.U will need an access key for that.
<b>Reward points if it solves ur query or answer is helpful</b>
Thanks
Chinmay -
Internal structures available in user exit
How can I found out all the internal structures that are populated and available in a user exit or any point in code.
Specifically I am looking at RV60AFZC routine USEREXIT_FILL_VBRK_VBRP and want to fill MWSKZ which is in KOMV. But I would like to learn a new technique that I can use for any program. Thank you.Hello,
You can know if the particular structure is available in your session in either old or new debugger, all you need to do is
(SAPLHRBEN00ESS)EVENT_DESCRIPTION_GS
Where SAPLHRBEN00ESS -> Program Name
EVENT_DESCRIPTION_GS -> Structure (wa), Internal Table that you want to access.
Hope it helps.
Thanks,
Jayant -
Can I create new IDOC segmemnt in user exit( edidd structure ) forcefully ?
RFFOEDI1 is the standard driver program which call the below user exit zxf08u06...
Am programing user exit ZXF08U06...
In user exit zxf08u06, actually edidd structue contains all the segments...
In user exit zxf08u06, I am reading each segment which are in edidd structure, pulling required data from database and passing this data into this segment, so that this data appears in the IDOC's segments (we02).
Now I need to create one new segment which is not there in edidd structure.
Still I inserted this new segment and updated data. This new is coming in IDOC out put But IDOC was crested with error . Am I not supposed to create new segment whcih was not there in edidd structure forcefully ?
MUCH THANKS IN ADVENCE.Hi
Go thru the bellow links
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400365
http://www.thespot4sap.com/Articles/SAP_ALE_IDOCS.asp
Thanks
Sunil -
Difference between the different structures while dealing with User-Exits
While dealing with User-Exits, we come across the different structures/Tables like XVBAP,YVBAP,TVBAP,IVBAP,*VBAP....
What is the difference between them ?Usually X<tablename> and Y<tablename> are used in change document management to determine records updated (Y is old values and X new ones). (Look at transaction SCDO)
T<tablename is an internal table read from database and I<tablename> is an import table parameter of the same structure. <tablename> is an equivalent of <tablename> declared with statement TABLES and contains usually the "old" value.
Look at exit documentation. start at [User Exits In Sales Document Processing|http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm]
Regards -
User include structure and routines/program/user exits
Hello Gurus,
following is the step for modify the field catalog in material determination .
Modify the field catalog (OV26)
1. Add the new field to the user include structure:
o Header data KOMKDZ
o Item data KOMPDZ.
2. Add coding to the routines for assigning values to the new fields in order processing in program MV45AFZA. Use user exits:
o USEREXIT_MOVE_FIELD_TO_KOMKD (header fields)
o USEREXIT_MOVE_FIELD_TO_KOMPD (item fields)
3. Add the new field to the field catalog (Customizing activity Basic Functions  Material Determination  Maintain prerequisites for material determination  Maintain field catalog).
Will you please tell me what the step 1 and step 2 mean ? and what 's the user include structure and USEREXIT_MOVE_FIELD_TO_KOMKD/USEREXIT_MOVE_FIELD_TO_KOMPD and program MV45AFZA ?
thanks very much!Hi,
KOMKD is cummunication header and KOMPD is communication item which are actually contained in KOMGD structure. So automatically when you add a field to either of header or item it becomes a part of KOMGD. And moreover KOMGD contains all the fields of KOMKD and KOMPD which are required for materail determination.
USEREXIT_MOVE_FIELD_TO_KOMKD
Use this user exit to include or assign values to additional header fields in the communication structure KOMKD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination" .
USEREXIT_MOVE_FIELD_TO_KOMPD
Use this user exit to include or assign values to additional item fields in the communication structure KOMPD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination ".
regards
sadhu kishore -
User exit to populate data into append structure of EKET ??
Hi all,
My requirement is to extend the table EKET to add few more columns . Is there any user exit available for this ? I tried appending a structure .After the columns are added what is the exit to be used to populated data into the new fields ?
Are there any OSS notes which will explain the process on how to extend the table EKET ?
Please help me with this .
Regards,
Varun .Hi Varun,
You can explore this solution.
- Create new output type for purchase order (for application EF) and assign medium '8' (special function) in transaction NACT.
- Create new program (SE38) for medium '8' (special function).
REPORT ZZUPDATE_EKET MESSAGE-ID E0.
FORM SPECIAL_FUNCTION_PROCESSING USING RC
US_SCREEN.
DATA: BEGIN OF I_EKET OCCURS 0.
INCLUDE STRUCTURE EKET.
DATA: END OF I_EKET.
RC = 1.
SELECT *
FROM EKET
INTO TABLE I_EKET
WHERE EBELN = NAST-OBJKY(10).
*Now you can use FM ME_UDPATE_DOCUMENT to update EKET.
ENDFORM. "SPECIAL_FUNCTION_PROCESSING
- Maintain condition record for above new output type (NACR) so that new message type would run upon save of purchase order.
Hope this will help and give an idea.
Regards,
Ferry Lianto -
User exit for update rule of info structure
Hi gurus,
Can anybody tell me how to implement a user exit of update rule for LIS info structure, for ex,S140.
Thanks
Eric xuThere is no user exit and we are not allowed to modify the update rules of the standard SAP info structures. However, you can create your own info structure with the same or similar configuration and then apply a formula or a requirement in the update definitions (MC25 transaction), as you please.
After that you can just turn off the update of S140 (in OMO1 transaction) and use your own info structure instead in MCSI transaction. -
Hi all,
We r on way to implement ACE, we have done at territory management.
Now wat is happening is when ever we r making changes at the Orgnisational structure that is having a immedate effect in Territory management but again i have to update the user context ...
<b>Is there any setting that needs to be done that will automatically updates the user context ?</b>
or
<b>I should luk at any User exit where i ask the system to update the user context. when save button is triggers the event</b> ..
Thanks in advance for this helpHi Rahul
You can do that in CMOD, by creating a project and using the enhancement: RSAP0001.
SAP provides enhancement RSAP0001 that can be used to populate the extract structure.
This enhancement has four components that are specific to each of the four types of R/3 DataSources:
Transaction data - EXIT_SAPLRSAP_001
Master data attributes - EXIT_SAPLRSAP_002
Master data texts - EXIT_SAPLRSAP_003
Master data hierarchies - EXIT_SAPLRSAP_004
Go to enhancement of transaction datasources in CMOD.
Add a case statement with datasource check and go for the below code.
This user exit is called for every datasource so be sure to put a CASE statement on the datasource.
CASE i_datasource:
WHEN '2lis_11_vascl'.
loop at c_t_data into <datasource structure>
modify c_t_data from <datasource structure>
endloop.
endcase. -
Need to check structure condition in user exit RV60AFZ,
Hi all, i need to write a condition for vf01(create billing document) in user exit * RV60AFZC * .
the condition is :
if vbak-auart = 'TA' and KOMV-KSCHL = 'JIN7'.
VBRK-FKART = 'ZFCS'.
ENDIF.
but the problem here is that komv is structure so the above condition is not working.
If i give condition as
if vbak-auart = 'TA' .
VBRK-FKART = 'ZFCS'.
ENDIF.
then the user exit is working.
So any one please suggest me how to make the above condition work.
thanks in advance,
koolspy.Hi
Perhaps you can try this, but be careful with performance.
In VBAK you have the value for KNUMV. So, as I understand that you refer to the value of KNUMV for the SO (not for the invoice that you are doing), try this:
DATA: i_konv LIKE konv OCCURS 10 WITH HEADER LINE.
SELECT * FROM konv
INTO TABLE i_konv
WHERE knumv = vbak-knumv.
READ TABLE i_konv WITH KEY kschl = VALUE.
IF sy-subrc = 0.
IF vbak-auart = value2. "OR OTHER CONDITION
"DO WHAT YOU WANT.
ENDIF.
ENDIF.
Newly, be careful with performance (try with a select single on KONV, etc...)
I hope this helps you
Regards
Eduardo -
VA02 user exit - cannot update append structure field in XVBAP/VBAP
Hi Guys,
I am currently using one of the many user exits in updating XVBAP to update the VBAP sap table in VA02.
However I am encountering a problem when updating a customized append structure field. When I change the value of the append structure field only it doesnt update in VBAP upon save event. Only when I also change a sap standard field (ARKTX) the append structure gets updated.
Is there a way to resolve this wherein even if I just XVBAP-<append structure field> only ... the corresponding field in VBAP gets updated?
THanks guys and hope to hear from you soon.Hi,
Which userexit subroutine are you using to move the append structure field values to the XVBAP table? Are you having the user enter values on a screen during VA02 for the append structure fields, or are you setting those values within the code when the user saves? For the purposes of this response, I will assume you are not having the user enter the values, and that (from what you have described) you are using subroutine userexit_move_field_to_vbap.
While userexit_move_field_to_vbap sounds logical at first, you should be aware that this subroutine (which is called at the end of module vbap_fuellen) may only be called when one of the chain fields (in the flow logic of the VA02 screen) is changed. If you search for all the calls of module vbap_fuellen in screens of SAPMV45A, you will see that most of them have a list of chain fields with "on chain-request" logic. Since your append structure fields will not be listed in the flow logic of the standard VA02 screen, changing one of the append structure fields alone would not trigger the PAI module vbap_fuellen. Of course, changing a standard VBAP field (ARKTX was your example) could trigger the vbap_fuellen module (as long as it was one of the chain fields) which would consequently trigger the userexit_move_field_to_vbap subroutine.
You may want to consider trying USEREXIT_SAVE_DOCUMENT_PREPARE. Please explain further if I have misunderstood your question.
Anyone else out there have any ideas? Does my analysis make any sense?
Best Regards,
Jamie
Maybe you are looking for
-
Installation Failed The installer can't install some files in "/".
The full message is Installation Failed! The installer can't install some files in "/". Contact the software manufacturer for assistance. I first received this message when trying to upgrade Pro Tools from 8.0 to 8.0.1 a prerelease for snow leopard.
-
Connectionstring to be used in ASP for instant client ??
Hi, I'm trying to use oracle instant client for one of my projects. I have installed basic, sqlplus and ODBC for instant client. I have set all the environment variables. I have the tnsnames.ora and sqlnet.ora So far I have succeeded in connecting to
-
Hi, My configuration: Database: 10.2.0.1.0 Express Libs: OCCI 10.2.0.3.0 (patch 13) libraries for Microsoft Visual C++ 8 IDE + Compiler: Visual C++ 2008 - 9.0.30729.1 SP I run into trouble with the following piece of code: stmt = con->createStatement
-
HT1391 What happens if my ipod is lost and you cant locate it???
Ok I lost my ipod moving and now i cant find it anywhere its still under warrenty If its lost can i get a new one sent to me??
-
Reading Mail through Java Mail using IMAP
When i tried to connect to IMAP server am getting the following error like Ntlm class not found Am using JAvaMAIL API version 1.4.3. Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/mail/auth/Ntl m at com.sun.mail.imap.protocol.IMAP