How to report on dates between From and To dates

Hi forum,
I have a requirement to report on Long Term Absences from work.  The user wants to enter a calendar month in a selection variable, and see who is away from work in that month.
I have the start and end dates of absences, but these are long term absences which span across months.  The problem is, if I base the Calendar Month variable on the start date or the end date of the absence, people get missed off the report.
For example, if we have someone on maternity leave for a year, the user wants to be able to enter any month within that year, and see that the person is on maternity leave.  So I cannot use the start date or end date of the absence as it is.
How do I get the report to run such that when a user enters a month, it will show everyone who is absent on any dates within that month?  I assume I need some kind of customer exit variable for this, but is there a standard SAP delivered variable which will work out all possible dates within the start and end date?  Or do I need to write some code myself?
I couldn't see anything in the forum already which would help me on this, but if there is an existing thread, please also let me know.
Many thanks
Mischa

Hi Mischa.
I think you can achieve what you want like this
Add the Start Month and End Month (let them be IO's that reference 0calmonth) to your cube and  populate them in the load using a formula, like Aron suggested.
Create a query with a  restricted key figure.  I suppose you are looking at some kind of count  to know how many people where absent in a given month, or something like that. Thus, add your KF to the structure and add the Start Month and End Month to the selection.
Restrict the Start Month using a variable, ZMONTH (this is what the user will enter at runtime), as follows:
Start Month <= ZMONTH.
Now restrict the End Month using a variable, XMONTH (this will have to be an exit variable filled in CMOD by reading ZMONTH) as follows:
End Month >= XMONTH.
Thus, your restricted key figure will only return values if the entered month is part of the absence interval. The abap you need for CMOD should be simple as all you are doing is reading a variable and passing it to another. From the top of my head, it should look something like this:
data:
l_s_range type rsr_s_rangesid,
loc_var_range like rrrangeexit.
case i_vnam.
the case statement will likely already be there, as well as the above definitions, so look for the case and insert the below
when 'XMONTH'.
if i_step = 2.
clear l_s_range.
loop at i_t_var_range into loc_var_range
where vnam = 'ZMONTH'.
l_s_range-low = loc_var_range-low.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
append l_s_range to e_t_range.
endloop.
endif.
endcase.
this will likely already be there, so you won't need to put it there again.
Good luck!
Jacob
Edited by: Jacob Jansen on Jan 11, 2010 9:18 PM
Edited by: Jacob Jansen on Jan 11, 2010 9:30 PM

Similar Messages

  • How to load the data from informatica into bw & how to report the data

    Hi friends,
    how to load the data from informatica into bw & how to report the data
    using cognos.(i.e how to access the data in sap bw using cognos 8 BI suite).
    Thanks,
    madhu.

    Inorder to report BW data into Cognos you can extract data from using Open Hub to the DB table from which Cognos reads.
    For BW informatic integration refer following docs:
    http://www.aman.co.il/aman/pfd/DataInteg_BR.q103cd.pdf.pdf
    http://h71028.www7.hp.com/enterprise/cache/3889-0-0-225-121.html
    http://devnet.informatica.com/learning/ePresentations.asp
    http://72.14.203.104/search?q=cache:C741L86Q19oJ:devnet.informatica.com/showcase/resources/Essbase_DataSheet.pdfinformaticapowerconnect(BI)&hl=en&gl=in&ct=clnk&cd=3
    http://www.informatica.com/customers/utilities_energy/fpl_group.htm
    http://www.informatica.com/solutions/resource_center/technote_sapbw_65241004.pdf#search=%22Informatica%20to%20Bw%22

  • Query to get number of invoice created by user between from and to date

    Dear All
    I need Query to get number of invoice created by user on day and his orgainization between from and to date.
    thanks

    select count(*) from ap_invoices_all where created_by = :p_User_id
    and trunc(creation_date) between :p_from_date and :P_to_date;
    Thanks/SRK

  • How to establish the connection between crm and r/3

    Hi,
    Sorry for posting this question in this forum, i did not find any CRM forums.My question is,How to establish the connection between CRM and R/3...in my office i installed standard alone CRM system,but it is not talking to R/3.
    Could any one tell me where to find adapters and plugins for this.
    Thanks in advance.
    Ajey

    Hello Ajey,
    in the case you mean the connection between R/3 and SAP CRM you should read the Best Practice Guides:
    B01: CRM Generation
    C71: CRM Connectivity
    B09: CRM Replication
    from http://help.sap.com/bp_crmv240/index.htm. There is a CRM Forum at http://www.sap.com/community/ and also at http://www.sapfans.com/.
    Regards
    Gregor

  • How can I transfer photographs between Revel and Photoshop (CS3)?

    How can I transfer photographs between Revel and Photoshop (CS3)?
    any Ideas?

    Hi poetryplease,
    Unfortunately, there is no Creative Cloud connection between CS3 and Revel. You can upload your images that you have edited, etc, in Photoshop from your desktop into Revel or download your Revel images to your desktop then open in Photoshop.
    Glenyse

  • How to create shared folder between mac and windows

    how to create shared folder between mac and windows

    Us ean external drive formatted FAT32 or ExFat. Both OSx and Windows can read/write to the drive and both can use the same data files as long as you have a program that can open and save these files. For example, Word running both on OSx and on Windows will be able to work with the same document on the external drive.

  • HT2729 How do I switch movies between sd and hd on my computer

    How do I switch movies between SD and HD.

    System Preferences > Display > Arrangement
    Drag the white Menu bar from the main screen to the second screen.

  • How do I Retrieve imovie projects from and external drive back into my mac internal drive

    How do I Retrieve imovie projects from and external drive back into my mac internal drive?
    Thank You

    Every working drive, Internal or External, should produce an Icon on your Desktop. If you cannot see those, click on the Desktop (to get Finder) and choose Preferences off the Finder Menu. The general pane has checkboxes for "Show these items on the Desktop:"
    Double click the Icon for your External Drive to open it. Open the folders on it until you find the Items you want to copy. Drag them to the Icon of your Internal Drive, or open the folder where you want them to land and drop them in there.
    A drive that does not appear on the desktop after you have asked it to may be damaged. But it would be smart to do a Restart to see if it is recognized again at next Startup.

  • How the relation is maintained between BOm and dependencies

    Hi Gurus,
      Please tell me how the relation is maintained between BOm and dependencies

    First you need to create object dependencies (CU01). Then these dependencies are to be assigned to BOM items in bill of material create / change  mode(CS01/CS02). For this you need to select a component / BOM item and click 'Allocations' button.(Select BOM item + cntr F1)
    Pls reward points if found suitable.
    Thank you.
    Umesh

  • How to find the relation between PAY_ELEMENT_TYPES_F and GL_CODE_COMBINATIO

    Hi, could someone tell me how to find the relation between PAY_ELEMENT_TYPES_F and GL_CODE_COMBINATION tables
    that is because as you could know PAY_ELEMENT_TYPES_F holds the definitions of elements in Oracle HRMS and i need to find the accounting code of each element.
    Thanks

    Hi;
    Please check e-trm site for table relation,integration,explanation etc..
    etrm.oracle.com/
    Regard
    Helios

  • How to fix "cannot convert between unicode and non-unicode string data types" :/

    Environment: SQL Server 2008 R2
    Introduction:Staging_table is a table where data is being stored from source file. Individual and ind_subject_scores are destination tables.
    Purpose: To load the data from a source file .csv while SSIS define table  fields with 50 varchar, I can still transfer the data to the entity table/ destination and keeping the table definition.
    I'm getting validation error "Cannot convert between a unicode and a non-unicode string data types" for all the columns.
    Please help

    Hi ,
    NVARCHAR = DT_WSTR
    VARCHAR = DT_STR
    Try below links:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/ed1caf36-7a62-44c8-9b67-127cb4a7b747/error-on-package-can-not-convert-from-unicode-to-non-unicode-string-type?forum=sqlintegrationservices
    http://social.msdn.microsoft.com/Forums/en-US/eb0d1519-4be3-427d-bd30-ae4004ea9e8d/data-conversion-error-how-to-fix-this
    http://technet.microsoft.com/en-us/library/aa337316(v=sql.105).aspx
    http://social.technet.microsoft.com/wiki/contents/articles/19612.ssis-import-excel-to-table-cannot-convert-between-unicode-and-non-unicode-string-data-types.aspx
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • How to set up connection between S and C

    I want to realize a chat between server and client.
    on both side ,there is a textArea to get the information to send to the other.
    I know the socket is must be used,but how to set up the data source(from textarea or textfield),and how to store the data?
    can some one tell me how to do this?
    thanq!

    So what are you saying you dont know how to use the textarea and textfield?Cause it is ez to convert that code that dunedinhigh gave you from console to a gui like what you want I think.So here is a link that shows you how to use text component.You learn this then you can put 2 and 2 together.Also check out the java tut page.
    http://java.sun.com/docs/books/tutorial/
    http://java.sun.com/docs/books/tutorial/uiswing/components/simpletext.html
    good luck

  • How to calculate the difference between intdate and getdate

    Hi,
    My requirement is to get the data for all the claims where the difference between transactiondate and getdate() should be less than or equal to 7 which means any claims that happened in the past week.
    So, my query would be something like this
    select * from claims
    where transactiondate-getdate < 8
    But my transactiondate is in int format such as 20150331 and getdate would be in the format of 2015-03-31. Can someone please help me on how can i achieve the difference between these 2 date formats in the where clause.
    Please let me know if you have any questions or if i am unclear.
    Thanks

    Hi SqlDev12,
    Please find the below condition in your query,hope it would help you
    DATEDIFF(DD,CAST(CAST(TransactionDate
    AS
    VARCHAR)
    AS
    DATETIME),GETDATE())
    < 8
    Thanks & Regards,
    Praveena.

  • How to create database link between oracle and SQL Server

    Hello Everyone,
    Here i have Oracle Database 9i and SQL Server 2005 databases.
    I have some tables in sql server db and i want to access from Oracle.
    How to create a database link between these two servers
    Thanks,

    Thanks for Everyone,
    I was struggle with this almost 10 days....
    I created Database link from Oracle to SQL Server
    Now it is fine.........
    Here i am giving my servers configuration and proceedure how i created the db link...@
    Using Generic Connectivity (HSODBC) we can create db link between Oracle and SQL server.
    Machine (1)
    DB Version : Oracle 9.2.0.7.0
    Operating System : HP-UX Itanuim 64 11.23
    IP : 192.168.0.31
    Host : abcdbt
    Machine (2)
    Version : SQL Server 2005
    Operating System : Windows server 2003 x86
    IP : 192.168.0.175
    Host : SQLDEV1
    User/PW : sa/abc@123! (Connect to database)
    Database : SQLTEST (exsisting)
    Table : T (“ T “ is the table existing in SQLTEST database with 10 rows)
    Prerequisites in Machine (2):
    a)     Oracle 10g software
    b)     User account to access SQL Server database (sa/abc@123!)
    c)     Existing SQL Server Database (SQLTEST)
    d) Tables (testing purpose) (T)
    Steps:
    1)     Install Oracle 10.2.0.1 (Only SW,No need of database) *(Machine 2)*
    2)     Create a DSN where your windows Oracle 10g SW resides *(Machine 2)*
    Control panel >> Administrative Tools >> Data Source (ODBC) >> System DSN ADD
    You can follow this link also.....
    http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
    I created DSN as
    DSN name : SQLTEST
    User : SA/abc@123! (Existing user account)
    Host : 192.168.0.175 (machine 2)
    Already I have 1 database in SQL Server with the name SQLTEST
    You can create DSN with different name also (not same as db name also)
    3)     Create a hsodbc init file in $ORACLE_HOME\hs\admin *(Machine 2)*
    Create init<DSN NAME> file
    Ex: initSQLTEST
    Copy inithsodbc to initSQLTEST
    And edit
    initSQLTEST file
    HS_FDS_CONNECT_INFO = SQLTEST    <DSN NAME>*
    HS_FDS_TRACE_LEVEL = OFF*
    save the file....@
    4)     Configure Listener.ora *(Machine 2)*
    LISTENER_NEW =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
    SID_LIST_LISTENER_NEW =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = SQLTEST) *+< Here SQLTEST is DSN NAME >+*
    (ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
    (PROGRAM = hsodbc))
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = G:\oracle 10g\oracle\product\10.2.0\db_1)
    (PROGRAM = extproc) )
    :> lsnrctl start LISTENER_NEW
    5)     Configure tnsname.ora *(Machine 2)*
    SQLTEST11 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.175)(PORT = 1525))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = SQLTEST))
    (HS=OK)
    :> tnsping SQLTEST11
    If No errors then conti….
    6)     Configure a file *(Machine 1)*
    Cd $TNS_ADMIN ($ORACLE_HOME/network/admin)
    Create a file
    $ vi TEST_abcdbt_ifile.ora
    something=
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST =192.168.0.175) (PORT=1525))
    (CONNECT_DATA=
    (SID=SQLTEST))
    (HS=OK)
    $ tnsping something
    $ sqlplus system/manager
    Your connected to Oracle database *(machine 1)*
    create database link xyz connect to “sa” identified by “abc@123!” using ‘SOMETHING’;
    select * from t@xyz;10 rows selected.
    Thanks,
    Edited by: ram5424 on Feb 10, 2010 7:24 PM

  • How to find the link between strcture and query technical name

    Hi Guru's
    How to find the link between Strcture in the query and query technical name. In other way where used list of the structure  used in queries?
    I know we have table called RSZELTDIR which have the values of strcuture name. from here i do not find any link to query technical name.
    Please can anyone help me?
    Regards,
    Sirisha

    Hi ,
    For structure and query relationship, the structure has to be a reusable structure( a global one). Then you can right click in on the structure name (in BEX query designer) and select the where used list. You will find all the query names where it is being used.
    U can also check out tables RSRREPDIR and RSZCOMPDIR for other query properties.
    Thanks,
    Amit

  • How to Report on Hourly Basis from BW in HH-MM(not on 0calday)

    Hi Pals,
    I need suggestions as my current user wants to report on every 2 hours(and staged into BW ODS) based on Time(HH-MM). Though we can bring details in BW on every 2 hrs but the issue is how to bring the Time characteristics in HH,MM. Requirement is to keep track of orders and deliveries with a precision on Time(i.e 12:10 PM). And when ever there is a chnage in OLTP box then based on scheduled extract it must reflect the time in hours and minutes.
    Robert and party do you suggest to make chnages to existing Extractors and cast a new InfoObject in extracts to bring such kind of details. If yes then we need to create this as NUMC(0CALDAY is lowest Time characteristics).
    Please suggest and let me know if this is possible then what are the pros and cons for this approach. I clearly agree that this kind of details can be best brought from OLTP box.
    Sanjeev

    Hi,
    Since you are going to load very frequently, please consider note 620361 in terms of problems to expect. BW is not (yet) build for such high frequency loads. (too many admin overhead.) In BI 7.0 a new ODS type for direct update is available. This has no activation queue and less admin. Purpose to directly update from 2LIS** or your kind of scenario. Isn't it possible to build or use a remote cube scenario ? For the time registration as stated use 0TIME.
    Kind regards, Patrick Rieken.

Maybe you are looking for

  • Error while installing LabVIEW on Linux

    Getting Error while installing LabVIEW on Linux and unable to use VISA. Please check the installation Log i Have attached. nilesh Attachments: Installation Log LV2012 Linux.txt ‏25 KB

  • Camera video not saved after installing 8.02 on iPhone6

    Videos were being saved prior to installing the last update.  Video and slow-mo ARE NOT being saved to "Photos App" either in "Collections" or "Albums->Videos" after the update.  Photos are being saved. I tried a "Home/Power Button" reset and a full

  • Mail Database Size Limit?

    Hello, I have an Entourage DB that is over 6GB. Does anyone know if there will be any issues importing a DB this size into Mail and does Mail have a DB size limit? Thanks!

  • Best approach to report on ports in use during the month

    I have been asked to come up with a report once a month outlining the network devices ports that are in use per cust omer location. I see the report device manager but it doesnt appear to give the simple number of ports in use by the device during th

  • Upgrade from Forms 4.5 to 6.0

    Has anyone been through this upgrade? I am trying to estimate how long it will take to upgrade an application from version 4.0 to 6.0. It was previously converted from 3.0 to 4.0, then 4.5. The app consists of about 230 forms in version 4.5. Any advi