How to implement this calendar function in ABAP code

Hi everyone,
Our requirement is : Give a date (e.g. YYYY.MM.DD, 1983.12.26), then we need to know which weekday it is. Is there a existing FM for this fuction? or how to implement it in ABAP?
Thanks a lot for any hint
Best regards
Deyang

Hi Deyang Liu,
    Could you please check these the below links they would give you some idea ....[SAP Calendar Control|http://help.sap.com/printdocu/core/print46b/en/data/en/pdf/BCCICALENDAR/SAP_KALENDER.pdf]
[Calendar functions |http://help.sap.com/saphelp_nw04/Helpdata/EN/2a/fa00f6493111d182b70000e829fbfe/content.htm]
[SAP Functions|http://abap4.tripod.com/SAP_Functions.html]
[Determine calendar |http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa00e9493111d182b70000e829fbfe/content.htm]
Regards,
S.Manu

Similar Messages

  • How to implement this planning function using Fox formula

    Hello,
    I am new to Fox.
    I want to implement this complex logic in a planning function
    i have A (Kf X from infoprovider Z_A), B (Kf Y from infoprovider Z_B) & moreover there is one more condition,
    If current FISCPER > variable value of FISCPER
    KF Z = KF Z1 (from Cube C1)
    Else KF Z = KF Z2 (from Cube C2).
    for a particular calender week,
    X =   ( Y * Z ) / (summation of (Y * Z)  for each week of the whole year)
    I know it is complex.
    but i have to implement this in a planning function.
    The aggreagtion level is built on a multiprovider having A, B , C1 & C2.
    Can someone help me out with the FOX formula for this? or is there any better way to do this.
    Thanks john

    Hi Gerardo,
    Thanks for that.
    I have tried something similiar to it
    DATA CHA_CALWEEK TYPE 0CALWEEK.
    DATA CHA_COMP_CODE TYPE 0COMP_CODE.
    DATA CHA_FISCPER TYPE 0FISCPER.
    DATA VAR_PERIOD  TYPE 0FISCPER.
    DATA SUM_YEAR TYPE F.
    DATA TEMP_D TYPE F.
    DATA SUM_WEEK TYPE F.
    CURRENCY IS LOCAL CURRENCY. FOR DATA SELECTION TO BE RIGHT, NECESSARY TO DERIVE FROM CC.
    DATA UN_LOC_CURRCY TYPE 0LOC_CURRCY.
    UN_LOC_CURRCY = VARV(Z_U_I100).
    CHA_COMP_CODE = VARV(Z_U_I100).
    To Calculate the D
    VAR_PERIOD = VARV(Z_U_I010).
    SUM_YEAR = 0.
    TEMP_D =0.
    IF CHA_FISCPER > VAR_PERIOD.
    TEMP_D = {ZSA_BUD2X,CHA_COMP_CODE,CHA_FISCPER,YBUDG_01X,CHA_CALWEEK}.
    FOREACH CHA_CALWEEK.
    SUM_YEAR = SUM_YEAR + TEMP_D * {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1} .
    ENDFOR.
    ELSE.
    TEMP_D = ({ZSAEXCUSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X} - {ZCREENTSV,CHA_COMP_CODE,CHA_FISCPER,YRT_C02X}).
    FOREACH CHA_CALWEEK.
    SUM_YEAR = SUM_YEAR + TEMP_D * {ZIP_INDEX,CHA_COMP_CODE,CHA_FISCPER,ZIP_RREF1}) .
    ENDFOR.
    ENDIF.
    But i am getting a syntax error
    Formula error: } expected
      Syntax error in row 21, column 20
    i have marke line21 in bold. above.
    I feel it is correct, still wonder why i am getting this error.
    can you pls help ?

  • How to Implement custom share functionality in SharePoint 2013 document Lib programmatically?

    Hi,
    I have created custom action for Share functionality in document library.
    On Share action i'm showing Model pop up with Share form with addition functionality.
    I am developing custom share functionality because there is some addition functionality related to this.
    How to Implement custom share functionality in SharePoint 2013  document Lib pro-grammatically?
    Regards,
    - Siddhehswar

    Hi Siddhehswar:
    I would suggest that you use the
    Ribbon. Because this is a flexible way for SharePoint. In my project experience, I always suggest my customers to use it. In the feature, if my customers have customization about permission then i can accomplish this as soon
    as possible. Simple put, I utilize this perfect mechanism to resolve our complex project requirement. Maybe we customize Upload/ Edit/ Modify/ Barcode/ Send mail etc... For example:
    We customize <Edit> Ribbon. As shown below.
    When user click <Edit Item>, the system will
    render customized pop up window.
    Will

  • How to implement this aggregate logic at target column in odi inteface mapp

    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    how to implement this aggregate logic at target column in odi inteface mappings

    Hi
    if you don't want to aggregate try to define a user function
    analytic_sum($(value))
    implémented by
    sum($(value))
    after that
    replace your
    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    by
    analytic_sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)

  • How to implement Review Page functionality

    Hi,
    I developed one custom Page, In that page user will enter data and click on Submit.
    Requirement is before submitting, user needs review the data and click on submit.
    Please suggest how to implement this functionality.
    Thanks in Advance,
    Hanimi.

    So far I have noticed that the best idea will be to recreate and code by
    myself. As You probably know each SSHR function ends with review page that shows the changes I just want the same.
    So problem that I have is, I need to implement Dynamic Approvals so the
    employee should be able to see who is going to approve and add approvers if
    neccessary. And I cannot find any information on how to code that.
    I jsut want the same functionality as in standard modules.

  • How to implement this in Oracle Apps 11i

    Hello Friends
    I am working as a consultant for a manufacturing company.
    They have a format for charging Excise and Sales tax on their products (example below). I dont know how to implement this using oracle apps. Please help me ASAP.
    eg.
    Product A:
    MRP = Rs. 100
    Assessable Value (i.e. the value at which I have contract with the Government to pay Excise Duty) = 60% of MRP = Rs. 60 in this case.
    Excise Duty = 16% of AV =0.16*60 = Rs. 9.6
    Now, let’s suppose I am selling my product to a dealer at 30% discount.
    Therefore, Sale Price = 70% of MRP = Rs. 70
    Sales Tax = 4% of Sale Price = 0.04*70 = 2.8
    Therefore, total revenue from the deal = 70-9.6-2.8 = Rs. 57.6

    you can use Advance Pricing or creating discount or attiribute while calculating.
    this is not much complex, possible even with Advance Pricing too. Thanks
    Shiv

  • How to implement this code in labview?

    How do implement this pseudo code in labview? Please keep in mind "a" and "c" in the code below ARE VARIABLES
    for i =0 to i=maxvalue
           if i <= a 
               output = output2
           else if i > a AND i<=c
               output = output2
           else if i < c 
               output = output3
           else i = d
               output = output4
    I understance i can use a case structures and modify the label, but i do not know how to make the label dependent on a variable value. 
    Thanks 

    Try an array of boudaries and use threshold array. See this old example:
    Now just iterate over an array of values using a FOR loop.
    LabVIEW Champion . Do more with less code and in less time .

  • How to implement this attribute ?

    Hi,
    I've this problem.
    In our application to control healthcare expense I've implemented a cube with 6 dimensions. (here for who knows Italian : http://www.oracle.com/global/it/customers/profiles/profile_77.html )
    The biggest dimension is the "patient" one, with 1.500.000 units at 5th level, grouped in geographic aggregates, until the entire city at highest level.
    Now customers wants to have the possibility to select patiens with chronic disease from these. There are about 500 kinds of chronic diseases.
    Every patient can have no one, one, or (and this is the problem) more then one of these chronic disease.
    How to try to implement this? as a new dimensions or as an attribute ?
    I've thought that best way is to introduce a new (chronic diseases) dimension, to have a way to select one or more of these diseases at all levels of patient dimension.
    I'm asking how to solve the problem that a single patien can also have more than one disease.
    Is there any way to implement this ?

    thanks to everyone for the answers
    I've some questions.
    to olapworld:
    have you any sample code to show me how to implement the dimensionalized valueset and the customizations needed ??
    to scott:
    I think I'm not understanding your suggestion:
    my target is to add the "ilnesses" selection to other ones. The most important cube of my applications analyze
    healthcare expenses from six dimensions. Customer wants analyze cube "adding" a way to select only "ilnesses" patients and elvaluate their expense.
    I'm in doubt becouse a patient can also have more then one ilness, so I can't simply add a "ilnesses" dimensions to the cube and mapping it to an "ilness_id" in the fact table.
    How can the two dimensioned cube to help me in this ?
    to Rafalm1:
    in any case, implementing Count(Distinct patient) would be useful for me, to have a way to count the number of patients who had a healthcae assistence. Can you suggest me how to implement this ?

  • How to create custom calendar in webdynpro ABAP.....(WDA)

    Hi,
    How to create custom calendar in Webdynpro Abap ?.
    Regards,
    Narasimha

    The best way I see here is to develop your custom calender in any of the UI technologies supported like Flash (flex) or HTML5 (or maybe even SilverLight? not sure) and embed it in your WD view. You can also handle interactions between the embedded component and the WD controller.
    Regards,
    Raghavendra

  • How to implement a back functionally like the back of the browser

    Hi, I have a commandImageLink("go back") in a template jspx. How to implement the back functionally like the back of the browser with a managed bean method??. For know I m not using task flows.

    I think you can use a javascript method to go back to the previous browser page.
    http://javascript.about.com/library/blback.htm
    http://www.pageresource.com/jscript/jhist.htm
    http://www.w3schools.com/jsref/met_his_back.asp
    Perhaps you find something useful and related to backing beans here:
    http://adfdevelopers.blogspot.com/2009/04/some-handy-code-for-backing-beans-adf.html
    NA
    http://nickaiva.blogspot.com

  • How to implement Shopping cart functionality in weblogic portal 10.3

    Hi,
    Can someone help me out on how to implement Shopping cart functionality in weblogic portal 10.3?
    Thanks,
    Uttam

    One piece of advise I can give is to NOT* use the Shopping Cart fuctnionality inherent in WLP (com.beasys.commerce.ebusiness.shoppingcart. The Online Commerce functionality in WebLogic Portal has been deprecated.
    Brad

  • Hi out there. To capture a screen shot one uses: Command-Shift-3 or 4. I have done this for a long time. Now suddenly neither screen shot works anymore. Suggestions how to get this useful function back? Thanks, Georgx

    Hi out there. To capture a screen shot one uses: Command-Shift-3 or 4. I have done this for a long time. Now suddenly neither screen shot command works anymore. Suggestions how to get this useful function back? Thanks, Georgx

    Command-Shift-3 and 4 works just fine on several Macs that I have here.
    Try restarting your Mac....or post in the specific support area for your Mac model....for more advice.
    https://discussions.apple.com/index.jspa

  • How to generate new perner number using Abap Code in pa0002. what is the fu

    how to generate new perner number using Abap Code in pa0002. what is the function Module used.

    hi
    define internal number ranges for ur implementation then when u run PA 40  do not input any employee number , system will generate the employee number automatically.
    Regards
    sameer

  • The volume keys on my Logitech K760 wireless keyboard do not work with my 2.3 GHz, Intel Core i5 Mac mini which runs Mac OS X 10.7.4. Anyone know how to correct this without having to re-code firmware?

    My first post to the Apple Support Community so it looks like all I wanted to know is covered in the title. The research I have done led me to solutions that I am not comfortable trying for fear of irreparably damaging my keyboard and/or Mac mini. Does anyone have a simpler solution? Please? Hellooooo?
    Just in case the title is too long to show, I have re-pasted here:
    The volume keys on my Logitech K760 wireless keyboard do not work with my 2.3 GHz, Intel Core i5 Mac mini which runs Mac OS X 10.7.4. Anyone know how to correct this without having to re-code firmware?

    BDAqua wrote:
    Hello & welcome to the Forums!
    I think Spark cured this for another person and the same problem...
    http://www.shadowlab.org/Software/spark.php
    http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ukelele
    http://doublecommand.sourceforge.net/
    Thank you for the response. Unfortunately, I could not figure out how to work the above applications. I thought that i had managed to assign the appropriate function keys in Spark to their volume counterparts, but it had no effect. Below is a screen shot. Do you see anything amiss?

  • How to Stop at Source System's Abap Code from BI Infopackage Trigger

    Hi Experts,
    I have enahanced 2 fields to some standard data source, that fields data is comiong fine to RSA3 in Source system.
    i am not getting 2 fields data to BI  PSA, but that 2 fields data  i am getting at in RSA3 Tcode  source system.
    i have tried all the ways to get data to BI PSA, but no luck.
    so, while running infopacke from BI i need to stop  at  Source System's Abap code where i have wriiten the code for those 2 fields.
    so, please any  one can explain, how to stop at source system's Abap Code once i  trigger infopackage from BI.
    Regards,
    Nagaraju K.

    Hi,
    which data source on your working?
    master data or transaction data
    enter the TCODE- CMOD
    choose the project
    select the funciton exit - EXIT_SAPLRSAP_001 - Transaction data
                                        EXIT_SAPLRSAP_002 - master data attr
                                        EXIT_SAPLRSAP_003 - mster data text
                                        EXIT_SAPLRSAP_004 - master data hier.
    choose the include program - ZXRSAU01.
    go to source code tab -> go to change mode -> find the code will start form here
    EX- : when " ZLIS_13_VDITM
    if not required don't put break-point .
    just comment it code.
    Thanks,
    Phani.

Maybe you are looking for

  • How can I transfer my app store purchases from one account to another?

    Can I transfer my apps to a new iTunes account from my old one? How? Thanks.

  • Cache searches on Google no longer work

    I get the following error message every time I click on any Google cache: Safari can't open the page "http://webcache.googleusercontent.com/search?q=cache:-vQqpvjK6j0J:www.acousticgu itarforum.com/Acoustic+guitarforum&cd=1&hl=en&ct=clnk&gl=us&client=

  • What is error code 0x132A5?

    I see the error code 0x132A5 in the error log. What does this mean? <P> Each concurrent directory server operation (bind, search, modify) issued by the Calendar Server requires an active Directory Server connection. By default, 5 such connections are

  • Portal source error

    Hi, I am trying to create a portal source. Source name : Portal URL Base : http://<webcache>/portal/pls/portal/PORTAL After that I am getting the following error. "Could not retrieve data from OracleAS Portal. Make sure that the URL base is correct a

  • Motorola droid HD, SD Card

    Verizon has known these phones have had a design problem with the SD card slot for sometime.  Getting a new phone through the insurance policy doesn't help because you end up the the same problems with the new phone.  Disappointed Verizon didn't step