Help with Customer Exit in ECC box
I have created the project successfully, thanks to Mr. V. but now when I go into CMOD and double click on 'INCLUDE ZXRSAU01'. I get the message that says Would you like to create an object? I am trying to put something there that can point CMOD to programs that I will write for each datasource in SE38 individually. How can I accomplish that task? thanks.
Try using this code:
data:l_found,
l_prog_name type sy-repid.
CONCATENATE 'ZBWM_' i_datasource INTO l_prog_name.
PERFORM execute_user_exit IN PROGRAM (l_prog_name)
TABLES I_T_SELECT
I_T_FIELDS
C_T_DATA
C_T_MESSAGES
using i_updmode
changing
l_found
IF FOUND.
if l_found = 'X'.
exit.
endif.
Regards,
Arminder
Similar Messages
-
Help with Customer exit variable
Hi Guys,
I need your urgent help. I have a requirement where I need to create a variable (on CALDAY) in a report which should use the input value given for another variable (created on CALMONTH). To put in words more clearly, CALMONTH is a variable that is mandatory for input but the CALDAY variable should not appear on the selection screen. I was told that I should write a customer exit to make this happen. So can someone please explain me the process of creating a customer exit and give me the code.
WHEN CALMONTH values are selected to be 07/2006 - 08/2006... CALDAY values should be 07/01/2006 to 08/31/2006.
CALMONTH is user entry, mandatory, range and multiple selection variable.
Early reply is highly appreciated and duely rewarded. Please let me know if I am not clear about the requirement. Thanks a bunch in advance.Let us say, user enters multiple ranges for the month, you would want corresponding date ranges for the same, right?
data : w_date like sy-datum.
case I_VNAM.
when 'ZCALDAY'. " Calday var
loop at i_t_var_range into LOC_VAR_RANGE
where iobjnm = 'ZCALMONTH'.
WA_RANGE-SIGN = 'I'.
wa_date+2(6) = loc_var_Range-low.
wa_date+0(2) = '01'.
wa_range-low = wa_date.
if loc_var_range-high eq space.
WA_RANGE-OPT = 'EQ'.
else.
wa_range-opt = 'BT'.
wa_date+2(6) = loc_var_range-high.
wa_date+0(2) = '01'.
wa_date = wa_date + 31.
wa_date+0(2) = '01'.
wa_date = wa_date - 1.
wa_range-high = wa_date.
endif.
append wa_range to e_t_range. clear wa_range.
endloop.
endcase.
This should do. -
HI Guys,
I am trying to create a Customer Exit in Bex on employee number (zempno) and the technical name of my Customer Exit is Zempnum.
What i am trying do is, who ever logs in and executes the query, he should get his relavant data, meaning if the employee login he should get his own data, or if the supervisor logs in he should get all the employess under him.
When i am trying to execute the query i am getting the below error.
Error: Error for variable in customer enhancement ZEMPNUM
Diagnosis:
This internal error is a deliberate termination, since a program status has arisen, that is not allowed to occur.
The error has arisen for variable ZEMPNUM in the customer enhancement .
Procedure:
Please check your customer enhancement.
Procedure for System Administration
Notification Number BRAIN 649
Below is my code
*& Include ZXRSRU01
data : itab like /BIC/AZHRPE00100 occurs 0 with header line .
data : zuid like /BIC/AZHRPE00100-/bic/zempno.
data region type /BIC/OIZCDOTREG1.
break-point.
case I_VNAM.
WHEN 'ZEMPNUM'.
DATA: L_S_RANGE TYPE RSR_S_RANGESID.
DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
IF I_STEP = 2. "before the popup
DATA username(20) type c.
username = sy-uname.
break-point.
select single /bic/zempno from /BIC/AZHRPE00100 INTO zuid where /bic/zuserid = username.
if sy-subrc = 0 .
select * from /bic/azhrpe00100 into table itab where /bic/zempno = zuid.
endif.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = ZUID."low value, e.g.200001
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'eq'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDIF.
ENDCASE.HI,
This is the update code, but still i am getting the same error.
*& Include ZXRSRU01
DATA: L_S_RANGE TYPE RSR_S_RANGESID,
LOC_VAR_RANGE LIKE RRRANGEEXIT. " This is Global
data : itab like /BIC/AZHRPE00100 occurs 0 with header line.
data : temp_zempno like /BIC/AZHRPE00100-/bic/zempno.
*region type /BIC/OIZCDOTREG1,
data : itab_empno like standard table of temp_zempno.
*itab_empno like /BIC/AZHRPE00100-/bic/zempno.
*break-point.
case I_VNAM.
WHEN 'ZEMPNUM'.
IF I_STEP = 1. "After the popup
*break-point.
select single /bic/zempno from /BIC/AZHRPE00100 INTO temp_zempno
where /bic/zuserid = sy-uname.
Check if he is the supervisor for any other employees
add them to the internal table
Check the syntax below.
if sy-subrc = 0 .
if sy-subrc = 0 .
select /bic/zempno from /bic/azhrpe00100 into table itab_empno where /bic/zspnm = temp_zempno.
*select /bic/zempno from /bic/azhrpe00100 into table itab_empno where /bic/zspno = temp_zempno.
endif.
endif.
*Add Own Employee number to the internal table
*Check the syntax below
Append temp_zempno to itab_empno.
*By now, all the employee numbers are added
to the internal tabe
*now loop at itab_empno and return all the values.
CLEAR L_S_RANGE.
loop at itab_empno into temp_zempno.
L_S_RANGE-LOW = temp_zempno.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
ENDIF.
ENDCASE.
Thanks,
kris -
Prob in text variable with customer exit
Hi to all
I am working in PA module in HR ,In my Report i have to count total number of trainee and lateral in given Date range that From date to To Date , Before that i have to calculate a Total Employee Strength before one day of From date , suppose user enter a 1st of April 2007 to 1st of jun 2007 , so Employee strength should be calculated on the 31march 2007, for that i have written custome exit , now i am getting a value also , for Display that date have a created a text variable with customer exit , but i am not able to get that date , it should be display strength as on 31march2007 , instead of it is displaying Strength as on 00.00.0000.I am giving a cod also
ls_range-sign ='I'.
ls_range-opt = 'EQ'.
ls_range-low = 'EB1A'.
append LS_Range to e_t_range.
WHEN 'ZPA_DATE'.
if i_step = 3.
READ TABLE I_T_VAR_RANGE INTO L_S_VAR_RANGE WITH KEY VNAM = 'ZPA_DATE'.
IF SY-SUBRC = 0.
ZTEST = L_S_VAR_RANGE-LOW.
ztest1 = ZTEST - 1.
export p = ztest1 to MEMORY ID 'VALUE'.
ENDIF.
endif.
WHEN 'ZFRMDAT'.
if i_step = 3.
ls_range-sign ='I'.
ls_range-opt = 'EQ'.
ls_range-low = ztest.
append LS_Range to e_t_range.
endif.
when 'ZPA_CDAT'.
if i_step = 3.
ztest1 = ztest - 1.
ls_range-sign ='I'.
ls_range-opt = 'EQ'.
ls_range-low = ztest1.
append LS_Range to e_t_range.
endif.
when 'ZPA_VAR3'.
if i_step = 3.
ztest1 = ztest - 1.
import p = ztest1 from memory id 'VALUE'.
concatenate ztest16(2) ztest14(2) ztest1+0(4) into date separated by '.'.
move date to temp.
move 'Hello' to temp.
ls_range-sign ='I'.
ls_range-opt = 'EQ'.
ls_range-low = temp.
append LS_Range to e_t_range.
endif.
Please help me to come out
ThanksHi Stefania,
to me it looks like your local variable num_mese is not defined with the correct data type.
Try to change
if num_mese = 09 to if num_mese = <b>'</b>09<b>'</b>,
same for 10 -> '10', 11 -> '11'.
If that does not help please let me know your coding where you define the type of num_mese (DATA statement).
Regards
Stephan -
Formula Variable with customer exit
Hi,
can we use Formula variables with customer exit based on characteristics(ex Bill date)? if yes, can you guys help me on this.
Thanks
kriYes , you can use a formula variable with customer exit based on characteristics .
Depends on the requirement what you want to show in the formula variable ,
Eg : if you want to show the max fiscal year period , in that case :
create a new formula in the keyfigure section of your query , go to edit , you can see formula variable below the keyfigures ,
right click on the same and create new formula variable :
Write the code for the formula varible in the backend as we do for normal customer exit varaible :
for this e.g the code will be :
FORM get_variable_value
tables E_T_RANGE type RSR_T_RANGESID
using I_VNAM type RSZGLOBV-VNAM
I_VARTYP type RSZGLOBV-VARTYP
I_IOBJNM type RSZGLOBV-IOBJNM
I_S_COB_PRO type RSD_S_COB_PRO
I_S_RKB1D type RSR_S_RKB1D
I_PERIV type RRO01_S_RKB1F-PERIV
I_T_VAR_RANGE type RRS0_T_VAR_RANGE
I_STEP type I.
DATA L_S_RANGE LIKE LINE OF E_T_RANGE.
DATA loc_var_range LIKE rrrangeexit.
Data : l_inPer TYPE string.
IF i_step = 1.
Select min( distinct FISCPER )
from /BIC/A(DSO name)
into l_minper .
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
l_s_range-low = l_minper .
APPEND l_s_range TO e_t_range.
endif.
drag the formula variable in the new formula created and exexcute the query , you will be able to see the output .
This is just an example , your code will differ as per your requirement . -
Hello,
I have created a query with customer exit variable.this variable calculates cumulative month from the beginning of the year. this variable depends on another regular variable 0PCALMON (single value, mandatory). i also use this variable in the query to show the month itself.
<b>the problem is as follow:</b>
until yesterday the 0PCALMON variable pop up normally, but now the variable doesn't pop up at all!
Does anyone have an idea?
Thanks,
MayaHi,
The variable may be personalized with some value.
<b>To remove the personalization for a user:</b>
Step 1: RSA1 -> Search for ODS 0PERS_VAR
Step 2: Manage -> Contents ->selective deletion
Step 3: Put the user to remove the personalization
http://help.sap.com/saphelp_nw04/helpdata/en/01/42c73c13b0ce5be10000000a114084/content.htm
Regards
Happy Tony -
Characterstic variable with customer exit
Can u some bady help me.
How to express about Characterstic variable with customer exit
Edited by: chenna reddy on Aug 7, 2008 9:48 PMHi,
The variable may be personalized with some value.
<b>To remove the personalization for a user:</b>
Step 1: RSA1 -> Search for ODS 0PERS_VAR
Step 2: Manage -> Contents ->selective deletion
Step 3: Put the user to remove the personalization
http://help.sap.com/saphelp_nw04/helpdata/en/01/42c73c13b0ce5be10000000a114084/content.htm
Regards
Happy Tony -
Formel Variable - how to fill with Customer Exit from control table
Hello Experts,
I have create in BEx-Analyser a formel Variable ZEXRATE1 filled through Customer Exit. In BW I had a "control tabel" with keyfigures.
In the query definition I have include 0FISCPER, 0FISCVARNT and 0VTYPE. This
are the keys which should give the values for the selectstatement to select my keyfigure from the "control table" to fill ZEXRATE1.
If it possible to do with Customer Exit (CMOD -> RSR00001 -> ZXRSRU01) or do I have to implement a Bapi. Perhaps someone can give me a code example.
Regards DieterHi,
Code may look like this
WHEN 'ZEXRATE1'.
check i_step = 2.
LOOP AT I_T_VAR_RANGE INTO L_S_RANGE.
CASE L_S_RANGE-IOBJNM.
WHEN 'ZFISCPER'. GV_ZFISCPER = L_S_RANGE-LOW.
WHEN 'ZFISCVARNT'. GV_ZFISCVARNT = L_S_RANGE-LOW.
WHEN 'ZVTYPE'. GV_ZVTYPE = L_S_RANGE-LOW.
ENDCASE.
ENDLOOP.
SELECT SINGLE RATE into INTO GV_RATE
FROM ZTABLE
WHERE 0FISCPER = GV_ZFISCPER
AND 0FISCVARNT = GV_ZFISCVARNT
AND 0VTYPE = GV_ZVTYPE .
Assumptions : ZTABLE name of control table
ZFISCPER name of variable represents fiscal period
'ZFISCVARNT' name of variable representing fiscal year variant
'ZVTYPE'. name of variable representing value type
Hope that helps.
Regards
Mr Kapadia
Assigning points is the way to say thanks in SDN. -
Error while trying to Execute the Query with Customer Exit
Hi Experts,
I am having a Query with Customer Exit, it is working fine for all the Employess, except for one. When i try to remove the Customer Exit it is working for her too. Below is the error i am getting.
system error in program SAPLLRK0 and form RSRDR; CHECK_NAV_INIT_BACK
Thanks,
Kris.Hello Kris,
Are you working with multiprovider? Please check if OSS notes 813454,840080 or 578948 are applicable in your case.
Regards,
Praveen -
Variable creation in bw with customer exit
hi experts,
how to create a variable in bw with customer exit?Hi
Create a variable with Processing type as customer exit.
Then Go to Se38 and ZXRSRU01 program in change mode and there you write the necessary coding how your customer exit variable should process.
else you can access the include function via CMOD also with selecting the enhancement for reports.
Regards
RaM -
Hierchies and hierchies node with customer exit?
hi friends,
what scenerio we use hierchies and hierchies node variable with customer exit ?
Thanking u
suneel.Hierarchy variables represent hierarchies. You can use them wherever
hierarchies can be selected.
Hierarchy node variables represent a node in a hierarchy. You can use them as
an alternative to hierarchy nodes as fixed values for restricting a characteristic.
If you use a hierarchy node variable, you can make selections by hierarchy
node when you use the query.
The Customer Exit processing type for variables enables you to determine
values for variables by means of a function module exit. The function
module used is EXIT_SAPLRRS0_001.
You create a project in transaction CMOD by selecting the SAP
enhancement RSR00001 and assigning this to the enhancement project.
Activate the project.
WHEN 'HIERARCHY'. " Hierarchy variable
CLEAR L_S_RANGE.
L_S_RANGE-LOW = 'MY HIERARCHY'. " hierarchy name
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
-> Only dependents of hierarchy 'MY HIERARCHY'
WHEN 'HNODE'. " Hierarchy node variable
CLEAR L_S_RANGE.
L_S_RANGE-LOW = 'DEPT1'. " Node name
L_S_RANGE-HIGH = '0HIER_NODE'. " InfoObject
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
-> Node 'DEPT1', that cannot be posted to
WHEN 'HNODEVAL'. " Hierarchy node variable
CLEAR L_S_RANGE.
L_S_RANGE-LOW = 'LEAVE1'. " node name (node is a leaf)
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
-> Node 'LEAVE1' (leaf)
Regards
Naga -
Help with date validation on input boxes.
I need some help with date validation on input boxes.
What I�m trying to create is a form where a user inputs dates and then the rest of the form calculates the other dates for them.
i.e. � A user inputs 2 dates (A & B) and then a 3rd date which is 11 weeks before date B is calculated automatically.
Is this possible and if so how do I do it ???
ThanksHi,
to get third date try this:
java.util.Date bDate = ...;
Calendar yourCalendar = new GregorianCalendar();
yourCalendar.setTime(bDate);
yourCalendar.roll(Calendar.WEEK_OF_YEAR, -11);
java.util.Date cDate = yourCalendar.getTime();Regards
Ldinka -
Hello All,
I need some help with custom tables. I have created a custom table to maintain names and I also did table maintenance generation so that the user can maintain names in this table using SM30 transaction.
The question is, in my program on the selection screen when the user press F4 I need to display the values maintained in this custom table...
Can anyone help me with this.
Thanks
PavanIf I understood you correctly, you have a program in which one or some of the selection screen fields refer to a custom database table field(s).
You want to implement a F4 functionality.
Fill an internal table with the values you want to show.
Call the function module 'F4IF_INT_TABLE_VALUE_REQUEST' in the event AT SELECTION-SCREEN ON VALUE-REQUEST FOR MYPARAM as follows.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = MYITAB-FIELD
dynprofield = MYSELSCREENPARAM
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
tables
value_tab = my_f4_itab.
Srinivas -
Variable multiple single value filled with customer exit used in FOX form.
Hi guys, I definitly need your help in the following scenario:
I have variable (multiple single value) filled in a customer exit and use it in web template. There it is used in the drop down box for selecting a special date in the analysis item. And there comes the first question:Why the results from the customer exit are written in the way "date1; date2; date3" in one line? They should appear line by line in rows. How can I influence that? I tried both data binding types, "variable" and "characteristic".
Now a button raises a planning function with a fox formula which should write the selected date (from the drop down box) in a customer table using "call function".
I always get the error, that I need to restrict the variable to "single value". Why do I have to do that and if necessary how can I do that? Other planning functions without the fox formula also work properly with using the selection from the drop down box.
I appreciate you help.
Kind regards, Anja.Hi Vamsi.,
Try this code.
WHEN 'PREVIOUS_YEAR_1'.
IF I_STEP = 2. "after the popup of user entry
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'ZCURRENT_YEAR_PERIOD'.
break-point.
IF SY-SUBRC EQ 0.
WA_YEAR = LOC_VAR_RANGE-LOW+0(4). "Year
WA_MONTH = LOC_VAR_RANGE-LOW+5(3). "Period
WA_YEAR = WA_YEAR - 1.
CONCATENATE WA_YEAR wa_month INTO WA_FISC_PERD .
CONCATENATE WA_YEAR WA_MONTH1 INTO L_S_RANGE-HIGH .
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
ENDIF.
ENDLOOP.
endif.
Assing points if it helps you.
-- Selva -
Text Variable With Customer Exit ABAP Code
Hi Experts,
Could you please help me with the Logic/Code that i need to use in Calculacting The TEXT Variable Using CUSTOMER EXIT
I had a rolling report in which there are 14 Calculacted Keyfigures (Not Restricted KF),Which are
M-1,M-2,M-3,M-4,M-5........M-14
My requirment is to get the MMM.YYYY based on Sy Date as a title of the column
In MAY2009
M-1 represents (Current Month -1) APR2009
M-2 represents (Current Month -2) MAR2009
M-3 represents (Current Month -3) FEB2009
M-4 represents (Current Month -4) JAN2009
M-5 represents (Current Month -5) DEC2008
M-6 represents (Current Month -6) NOV2008
M-7 represents (Current Month -7) OCT2008
M-13 represents (Current Month -13) APR2008
M-14 represents (Current Month -14) MAR2008
In JUNE2009
M-1 represents (Current Month -1) MAY2009
M-2 represents (Current Month -2) APR2009
M-3 represents (Current Month -3) MAR2009
M-4 represents (Current Month -4) FEB2009
M-5 represents (Current Month -5) JAN2009
M-6 represents (Current Month -6) DEC2008
M-7 represents (Current Month -7) NOV2008
M-13 represents (Current Month -13) MAY2008
M-14 represents (Current Month -14) APR2008
Currently the Description of CKF is named as M-1,M-2..M-14.My requirment is to develop Text Variables that displays the description as MMMYYYYAmrit I think u72720 wanted to know how to get MMYYYY in the column headings.
this can be achieved using text variable easily.
steps
1. Right click and go to properties and click the button next to description box.
2. Add any existing text var from the list
3. now right click on this var in the desription box and select 'new variable'
4. give var name description
processing type ->replacement path
replace with char-> fiscal period (or calmonth if that is what restricted in your column)
select value as 'Key'
finish creation and use this var in all the selection column headings (remove M-1, M-2 etc)
you will get mmyyyy decriptions for every column depending on month of that column
Maybe you are looking for
-
Duplicating calendar events on windows 8
Hi, I have iCloud linked up to Outlook, and Outlook is linked to the Windows 8 calendar app. However, when viewing my calendar on windows 8, I see duplicate entries. But when I view it on Outlook.com, there are only single entries. What can I do? Als
-
Hi, I have a page with three report regions. Two (with column 1 and 2) on the region 4, and one in region 5 (with column 1). The report in region 5 starts 3 or 4 characters earlier on the page then the first report of region 4. How to get a correct o
-
HT6114 After loading 10.9.2 my mid 2011 MacAir keeps freezing every 5-10 minutes
After loading 10.9.2 my mid 2011 MacAir keeps locking up. Just a spinning pinwheel.
-
Stock Transfer from WM Sloc to non WM Sloc
Dear Friends We have 2 Storage location where one is WM relevant and other is not. when we do a stock transfer from WM S.LOC to Non WM sloc, the system creates a TR and when creating a TO system does not automatically consider FIFO or even does not
-
HT4211 i like to restore all my file last month
ill like restore my file in my iphone last month