Can i assign a string to a variable in User Exit?
Friends,
I would like ot write a User Exit that will assign a string to a variable depending on the value of the other variable.
I just wanted to know if such a code is valid:
When zimport
IF i_step = 2. " read user input parameter
l_s_range-low = 'Important'.
APPEND l_s_range TO e_t_range.
ENDIF.
If so, my second problem is that in the variable exit definition with processing Customer type you need to identify a "Dimension" for the variable. Non of them really fit, because the value is a string so why convert it to another format?
Your input is appreciated in advance,
Xibi
hi Xibi,
say you have var1 and var2, var2 will be filled depend on value of var1, you can write something like following.
please be remind that var2 is not marked as ready for input and is set to mandatory variable entry.
hope this helps.
The second step (I_STEP = 2) is called after the processing of the variable pop-up. This step is called only for those variables that are not marked as ready for input and are set to mandatory variable entry.
WHEN 'var2'.
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'var1'.
CLEAR L_S_RANGE.
if LOC_VAR_RANGE-low = ...
L_S_RANGE-LOW = 'IMPORTANT'.
else.
L_S_RANGE-LOW = '....'.
endif.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDLOOP.
ENDIF.
Similar Messages
-
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 -
Hi,
I am trying to populate a fiscal year period (from and to) dynamically using a user exit variable. The fiscal year selection is for data slicing at the planning area.
Anyone has an idea of how I can achieve this ? Some function module lines will be appreciated.
Regards,
ucheHi Uchenna,
i don't clearly understand your scenario, but i there's a great HOWTO for user exit variable. If you specify your mail i can send you.
However i have created an user exit var filled with the entries on a customer table, follows the code:
FUNCTION z_sem_bps_slice_comp.
""Interfaccia locale:
*" IMPORTING
*" REFERENCE(I_AREA) TYPE UPC_Y_AREA
*" REFERENCE(I_VARIABLE) TYPE UPC_Y_VARIABLE
*" REFERENCE(I_CHANM) TYPE UPC_Y_CHANM
*" REFERENCE(ITO_CHANM) TYPE UPC_YTO_CHA
*" EXPORTING
*" REFERENCE(ETO_CHARSEL) TYPE UPC_YTO_CHARSEL
CONSTANTS:
*l_source_var TYPE upc_y_variable VALUE 'SOURCE',
*l_source_area TYPE upc_y_area VALUE '4PERF001',
l_use_restricted_values TYPE boole-boole VALUE ' ',
l_buffer_call TYPE boole-boole VALUE 'X'.
DATA:
l_type LIKE upc_var-vartype,
lto_varsel_all TYPE upc_yto_charsel,
lto_varsel TYPE upc_yto_charsel,
lto_var TYPE upc_yto_charsel,
lto_chanm TYPE upc_yto_cha,
z_noslice(1) TYPE n.
BREAK-POINT.
DATA: ls_varsel TYPE upc_ys_charsel,
lt_chavl TYPE STANDARD TABLE OF zcompslice,
ls_chavl TYPE zcompslice.
HERE I FILL LT_CHAVL WITH THE VALUE IN THE CUSTOMER TABLE
CLEAR:lt_chavl,ls_chavl,z_noslice.
REFRESH:lt_chavl.
SELECT zsocieta FROM zcompslice INTO TABLE lt_chavl
WHERE zflag = 'X'.
IF sy-subrc <> 0.
z_noslice = 1.
ENDIF.
HERE YOU FILL THE "USER EXIT VAR" WITH PROPER VALUE EXTRACTED ABOVE, LT_VARSEL IS THE TABLE FOR THE OUTPUT VALUE OF THE USER EXIT VARIABLE
IF z_noslice EQ 1.
ls_varsel-seqno = '0000'.
ls_varsel-chanm = '0COMP_CODE'.
ls_varsel-opt = 'EQ'.
ls_varsel-sign = 'I'.
ls_varsel-low = '#'.
APPEND ls_varsel TO eto_charsel.
ELSE.
ls_varsel-seqno = '0000'.
ls_varsel-chanm = '0COMP_CODE'.
ls_varsel-opt = 'EQ'.
ls_varsel-sign = 'I'.
LOOP AT lt_chavl INTO ls_chavl.
ls_varsel-seqno = ls_varsel-seqno + 1.
ls_varsel-low = ls_chavl-zsocieta.
APPEND ls_varsel TO eto_charsel.
ENDLOOP.
ENDIF.
ENDFUNCTION.
Hope it helps
Fabio -
Can't assign a string value to a member of type TEXT in Calculation Manager
I can assign a string value to that member of type TEXT using a run-time prompt of type StringToNumber.
Example: "My Text Member" = {string_rtp};
However, I need to accompllish the same function without using a run-time prompts.
I have a planning application and I know that text along with all other non-numeric
values are stored on the relational side in the planning application schema.
It seems reasonable to assume that if this can can accomplish
with a run-time prompt that I could do also do it without a run-time prompt.
What appears to be lacking is a function like:
"My Text Member" = @StringToNumber(<String Literal>);
Clearly, this is already being done "under the covers" for run-time prompts. If
would appear to be a minor enhancement to expose such a function to developers.
NOTE: I suppose you would also need to add new syntax/function to identify a string
literal from say a member name. I'm wondering if this is the more difficult challenge
from a product perspective????When executing a Calculation Manager rule in Planning, the run-time prompt (RTP) is populated by looking up the outline information present in the relational Planning application database. If the RTP is of type TEXT, the strings displayed in the member select are from the from the relational Planning application database too. Subsequently when executing the Rule, the RTP's value is in fact the record ID (a number) which is then saved into the appropriate intersection in Essbase.
You need to bear in mind, the Rule is executed in Essbase. If Essbase needs to "write" a text, it would then need to connect to the Planning relational database to create a new record. The newly created record ID then needs to be feed back to Essbase, in order to store it in the appropriate intersection.
What you are suggesting, comes with a big overhead causing Essbase and the rule to slow. Thus, the disadvantages outweighs the advantages. -
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.' -
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 advanceHi,
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 -
Display a variable d'user exit as text in the title of a colomn
Hi, experts,
I would like to calculate the number of days of a certain month. This calculation would be done in the user exit.
Then in the report, this number will be displayed in the title of the colomn.
Is it possible to realise this requirement and what is the configuration regarding as this variable?
Thanks in advance.Hi,
Yes you can do it.
Create text variable 'ZNO_MNTH', with processing by Customet Exit.
Variable Entry = Mandatory
Length of Input field = 0008
Uncheck ready for input.
Note: Here I'm using based on SY-DATUM, for your requirement you can change the LOGIC. Insted of SY-Datum you can pass your Date.
WHEN 'ZNO_MNTH'.
*ZDATE = SY-DATUM.
DATA: NODAYS TYPE INT1.
LOOP AT i_t_var_range INTO loc_var_range.
IF sy-subrc = 0.
CLEAR: l_s_range.
CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
EXPORTING
IV_DATE = SY-DATUM
IMPORTING
EV_DAYS = NODAYS .
L_S_RANGE-LOW = NODAYS.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
ENDLOOP.
In Report you just gve text variable and check it, don't give any Alphabets in heading, just give this Text Variable.
Thanks
Reddy -
Numeric Variable with USER-EXITS
Hi all,
I've created a Variable which type is numeric values in BPS0 and it's value is from a USER-EXITS,ex. Z_FUC_A, in my Z_FUC_A there's a export PARA which name is CNT and it's type is UPC_Y_VAR_NUMBER,in Z_FUC_A,I'm sure CNT has got it's value,asume CNT =100.but in BPS0,the Numeric Variable can't got this value,it's always 0.000000,I don't know why.
anyone can help me,thanks alot.I solve this by myself,thx everybody
-
How to find if 1000 variables have user exit or not
Hi could you please let me know any table
to find if a list of variables In bex have a user exit or not .
actually i have 7000 variables and want to document if these variables have a user exit or not for Reporting Documentation
Wuld really appreciate your help
Thanks and regards
NovinoHi,
See following tables related to Rpeorts, so check in that tables to find the Variables and properties
Use RSZGLOBV table and there give OBJVERS = A and VPROCTP = 3 or 4 then execute it and se eth variables, all that are SAP/Customer Exit varaibles.
RSZELTDIR Directory of the reporting component elements
RSZELTTXT Texts of reporting component elements
RSZELTXREF Directory of query element references
RSRREPDIR Directory of all reports (Query GENUNIID)
RSZCOMPDIR Directory of reporting components
RSZRANGE Selection specification for an element
RSZSELECT Selection properties of an element
RSZELTDIR Directory of the reporting component elements
RSZCOMPIC Assignment reuseable component <-> InfoCube
RSZELTPRIO Priorities with element collisions
RSZELTPROP Element properties (settings)
RSZELTATTR Attribute selection per dimension element
RSZCALC Definition of a formula element
RSZCEL Query Designer: Directory of Cells
RSZGLOBV Global Variables in Reporting
Thanks
Reddy -
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 -
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 -
Creating delivery, can I check the sales order's field using user-exit or ?
Hi dear.
When I create a delivery in VL01N or other transactions, I want automatically to check the sales order's some field and to decide whether create or not.
Can I use user-exit for that?
Or other solutions is there?
Thanks regardsYes your requirement can be achieved thru a User Exit.
There are many User Exits available in Delivery as listed in the link below:
https://wiki.sdn.sap.com/wiki/display/ERPLO/SDUserexits
The selection of necessary User Exit is based on your specific requirement.
Also if you want to check some feild of Sales Order whether it is completed or not, then you can also use Incompletion Procedure in Sales Order, which will make sure that no Sales Order is saved until the end-user enter data in those feilds.
Hope this helps...
Thanks,
Jignesh Mehta -
Can we assign multiple SAP alias to one Enterprise user?
Hi,
Customer has a request to assign multiple SAP roles (imported to BOE) to an Enterprise user. The purpose to do this is to be able to refresh different reports reporting off different SAP system by one single user.
Can the above been done by any kind of configuration or it's not possible at all?
thanks and regardsYes, he wish to assign several SAP users from different SAP system to one Enterprise user.
Actually customer wants to assign multiple SAP alias (from different SAP system) to one Enterprise user. (In this case, does it mean he needs to enable SAP authentication for multiple SAP system?) And then he can use the Enterprise user to refresh any reports, e.g report from BOE, and reports from different SAP system.
Can the above be done through any configuration?
thanks and regards
nora -
OLAP Variable with user exit for Infopackage Selection 0fiscper
Hi Frds/ Guru's ,
I have a requirement to use a OLAP Variable for Fiscal year period 0fiscper(Characteristic ) in the Infopackage Selection. . I need to extract the data for Previous Year and Current Year , that is to be automatically selected with a OLAP Variable . The standard one's provided by SAP are not satisfying my requirement,as they are getting populated with SAP Exit and I am not getting the ranges .I am planning to create a variable and use the processing type as Customer Exit and Populate it with ABAP code in respective Enhancement RSR00001.
Even Can I create a ABAP Routine ? Please suggest me which is better to do in respect to performance of dataload , will be really glad if anyone can provide some code for doing this as u might have faced the situation sometime .
I have checked with all the threads available , could get some idea but will be really thankful if u gimme some hints in writing the code , at Exit level and routine level .
Thanks,
Krishthnx
Maybe you are looking for
-
I would like a jukebox type of audio player and would hope it can stay perhaps in the top or bottom inch of the screen. I would like this to not be affected by which page or chapter one navigates too. Thanks
-
How can I download YouTube in my I pad 2, How can I download YouTube in my I pad 2
Hi I am trying to download you tube from app store but there is a message shown that this application requires ios6.0or later, you must update to iOS 6.0 in order to download and use this applicatiom
-
I am getting REP 1202 REP-1202: ID attribute of rw:id tag is not unique. REP-1202: ORACLE logon not specified. we are using rwservlet with authentication using key map /cgicmd.dat config. the problem is that we are getting only for certain users this
-
Hi All, Could anyone tell me which server is used for 'BO Explorer' & where we can check? Regards,
-
Goods Issue for Movement Type 281
Hi, Can anyone suggest me how to use MB_CREATE_GOODS_MOVEMENT to post goods for Mvmt Type 281. Please give me Sample data as i'm getting errors with data. Thanks in Advance, Anjani.