Customer Exit For Variable
Hi Experts,
Currently i am using SAP BI 7.0, I dont have much ABAP knowledge.
Requirement : I need to create a Customer exit on variable to derive Fiscal period from the date entered manually by user.The date is in mm/dd/yyyy format and i need to derive Fiscal period from it.
Please assist me in doing this.
Best Regards,
Hi,
Assume date entered by the user is captured in user input variable: Variable_Date
Exit Call after User Input
<Declaration>
DATA : l_date1(7) TYPE c,
l_year(4) TYPE c,
l_month(2) TYPE c,
LS_RANGE_IN_LINE LIKE LINE OF I_T_VAR_RANGE,
d_date type sydatum.
<You need to write code in Step2 as you would be reading data entered by user.>
WHEN 2.
CLEAR l_s_range.
READ TABLE I_T_VAR_RANGE WITH KEY VNAM = 'Variable_Date' INTO
LS_RANGE_IN_LINE.
d_date = LS_RANGE_IN_LINE-LOW .
l_year = d_date(4).
l_month = d_date+4(2).
CONCATENATE l_year '0' l_month INTO l_date1.
l_s_range-low = l_date1.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
Regards
Lavanya
Similar Messages
-
How to find out query name in customer exit for variables
We use the same customer exit variable in different queries. In the customer exit we want to find out, which query has called the customer exit. With the technical query name we want to read a master data table entry.
e.g. If we come from query ZG1_TEST1 we want to use selection sel1
Query name | selection
ZG1_TEST1 | sel1
ZG1_TEST2 | sel2
How can we find out the query name in the customer exit for variables?
Thanks for your help,
EviHi Evi,
check out the structure I_S_RKB1D in your exit. It contains the query.
Siggi -
Wrting customer exit in variables
Hi Guys,
I have to change the code in customer exit for variables in reporting.i have to give inputrange in 0calmonth(01/06-07/06)and i have to get the output as 0calday(multiplevalues),can any body help me out.
Thanks
KiranKiran,
check this... i wrote the code as mentioed in my last post...
data:w_date(8).
CASE I_VNAM.
WHEN '0CALDAY Variable Name'
if i_step = 1. clear l_s_range.
read table I_T_VAR_RANGE where vnam = '0CALMONTH Varibale'.
l_s_range-low = concatenate i_t_var_range-low+'01'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
w_date = concatenate i_t_var_range-high '01' into w_date.
call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
exporting
DAY_IN = w_date
importing
LAST_DAY_OF_MONTH = l_s_range-high.
append l_s_range to e_t_range.
endif.
endcase.
check this code and let me know...change the Variable Names and keep capital letters.
i'm telling you again... if the 0CALMONTH variable range 200605 to 200608. code will populate the values for 0CALDAY like this...20060501 to 20060831.
all thes best.
Regards,
Nagesh Ganisetti. -
How to Write a CUstomer Exit for a variable in BEx
Hi,
How to write a customer exit variable in bex Query designer
Do i need developers key for this (If so what type of key do i need so that i can ask basis tean to generate)
Info Object: ZEXP_DTE (Expiry Date)
Variable on ZEXP_DTE :
ZEDTE
Type: Customer Exit
Can any one please tell me how to write a code in CMOD from this (Step-by Step)
Expiry Date > Current Cal Day
As arun said
'l_s_range-low = SY-DATUM.
l_s_range-opt = 'I'.
l_s_range-sign = 'GT'.
APPEND l_s_range TO e_t_range.'
I want to insert the above code for the above customer exit but as i am new to BW as ABAP please explain me what are the steps involved in CMOD
ThanksHi,
To write customer exit for a variable, you require Access key.
Contact your BASIS to get that.
Access Key,BASIS?
To write Customer exit,
User Exits
User Exit for Variable
/thread/809285 [original link is broken]
Hope these helps u...
Regards,
KK. -
How to create customer exit for characteristic variables and for text vars.
hi friends,
can anybody tell me how to create customer exit for characteristic variables and for text variables in bw ides system.
thanks,
sreeHi,
Please have a look at:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
Krzys -
Allowing customer exit interval variables to be "Ready for Input"
Hi BI fans,
I am looking to construct a Pie Chart where the default view will show the Year-To-Date data. At present, we are utilizing a customer exit variable (from the 0FISCPER characteristic) to carry out this task.
It is also required, however, to allow the user to manually adjust the start <u><b>and</b></u> end date of this period. Is it possible to have a customer exit interval variable which will allow the user to modify the start and end date and thus facilitate specified time periods?
I look forward to hearing from you,Hi
Use a BI Content variable like 0I_CFYTD - Year to Date For Current Fiscal Yearm, this variable is a interval variable and will default from fiscal period 1 to the current period.
If you edit the variable and set it to ready to input then when you run the report at the variable screen you can change the period on which you want to report.
hope this helps -
Customer Exit for Number of Days from 1 st Apr to last date of Month Enter
Hello BI Experts,
I have a requirement to count the number of days from 1 st April of current year to the last date of month entered.
For example : The use will enter say July 2010 or 003.2010 (as Fiscal Year Variant is V3 ).
Today is 14 July ...So we have to first find out the end date of the July month ie 31 st July
Then go to 1 st April 2010.
Now calculate the Number of days between 1 st April to 31 st July 2010.
I consider I have to create two Customer Exit variable
as below
1 st customer exit Bex variable say ZLY_MTH ( Last day of Month Entered)
and i_step = 1
2 nd Customer Exit BEx Formula variable say ZF_NUMDAYS ( Number of days between two dates)
i_step =1 .
Please provide me the logic for the above two.
Thanks in Advance.
Regards,
Amol KulkarniPSUDEO CODE:
1. Initially LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZMONTH'.
2. Get the Month input using VAR_MONTH2 = LOC_VAR_RANGE-LOW+4(2)
3. Now calculate Month+1: VAR_MONTH2 = VAR_MONTH2 + 1 (Refer **)
4. Now calculate the Current Year: VAR_YEAR = LOC_VAR_RANGE-LOW+0(4).
5. Get the 1st Day of the Month (VAR_MONTH2): CONCATENATE '01' '/' VAR_MONTH2 '/' VAR_YEAR INTO L_S_RANGE-LOW.
6. SUBRACT 1 (0DATE) from this DATE (This will give the logic for last day of the current month)
Insert this code also for using the date conversions
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = VAR_MONTH2
IMPORTING
OUTPUT = VAR_MONTH2.
Pls. check out this logic. Guess it would solve your need.
Thanks,
Arun Bala -
Customer Exit for Calendar Month based on the day (system Date)
Hello,
I need help in creating a customer exit for Calendar month without the user input. The logic is as follows:
For the BEx variable created with customer exit option and no user input:
If the day on the system date falls in between 1 to 14 take the calendar year/month value as previous month.
If the day on the system date falls in between 15 through 31 then take the calendar year/month as current month.
eg if report is run on March 24th2009 the calendar year/month variable should be calculated as 03/2009 (March 2009)
if the report is run on March 1st2009 the calendar year/month should be calculated as 02/2009 (Feb 2009).
The code should be effective when run in the first 15 days of Jan when the previous month would contain the previous year as well.
Thank You
SrishtiThanks Shanthi. I am trying to incorporate the logic when the query is run in beginning of Jan when the year should be the previous year.Following is the code.please let me know if it would work. Is there a way I can test it as well?
CASE I_VNAM.
WHEN 'ZCURCALMON'.
IF i_step = 2.
data: mm(2),
dd(2),
yy(4),
FM(6).
if sy-datum+4(2) EQ 1.
sy-datum(4) = sy-datum(4) - 1.
else.
sy-datum(4) = sy-datum(4).
endif.
if sy-datum+6(2) LE 15.
mm = sy-datum+4(2) - 1.
concatenate sy-datum(4) mm into FM.
else.
concatenate sy-datum(4) sy-datum+4(2) into FM.
endif.
l_s_range-low = FM.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
append l_s_range to e_t_range.
Endif.
ENDCASE.
Thanks
Srishti -
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 -
How to find the customer exits for a particular transaction
hi
how to find the customer exits for a particular transactionHi jyothsna vankadari ,
ther is a convenient way to find all BADIS called. You may know that BADIS are the newer version of EXITs.
I would suggest you to go for BADI.
Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
1) Goto se24 (Display class cl_exithandler)
2) Double click on the method GET_INSTANCE.
3) Put a break point at Line no.25 (CASE sy-subrc).
Now
4) Execute SAP standard transaction
5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
7) This way you will find all the BADIs called on click of any button in any transaction.
Regards,
Clemens -
How to select data from an aggregate in a customer exit for a query?
Hi,
I have written a virtual key figure customer exit for a query. Earlier the selection was from the cube, where there was severe performance issue. So I have created an aggregate, activated and have loaded the data.
Now when I select that data I find that the Key table is different in development and production. How do I resolve this.
My code is attached below. The table in developemnt is KEY_100027 and in production is KEY_100004. This code is activated and running in BW development server.
SELECT
F~KEY_1000041 AS K____035
F~KEY_1000271 AS K____035
F~QUANT_B AS K____051
F~VALUE_LC AS K____052
INTO (xdoc_date, xval1, xqty1)
UP TO 1 ROWS
FROM
FROM
*/BIC/E100004 AS F JOIN
/BIC/E100027 AS F JOIN
/BIC/DZMM_CGRNU AS DU
ON FKEY_ZMM_CGRNU = DUDIMID
JOIN /BI0/SUNIT AS S1
ON DUSID_0BASE_UOM = S1SID
JOIN /BI0/SCURRENCY AS S2
ON DUSID_0LOC_CURRCY = S2SID
JOIN /BI0/SMATERIAL AS S3
*ON FKEY_1000042 = S3SID
ON FKEY_1000272 = S3SID
JOIN /BI0/SMOVETYPE AS S4
*ON FKEY_1000043 = S4SID
ON FKEY_1000273 = S4SID
JOIN /BI0/SPLANT AS S5
*ON FKEY_1000044 = S5SID
ON FKEY_1000274 = S5SID
JOIN /BIC/D100004P AS DP
*ON FKEY_100004P = DPDIMID
ON FKEY_100027P = DPDIMID
WHERE
WHERE
( ( ( ( F~KEY_1000041 BETWEEN 20051230 AND 20060630 ) ) AND ( (
( ( ( ( F~KEY_1000271 BETWEEN 20051230 AND 20060630 ) ) AND ( (
S3~MATERIAL = <l_0material> ) ) AND ( (
s2~movetype BETWEEN '101' AND '102' OR
s4~movetype BETWEEN '921' AND '922' OR
s4~movetype BETWEEN '105' AND '106' OR
s4~movetype BETWEEN '701' AND '701' OR
s4~movetype BETWEEN '632' AND '632' ) ) AND ( (
S5~PLANT = <l_0plant> ) ) AND ( (
DP~SID_0RECORDTP = 0 ) ) ) )
GROUP BY
ORDER BY F~KEY_1000271 DESCENDING.
IF sy-subrc NE 0.
EXIT.
ENDIF.
ENDSELECT.
How do I transport the code and make it work?
Whats the reason that the two key fields are different.
I had transported the aggregate from development to production. Activated it and filled the data.
What is the way out? Please help.
Regards,
Annie.Hi Sonu,
The main task is to move the contents of the one internal table to another with some condition.
First sort and delete the duplicate entries from the First Internal table like below :
sort it_tab by material ascending date_modified descending.
delete adjacent duplicates from it_tab.
Then move that Internal table contents to another internal table.
Define another internal table with the same structure as you have first internal table and then
Second Step :
it_itab1 = it_itab.
If you are using seperate Header line and Body then you can do like below :
it_itab1[] = it_itab[].
This will fix the issue.
Please let me know if you need any further explonation.
Regards,
Kittu
Edited by: Kittu on Apr 24, 2009 12:21 PM -
Customer exit for Batch management
Hi experts,
I'm using customer exit for batch management for internal number assignment.
I need the Batch number as i mentioned below
DDMMYYB01
DD-Date
MM-Month
YY-Year
B-Block
01-Number
For this i need to give logic. How to give i'm not getting. This batch number creation will come at the time of GR.
Anybody help me?
NarenHi
Please use the user exit SAPLV01Z as I mentioned in your other thread, please go to SMOD to read its documentstion.
In SMOD, select the 'Documentation' and click 'Display', this will show the overview documentation.
Select the 'Componnet', then ciick the 'Display'. select each component and click 'Documentation Ctrl+F4) this will show the detailed documentation of them.
Best Regards.
Leon. -
Custom Exit for determining previous-year time range
Dear all:
I have a problem about custom exit:
We have created a new object for combining Fiscal Year/Month and Period. So the format will be shown as " yyyymmp"
now we have one requirement which is determining the same period but previous year based on user input. For Example, if user input start and end period as
"2006041" and "2006111". There are should be 2 custom exit which are able to convert the user input to be "2005041" and "2005111". We created 2 custom exit for telling the previous-year period.
Then based on this converted time range, we should be able to extract applicable data. But after testing, we cant get supposing result. The code is following:
We will be very grateful for any input. thank you all so much
Calculate (Start)previous year/month/period by current
*year/month/period
*user-entry calendar year/month/period
WHEN 'ZFACLV19'.
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = 'ZFACYMP1'.
CLEAR l_s_range.
LOC_YEAR = LOC_VAR_RANGE-LOW(4).
LOC_MONTH = LOC_VAR_RANGE-LOW+4(2).
LOC_YEAR = LOC_YEAR - 1.
L_S_RANGE-LOW(4) = LOC_YEAR.
L_S_RANGE-LOW+4(2) = LOC_MONTH.
L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW6(1).
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
EXIT.
ENDLOOP.
Calculate (End)previous year/month/period by current
*year/month/period
*user-entry calendar year/month/period
WHEN 'ZFACLV20'.
break ab_william.
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = 'ZFACYMP2'.
CLEAR l_s_range.
LOC_YEAR = LOC_VAR_RANGE-LOW(4).
LOC_MONTH = LOC_VAR_RANGE-LOW+4(2).
LOC_YEAR = LOC_YEAR - 1.
L_S_RANGE-LOW(4) = LOC_YEAR.
L_S_RANGE-LOW+4(2) = LOC_MONTH.
L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW6(1).
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
EXIT.
ENDLOOP.
SzuFenHi,
Try with following modifications:
ZYEAR1(4) = LOC_VAR_RANGE-LOW(4).
ZYEAR1(4) = ZYEAR1(4)- 1.
ZMONTH1(2) = LOC_VAR_RANGE-LOW+4(2).
CONCATENATE ZYEAR1(4) ZMONTH1(2) INTO LOC_VAR_RANGE-LOW(6).
With rgds,
Anil Kumar Sharma .P -
Problem in creating include program for customer exit for BC425_01
Hi,
I want to write a customer exit for transaction BC425_01. For identifying the include program for exit , i go to System->Status.There I double click on the program name(GUI).Then I perform a 'FIND' in main program for 'customer-function' keyword. I get 3 search results with "CALL CUSTOMER-FUNCTION '001' " , "CALL CUSTOMER-FUNCTION '002' " , "CALL CUSTOMER-FUNCTION '003' ".
Now i double click on CALL CUSTOMER-FUNCTION '001' and i am taken to the code of program where this function is called in MODULE cust_check INPUT. I double click on CALL CUSTOMER-FUNCTION '001' and then I am taken to the function module code which contains a single statement 'INCLUDE ZXBC425G01U01 .' .
Now I double click on this include program so that I can write my own code. But when i double click on it , a message displayed 'Program names ZX.. are reserved for includes of exit function groups'. Hence I am not able to creates this include program and write my coding.
Kindly Help
THANKSHi Amber,
Then you click enter button.It is asking to create object with that include name ZXBC425G01U01 in a pop-up.You should select YES option.It will ask package . Give the package name and save.Then include program is created and allowed you to write your own code.
Thanks,
Prasad GVK. -
Customer exit for IDOC_INPUT_SALESORDER_CREATEFR
Hi All,
I am doing the salesorder creation through IDOC_INPUT_SALESORDER_CREATEFR but i couldn't find any customer exit in this. I am in version 4.7.
Can anyone tell me if you find any user exit for this
Regards,Hi,
There are no customer exits for this particular FM I suppose.
If you require to modify you need to customize it and do the necessary changes.
Regards,
Sharath
Maybe you are looking for
-
Change decimal points in SD Condition type from 2 to 3, for EU
Hello, We have a slight problem with the amounts. We are using resource related billing in the project and to track some expenses, there are some condition types created. Since the currency is maintained as EU, the decimal places are maintained as 2
-
I suppose Cisco ISE sends a URL redirect to the switch and the switch presents it to the client in case of guest Access getting a URL redirect with User Acceptance Page (Wired Guests and not wireless). My question here is, Do we need to configure htt
-
Some PSD files won't display in Bridge
Why is it that some PSD files won't display a visible thumbnail in Bridge? Don
-
Hi i want to check the date format how can i? 2007/09/23 like this format or not
-
Can someone review this nTPV (POS system) PKGBUILD, please ?
Hi, This is my first serious attempt to make a PKGBUILD, and I would like if someone can review it and make comments, bugfixes, and all kind of feedback you want. The package is nTPV, a POS (Point Of Sale) system for pubs, discos, restaurants, .... I