Customer exits for varibles in BeX selection screen
Dear All,
I have two fields in BeX variable screen - 'Emp_id' and 'Dep_id'.
The entry for 'Emp_id' is mandatory. But at the same time, if someone does not enter values for it, it should ask for 'Dep_id' atleast. If both are blank, then no execution.
In short, if both fields are blank then don't run the report. If one of them has a value, then run the report.
I know that for this case of mine, customer exit is the only way.
Can anybody please write me the exact syntax of the exit as I am least aware of writing the exits. Thanking you all.
Points will be assigned.
Thanks,
Srinivas
Hi,
Code should as below.
IF I_STEP = 3 .
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'VAR1' OR
VNAM = 'VAR2' .
ENDLOOP.
IF SY-SUBRC NE 0 .
CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
EXPORTING
I_CLASS = 'RSBBS'
I_TYPE = 'E'
I_NUMBER = '000'
I_MSGV1 = 'Enter Either one of the variable'
EXCEPTIONS
DUMMY = 1
OTHERS = 2.
RAISE NO_PROCESSING.
ENDIF.
ENDIF.
Similar Messages
-
Exits for saving variant of selection screen
Hi,
My need is that I have to validate the name of the variant on saving. If the name is not in compliance then we will put a tick on a checkbox on screen and save it. So to do this can anyone suggest me the exit name or BADI name.
thanks in advance.Hi,
Code should as below.
IF I_STEP = 3 .
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'VAR1' OR
VNAM = 'VAR2' .
ENDLOOP.
IF SY-SUBRC NE 0 .
CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
EXPORTING
I_CLASS = 'RSBBS'
I_TYPE = 'E'
I_NUMBER = '000'
I_MSGV1 = 'Enter Either one of the variable'
EXCEPTIONS
DUMMY = 1
OTHERS = 2.
RAISE NO_PROCESSING.
ENDIF.
ENDIF. -
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 -
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. -
'Text' of a variable in Bex selection screen
Hello,
We have a customer exit variable in Bex Query selection.it is mandatory,ready for input,interval which is on 0CALMONTH2.
In Bex selection screen i am not getting text of default/entered months.
for example: if default value is 2 to 4,then text would be FEB to APR.
what could be the reason?how to get teaxts of entered values?
(we have one more customer exit variable on 0CALMONTH2 which is single value and it shows text of enterd values in bex selection)
In web it is working fine.
RakeshHi,
Try to create an another customer exit variable for 0CALMONTH2 with mandatory,ready for input,interval. refer the abap code of the another customer exit variable(single value variable) of 0CALMONTH2 which you have mentioned in the bracket and modify the abap code based on the selection - interval. hope it helps.
Regs,
Vachan -
BEX Selection screen in an endless loop when pressing the Check button
Hello SDN
Has anyone faced this issue before where the BEX selection screen seems to get its knickers in a twist and goes into an endless loopp when the Check button is clicked? It goes through fine if I directly hit execute.
Anyone ? Any ideas ?Never seen it before but here is something to check..
Does the query have a variable with processing type of customer exit. If yes, look at the user exit code in step 3 which is used for input value validation.
Vineet -
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. -
Change of variable text in BEx selection screen
Hi all,
in our BW system the key users are allowed to create queries and also create variables. In some cases, especially for often used info objects like 0DATE the number of variables is increasing very quickly. The reason for this is, that 0DATE is used for a big variety of meanings e.g. delivery date, order date, invoice date etc.
So the users always create new variables only to have a meaningful description in the BEx selection screen, because they do not want only "date" to be displayed here. As result we have many different varianbles with exactly the same technical settings with only different names.
So my question is: Is it possible to change the diplayed text in the selection screen for each query without having to create a new variable?
Thanek you and best regardsHi Stephan,
Changing the diplayed text in the selection screen for each query is not possible.You have to create a new variable for each query.
Rgds,
Murali -
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. -
Popup Menu(F1- Help values) is not diaplying for a char at selection screen
Hi,
After executed the query, we are trying to get help (F4) values for info object Employee Group (EMPLGROUP) in the selection screen but it is taking long time nearly 1 hr and getting timed out. And for other Chars we are getting the help popup menu.
for your info...
There are only 6 values are there in Employee Group master data table.
And the characteristic settings in Business Explorer tab are as the following,
Display u2013 Text
Text type u2013 Default
BEx description u2013 Short description
Selection u2013 No selection Restriction
Query Def. Filter Value Selection u2013 Only values in Infoprovider
Query Execution Filter Val. Selection u2013 Only Posted Values for Navigation
Can any one please suggest us which settings we needs to change to get the popup menu (help values) for Employee Group at selection screen and what is the reason for not displaying the help popup menu?.
and can any one explain us about the setting "Query Execution Filter Val. Selection u2013 Only Posted Values for Navigation"
Thanks & Regards,
Raju. EHi,
I am getting the data aslo for Employee Group in the query when I drill down that char.
But I dont know why it is taking long time and getting time out to display the popup menu for help values at selection screen.
I think this is due to the below setting only at char level,
Query Execution Filter Val. Selection u2013 Only Posted Values for Navigation
and there are 3 opstions for the above seeting as below,
1. Only values in master data
2. Only values in Infoprovider
3. Only Posted Values for Navigation
Can any one help me, which opstion will solve the issue and can any one explain me what is the difference between 2 & 3
Thanks,
Raju. E -
BEx Selection screen Hierarchy display (text - key)
Hi,
We have a new query deployed that uses several hierarchies in the selection screen.
When running the reports, the drop down for the hierarchies on the variable selection screen displays the full text.
However, the users are more familiar with the key value and would prefer to see that. In the actual report, the keys are displayed.
I am trying to find where the default display can be set for the hierarchies on the BEx selection screen so I can show the key values?
Thanks!
Darryl
Edited by: Darryl Goveas on Nov 16, 2011 12:14 PMCreate a FM like below and a wrapper for it so you can call it as part of process chain; we load all of our hierarchies then call this:
FUNCTION ZBW_CHANGE_HIER_DISPLAYNAME.
""Local Interface:
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRET2
data: hieid(25) type c,
hienm(30) type c,
lgtxt(60) type c.
RETURN-TYPE = 'I'.
RETURN-ID = '01'.
Select each hierarchy from list table
select nhieid nhienm t~txtmd
into (hieid, hienm, lgtxt)
from rshiedir as n
join rshiedirt as t
on nhieid = thieid
where n~objvers = 'A'
and t~objvers = 'A'.
if sy-subrc = 0.
concatenate Key and Text
concatenate hienm '-' lgtxt into lgtxt SEPARATED BY space.
update table with new description
update rshiedirt
set TXTLG = lgtxt
where langu = 'E'
and hieid = hieid
and objvers = 'A'.
if sy-subrc = 0.
RETURN-NUMBER = '001'.
RETURN-MESSAGE = 'Successfully updated Hierarchy Descriptions.'.
else.
RETURN-NUMBER = '002'.
RETURN-MESSAGE = 'Error when updating Hierarchy Descriptions.'.
endif.
else.
RETURN-NUMBER = '003'.
RETURN-MESSAGE = 'Error when selecting Hierarchy Descriptions.'.
endif.
endselect. -
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 -
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 -
How to find CUSTOMER EXIT for a Standard SAP program
How to find CUSTOMER EXIT for a Standard SAP program
Hi
To introduce the techniques of enhancement in standard SAP system. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
They do not affect standard SAP source code.
When you add new functionality to your SAP System using SAPs exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAPs standard software package.
They do not affect software updates.
When you add new functionality to your SAP System using SAPs exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects names ensure that they will not be affected by any changes or new additions to the standard software package.
Customer exits are not available for all programs and screens found in the SAP System.
Any change made to an SAP object in a customer system is called a modification. Customers usually modify their systems for one of two reasons. Either they make changes to the SAP standard in order to adjust the R/3 System to their specific business needs (actual modifications), or they alter individual SAP objects in order to correct an error (as recommended in an SAP error note).
You should only modify the SAP standard if the modifications you want to make are absolutely necessary for optimizing work flow in your company. Be aware that good background knowledge of application structure and flow are important prerequisites for deciding what kind of modifications to make and how these modifications should be designed.
SAP application programmers create SAP enhancements in transaction SMOD using function module exits, menu exits, and screen exits.
Customers are given a catalog containing an overview of existing SAP enhancements. They can then combine the SAP enhancements they want into an enhancement project using transaction CMOD.
SAP enhancements are made up of component parts. These components include function module exits, menu exits, and screen exits. A specific component may be used only once in a single SAP enhancement (this guarantees the uniqueness of SAP enhancements).
Customer enhancement projects consist of SAP enhancements. Each individual SAP enhancement may be used only once in a single customer enhancement program (this guarantees the uniqueness of a customer project).
SAP application programmers preplan function module exits, menu exits, and screen exits for their applications and combine them to create useful enhancements for the R/3 System.
Customers create their own enhancement projects for their systems using SAP enhancements. You can customize the individual components of an enhancement project by creating your own include programs (for function module exits), texts (for menu exits), and subscreens (for screen exits). -
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
Maybe you are looking for
-
I need to tranfer music from my iPod to my iTunes Library.
I really need someone's help bad. Rececently my computer crashed and I lost all of my music in my iTunes library. I still have it all loaded onto my iPod. The problem is that most of my music was not purchased thru the iTunes store so I can't transfe
-
Save the export parameter as an excel or notepad file in ecatt
Hello, Que: I want to save the export parameter value to an excel or a notepad file in my ecatt script? Importing of notepad file can be handled as an external file variant input from test data container. But I am not able to export the value to a fi
-
Importing classes and performance
Is there any difference in performance between importing all the package and importing only the needed classes. I am doing an applet project and as it first must download the classes I wonder if it may be faster to import just the needed classes inst
-
Exeecuting Operating System Commands in Weblogic
Hi, as part of an offline process every time my database gets updated I have to call a tool ( Verity ) to create a collection. This is done from a Servlet where the Administrator simply clicks on a link and the verity collection is built and updated.
-
Target Namespace in a WSDL file
Hi, I had generated a JPD from a WSDL file using the "Generate JPD file" option in weblogic workshop. The WSDL file has a target namespace specified ("wli.abc.com"). When i access the JPD as a webservice using the WebService Proxy , the target namesp