Code for Customer exit in a variable is required
Hi Guys,
Document numbers are flowing in to two OD's. These doc numbers are available in 'X' and 'Y' ODS's.
We are missing some doc nos both the ODS's. we want to display those doc nos in a report.
We Created an infoset on these two ODS's.We want to write a Code for the Ccustome exit on this document number.
Can anybody suggest how to get these doc nos in areport.
Can anybody help me in writing a code on customer exit.
Pleas give suggestions how to display rhes doc nos in areport.
Thanks,
Nela
Hi,
case I_VNAM.
when 'ZPRYRPER'.
if I_STEP = '2'.
loop at i_t_var_range into temp.
append temp.
endloop.
read table temp with key vnam = '0S_FPER'.
if sy-subrc eq 0.
move temp-low to l1_period.
move temp-high to l_period.
endif.
if l_period-gjahr = 0000.
l_period-gjahr = 2020.
endif.
if l1_period-gjahr = 0001.
l1_period-gjahr = 1990.
endif.
CLEAR E_T_RANGE_WA.
l1_period-buper = '001'.
l_period-gjahr = l_period-gjahr - 1.
l1_period-gjahr = l_period-gjahr.
E_T_RANGE_WA-SIGN = 'I'.
E_T_RANGE_WA-OPT = 'BT'.
E_T_RANGE_WA-HIGH = L_PERIOD.
E_T_RANGE_WA-LOW = L1_PERIOD.
APPEND E_T_RANGE_WA TO E_T_RANGE.
endif.
Regards,
Marasa.
Similar Messages
-
Error in the ABAP Code for Customer Exit Variable
Could you please update me what is the wrong with the below ABAP Code developed for Customer Exit Variable in BW
i created a Variable (ZVWKNO) of Customer Exit,Single Value ,Mandatory and Variable is ready for input
In CMOD i had written the below Code:
When 'ZVWKNO'.
DATA: WEEK(2) TYPE N,
WEEKNO(2) TYPE N.
IF i_step = 1.
l_st_date = SY-DATUM.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = l_st_date
IMPORTING
WEEK = l_fn_week.
CHECK sy-subrc = 0.
WEEK = l_fn_week+4(2).
If WEEK 0.
WEEKNO = WEEK - 1.
l_s_range-low = WEEKNO.
l_s_range-sign = k_sign_inclusive.
l_s_range-opt = k_option_equals.
APPEND l_s_range to e_t_range.
ENDIF.
ENDIF.
But when i execute the query the default value is not populated with Week-1 No in the variable screen
Please update me what went wrong
ThanksCase ZVWKNO. "write this with out comments
When '1'. "write the value that needs to equal with value in varaible ZVWKNO after when in sungle quotes
DATA: WEEK(2) TYPE N,
WEEKNO(2) TYPE N.
IF i_step = 1.
l_st_date = SY-DATUM.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = l_st_date
IMPORTING
WEEK = l_fn_week.
CHECK sy-subrc = 0.
WEEK = l_fn_week+4(2).
If WEEK 0. "check this Week Minimum is '01' and Maximum '52'
WEEKNO = WEEK - 1.
l_s_range-low = WEEKNO.
l_s_range-sign = k_sign_inclusive.
l_s_range-opt = k_option_equals.
APPEND l_s_range to e_t_range.
ENDIF.
ENDIF.
Prabhudas -
Where do I write the code for customer exit variable?
Hi Gurus,
Can anyone tell me where and the procedure that I have to follow to get to the include ZXRSRU01 where I can write customer exit variable code.
I know its written in ZXRSRU01, but in my system it seems like its not active or does not exist. How do I get to start working in this include for customer exit variables?
Any help is appreciated. Thank you.
Regards
Reddyhi Reddy,
variable exit use enhancement RSR00001 not RSAP0001. EXIT_SAPLRRS0_001.
try to follow some steps in 'how to' doc related to this, and sample code may useful for you
https://websmp206.sap-ag.de/~sapdownload/011000358700002762582003E/HowToDeriveVariableValue.pdf
https://websmp206.sap-ag.de/~sapdownload/011000358700002765042003E/HowToVerifyVariableInput.pdf
INCLUDE ZXRSRU01 *
DATA: L_S_RANGE TYPE RSR_S_RANGESID.
DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
CASE I_VNAM.
WHEN 'CUMMONTH'.
IF I_STEP = 2. "after the popup
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
WHERE VNAM = 'MONTH'.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
L_S_RANGE-LOW+4(2) = '01'.
L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND L_S_RANGE TO E_T_RANGE.
EXIT.
ENDLOOP.
ENDIF.
ENDCASE.
hope this helps. -
Need a code for Customer exit for extractor 0WBS_ELEMT_ATTR
Hi Guys,
I need a code for following requirement.
I have appended some fields to standard extractor 0WBS_ELEMT_ATTR which normally takes data from PRPS table. But the new fields will be getting data from PRTE and PROJ table. with common keys. Following is my code which is not working. Please help me out, I am not good in abap. Please note some lines are commented.
Thanks,
H
CODE:::::
form 0wbs_elemt_attr tables i_t_data structure biw_prps.
data: it_wbs_prps like biw_prps occurs 0.
data wa_prps like it_wbs_prps.
data: begin of it_wbs_prps occurs 0,
PSPNR like prps-pspnr,
POSID like prps-posid,
PBUKR like prps-PBUKR,
IZWEK like prps-IZWEK,
USR10 like prps-USR10,
USR00 like prps-USR00,
USR02 like prps-USR02,
OBJNR like prps-OBJNR,
end of it_wbs_prps.
data wa_prps like it_wbs_prps.
data: begin of it_wbs_prps1 occurs 0,
PSPNR like prps-pspnr,
POSID like prps-posid,
end of it_wbs_prps1.
data wa_prps1 like it_wbs_prps1.
data: begin of it_wbs_prte occurs 0,
posnr like prte-posnr,
PSTRT like prte-PSTRT,
PENDE like prte-PENDE,
ESTRT like prte-ESTRT,
EENDE like prte-EENDE,
ISTRT like prte-ISTRT,
IENDE like prte-IENDE,
end of it_wbs_prte.
data wa_prte like it_wbs_prte.
data: begin of it_wbs_proj occurs 0,
PSPNR like proj-pspnr,
PLFAZ like proj-plfaz,
PLSEZ like proj-plsez,
end of it_wbs_proj.
data wa_proj like it_wbs_proj.
refresh: it_wbs_prte, it_wbs_proj.
*it_wbs_jest.
if i_t_data[] is not initial.
Get data from PRPS WBS Master Data
select pspnr posid PBUKR IZWEK USR10 USR00 USR02 objnr
into corresponding fields of table it_wbs_prps
from prps
for all entries in i_t_data
where POSID = i_t_data-POSID.
sort it_wbs_prps by posid.
Get data from PRPS1 WBS Master Data
select pspnr posid
into corresponding fields of table it_wbs_prps1
from prps
for all entries in i_t_data
where POSID = i_t_data-POSID.
sort it_wbs_prps1 by posid.
Get data from PRTE Scheduling Data for Project Item
if it_wbs_prps1[] is not initial.
select posnr PSTRT PENDE ESTRT EENDE ISTRT IENDE
into corresponding fields of table it_wbs_prte
from prte
for all entries in it_wbs_prps1
where posnr = it_wbs_prps1-pspnr.
sort it_wbs_prte by posnr.
endif.
Get data from PROJ Project Master Data
if it_wbs_prps1[] is not initial.
select pspnr PLFAZ PLSEZ
into corresponding fields of table it_wbs_proj
from proj
for all entries in it_wbs_prps
where pspnr = it_wbs_proj-pspnr.
sort it_wbs_proj by pspnr.
endif.
loop at i_t_data.
clear: wa_prps1, wa_prte, wa_proj.
read table it_wbs_prps into wa_prps with key
posid = i_t_data-posid binary search.
read table it_wbs_prte into wa_prte with key
posnr = wa_prps1-pspnr.
read table it_wbs_proj into wa_proj with key
pspnr = it_wbs_proj-pspnr.
i_t_data-zzPBUKR = wa_prps-pbukr.
i_t_data-zzIZWEK = wa_prps-IZWEK.
i_t_data-zzUSR10 = wa_prps-USR10.
i_t_data-zzUSR00 = wa_prps-USR00.
i_t_data-zzUSR02 = wa_prps-USR02.
i_t_data-zzPSTRT = wa_prte-PSTRT.
i_t_data-zzPENDE = wa_prte-PENDE.
i_t_data-zzESTRT = wa_prte-ESTRT.
i_t_data-zzEENDE = wa_prte-EENDE.
i_t_data-zzISTRT = wa_prte-ISTRT.
i_t_data-zzIENDE = wa_prte-IENDE.
i_t_data-zzPLFAZ = wa_proj-PLFAZ.
i_t_data-zzPLSEZ = wa_proj-PLSEZ.
modify i_t_data.
endloop.
endif.
endform. " 0wbs_elemt_attrHi,
it_wbs_prps1 .
If you are going to use this internal table to check for a null condition, shouldn't you first assign the data package to it?
For example, it_wbs_prps1 = i_t_data[].
Because you are now using it_wbs_prps1 to select data from a table and it doesn't have any data.
Please check.
-RMP
Edit : Please ignore this. I didn't see that you are actually filling the internal table. Sorry!
Edited by: RMP on Oct 18, 2010 12:16 PM -
Reg: ABAP code for customer exit variable
Hi Team,
I have a requirement to create a report based on an multiprovider 'TEST'.
Based on the input selection of Period; I need to define a Keyfigure X which will be a count of value available for that Period in one cube involved in the MProvider. E.g.: If for period 12, the value = 1 in the cube; then this keyfigure will give the count as 1 in the output of the report.
The second KF Y values are available in the second infocube directly: ibut should be displayed based on the value of the KF 'X' with logic as if X > 0 ; then the values should be read from the second infocube in the report. & if X <= 0; no values should be displayed.
Please help me with the ABAP code to be used in the query level.
Thanks & Regards
SnehaHi Sneha,
I would suggest the following
1.Please change the design the cube and include a key figure Zcount that would be incremented for each record.
Now as per the first requirement you need to get the count for a Input Period from First cube
This would be very simple to implement , all you have to do is restrict this KF with the Input characteristic/variable and also the First Infocube.
2.You can also use exception aggreation counter to address this requirement . Even in this case you need to include a dummy key figure in the cube and the exception characteristic would be the period in the Infocube.
But performance would be on downside when compared to the first one.
3.The second requirement is quite simple
Create a formula KF as follows
(KF1 > 0)*KF2 .
KF1 > 0 is a logical operation and it would always return 1 on success and 0 otherwise.
Hope this helps,
Regards,
James Harold. -
Hi Xperts,
can anybody give me the Correct Coding todisplay the month year in the format "Dec 2006".
WHEN 'ZT_PRVMT-1'.
Data : month_nam(3) type c.
IF i_step = 2.
CLEAR l_s_range.
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam EQ 'ZPPRVMTH'.
l_s_range-low = loc_var_range-low.
wa_month = loc_var_range-low+4(2).
wa_year = loc_var_range-low(4).
wa_month = wa_month - 1.
If wa_month = 00.
wa_month = 12.
wa_year = wa_year - 1.
Endif.
CASE wa_month.
WHEN '01'.
month_nam = 'JAN'.
WHEN '02'.
month_nam = 'FEB'.
WHEN '03'.
month_nam = 'MAR'.
WHEN '04'.
month_nam = 'APR'.
WHEN '05'.
month_nam = 'MAY'.
WHEN '06'.
month_nam = 'JUN'.
WHEN '07'.
month_nam = 'JUL'.
WHEN '08'.
month_nam = 'AUG'.
WHEN '09'.
month_nam = 'SEP'.
WHEN '10'.
month_nam = 'OCT'.
WHEN '11'.
month_nam = 'NOV'.
WHEN '12'.
month_nam = 'DEC'.
ENDCASE.
CONCATENATE month_nam wa_year INTO L_S_RANGE-LOW SEPARATED BY ' '.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
EXIT.
ENDLOOP.
ENDIF.
Please help me.Hi,
Try like this
p_date EQ 'X'. "The date format is like 31 apr, 2007
CONDENSE temdate NO-GAPS.
SPLIT date AT ',' INTO daymonth year.
IF STRLEN( year ) NE '4'.
error = 'X'.
WRITE : 'Invalid date format.'.
ELSE.
daymonth1 = daymonth.
CONDENSE daymonth1 NO-GAPS.
SHIFT daymonth1 LEFT BY 2 PLACES.
CONDENSE daymonth1 NO-GAPS.
month = daymonth1.
CONDENSE month NO-GAPS.
TRANSLATE month TO UPPER CASE.
SORT t_month BY monthstx.
MOVE month to mon.
READ TABLE t_month WITH KEY monthstx = mon.
IF sy-subrc <> 0.
error = 'X'.
WRITE : 'Invalid date format.' .
ELSE.
CONDENSE daymonth NO-GAPS.
day = daymonth+0(2).
CONDENSE day NO-GAPS.
CONCATENATE year t_month-monthnumber day INTO o_date.
Regards -
Hi All, I need help with ABAP code for customer exit for formula variable. I have ZVKDATE as formula var from customer exit. user enters date in ZVKEYDT(this is selection type var). I have the below code, I debugged it the l_var_range-low get the date but when I append it to e_t_range the table doesn't gets the date. The report shows the ZVKDATE has empty demarcation. kindly help.
data l_var_range like rrrangeexit.
data: l_s_range type RSR_s_RANGESID.
data: w_day(2) type c,
w_mth(2) type c,
w_year(4) type c.
define append_range_table.
l_s_range-low = &1.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
append l_s_range to e_t_range.
end-of-definition.
*Activities performed before selection screen pop-up window
if i_step = 2.
Calculate the current date based on system date
case i_vnam.
when 'ZVKDATE'.
read table i_t_var_range into l_var_range
with key vnam = 'ZVKEYDAT'.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
w_day = l_var_range-low+6(2).
w_mth = l_var_range-low+4(2).
w_year = l_var_range-low(4).
concatenate w_year w_mth w_day into l_var_range-low.
append l_s_range to e_t_range.
endcase.
endif.
puneetHi,
Check your code again. You are not appending l_var_range but l_s_range. Also I think the concatenate statement should contain l_s_range-low instead of l_var_range-low.
Hope this will help you.
Regards,
Vaibhav -
Variable Offset for Customer Exit??
Hi,
is it possible to have a variable offset for customer exit time variables?
E.g. I have a variable current month but can I also create a one-year offset of that?
In our system that doesn't work (but also the current month variable doesn't work...)
thanks
SabineHi,
As it is mentioned by Mr.Voodi,it definately works.
You only has given the answer for your problem .i.e you need to make sure the Customer exit variable is working proper.So take a look on the code used for it.
With rgds,
Anil Kumar Sharma .P -
Abap code for sap exit variables?
Hi,
i) Where can I find the abap code for SAP exit variables
OP_KEYDT used for the net due date
OP_KEYD2 used for the posting date
OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
Based on the Net Due Date, which is key date(0NETDUEDATE), entered by the user at runtime, the posting date and celaring date are populated.
II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom Net Due Date(ZNETDUEDATE).And this date is populated to posting date and clearing date variables.
How do we acheive that.
Thanks.Please tell how u solved ur issue i have the same scenario to be do.
-
Function module needed for customer exit variable need to use in Bex report
Hi Experts,
I have a requirement where i need to get Cummulative result between two interval periods.
If user gives single mandatory input value - 002-2009
for one Scenario:-
Project start Date untill Pervious year i.e December 2008
Where project start date will get from one of the field in my BW CUBE
can anyone help for the customer exit function code for this scenario. As i am into BI i dont have idea in ABAP.
Please help sample cod for this .
Thanks,
Anil.I had created one customer exit which had fullfill my requirement.
-
How to create an user input variable for customer exit variable? - BW3.5
Hi Guru,
I have a requirement for the selection period of my reports. There are 3 possible reporting periods which should be user selectable:
1. Month: Current reporting month
2. Fiscal Year to Date
3. Project Year to Date
Here I need 2 variable to do these, 1 customer exit and 1 user input variable. I have created a variable customer exit to calculate all these requirement. But can any1 tell on how to create the user input variable for my customer exit? I need a user input variable with drop down list like below.
01-Current month
02- Fiscal Year to Date
03-Project Year to Date
I have create a new master data for this variable, but it's not working. What I need now is a standalone master data which do not need to link to any exiting records. Can any1 tell me how to create this?Just go to the definition of the variable for which you have created a customer exit. There you will find a check box for "Ready for Input". Just tick that checkbox and the variable will be available as a selection variable in the reports selection screen.
Regards,
Yogesh -
Coding for Customer-Exit Variables
Hi experts,
We have some variables in BEX with Customer-Exits.
I want to see the codings and i do following.
1- Tcode u201CCMODu201D and enter u201CProject Codeu201D go tou201DComponentsu201D.
2- Double Click on EXIT_SAPLRRS0_001
3- Double Click on INCLUDE ZXRSRU01
But I dont see anycoding here.
Where should be the codings for Variables with Customer-Exits hidden?
Do you have any idea, thank you.Hi,
The Include which you are seeing is for only the customer space. This is for Customer exit variables created by Developers. So Here if there are any routines written by the Developers will be there. Initially it will be Blank.
If you want to See the standard SAP Exits goto SMOD.
Regards
Karthik -
ABAP Code for SAP exit varaibles?
Hi,
i) Where can I find the abap code for SAP exit variables
OP_KEYDT used for the net due date
OP_KEYD2 used for the posting date
OP_KEYD3 used for the clearing date, which are used in FI AR aging report(0FIAR_C03).
Based on the Net Due Date, which is key date(0NETDUEDATE), entered by the user at runtime, the posting date and celaring date are populated.
II) The problem is we want to simulate a similar scenario, but with key date, which user enters is based on the custom Net Due Date(ZNETDUEDATE).And this date is populated to posting date and clearing date variables.
How do we acheive that.
Thanks.Hi Kumar,
Try this below mentioned example where default date is current date.
Step1: Create a variable(ex: cur_date) on requrired characteristic with Processing type "Customer Eixt" and check the check box for ready for input(if this variable need in selection screen).
Step 2: Goto T Code : CMOD and provide appropriate Project and choose components and click on display.
Step3: Double click on exit "EXIT_SAPLRRS0_001" you can see include "ZXRSRU01", double click on include.
Step4: Sample code to populate.
WHEN 'CUR_DATE'.
Data : l_p_range_SSS TYPE rrrangesid.
IF I_STEP = 1.
l_p_range_SSS-Low = sy-datum.
l_p_range_SSS-Sign = 'I'.
l_p_range_SSS-Opt = 'EQ'.
APPEND l_p_range_SSS TO e_t_range.
Endif.
The following values are valid for I_STEP:
· I_STEP = 1
Call up takes place directly before variable entry
· I_STEP = 2
Call up takes place directly after variable entry. This step is only started up when the same variable could not be filled at I_STEP=1.
· I_STEP = 3
In this call up, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called up again.
· I_STEP = 0
The enhancement is not called from the variable screen. The call up can come from the authorization check or from the Monitor.
Also, refer this link..
http://help.sap.com/saphelp_bw320/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm
Cheers,
Allen -
Transaction code for Custom report
Hi,
How to create transaction code for Custom report ?
the custom report is a drilldown report of COPA, which can seen in tcode FDI3.
then how to add this new transaction to the menu path Easy assess->FI->AR->Information system->Reports->customers:items.
Thanks,
SwethaHi Swetha,
There is a special way to assign tcodes to such reports. Normally you create the report via report painter/writer. These reports are part of library and report group.
Create the tcode in SE93. Then at the bottom of the screen you would find option to specify report group, report name, variant to lauch with. Don't have system to specify the exact way of specifying, if you need I can provide on monday. You can take some existing COPA standard report and check from SE93.
--Ram -
T code for custom infotype in PA
Hi
T code for custom infotype in PA.
Regards
SudhaHi Sudha,
PM01 is the tcode.
Similar questions were already answered in the following threads
ABAP HR : Infotype Enhancement
So please search and then post specific queries.
rgds
gayathri
Maybe you are looking for
-
Why do I have a font problem in my FROM and TO lines?
I have converted this week from Entourage to Apple Mail. I'm getting used to it, but really miss the formatting capabilities of Entourage. Given Apple's mastery of fonts and typography, how did Apple Mail end up being so basic? But more immediate is
-
Changing the default setting in ZOOM
I've searched and unable to find an answer... Any time the zoom tool is selected, it is set as a default of 100%. Is there a way to change this? Thanks,
-
Hi, I'm creating a custom page in OAF, and I have a question about row status. I am curious to know if there is a way to determine if a row has been committed to the database yet or if it is just sitting in the cache. Basically, we have a 1-1 relatio
-
Will the internet still work if no 3g network?
I ordered an Ipad 3g verizon and I live in Sun Valley Idaho where there is no 3g coverage. I have a verizon phone and the internet works. So will the Ipad work too? Just not at 3g speeds? I know I can always connect to wi-fi just want to know if it w
-
Help! I loat my PALM E2 and tried to Sync my desktop with a new E2 that I had and it somehow deleted the desktop. Is it possible to recover what was in the calander befor my mishap. Thanks! This question was solved. View Solution.