User exit vriable with several values
Hi,
I need to use a user exit defined variable containing several values; as of now I have only used single values and plain ranges... any tips on which values to assign to the E_T_RANGE table line ?
many thanks
Hi Thibault,
You can do this as multiple single values.
Create an internal table and fill with required values. Loop from this internal table and append values one by one as multiple single values into E_T_Range.
Sample code.
Loop at lt_data.
e_t_range-sign = 'I'.
e_t_range-option = 'EQ'.
e_t_range-low = Lt_data-<field1> .
append e_t_range.
endloop.
Hope it Helps
Srini
Similar Messages
-
Populate user exit Variable with User Authorizations using ABAP?
Hi, Does anyone know of a way to populate a user exit variable (with ABAP) with the Authorization Values for a user running a report? I am turning off authorizations for our InfoProvider using RSSM and want to populate a variable instead and use the variable as a filter.
Hi Kenneth ,
You need dynamic authorization in your report .This can be done at query runtime by using exit variable and writing cmod code for the same .
This code will read authorization maintained at runtime of query in i_step = 1 and will pass input var values accordingly .
For step by step information you can access this document .
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0f9f33c-0f17-2d10-d3a2-ae52ccd00780?quicklink=index&overridelayout=true
Hope this will be helpful .
Regards,
Jaya Tiwari -
Explain User exit concept with simple example
Hi friends
I am new member of this forum & i am learning ABAP.
Kindly send me user exit concept with simple example to my mail ID so i can able to use it.
mail ID [email protected]
thanks in advance
Thanks & RegardsCode SE18 is used to Identify the BADI available.
Look for the string 'CL_EXITHANDLER' in the standard program. This is a class which has a method 'GET_INSTANCE' which is used to trigger BADI's from the Standard Program. The interface parameter for this static method 'EXIT_NAME' is used to pass the BADI to the method.
Open Standard Program and do a global search 'CL_EXITHANDLER'.
SE18 > give the BADI name found through above search.
CUSTOMER_ADD_DATA > which has a method SAVE_DATA.
T.Code SE19 is used to Implement BADI.
SE19 > give the implementation name > Give the Definition name as CUSTOMER_ADD_DATA and the Short Text.
Intro.....
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
Check these links for info about badi..
BADI's
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
BADI's
http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://members.aol.com/_ht_a/skarkada/sap/
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://www.guidancetech.com/people/holland/sap/abap/
http://www.planetsap.com/download_abap_programs.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
http://www.esnips.com/web/BAdI
http://www.allsaplinks.com/badi.html
New to Badi
check any fo the below links. this will def help u.
http://www.allsaplinks.com/badi.html
And also download this file....
http://www.savefile.com/files.php?fid=8913854
There are other tutorials on this site...
http://sapbrain.com/Tutorials/tuto_download.html
What are BAdIs?
-> is an anticipated point of extension these points act like sockets and exist in the original source code
-> based on ABAP Objects. BAdI defines an interface that can be implemented by BAdI-implementations that are transport objects of their own
->Important! There are 2 roles: Enhancement Option-provider & Implementer.
-> In the above context, Enhancement Implementation can be done only if option (hook) is provided by the Option-provider. In simple words there are no implicit BAdIs.
Note: In the following slides, Definitions are created so as to understand the method of BAdI definition & for example purpose. As stated above this is the role of Enhancement Option-Provider.
Classic BAdIs already exist since SAP Release 4.6
BAdIs have been Re-implemented in ECC7.0 under the new Enhancement Framework & Switch Framework
Classic BAdIs
To understand what a powerful pattern a BAdI is, we will now define & then implement a BAdI
BADI Class is created automatically.
The various options are described below in detail:
1. Enhanceable: Enhanceability of filter types can only be specified for filter-dependent BADI definitions under very special conditions. For example, the domain belonging to the filter type must be linked with a value table that is of the type E or G. A BADI implementation can then be created in one step by creating a new filter value that is automatically entered into the value table at save and also copied into the transport order of the BADI implementation. In addition, it is also possible to create a new filter value and, at the same time, a BADI implementation with the same name. Naturally, you can also specify existing filter values.
You should select this feature if there is a prerequisite that a new filter value is created together with a new BADI implementation - that is, that BADI implementations are not created solely with existing filter values, although this, too, is possible.
2. Multiple-Use
3. Filter-Dependent
Instance Methods can access all of the attributes of a class and can trigger all events of a class. Static Methods can only access static attributes and static events.
Exceptions:
Events:
Events can be defined in classes or in interfaces. Corresponding methods can trigger these events with the RAISE EVENT statement. Each class (or interface) that is going to handle the corresponding event must implement a relevant handler method, and register it using the SET HANDLER statement. When an event occurs, the system calls all of the handler methods registered for that event.
Like method definitions, events have a parameter interface. The only difference is that events may only have EXPORTING parameters.
BADI : Businees Add IN's
Business Add-Ins are SAP enhancement technique based on ABAP Objects.
Where the SAP standard program is not going to fullfill the client requirement , we are going to add our own program to SAP standard program, without changing the standard prog.
Each Business Add-In has
at least one Business Add-In definition
a Business Add-In interface
a Business Add-In class that implements the interface
Each BADI has two different Views.
1.Definition view
2.Implementation view
T.C for BADI Definition is SE18.
T.C for BADI Implementation is SE19.
There are multiple ways of searching for BADI.
Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
Finding BADI Using SQL Trace (TCODE-ST05).
Finding BADI Using Repository Information System (TCODE- SE84).
1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for CL_EXITHANDLER=>GET_INSTANCE.
Make sure the radio button In main program is checked. A list of all the programs with call to the BADIs will be listed.
The export parameter EXIT_NAME for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter INSTANCE will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
2. Start transaction ST05 (Performance Analysis).
Set flag field "Buffer trace"
Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)
Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.
Push the button "Deactivate Trace".
Push the button "Display Trace".
The popup screen "Set Restrictions for Displaying Trace" appears.
Now, filter the trace on Objects:
V_EXT_IMP
V_EXT_ACT
Push button "Multiple selections" button behind field Objects
Fill: V_EXT_IMP and V_EXT_ACT
All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.
So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
3. Go to Maintain Transaction (TCODE- SE93).
Enter the Transaction VD02 for which you want to find BADI.
Click on the Display push buttons.
Get the Package Name. (Package VS in this case)
Go to TCode: SE84->Enhancements->Business Add-inns->Definition
Enter the Package Name and Execute.
Here you get a list of all the Enhancement BADIs for the given package MB.
Have a look at http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://members.aol.com/_ht_a/skarkada/sap/
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://www.guidancetech.com/people/holland/sap/abap/
http://www.planetsap.com/download_abap_programs.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
How to develop BADI
Rewards if useful. -
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. -
Map the user exit variables with the queries/cubes using them
Hello Friends,
What are the post unicode conversion tests that you can perform on front end/existing queries?
is there any added advantage for queries due to unicode?
is testing the working of variable enough? is there any table to map the user exit variables with the queries/cubes using them?
Thanks
TanyaGuys, any clue about this? Answer are appreciated.
Thanks
Tanya -
User exit to change the value of ltbp-wempf
Hi,
Is there any user exit to modify the value of ltbp-wempf during Transfer requirement creation ?It is also ok, if i can get a way to modify MSEG-wempf during production declaration. (MFBF)
-
User exit work with small example
will someone show how to make user exit work with small example and sceenshot? i do not want legthy explanation /hard examples,only a stepwise example.
points will get reward
email:[email protected]Go to transaction CMOD
Create a project called ZVA01
Choose the Enhancement assign radio button and press the Change button
In the first column enter V45A0002 Predefine sold-to party in sales document . Note that an
enhancement can only be used i 1 project. If the enhancement is allready in use, and error message
will be displayed
Press Save
Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002.
Double click on the exit.
Now the function module is displayed. Double click on include ZXVVAU04 in the function module
Insert the following code into the include: E_KUNNR = '2155'.
Activate the include program. Go back to CMOD and activate the project.
Goto transaction VA01 and craete a salesorder. Note that Sold-to-party now automatically is "2155" -
User entry variable with exclude values
Hello All,
I created a user entry/ default value variable, which allows multiple single values and is optional entry. And I also got to exclude few values from this infoobject as well as have a variable. When I select and exclude my value from selsction and run the report, I get a system error and the varibale is converted to mandatory entry. The detail error message is displayed below. Any useful input will be awarded
Diagnosis
Variable &V1& is used in the query in such a way, that an optional entry is not possible.
For example, you might be using an "Exclude", or the variable might be connected using OR to additional selections for &V2& in the global filter, but is still displayed in the columns selections.
It is also not possible to use an optional parameter variable to fill an interval selection in either the from-field or the to-field.
System response
Procedure
If you are able to accept the mandatory entry, you need not do anything. Otherwise you must work with several variables in the query. You can use an optional interval variable to do this.
Procedure for System AdministrationHello ,
I did try creating a variable with the foll details:
Variable Type : User Entry / Default Value
Variable Represents : Multiple Single values
Variable entry optional
When I run the query it converts my variable to mandotary entry. but I want to have optional user entry variable.
Any help will be awarded -
Pre-validation user exit to replace input values (unit of measure)
Hi experts,
I have a quick question in regard to applying a user exit when saving data through an input template into a real-time cube. I'm not a planning expert, but what I'm trying to achieve is to replace a field value with another one before any validations take place (folks submit a row with UoM 'TIB' and I need to change that to 'TB' before saving the data?
The issue here is that in the above exampe 'TIB' is a UOM that gets extracted from a non-SAP source and there's no ETL process in place that could take care of that before it gets input/loaded into BW (IP). Also that UOM isn't maintined in BW.
Thanks a lot,
Fabian
Edited by: Fabian Binz-Scharf on May 18, 2011 11:23 PM
Edited by: Fabian Binz-Scharf on May 18, 2011 11:23 PMHi,
I would add a rebooking function directly after the step where the data is loaded or entered and just change the value of UOM in the rebooking.
regards
Cornelia -
User defined Variable with multiple value
Hi Experts,
customer requirement is the following:
Build a layout in which to have in Lead Column the cost center characteristics, but not all cost center in master data but only those chosen by user with manual input. To achieve this goal i have created a variable of type characteristics (associatd to cost center CH) with replacement type "user defined values", then i have put this var in planning level. I have created a layout with Cost Center in Lead Column and set "all possible ch combination" in additional setting.
Thanks to the varable created, the user can enter Cost Center value, but the problem is that he cannot select more than one single cost center value, for example:
User want to see in layout CosCen1 and CosCen4, by now he can set variable in order to see the entire range from CosCen1 to CosCen4 (included all intermediate Cost Center) or to see only one between those 2 Cost Center, but it's not possible (or better i don't know how to..) to select both cost center and display the layout with ONLY those 2 Cost Center in Lead Column (CosCen1 and CosCen4).
In other word, is it possible to set a variable with more than one single value without using range from-to?
If not, does exist an alternative?
Thanks in advance.
FabioHi Fabio,
It works as follows.
let's say you have 3 multiple single lines for your cost center variable.
once you are in the folder, select any single value & the layout is ready for planning with the corresponding cost center.
now, select the "Cost center variable row" in the header of the folder within section "Name of Variable" & click on "Trash Can" icon to "Delete Selection" of variable.
this basically deletes all the entered selections (3 entries) & displays for all.
It works this way, because we don't have "resriction of values required by user".
if am not wrong & correct me if am wrong,
overall, this is nothing but equal to "planning level not restricted with any variable".
I just tested this & the flaw in this is that, it is not only displaying for all the initially entered 3 lines but it displays for each & every cost center irrespective of the variable selections.
hope it is clear. -
User Exit to derive characterstics values of COPA
Hi
I Am posting an FI document using the standard program rfbibl00 or through FB01.
I have to post data to the PA segements too .
But the problem is that i need to derive the value of Brand based upon the value to Profit centre.
Can you help if ther is any user exit hat will be triggered where i can put in this code to derive the brand.
Thanks
NikhilHi,
The follwoing user exits are available:
Exit Name Description
F050S001 FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
F050S002 FIDCC1: Change IDoc/do not send
F050S003 FIDCC2: Change IDoc/do not send
F050S004 FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
F050S005 FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
F050S006 FI Outgoing IDoc: Reset Clearing in FI Document
F050S007 FIDCCH Outbound: Influence on IDoc for Document Change
F180A001 Balance Sheet Adjustment
FARC0002 Additional Checks for Archiving MM Vendor Master Data
RFAVIS01 Customer Exit for Changing Payment Advice Segment Text
RFEPOS00 Line item display: Checking of selection conditions
RFKORIEX Automatic correspondence
SAPLF051 Workflow for FI (pre-capture, release for payment)
regards
Aveek -
Need info regd User exits use with examples
Hi!
I'm SD consultant and I need some user exits info along with some examples. They are as follows
USEREXIT_FIELD_MODiFICATION
USEREXIT_MOVE_FIELD_TO_VBAK
USEREXIT_MOVE_FIELD_TO_VBAP
USEREXIT_PRICING_PREPARE_TKOMK
USEREXIT_ACCOUNT_PREP_KOMPCV
USEREXIT_FILL_VBRK_VBRP
Thank you in advanceHi,
Please check this link
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/automatically-populating-the-sales-order-field-in-va01-1623468
http://help.sap.com/saphelp_40b/helpdata/pt/ff/f52c7dd435d1118b3f0060b03ca329/content.htm
http://help.sap.com/saphelp_46c/helpdata/en/08/f62c7dd435d1118b3f0060b03ca329/content.htm
Best regards,
raam -
Change Schedule Line category through user exit - Issue with transfer of requirements
Dear All,
There is a user exit in Sales Order program MV45AZZ - PREPARE_TO_SAVE . It is currently being used to implement code to change schedule line category based on the status of the sales order.
When Blocked , category is set to ZP, and when Released then it is set to CP.
Now, when we change ZP to CP manually through VA02, I am able to see the requirements transferred in tcode MD50.
The problem is, when user changes status of sales order from blocked to released, the userexit changes categories from ZP to CP, but the requirements are not transferred ( cannot see it in MD50 ).
I tried searching the SCN, tried googling it, its been a week now and I havent found any clear solution.
So, far what I understood is Availability Check needs to be carried out again. But I am not clear how to trigger it again.
Are there any indicators that need to be set or any internal tables to be updated or any FM to call or any other user exit to place the code in.?? Any suggestion friends ?
-
Displaying Customer Exit Variable with derived value from another ODS
Hi All,
Sorry if this question has been answered before. I searched the forums and could not find anything specific to my problem.
I am new to BEx Query. Customer is requesting a variable(s) be created which will be displayed as a column along with other CKF and RKF. This query is a payroll query for US/Canada. This new variable will be based on the user input date for the query. We are to take this date and go look up the actual pay date for the pay period to which the user input date belongs. The pay date is stored in another ODS.
So far, as far as the changes to the Customer Exit ZXRSRU01 are concerned, I would perform the logic when I_STEP = 2. Do a basic selection off the second ODS, derive the pay date, and store in range table E_T_Range.
The data displayed off the user input date is displayed in rows. This is done six times, going back seven days for each row (first row is data for period user entered date to user entered date - 7 days; second row is data for period user entered date - 7 days to user entered date - 14 days; etc ...). For this to happen correctly, I am assuming the variable(s) are to to have characteristic types 'Not ready for input', 'Mandatory', 'Customer Exit', and 'Single Value'.
My question is ... How do I display the six variables in columns (how are they to be defined in the query) and the characteristics I list above, are they correct? Does this need to be a replacement path variable?
Thanks.
Edited by: Amir Hasan on Jun 11, 2009 6:24 PM
Edited by: Amir Hasan on Jun 11, 2009 6:25 PMHi Amir,
What i can understand from u r requirement is you want to few columns that will show something like below,
User entered date = x
Period of X to Period of (X-7) Period of X to Period of (X-14).....
This can be done by CMOD for variable only.
Logic steps :
1) Take the user input.
2) Find out the period by using T009B table and store in temp variable.
3) Do day -7 and find out period for the same
4) Assing period of X to ls_range-high range and X-7 to ls_range-low.
Let me know if you have any doubt
Regards,
Viren -
Exit variable with multiple values or with ranges
Dear Experts,
I have a date exit variable used in a planning level. If the variable has a single value, I am able to execute the planning function. But if the exit is populated with a range or multiple single values, I am unable to execute the planning function. I get this message 'Variable "ZXPRDATE" is not restricted to a single value'.
I should be able to read all records from the cube in date range of one week for repost. Please advice if this is possible.
Thanks,
GnanaHi Mayank,
Yes, I am using the same variable for repost function also.
Let me explain in detial.
Req: I have a planning level with product, effective date and count(keyfigure). I want all products that has a count keyfigure value for the last one week.
If my effective date is a single value, I get all the list of products on that particular day. But, if my effective date has multiple dates or a date range, nothing is read from the data base.
Please advice.
Thanks,
Gnana
Maybe you are looking for
-
TiG4 can't clean install from origianl disks -WEIRD
My TiG4 came with 10.2 and I've operated with 10.2.8 since the update. Recent problems cause me to require a reinstall of the 10.2 system; however, the installer disk will not allow an install on the current boot volume. My first thought it was the 1
-
I need a memory management/ data storage recomendation for my IMac 2 GH Intel Core 2 Duo
Since giving my mid 2007 IMac a 2GB memory boost to accommodate Lion all has been well however my memory is full. I have a sizable ITunes library and 6000 photos in IPhoto, Me thinks I should store this all more effectively for the safety of the musi
-
What's the difference between Infospokes and Open Hub Destination in BI 7?
I understand the API that a 3rd party tool uses to get data our of BW using infospokes. Is it the same API that a 3rd party tools such as MS-SSIS uses? Supposedly that software only communicates with an OH Destination and not Infospokes. So a
-
ASA port-channel command on IOS v. 9.0(4)
I have configured 2 of ASA 5550 on a port channel as follows: ======================================= router# show version Cisco Adaptive Security Appliance Software Version 8.4(2) router# show module 0 ASA 5550 Adaptive Security Appliance
-
Access level changes captured in Auditing ?
Hi, do auditing capture Access level changes / modifications in the CMC and how i can access them. Need to know. Thanks. Toor.