BEx User Exit on Variable to populate with YTD values.
Hi All,
I have a multiple selection option variable on 0CALDAY that I want to prepopulate with the YTD range.
When the variable screen pops up it should display the range 01/01/2008 to 05/05/2008 (Current Date), however the user shall have the ability to change these populated values.
Thanks.
Hey thanks for the quick resposne. I was thinking of using the following code, but have the following questions, how do i know that the I_T_VAR_RANGE contains the current date that the report is on?
WHEN 'ZCCYTDIN'.
if i_step = 1.
read table I_T_VAR_RANGE INTO LOC_VAR_RANGE
with key VNAM = 'ZRPTDATE'.
clear l_date1.
clear l_date2.
move LOC_VAR_RANGE-LOW to l_date1.
Move First day of the year to low
concatenate l_date1+0(4) '0101' into l_date2.
L_S_RANGE-LOW = l_date2.
Move Calendar day entered by user to high
L_S_RANGE-HIGH = LOC_VAR_RANGE-low.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
endif.
Similar Messages
-
BEX User exit variables in WEBI
Hi Experts,
Need your help please.
I have a report in BEX with a user exit variable wich depends on other manual input variable.
In BEX it works properly but in WEBI it doesn't recognize the user exit variable.
It displays the error message: Not possible to determine the value for ZPD_YEAR_DAY variable
Error in DB. Error message is: failure to execute the query MDX SELECT { [Measures].[D9CS1W7FA8FEOHJ3T32H4QDZ4], [Measures].[D9DH9K1NITCZE4UY3J4UAETZ4], [Measures].[D9DH9K1NITDR2R6PF2KGCU88W], [Measures].[D9CS1W7FA8EMZV7CHJMV2AZPC], [Measures].[D9CS1W7FA8K0S7HNQBO5JARLS], [Measures].[D9CS1W7FA8G6D3UV4MI375S8W], [Measures].[D9CS1W7FA8HPQCIDRPDBC0KSG], [Measures].[D9CS1W7FA8IHEYU538SXEFZ28], [Measures].[D9DH28DWVF6742E64ZOL8FX34] } ON COLUMNS , NON EMPTY CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( { [0CALYEAR].[2010] } , { [0HAP_DOC_ID__ZAP_SUBST].[50], [0HAP_DOC_ID__ZAP_SUBST].[70] } ), [0INFOPROV].[LEVEL01].MEMBERS ), [ZDATE_AT].[LEVEL01].MEMBERS ), { [ZCPM].[X] } ), [ZPROMOCAO].[LEVEL01].MEMBERS ), [ZRESP_AVL__ZNIV_CARR].[LEVEL01].MEMBERS ), [ZRESP_AVL].[LEVEL01].MEMBERS ), [ZNIV_CARR].[LEVEL01].MEMBERS ), [0EMPLOYEE].[LEVEL01].MEMBERS ) DIMENSION PROPERTIES MEMBER_NAME, MEMBER_CAPTION, [0EMPLOYEE].[20EMPLOYEE], [0EMPLOYEE].[40EMPLOYEE], [0HAP_DOC_ID__ZAP_SUBST].[20HAP_DOC_ID__ZAP_SUBST], [ZRESP_AVL].[2ZRESP_AVL] ON ROWS FROM [ZAVDP_M01/ZPD_GPS_VARIAVEL_002] with error: Not possible to determine the value for ZPD_YEAR_DAY variable. (WIS 10901)
This ZPD_YEAR_DAY variable is the user exit variable.
Thanks in advance,
José SimõesHi!
I am following up to this post to see if there is something I am missing.
We have bex query with user exit variable and webi bi4sp04.4
In bex the user exit variable works correctly, in webi, it is ignored (the webi results are not filtered as they are in bex web results)
I have tried moving the variable to the char restrictions and removed ready for input - so there are now no prompts in bex query.
I have reviewed note 1611185 as well as other info on restrictions of BICS and webi, but cannot find a clear answer if bex user exit variables are supported in BI4 clients or not.
Lee Lewis -
Funtion Module for user exits for variables used in BEx Queries.
Hi,
This is for BW Query customer exit variable (zvar2) for include ZXRSRU01 and exit :EXIT_SAPLRRS0_001.
Can anyone please suggest the function modules that can be used to do the following.
1)Read value of zvar1 from selection screen whatever
user enters at run time.
2)How to define the zvar2 in the include. zvar2 is the
variable created in BEx to be populated from this
customer exit.
3)How to use case statment where once the value for zvar1
is determined then,
Case zvar1.
when zvar1 = 0 , then zvar2 = 10
when zvar1 = 1 , then zvar2 = 20
3) Assign zvar2 value as computed in the case statement.
Can anyone please help with the code to achieve this.
Any information regarding function modules that can help write user exits for variable reading and input will be greatly helpful.
Thanks
Sarah.Hi Sarah,
You don't need any FM for your issue.
Please try thie sample code :
DATA: VAR_INPIUT LIKE RRRANGEEXIT.
CASE I_VNAM.
WHEN 'ZVAR2'.
CLEAR L_S_RANGE.
IF I_STEP = 2."PROCESSED AFTER VARIABLE INPUT
*Reading value of ZVAR1
LOOP AT I_T_VAR_RANGE INTO VAR_INPIUT
WHERE VNAM = 'ZVAR1'.
CASE VAR_INPIUT-LOW.
*FILLING ZVAR2
WHEN 0.
L_S_RANGE-LOW = 10.
WHEN 1.
L_S_RANGE-LOW = 20.
ENDCASE.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
ENDIF.
ENDCASE.
Hope this helps
Joe -
Difference between bex user exit and macros in functionality?
Hi all,
I need to create a report on material master data. I created an infoset on 0material and 0mat_plant. In the requirem
ent, I have a report containing different material numbers followed by attributes in each row. the final column in each
row should be calculated using logic. the logic involves comparing different row values and arrive at final conclusion.
the logic comprises of large number of if conditions. so should i use bex user exit or excel macros?
what is the difference between user exit and macros in funcitonalilty?
is there an issue transporting the macro to Prod for end users to use?
any performance criteria?
Any how to documents ..will be of a lot of help
plz send them to [email protected]
Message was edited by:
ravi aHi,
Macros offer a powerful and flexible way to extend the features of MS Excel. You can either create a macro using VB code or Record a macro. Use Alt+F11 for creating macro using VB code.
You can refer to Microsoft help site or this link for more details:
http://www.taltech.com/support/sw_tricks/exmacros.htm
User-exits are empty subroutines that SAP Developers have provided for you.You can fill them with your own source code.Technically this is a modification.Customer exits are nothing but a include in customer name space will be provided in the function module which starts with CALL CUSTOMER.You can fill them with your own source code.Technically this is an enhancement.
look into following links for procedure to find and use user-exits transaction for finding user-exits is 'SMOD'
http://www.sapbrain.com/TUTORIALS/TECHNICAL/user_exits_tutorial.html
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm -
User Exit Formula Variable - to calculate #days of any month
Hello Team,
I need a column in my report layout which shows the #days of any month entered by the user. User entry 01.2014 to 03.2014 report should have 31 28 & 31 according to the Calendar month in the rows.
To achieve this I'm using a user exit formula variable in my local calculation. An Optional Interval User Entry variable on CALMONTH is also put in at the filter section.
I created a CLASS with 2 methods CONSTRUCTOR( vNam = 'ZC2C_DSONWDAYS') & GET_VALUES. We may also use FM /OSP/GET_DAYS_IN_MONTH but i need the code because I failed terribly.
GET_VALUES method code:
if i_step = 2.
DATA: wa like line of i_t_var_range[].
DATA: L_V_INDICATOR TYPE SCAL-INDICATOR.
data: begin of ccrange ,
iobjnm(30) type c,
sign(1),
opt(2),
low(7) type c,
high(7) type c,
end of ccrange.
data: l_s_range type rrrangesid,
no_of_wrkdays type i value 0,
startdate type d,
enddate type d,
startmth(2) type c,
endmth(2) type c,
startyr(4) type c,
endyr(4) type c,
endday(2) type c,
leapyear type i value 0,
dayofmth type syst-datum.
DATA: day type SCAL-INDICATOR.
loop at i_t_var_range into wa.
if wa-iobjnm = '0CALMONTH'.
ccrange-sign = wa-sign.
ccrange-opt = wa-opt.
ccrange-low = wa-low.
ccrange-high = wa-high.
exit.
endif.
endloop.
startyr = ccrange-low+0(4).
startmth = ccrange-low+4(2).
endyr = ccrange-high+0(4).
endmth = ccrange-high+4(2).
concatenate startyr startmth '01' into startdate.
* determine last day of the end month
if endmth = '02'.
leapyear = endyr mod 4.
if leapyear = 0.
endday = '29'.
else.
endday = '28'.
endif.
elseif ( endmth = '04' or endmth = '06' or endmth = '09' or endmth = '11' ).
endday = '30'.
else.
endday = '31'.
endif.
concatenate endyr endmth endday into enddate.
dayofmth = startdate.
IF startmth <= endmth.
startmth = startmth+1.
ENDIF.
* do it for all days in space of time
WHILE dayofmth <= enddate. "to date
CALL FUNCTION '/OSP/GET_DAYS_IN_MONTH'
EXPORTING
input = startmth
IMPORTING
output = no_of_wrkdays.
CLEAR l_s_range.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
l_s_range-low = no_of_wrkdays.
append l_s_range to e_t_range.
startmth = startmth + 1.
CONCATENATE startyr startmth '01' into dayofmth.
ENDWHILE.
endif.
endmethod.Hi Vasavi,
1) Create a FV to calculate no.of days like below, with calmonth in ref characteristics :
2. If you see number of days is an attribute of calmonth. Please enter that as below :
3. Create a formula with above variable and make sure calmonth is added in the row.
Its giving output like this :
I hope this will help you.
Thanks, -
Objects in BEx User Exit ???
Hello all,
I have come across these in some sample codes. I am new to ABAP coding.
Can anyone please take some time and explain what these objects mean in the BEx User Exit. I dont know if they are just some objects or tables. What is the use of them?. I would really appreciate if anyone can answer atleast a few of the below. Some of these might be just some declarations made by the programmer whilst coding.
E_T_RANGE
L_S_RANGE
RSR_S_RANGESID
L_S_VAR_RANGE
RRRANGEEXIT
I_T_VAR_RANGE
LOC_VAR_RANGE
RESULT-SIGN
RESULT-OPT
RESULT-HIGH
RESULT-LOW
Thanks in advance
S NSN,
This is the Function Module - EXIT_SAPLRRS0_001
Go to SE37 and enter above Function Module and You will find different Tap strips
Go to Import and Export Tab Strips you will find the mentioned Variables.
E_T_RANGE - Variables Value Table
L_S_RANGE - Structure (work Area of E_T_RANGE)
RSR_S_RANGESID
L_S_VAR_RANGE
RRRANGEEXIT
I_T_VAR_RANGE - Table
LOC_VAR_RANGE - Work Area of I_T_VAR_RANGE
RESULT-SIGN - I (Interval)
RESULT-OPT - EQ- Equal
RESULT-HIGH - To Value in the Variable
RESULT-LOW - From Value in the Variable
This is the sample code
XYZ - Is your customer exit variable
SY-DATUM - This will get System Date (Current Date)
WHEN 'XYZ'.
DATA: V_LOC TYPE D.
V_LOC = SY-DATUM.
IF I_STEP = 2.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = V_LOC.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDloop.
ENDIF.
Thanks
Sriram -
Regarding User Exits in VARIABLES
can any one let me know,
1> wen can we go for user exits in variables ?
2> any suitable examples for that ?
3> and can u people provide CODE for better Xplaination.?
Thanks and Regards,
Hawkin.Read this article, it will clear your concepts.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d -
How user exit is used to populate the Profit center field in Sales order?
Hi All,
Please let me know :
How the user exit is used to populate the Profit center field in the Sales order?
Please gurus answer as quickly as possible as I require this urgently.Hi,
To derive the correct profit center in the Sales Order, you customize in 0KEM.
Trust this helps much and do encourage our efforts!
Cheers! -
User Exits: Global Variables
Please help me in how to create User Exits: Global Variables
if there is step by step doc pls send it to my mail id
[email protected]I guess by default (if text is maintained) F4 for calmonth should show you key, short description and long description.
refer: Variable - Name of month instead of Number
Edited by: sam hennry on Mar 17, 2008 11:00 AM -
Authorization variable not filled with authorization values
Hello All
I post a similar message earlier this week, I thought that my issue was solved, but it was not.
I've got a workbook with 4 differents queries.
There as an authorizations variable in each query. This variable properties is as follows :
**General tab**
Type of variable : characteristic value
Processing type : authorization
Characteristic : company code
**Details**
Variable represents : selection options
Variable is : optional
Variable is ready for input : yes
I've followed recommandations from OSS notes 976680
My issue is : if I run each query individually, variable is filled with authorized values
If I run the workbook, variable is not filled with authorized value, so when end user run the workbook, BW consider that end user wants to see all data and get "No authorization".
I don't understand why variable within the workbook doesn't show the authorized values and why the queries do.
Any suggestion about this issue ????
Thanks
CatherineHi
thanks for replying
I ran the query with UserID from RSECADMIN and I could open the query. But if I want to select 0profit_ctr I get this error No authorization to characteristic values.
I checked the log and this is the message.
Value Authorization
InfoProvider FIGL_MP1
Value Authorization for Characteristic 0PROFIT_CTR
Building the Buffer...
Building the Buffer...
No Authorization for Values
thanks -
Query with user-exit hierarchy variable and input ready hierarchy node var.
Hello everyone.
we are using several hierarchies (2005, 2006 and 2007) of the same info object 0FUNDS_CTR (one for each fiscal year). We would like to be able to use same reports regardless of chosen fiscal year (selected hierarchy) and ever more, to select node inside proper hierarchy. At the moment reports use 3 parameters:
1) fiscal period from - fiscal period to
2) hierarchy name
3) hierarchy node
Our goal is to get report with only 2 parameters:
1) fiscal period from - fiscal period to
2) hierarchy node
since hierarchy name could be derived (user exit) from fiscal period.
When user selects hierarchy node he is being asked to select hierarchy name (despite of user exit for hierarchy name) and key date (populated with current date).
We would like to avoid step of user selecting hierarchy. Is it possible?
Any other approaches to problem would be appreciated.
Kind regards,
Josko.Hi Jörg,
As mentioned, I_STEP = 3 is processed once per query, not once per varaiable.
If this statement is placed within case-endcase for I_VNAM it never will be processed.
Please take a look on this, it might be helpful..
Regards
Joe -
User Exit is required to populate PO type in IDOC
Hi,
My requirement is:
DELVRY03 Idoc presently doesn't carry any field in which we can store a purchase order.
here i need to extend the idoc with a new segment with PO type as field and sales order number field.
I need to get Purchase document type field(BSART). from EKKO table ,
here i need to retrieve the PO number from the line item reference field LIPS-VGBEL., based on the PO number i need to get the EKKO-BSART.
in which exit i need to write the logic for this.
Pls help me on this ASAP.
Thanks,
SatishHi
Go to the related Function module for this IDOC type/Message Type/PROCESS CODE which you are using for this purpose
then in that Fun module search for the CUSTOMER-FUNCTION's which are nothing but the user exits where we write code to populate the custom segments and other values.
search for the relavent FUNCTION and write the above code.
Regards
Anji -
User Exit for CO11N to populate the Ref Order in Prod Order when Rework Ord
HI All,
I created a Production Order(100023) using TCode CO01 with 10 Qty.
When i am creating a Production Order confirmation using TCode CO11N, i Confirmed 9 Qty and 1 Qty for Rework Order, it is confirming the 9Qty and creating a new Production Order (100024) for 1Qty.
As per the requirement it is working fine. While system creating a Production Order (100024) for the Rework Qty, i need to populate the Reference Production Order number (100023) in the field Ref. Order in Control Data tab in the Production Order.
Can any one suggest me how to populate this field? Is this possible by any USER EXIT or BADI ?
Or Can we do it by configuration?
Regards,Hey all: I already have solved it. This was solved using a batch input application: before is launched the MIGO transaction, we print the smartorm using ME38 transaction with SHDB.
-
Get hierarchy name in user-exit from variable
Hi everybody
I have a WebTemplate with different queris. The user can select the costcenter in the beginning. In a further query of the template I show all the orders regarding that costcenter. But with this concept I block all the orders with one user executing the template.
So now I want to select the orders that belong to the selected costcenter in a user exit (with a variable). This works fine when the user selects a costcenter.
But it is also possible that the user selects a higher node of the costcenter hierarchy. How can I get all the orders that are connected to a costcenter node?
So far I thought that I have to get all costcenter nodes that have the selected node as a parent (etc..) in the hierarchy table. But how do I find out which hierarchy is used by the query? I get the Variable name loc_var_range-vnam. And I know which table the hierarchy is in. But how do I find the correct HIEID?
or does anybody have a better suggestion to solve my problem?
Thanks in advance.
ChristopheHi Christophe,
I've written a code for finding the name of hierarchy using the node.
It's little bit big code, if send ur email id i can pass it to you.
hope that helps you.
regards
rajesh -
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
Maybe you are looking for
-
How to change the name of icloud mail ?
I have an iphone 6 and i have an apple id . but when I log on I get mail icloud with content : "Welcome to iCloud Mail . Your new email address is [email protected] . . You interference của am also access mail on the web at icloud.com . Sincerely , "
-
when I try to login to icloud I get a message that says my appleid is valid but it wont work for icloud. What do I do?
-
Profit Center Configuration for segment reporting
Hi Experts, We use flexible upload for first consolidation, at that time we take profit centers as prefix P company code eg., Company code: ABCD then profit center : PABCD In LDS mapping tab page for profit center configured move with constant as "P
-
XI, WebService Call, XML incoming request Umlauts go into "#"
Hi we have following problem. We have WebService defined in XI. Request XML file comes from external system to call WebService, and in one of the fields there is German Umlaut character. But in XI Monitoring this Umlaut is changed into "#" character.
-
Field length restrictions - any workaround possible?
Ladies and gents, Here is a question for which I would love to get some feedback. In an ongoing project, i'm migrating from a legacy system that has document numbers longer than 30 characters. I'm looking to see whether you have any suggestions as ho