How to view output of SAP Exit variables
Hi All,
I want to view the data of standard SAP Exit variables. For example, for displaying the current date, SAP has provided some variables to use in the report. Can you please guide me where to get all the variables and how to see the output of these variables.
Thanks.
Hi,
1) In Business Content all the variable will available.
2) If you will proper standard variable in your report, there is no need to check still you need to check then use RSRT tcode, give the report name and execute with EXECUTE+DEBUG option.
3) for example current calender day data need in report then standard exit variable to you character sticks or depend upon same logic directly use in your key figure, in this case for that key figure value always current day date.
4) it may helps you and elaborate your idea and explore your issue for further discussion.
Thanks & Regards,
Srinu.Raport
Similar Messages
-
How to Find Code for SAP Exit variables.....
Gurus:
The SAP Business Content Query "0FIAR_C03_Q0005" uses several BC variables of 'SAP Exit' type for determining "Date" values. I would like to see the code used in these variables. Can anyone please suggest how I can find it?
For examople, the variable on Posting Date is "0P_KEYD2". What is the ABAP code for this? Please give me the Steps..!
Thanks in Advance......PBGenerally SAP doesn't give access to the code behind SAP exit variables, but you can find what the variable is doing using help documentation. Here is some info i saw on SAP help for your variable
0CWD Current workday
0DAT Current calendar day
0P_KEYDT Key date of due date
0P_KEYD2 Key date of posting (from key date of due date)
0P_KEYD3 Key date of clearing (from key date of due date)
0P_KEYD4 Key date of posting (posting date)
0P_KEYD5 Key date of clearing (from key date of posting) -
Subject: Where are SAP Exit Variables and how to use them in Bex Query
I have seen references to variables: 0cyear (Current Year), 0CALYEAR (current year), oCALMONTH (Current month/year).
Under 0CALMONTH characteristic or 0CALYEAR I do not see any of the variables, so how does
one use these variable in the query. For example I want to create a restricted key figure: Duration restricted by Current calendar year (e.g. 2009 if I am in 2009, 2010 if I am in 2010..).Thanks a lot. Actally, I was looking in my production system and under varaiables I did not find any SAP Exit variables,
but in development envrionment I do see some.
Why will it not show me these variables in production? Is it because:
1. Some special premssion is required to view this type of variable
or
2. THese varaiables were not installed from Business Content
It is hard for me to beleive, it is permission issue. -
How to find out the customer exit and sap exit variables created provider?
Hi all,
How to identify what are all the customer exit and sap exit variables are been created for an info provider. is there any tables which allow us to find out.
thanxs
harithaHello haritha,
SAP Exit and Customer Exit variables are created for Characteristics and not for individual InfoProviders.
So whenever the characteristic is used in the InfoProvider, by selection the appropriate variable the exit can be called.
So the same Exit can be in one or more InfoProviders.
Hope it helps.
Thanks,
Chandran -
How to create/use SAP Exit variable of Query designer
Hello experts,
Can you please guide me on how to create/use SAP Exit variables ?
Is there any way we can transport customer exit include in which we write all codes related to customer exit variables?
Kindly provide your valuable inputs on this.
Thanks,
MiteshHello Gautam,
I think you should first implement the user-exit via the transaction SMOD/CMOD and the SAP-Enhancement RSR00001 User-Exit ( BW Reporting )
For the concrete implementation I would suggest to encapsulate the variables, as it is described here
Easy implementation of BEx-Userexit-Variables
and here: BEx-Userexits reloaded
Kind regards,
Hendrik -
How to see the ABAP Code behind SAP Exit Variables.
Hi Everyone.
I was wondering if anyone could help me with the steps to see the ABAP Code behind a SAP Exit Variable.
Sometime back I remember of going to Transaction SE37 - Function Module and give the Variable name,
Eg: 0F_ADAY, Hit F4 or something like that and was able to see the ABAP Code/Function Module/Exit written for that Variable.same
But today I tried to do the same thing to see the code for Variable 0P_FVAEX but I was NOT able to see it.
I think I am missing something.
Can someone help me recollect what I am missing.
Thank You for your time
NOVICEHi bi novice,
big sorry for the late reply!
The following variables are defined in function module RREX_VARIABLE_EXIT as case statement:
'0CMONTH', '0CWEEK', '0CYEAR', '0CQUART', '0DAT', '0CWD', '0FYEAR', '0FPER', '0FYTCFP',
'0FYTLFP', '0FYTCD', '0CYTCM', '0CYTLM', '0CYTCD', '0LYTCLD', '0CMONTHT', '0CWEEKT', '0CYEART', '0CQUARTT', '0DATT', '0FYEART', '0FPERT'
Best regards,
Andreas -
Current Workday SAP EXIT variable not aligned with correct work days
Hello,
I am trying to use the Current Workday variable within a report so that the data will only be refreshed when the calendar day is Monday - Friday. Users look at this report every day, but when they get the report on Monday we would like for the date to be restricted to the previous Friday, and then switch back to Monday's date when they view the report on Tuesday. In order to do this we have placed the Current Workday variable from the Calendar Date characteristic with an offset of negative 1, but it is showing Sunday's date when they look at the report on Monday.
My questions are:
-Does this variable use the factory calendar that can define the work days?
-If so, which Factory calendar does it use? I have gone to the Tcode SCAL but I can see there are many different factory calendars and I have no idea which calendar this variable pertains to. I have also transferred the global settings for the factory calendar from the source system, and I see no change within the variable.
-How can I see the program name behind this SAP Exit variable? My thinking is that I could at least look at the code to see if perhaps I can find out the factory calendar ID the variable refers to from there.
Any help on this would be greatly appreciated! Until this is fixed I have to manually adjust this report every Monday and Tuesday morning!! Not ideal.Hi Kelly,
I am not sure whether this can be done by an SAP Exit variable.
But you may try this using a Customer exit variable by using the Function module DATE_COMPUTE_DAY.
The function module "DATE_COMPUTE_DAY" will return the day by 1 to 7 when you input date.
Monday : System will return value = 1
Tuesday : System will return value = 2
Wednesday : System will return value = 3
Thursday : System will return value = 4
Friday : System will return value = 5
Saturday : System will return value = 6
Sunday : System will return value = 7
So input sy-datum to this FM and find the number of day. If it is Monday, the number will be 1.
If output is 1, then offset date by -3 to that of Friday, else offset by -1 to previous day.
Hope this helps,
Regards,
Hari -
Urgent ...how to send output of sap through mail
Could you please guide me how to send output of SAP Script through mail in PDF format.
Thanks in Advance....
Regards,
Kumar.*& Report ZSPOOLTOPDF *
*& Converts spool request into PDF document and emails it to *
*& recipicant. *
*& Execution *
*& This program must be run as a background job in-order for the write *
*& commands to create a Spool request rather than be displayed on *
*& screen *
REPORT zspooltopdf.
PARAMETER: p_email1 LIKE somlreci1-receiver,
p_sender LIKE somlreci1-receiver,
p_delspl AS CHECKBOX.
*DATA DECLARATION
DATA: gd_recsize TYPE i.
Spool IDs
TYPES: BEGIN OF t_tbtcp.
INCLUDE STRUCTURE tbtcp.
TYPES: END OF t_tbtcp.
DATA: it_tbtcp TYPE STANDARD TABLE OF t_tbtcp INITIAL SIZE 0,
wa_tbtcp TYPE t_tbtcp.
Job Runtime Parameters
DATA: gd_eventid LIKE tbtcm-eventid,
gd_eventparm LIKE tbtcm-eventparm,
gd_external_program_active LIKE tbtcm-xpgactive,
gd_jobcount LIKE tbtcm-jobcount,
gd_jobname LIKE tbtcm-jobname,
gd_stepcount LIKE tbtcm-stepcount,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: w_recsize TYPE i.
DATA: gd_subject LIKE sodocchgi1-obj_descr,
it_mess_bod LIKE solisti1 OCCURS 0 WITH HEADER LINE,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_sender_type LIKE soextreci1-adr_typ,
gd_attachment_desc TYPE so_obj_nam,
gd_attachment_name TYPE so_obj_des.
Spool to PDF conversions
DATA: gd_spool_nr LIKE tsp01-rqident,
gd_destination LIKE rlgrap-filename,
gd_bytecount LIKE tst01-dsize,
gd_buffer TYPE string.
Binary store for PDF
DATA: BEGIN OF it_pdf_output OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF it_pdf_output.
CONSTANTS: c_dev LIKE sy-sysid VALUE 'DEV',
c_no(1) TYPE c VALUE ' ',
c_device(4) TYPE c VALUE 'LOCL'.
*START-OF-SELECTION.
START-OF-SELECTION.
Write statement to represent report output. Spool request is created
if write statement is executed in background. This could also be an
ALV grid which would be converted to PDF without any extra effort
WRITE 'Hello World'.
new-page.
commit work.
new-page print off.
IF sy-batch EQ 'X'.
PERFORM get_job_details.
PERFORM obtain_spool_id.
Alternative way could be to submit another program and store spool
id into memory, will be stored in sy-spono.
*submit ZSPOOLTOPDF2
to sap-spool
spool parameters %_print
archive parameters %_print
without spool dynpro
and return.
Get spool id from program called above
IMPORT w_spool_nr FROM MEMORY ID 'SPOOLTOPDF'.
PERFORM convert_spool_to_pdf.
PERFORM process_email.
if p_delspl EQ 'X'.
PERFORM delete_spool.
endif.
IF sy-sysid = c_dev.
wait up to 5 seconds.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDIF.
ELSE.
SKIP.
WRITE:/ 'Program must be executed in background in-order for spool',
'request to be created.'.
ENDIF.
FORM obtain_spool_id *
FORM obtain_spool_id.
CHECK NOT ( gd_jobname IS INITIAL ).
CHECK NOT ( gd_jobcount IS INITIAL ).
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> '0000000000'
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
IF sy-subrc = 0.
message s004(zdd) with gd_spool_nr.
gd_spool_nr = wa_tbtcp-listident.
MESSAGE s004(zdd) WITH gd_spool_nr.
ELSE.
MESSAGE s005(zdd).
ENDIF.
ENDFORM.
FORM get_job_details *
FORM get_job_details.
Get current job details
CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
ENDFORM.
FORM convert_spool_to_pdf *
FORM convert_spool_to_pdf.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
CHECK sy-subrc = 0.
Transfer the 132-long strings to 255-long strings
LOOP AT it_pdf_output.
TRANSLATE it_pdf_output USING ' ~'.
CONCATENATE gd_buffer it_pdf_output INTO gd_buffer.
ENDLOOP.
TRANSLATE gd_buffer USING '~ '.
DO.
it_mess_att = gd_buffer.
APPEND it_mess_att.
SHIFT gd_buffer LEFT BY 255 PLACES.
IF gd_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
FORM process_email *
FORM process_email.
DESCRIBE TABLE it_mess_att LINES gd_recsize.
CHECK gd_recsize > 0.
PERFORM send_email USING p_email1.
perform send_email using p_email2.
ENDFORM.
FORM send_email *
--> p_email *
FORM send_email USING p_email.
CHECK NOT ( p_email IS INITIAL ).
REFRESH it_mess_bod.
Default subject matter
gd_subject = 'Subject'.
gd_attachment_desc = 'Attachname'.
CONCATENATE 'attach_name' ' ' INTO gd_attachment_name.
it_mess_bod = 'Message Body text, line 1'.
APPEND it_mess_bod.
it_mess_bod = 'Message Body text, line 2...'.
APPEND it_mess_bod.
If no sender specified - default blank
IF p_sender EQ space.
gd_sender_type = space.
ELSE.
gd_sender_type = 'INT'.
ENDIF.
Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_mess_bod
it_mess_att
using p_email
'Example .xls documnet attachment'
'PDF'
gd_attachment_name
gd_attachment_desc
p_sender
gd_sender_type
changing gd_error
gd_reciever.
ENDFORM.
FORM delete_spool *
FORM delete_spool.
DATA: ld_spool_nr TYPE tsp01_sp0r-rqid_char.
ld_spool_nr = gd_spool_nr.
CHECK p_delspl <> c_no.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = ld_spool_nr.
ENDFORM.
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables it_message
it_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
data: t_packing_list like sopcklsti1 occurs 0 with header line,
t_contents like solisti1 occurs 0 with header line,
t_receivers like somlreci1 occurs 0 with header line,
t_attachment like solisti1 occurs 0 with header line,
t_object_header like solisti1 occurs 0 with header line,
w_cnt type i,
w_sent_all(1) type c,
w_doc_data like sodocchgi1.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = it_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
regards,
venkat -
U201CDisplay not allowedu201D for SAP Exit variables
Hi All
I collected some SAP Exit variables under a transport request and moved them to the BI DEV system from sand box systemu2026u2026u2026 when we are trying to use these objects in BIDEV in the query designer the variables are displaying as u201CDISPLAY NOT ALLOWEDu201D for all queries where ever these variables are used and we are not able to use them for drag and drop in the query designer
I searched forum and find one similar thread but no answer
Please help on this
Thanks in advanceSame here. Do you know how you resolved this issue?
-
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.
-
Error when using SAP Exit Variable for Current Fiscal Period (0FPER)
Hi Friendz,
My requirement is to execute a query for the current fiscal period. I am using the SAP Exit Variable 0FPER.
I placed this variable on char. Fiscal year/period 0FISCPER.
When I execute the Query, it is returning the error: No value could be determined for variable ZVBSYCUR; Variables Contain Invalid Values.
Please give inputs on how to use this variable.
Regards...
GaneshHello Dipika,
I am also getting the same error.
ERROR: Variable 0FPER could not be replaced.
Yesterday we created one customer exit. But this should not affect the SAP Exit right? Till yesterday the 0FPER variable was working fine. I tried re-installing from BI content, but still getting the same error. If anybody has a clue please let me know.
Thanks,
Harshal -
Variable required for 0DOC_DATE, same as the SAP exit variable 0P_KEYDT
Hi Gurus,
I am currently trying to create a query based upon the InfoProvider - FIAP: Line Item (0FIAP_C03).
For the Characteristic Net Due Date (0NETDUEDATE) there is a SAP exit variable called Key Due Date (0P_KEYDT).
I need to replicate this variable for 0DOC_DATE, which is what I need to use in this query.
I do not have any knowledge of ABAP therefore could you please advise;
1) Whether this variable can be replicated for 0DOC_DATE so that it defaults to system date - 1 day
2) What steps I need to take to create this variable
3) What is the exact ABAP code that I will need to do this.
If there is a variable that already exists for 0DOC_DATE that acts in the same way as 0P_KEYDT then please let me know.
Thanks
NateHello,
1&3) goto CMOD - create e.g. ZBWVARS. Add RSR00001enhancement. Modify ZXRSRU01 include.
You need developer key to do that.
CASE i_vnam.
WHEN 'ZDOC_DATE,'.
IF i_step EQ '2'.
CLEAR l_s_range.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
l_s_range-low = sy-datum - 1.
APPEND l_s_range TO e_t_range.
ENDIF.
ENDCASE.
2) In Query Designer create customer-exit variable ZDOC_DATE.
BR
Ondrej -
Where do I find documentation on BEx SAP-Exit Variables. What the Exit does and so on?
Try this link.
http://help.sap.com/saphelp_nw70/helpdata/en/36/df22419e2ab167e10000000a155106/frameset.htm
The variables are documented as per BI Content.
-Saket -
SAP Exit Variables changes using FM RREX_VARIABLE_EXIT
Hi BW Group:
I am trying to made some modifications on Dates fields and for that I created variables as SAP Exit.
In the code of the standard FM RREX_VARIABLE_EXIT appear a part to include the code for the new variables as RSVAREXIT_XXX_YYY.
Does any one in the group use a SAP Exit variable before? Do you need to code in this FM?
Thanks in advance.
NorgeHi,
Please chk this URL , hope it may help u .
http://help.sap.com/saphelp_bw21c/helpdata/en/f1/0a56a7e09411d2acb90000e829fbfe/content.htm -
How to View Smartforms or SAP Script Forms in Web Dynpro ABAP
Do anyone have idea of how to View Smartforms or SAP Script Forms in Web Dynpro ABAP?
Please let me know. ThanksHi Sameeksha,
You can display an smartform in WDA as an pdf file. Try go through this [article |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785]where Nanda does explain about the same.
Regards,
Uday
Maybe you are looking for
-
Cannot Filled in Form to Excel
I am running Adobe X Standard. I am trying to export a PDF form with fillable fields to excel. I have tired serveral methods shown on the site. Every time I get the form saved, the but data that was entered into the form is not exported to excel (o
-
BI Content not displaying in status
Hi Experts, we are using Netwear 2004S BI, in my status BI Content is not showing earlier Basis Consultant has integrated to R3 so can we integrate without having BI Content or is there any chance to missing BIContent please help in this regards Re
-
Sequence number throwing error.
Gurus, I am currently at the schema "rawfeed" in "dev" database. I created a DB link to the "prod" database to the schema 'prod_schema" 1) select distinct job_group as grp from prod_schema.test_table@prod. Gives me result as: CIAZ ID0PA IDS1R IEMRR2)
-
ATTACH DOCUMENT TO ABAP OBJECT
Hello All, I have a situation here. i need to attach a document to the business object(customer number) . am not sure what all the function modules or methods i need to use.Could any one please shed some light here as am new to this. and also what al
-
Plant Maintenance Order planning costs transfer to Cost Centers.
Hello, 1. Capacity Planning I'm trying to get planning information from a PM order back to a cost center. I have planned operations in a PM order with a valid activity type and the work center is linked to the Cost Center. But I cannot see any infor