Any function module for getting fiscal year week numbers

can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
Thanks!
Lakshmikandh

hi,
Use FM <b>'DATE_GET_WEEK'</b>...
parameter D1 LIKE SCAL-DATE.
Data w like scal-week.
CALL FUNCTION <b>'DATE_GET_WEEK'</b>
EXPORTING
date = D1
IMPORTING
WEEK = W
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write W+4(2).
Regards,
Santosh

Similar Messages

  • Function module to get Fiscal year/week

    Hi,
    I searched SAP forum but could not find specific answer to this question.
    I want to find Fiscal year week (YYYYWW) for a date using Fiscal year variant.
    Can you suggest some function module/method to get the info?
    E.g., if todays date is 06/23/2010
    then Fiscal year week should be 201034. (Depending on Fiscal year variant XX)
    Calendar year week is 201025.
    Thanks,
    Chirag

    >
    Chirag Mistry wrote:
    > C'on guys, help me out!
    That's what the other's have been doing all along!
    AT some point, you have to take responsibility yourself. The forum isn't here to provide people with complete packaged solutions. You have to do some work yourself.
    You either have the fiscal year variant in your system as Brad has suggested, or you will have to develop some logic to figure out what week you are in based on the start date of your fiscal year and the date you are interested in.
    Rob

  • Is there any function module for getting distribution list name

    Hi all,
    Is there any function module for getting distribution list name when there is same description for two distribution list name.
    or
    help me how to fetch the correct distribution name when there is same description.
    In order to send mails.
    Tell me ASAP.
    thanks
    sagar.

    http://www.sapbrainsonline.com/REFERENCES/FunctionModules/SAP_function_modules_list.html
    list of Fms

  • Any Function Module For getting Shipment Details

    Hi All,
    I want to get all details of shipment. i tired , but unable to get any function? I was able to find the creation or change shipment function modules, but not able to find the function module for getting the details for Shipment.
    like BAPI_SHIPMENT_CHANGE           Change Shipment
    BAPI_SHIPMENT_CREATE           Create Shipment
    similary
    Do you have any idea for getting (display)the details of Shipments?
    Regards,
    Raju

    hi,
    you can use
    VTTP,VTTK
    or
    RV_SHIPMENT_READ

  • Function Module for getting address from address number

    Hi all,
    Is there any function module for getting address from address number. kindly reply.
    regards,
    siya

    HI,
    just try this function module:
    CALL FUNCTION 'HR_GET_ADDRESS'
        EXPORTING
          ankey          = ankey
          anart          = anart
          molga          = '01'
        IMPORTING
          address_detail = adr_data
        EXCEPTIONS
          not_found      = 1
          OTHERS         = 2.
    HOPE IT WILL HELP YOU
    regards
    rahul

  • Is their any function module for deleting condition record i am trying

    Hi Experts,
    Is their any function module for deleting condition record i am trying  this way.......
    DATA: TABLE (4) TYPE C.
    DATA: KNUM LIKE KONH-KNUMH
    DATA: K_VEWE LIKE T681-KVEWE VALUE 'A'.
    DATA: T681_STR LIKE T681.
    DATA: LV_NUM TYPE I.
    GET PARAMETERS
    PARAMETERS: TABNO LIKE T681-KOTABNR.
    PARAMETERS: TESTMODE DEFAULT 'X' AS CHECKBOX.
    REFRESH INT_KNUMH.
    Select single * from T681 into T681_STR
    where kvewe = K_VEWE AND
    KOTABNR = TABNO.
    IF SY-SUBRC NE 0.
    WRITE: / 'No entry in T681 for number ', TABNO.
    WRITE: / 'Check whether corresponding condition table exists.'.
    EXIT.
    ENDIF.
    TABLE = T681_STR-KOTAB.
    SELECT KNUMH FROM (TABLE) INTO KNUM.
    SELECT SINGLE * FROM KONH WHERE KNUMH = KNUM.
    IF SY-SUBRC NE 0.
    INT_KNUMH-KNUMH = KNUM.
    COLLECT INT_KNUMH.
    ENDIF.
    ENDSELECT.
    DESCRIBE TABLE INT_KNUMH LINES LV_NUM.
    IF LV_NUM EQ 0.
    WRITE: / 'No inconsistent entries found.'.
    WRITE: / 'Each record in the condition table has a corresponding.'.
    WRITE: / 'entry in the KONH table.'.
    EXIT.
    ENDIF.
    LOOP AT INT_KNUMH.
    IF TESTMODE IS INITIAL.
    DELETE FROM (TABLE) WHERE
    KNUMH = INT_KNUMH-KNUMH.
    IF SY-SUBRC = 0.
    WRITE: / 'KNUMH =', INT_KNUMH-KNUMH(10), ' deleted from table ' ,TABLE.
    ELSE.
    WRITE: / 'DELETE: SY-SUBRC is', SY-SUBRC , ' FOR KNUMH = ' .
    WRITE: INT_KNUMH-KNUMH(10).
    ENDIF.
    ELSE.
    WRITE: / 'TESTRUN: KNUMH =', INT_KNUMH-KNUMH(10).
    ENDIF.
    ENDLOOP.
    is their any Standerd Function module  for comparing  tables if the condition record not exist in it has to exit if it is their then compare  those two tables if not exist in one table also that has  to be delete  the condition record
    Please let me know .....

    Hi,
       You can use Function module PRICING_CHECK to check condition record. Do a where-used list on it to see how to call it.
    Regards
    Kiran Sure

  • Function module for getting the open qty

    HI experts,
                      I have a PO quantity(EKPO_MENGE).against same PO and item item(EBELN and EBELP) if Goods receipt has happened (MSEG_ERFMG) then i need to calculate the open qty.and also by netting the open quantity if multiple GRs has done against the same PO and item.
    Can you suggest any function module to get this open PO quantity.

    Hello,
    Hope this link can help you.
    [Po Open Quantity;
    Thanks
    Jayant

  • Is there any function module to get the variables used in a query?

    Hi experts
    Please, do you know if is there any function module to get the variables used in a query?
    Thanks and regards
    Luis

    Hi Srini
    Yes, I have checked the tables but I need a function module
    Thanks anyway!
    Luis

  • Any function module to get all items in SAP INBOX

    hi All
    I am trying to get all the items in my SAP Inbox via rfc.
    Can anyone help me with any function module to get all items in SAP INBOX.
    Thanks

    Hi Mukesh,
    Step 1. Use FM SO_USER_READ_API1 to get the folder details of the user
    Step 2. Use FM SO_FOLDER_READ_API1 of the respective folder. You can read the Inbox, Workflow Inbox depending on what folder you read. The function modules are documented well as well with examples.
    Hope this will  help u,
    Thanks & Regards
    Kiran

  • Functional module for Getting Material classification data.

    Please tell me Functional module for Getting Material classification data like class type , class, characteristics and characteristics values for material.

    Dear,
    FM:
    CLAF_CLASSIFICATION_OF_OBJECTS
    Table KLAH Class Header Data
    - KSML Characteristics of a Class
    Regards,
    R.Brahmankar

  • Is there any function module for purchase order change

    Hi Experts,
    Is there any function module for purchase order change or i need to do new recording in me22n.
    Thanks,
    Senthil

    Hi
    Function module <b>BAPI_PO_CHANGE</b> enables you to change purchase orders. The Change method uses the technology behind transaction ME22N.
    Regards,
    Viven

  • Any functional module to get financial document based on billing document

    hi all,
    do we have any functional module to get accounting document (bseg-BELNR) based on billing document (bseg-VBELN)?
    i have a requirement to retrieve the clearing document (bseg-augcp) & date(bseg-augdt) from BSEG with billing document.
    billing document is not a key, so i would like to retrieve the accounting document from any function module and use that to get clearing document (bseg-augcp) & date(bseg-augdt).
    thanks.

    hi all,
    i got other option to get this....thanks.
          select single * from bkpf
          where bukrs = <data>-werks
            and AWTYP = 'VBRK'
            and AWKEY = billing doc.
          if sy-subrc EQ 0.
            select single * from bseg
            where bukrs = bkpf-bukrs
              and belnr = bkpf-belnr
              and gjahr = bkpf-gjahr.
            if sy-subrc EQ 0.
              <data>-AUGDT = bseg-augdt.
              <data>-AUGBL = bseg-augbl.
            endif.

  • Hi is there any function module for radix conversion

    Hi,
    I need to convert number of base 36 to decimal number. Is there any function module for that.
    i.e) z to 35
         10 to 36
         11 t0 37

    Hai,
    This program perfectly converts a number from one number system to another number system.
    REPORT  Z_RADIX_CONVERSION.
    PARAMETERS:
      P_S_RAD(2) TYPE N,                   " Source Radix
      P_D_RAD(2) TYPE N,                   " Destination Radix
      P_S_NUM(5) TYPE C.                   " Source Number
    *" Data declarations...................................................
    Work variables                                                      *
    DATA:
      W_LEN         TYPE I,
      W_FACT        TYPE I,
      W_D_NUM(5)    TYPE N,
      W_T_LEN       TYPE I,
      W_NUM         TYPE C,
      W_NUM1        TYPE I,
      W_REM         TYPE I,
      W_INDEX       TYPE I VALUE 20,
      W_T_NUM(30)   TYPE C,
      W_T_NUMBER(5) TYPE N.
    IF P_S_RAD GE 1  AND
       P_S_RAD LE 16 AND
       P_D_RAD GE 1  AND
       P_D_RAD LE 16.
      IF P_S_RAD EQ 01 AND P_S_NUM CO '0 ' OR
         P_S_RAD EQ 02 AND P_S_NUM CO '01 ' OR
         P_S_RAD EQ 03 AND P_S_NUM CO '012 ' OR
         P_S_RAD EQ 04 AND P_S_NUM CO '0123 ' OR
         P_S_RAD EQ 05 AND P_S_NUM CO '01234 ' OR
         P_S_RAD EQ 06 AND P_S_NUM CO '012345 ' OR
         P_S_RAD EQ 07 AND P_S_NUM CO '0123456 ' OR
         P_S_RAD EQ 08 AND P_S_NUM CO '01234567 ' OR
         P_S_RAD EQ 09 AND P_S_NUM CO '012345678 ' OR
         P_S_RAD EQ 10 AND P_S_NUM CO '0123456789 ' OR
         P_S_RAD EQ 11 AND P_S_NUM CO '0123456789A ' OR
         P_S_RAD EQ 12 AND P_S_NUM CO '0123456789AB ' OR
         P_S_RAD EQ 13 AND P_S_NUM CO '0123456789ABC ' OR
         P_S_RAD EQ 14 AND P_S_NUM CO '0123456789ABCD ' OR
         P_S_RAD EQ 15 AND P_S_NUM CO '0123456789ABCDE ' OR
         P_S_RAD EQ 16 AND P_S_NUM CO '00123456789ABCDEF ' .
        W_LEN = STRLEN( P_S_NUM ).
        W_T_LEN = W_LEN - 1.
        DO W_LEN TIMES.
          W_NUM = P_S_NUM+W_T_LEN(1).
          CASE W_NUM.
            WHEN 'A'.
              W_NUM1 = 10.
            WHEN 'B'.
              W_NUM1 = 11.
            WHEN 'C'.
              W_NUM1 = 12.
            WHEN 'D'.
              W_NUM1 = 13.
            WHEN 'E'.
              W_NUM1 = 14.
            WHEN 'F'.
              W_NUM1 = 15.
            WHEN OTHERS.
              W_NUM1 = W_NUM.
          ENDCASE.
          W_D_NUM = W_D_NUM + W_NUM1 * ( P_S_RAD ** W_FACT ).
          ADD 1 TO W_FACT.
          SUBTRACT 1 FROM W_T_LEN.
        ENDDO.
      ELSE.
        WRITE'Invalid Number'(003).
      ENDIF.
    ELSE.
      WRITE'Enter radix between 1 and 16 '(002).
    ENDIF.
    W_T_NUMBER = W_D_NUM.
    IF P_D_RAD = 1.
      DO W_D_NUM TIMES.
        WRITE'O'.
      ENDDO.
    ELSE.
      WHILE W_T_NUMBER NE 0.
        W_REM = W_T_NUMBER MOD P_D_RAD.
        CASE W_REM.
          WHEN  10.
            W_T_NUM+W_INDEX(1) = 'A'.
          WHEN  11.
            W_T_NUM+W_INDEX(1) = 'B'.
          WHEN  12.
            W_T_NUM+W_INDEX(1) = 'C'.
          WHEN  13.
            W_T_NUM+W_INDEX(1) = 'D'.
          WHEN  14.
            W_T_NUM+W_INDEX(1) = 'E'.
          WHEN  15.
            W_T_NUM+W_INDEX(1) = 'F'.
          WHEN OTHERS.
            W_T_NUM+W_INDEX(1) = W_REM.
        ENDCASE.                           " CASE W_REM.
        SUBTRACT 1 FROM W_INDEX.
        W_T_NUMBER = W_T_NUMBER DIV P_D_RAD.
      ENDWHILE.
    ENDIF.
    WRITE:
      /10 'The Equivallent number in Base'(001),
           P_D_RAD,
           'is',
           W_T_NUM.
    <b>Reward points if helpful .</b>
    regards,
    rama pammi

  • Any Function module for Date conversion

    Hi,
    In my output the date is coming like 80999898 but the actual date is 01.01.1900.
    Could you please tell me is there any Function module for that.
    Regards,
    Tushar

    Use the conv. exit CONVERSION_EXIT_INVDT_OUTPUT for this purpose.
    BR,
    Suhas

  • Any Function Module to get date by passing week and year

    Hi,
       Is there any Function Module available to get date by passing week and year. For example, Week 24, Year 2005 and you get the date.
    Regards,
    Mira

    WEEK_GET_FIRST_DAY
    pass 'YYYYWW' (200524) to WEEK parameter it will give you the week start date
    Raja

Maybe you are looking for

  • ORA-12560 when logging as SYSDBA in 11gR2 db installed in Windows 7

    I have installed Oracle 11gR2 in Windows 7. I setup all listener and tnsname file and can login to the database like following: sqlplus cisadm/cisadm@demo However, it throws ORA-12560 error when loggin as sysdba as below: sqlplus / as sysdba I have r

  • Bluetooth keyboard case?

    Will a keyboard case that I have for my iPad 2 fit an iPad 4?

  • J1IEX  Issue

    While Doing the Posting in J1iex I m getting the Following message FI/CO interface: Inconsistent FI/CO line item data for updating     Message no. RW016

  • N8 Anna update zoom out not working in mails

    prior to the Anna update, i could zoom out  the view for all the mails received in N8 (ive set up gmail account). I use this particularly to view in full page mode for big images in html mails. But after the Anna update, i cannot zoom out the default

  • Exporting PDFs?  Replaces images.

    I'm creating a newsletter that includes several pictures on different pages.  I export the Pages document as a PDF and during that transition it copies some of the images and replaces existing images on top.  Help!!