Function Module to check posting date

Hi,
Is there any function module avilable to check whether the posting date is open or not.
Regards
Suresh.

check G_POSTING_DATE_OF_PERIOD_GET
Reward points if useful, get back in case of query...
Cheers!!!

Similar Messages

  • I'm looking for a Funciont Module that check posting date (VBRK-FKDAT)

    Hi, All
    I'm looking for a Function Module that let me know whether or not a Date (importing paramerter) is allowed for posting in period. (MARV data (including XRUEM (Allow Posting to Previous Period) ))
    If you know that, please let me know.
    Best Regards.
    Rie.

    Hi,
    Check the following FM. :
    MARV_SINGLE_READ
    Thanks & Regards,
    Faheem.

  • Function module to validate posting date

    Hi all,
    i am using function module amfi_period_get_and_check to validate posting date.
    if posting date is not open this module raises error message but when i am using it
    in my code its not showing error message but when i am executing the module
    it is showing the message for the same date
    please reply soon
    thnx

    at selection-screen on pos_dt.
    CALL FUNCTION 'AMFI_PERIOD_GET_AND_CHECK'
      EXPORTING
        i_bukrs                = com_code-low
      I_GJAHR                =
        i_koart                = 's'
      I_KONTO                = ' '
       I_MONAT                = '00'
       I_BUDAT                = pos_dt.
    IMPORTING
      E_MONAT                =
      E_GJAHR                =
    EXCEPTIONS
      ERROR_PERIOD           = 1
      ERROR_PERIOD_ACC       = 2
      OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Function module to get posting date from posting year and posting period

    Hi all,
    I need a function module which will return posting date when posting period and fiscal year is passed to it..
    Thanks and regards,
    Puja.

    Hi puja
    try this FM
    this will solve ur problem
    G_POSTING_DATE_OF_PERIOD_GET
    G_POSTING_DATE_OF_YEAR_GET
    FCJ_CHECK_POSTING_DATE
    Cheers
    Snehi Chouhan

  • Function module to check if a given file/folder path is valid or not?

    Hi,
    I am using function modules GUI_DOWNLOAD and GUI_UPLOAD.
    Is there any function module to check if a given file/folder path is valid or not?
    Thanks.

    Hi Kumar ,
    REPORT  zdir_test.
    TYPE-POOLS: abap.
    DATA: v_dir TYPE string.
    DATA: v_bol TYPE abap_bool.
    v_dir = 'c:\sap\'.
    CALL METHOD cl_gui_frontend_services=>directory_exist
      EXPORTING
        directory            = v_dir
      RECEIVING
        result               = v_bol
      EXCEPTIONS
        cntl_error           = 1
        error_no_gui         = 2
        wrong_parameter      = 3
        not_supported_by_gui = 4
        OTHERS               = 5.IF NOT v_bol IS INITIAL.
      WRITE:/ 'Directory exists.'.
    ELSE.
      WRITE:/ 'Directory does not exist.'.
    ENDIF.
    Regards,
    Sachin M M

  • Function Module tto check special characters in a field

    Hi All,
    I have a requriemnt where i need to make sure there are no special characters allowed
    in a paremeter ( is there any functional module to check it)
    r anyway to work with
    Thank in advance for u replies.
    Regards,
    Riyaz.

    DATA: vergleich_string(100) VALUE
              'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.
      CONCATENATE vergleich_string ' 1234567890,./!@#$%&*-_+=~|\[{]}()"'
                                                   INTO vergleich_string.
    use condition.
    if var ca vergleich_string.
    raise error message.
    endif.

  • FUNCTION MODULE CREATION FOR GENERIC DATA SOURCE

    Hi BI gurus,
    I am creating function module for generic datasource. For that I followed below mentioned steps
    Steps
    1.     Created s structure with the fields that needed.
    2. Created FM by copying the standard Function module
    " RSAX_BIW_GET_DATA_SIMPLE " and Give a New name starting With
    Y or Z .
    3. IN SE37 ->Your Function module name -> Change, In table tab given structure
    name by deleting the associated type given in “E_T_DATA “.
    And inserted the required code given below
          PROGRAM 'ZHU_BALANCE'.
    *& Report  ZHU_BALANCE
    TABLES: VEKP, VEPO.
    DATA: BEGIN OF T_DISPLAY,
          DATE   LIKE SY-DATUM,
          EXIDV  LIKE VEKP-EXIDV,
          LGORT  LIKE VEPO-LGORT,
          WERKS  LIKE VEKP-WERKS,
          END OF T_DISPLAY.
    DATA: ITAB_DISPLAY LIKE TABLE OF T_DISPLAY.
    DATA: WA_ITAB_DISPLAY LIKE LINE OF ITAB_DISPLAY.
    SELECT VEKPEXIDV VEPOLGORT VEPO~WERKS
           INTO CORRESPONDING FIELDS OF TABLE ITAB_DISPLAY
           FROM VEKP AS VEKP INNER JOIN VEPO AS VEPO
             ON  VEKPVENUM = VEPOVENUM
             AND VEKPWERKS = VEPOWERKS
           WHERE VEKP~VSTEL = SPACE
             AND VEKP~VEGR1 = '401'
             AND VEKP~VPOBJ = '12'
             AND VEKP~STATUS = '0020'
             AND VEPO~VEPOS = '000001'.
    LOOP AT ITAB_DISPLAY INTO WA_ITAB_DISPLAY.
    WA_ITAB_DISPLAY-DATE = SY-DATUM.
    MODIFY ITAB_DISPLAY FROM WA_ITAB_DISPLAY TRANSPORTING DATE.
    ENDLOOP.
    WRITE:/ 'DATE', 20 'EXIDV', 40 'LGORT', 60 'WERKS'.
    ULINE.
    LOOP AT ITAB_DISPLAY INTO WA_ITAB_DISPLAY.
    WRITE:/ WA_ITAB_DISPLAY-DATE, 20 WA_ITAB_DISPLAY-EXIDV , 40 WA_ITAB_DISPLAY-LGORT, 60 WA_ITAB_DISPLAY-WERKS.
    ENDLOOP.
    While checking the function module it’s populating the syntax error as
    THE TYPE “SRSC_S_IF_SIMPLE” IS UNKOWN. (Though this is commented in program)
    So pls suggest
    Regards,
    praful

    hi indira,
    thanx for ur reply we have created the funcion module successfuly it is also showing the output correct. But when we put that function module in the generic data source and try to extract data in RSA3 it shows the correct output of function module but with the msg ' 0 entries found in customer enhancement' and therfore zero records in the display list.
    is there any correction or steps to be followed in data extraction
    pls suggest
    regards,
    praful

  • Is there any function module to convert the date format

    Dear ABAPers,
    Is there any function module to convert the date format from dd.mm.yyyy to dd-mmm-yyyy.
           I want to convert the date format from dd.mm.yyy to dd.mmm.yyy Eg.from 10.03.2008 to 10-mar-2009.
    Thanks & Regards,
    Ashok.

    hi,
    create custom function module or copy the below code in the report ..and use it
    the out put for below is :----Convert a DATE field into a full format date eg. March 23, 2000
    FUNCTION Z_CONVERT_DATE_INTO_FULL_DATE.
    ""Local interface:
    *"       IMPORTING
    *"             VALUE(DATE) LIKE  SY-DATUM
    *"       EXPORTING
    *"             VALUE(FORMATTED_DATE)
    *"       EXCEPTIONS
    *"              INVALID_DATE
    TABLES: TTDTG.
    DATA: BEGIN OF T_DATE,
            YYYY(4) TYPE C,
            MM(2) TYPE C,
            DD(2) TYPE C,
          END OF T_DATE.
    DATA: DAY(3) TYPE N.
    DATA: VARNAME LIKE TTDTG-VARNAME.
    IF DATE IS INITIAL.
      CLEAR FORMATTED_DATE.
      EXIT.
    ENDIF.
    check document date format
    CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
      EXPORTING
        DATE = DATE
      EXCEPTIONS
        PLAUSIBILITY_CHECK_FAILED = 1.
    IF SY-SUBRC NE 0.
      RAISE INVALID_DATE.
    ENDIF.
    MOVE DATE TO T_DATE.
    CONCATENATE '%%SAPSCRIPT_MMM_' T_DATE-MM INTO VARNAME.
    SELECT SINGLE * FROM TTDTG WHERE SPRAS = 'EN' AND VARNAME = VARNAME.
    WRITE T_DATE-DD TO DAY.
    CONCATENATE DAY ',' INTO DAY.
    CONCATENATE TTDTG-VARVALUE DAY T_DATE-YYYY INTO FORMATTED_DATE
      SEPARATED BY SPACE.
    ENDFUNCTION.
    the output is :--Convert a DATE field into a full format date eg. March 23, 2000
    Regards,
    Prabhudas

  • Function module to determine the date for the nth weekday of the mth month

    Hey folks,
    Is there a function module which determines the date for the mth weekday of the nth month in the pth year.
    For instance, if I input 2nd thursday of the 4th month in 2008, it should return me, 04/10/2008  (MM/DD/YYYY).
    Thanks and Best Regards,
    Puja.

    Hi Ravi,
    Hadn't been able to work on this lately...You solution was quite close, but did not work for a few scenarios....I tweaked the logic a bit to take care of them as well...
    So here goes the code:
    ================================================
      DATA first_day_of_month TYPE datum.
      DATA day TYPE p.
      CONCATENATE year month '01' INTO first_day_of_month.
      CALL FUNCTION 'DAY_IN_WEEK'
        EXPORTING
          datum = first_day_of_month
        IMPORTING
          wotnr = day.
      DATA day_number TYPE numc2.
      IF day = weekday.
        IF recur = 1.
          DATA ls_date(10) TYPE c.
          CONCATENATE month '/01/' year INTO ls_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external                  = ls_date
           IMPORTING
             date_internal                  = date.
        ELSE.
          day_number =  ( ( recur - 1 ) * 7 )  + 1.
        ENDIF.
      ELSEIF day < weekday.
        day_number = ( ( recur - 1 ) * 7 ) + ( weekday - day ) + 1.
      ELSE.
        day_number = ( ( recur - 1 ) * 7 ) + ( 7 - day ) + weekday + 1.
      ENDIF.
      IF date IS INITIAL.
        CONCATENATE year month day_number INTO date.
      ENDIF.
    ====================================
    There still could be some loopholes in this....am not sure....but it sure did seem to work for a couple of random checks that I performed.
    Brownie points to you for giving me a direction.
    Thanks,
    Puja.

  • Function module to fine closest date among given date

    Hi All,
    Is there any function module to find closest date among given dates?
    Thanks in advance

    Hi
    I think there is no FM module available which will satisy this requirement...
    But You can develope one ZFM or You can write a code for it...
    Logic will be
    Check out below code...
    PARAMETERS : P_DATE TYPE SY-DATUM DEFAULT '20090909'.
    DATA : BEGIN OF WA_ITAB,
            DATE TYPE SY-DATUM,
           END OF WA_ITAB.
    DATA : ITAB LIKE STANDARD TABLE OF WA_ITAB.
    DATA : IND TYPE SY-TABIX,
            IND2 TYPE SY-TABIX,
            IND3 TYPE SY-TABIX,
            DATE1 TYPE SY-DATUM,
            DATE2 TYPE SY-DATUM,
            DIFF1 TYPE I,
            DIFF2 TYPE I,
            UTTER_CLOSE TYPE SY-DATUM.
    CLEAR : WA_ITAB, ITAB[].
    WA_ITAB-DATE = '20090824'.
    APPEND WA_ITAB TO ITAB.
    CLEAR : WA_ITAB.
    WA_ITAB-DATE = '20090901'.
    APPEND WA_ITAB TO ITAB.
    CLEAR : WA_ITAB.
    WA_ITAB-DATE = '20090912'.
    APPEND WA_ITAB TO ITAB.
    CLEAR : WA_ITAB.
    WA_ITAB-DATE = '20090930'.
    APPEND WA_ITAB TO ITAB.
    CLEAR : WA_ITAB.
    WA_ITAB-DATE = '20091011'.
    APPEND WA_ITAB TO ITAB.
    CLEAR : WA_ITAB.
    WA_ITAB-DATE = P_DATE. " P_DATE ==> Your Key Date
    APPEND WA_ITAB TO ITAB.
    CLEAR : WA_ITAB.
    SORT ITAB BY DATE.
    DELETE ADJACENT DUPLICATES FROM ITAB COMPARING DATE.
    READ TABLE ITAB INTO WA_ITAB WITH KEY DATE = P_DATE.
    IF SY-SUBRC = 0.
      IND = SY-TABIX.
    ENDIF.
    IND2 = IND - 1.
    IND3 = IND + 1.
    READ TABLE ITAB INTO WA_ITAB INDEX IND2.
    IF SY-SUBRC = 0.
      DATE1 = WA_ITAB-DATE.
    ENDIF.
    READ TABLE ITAB INTO WA_ITAB INDEX IND3.
    IF SY-SUBRC = 0.
      DATE2 = WA_ITAB-DATE.
    ENDIF.
    CLEAR : DIFF1 , DIFF2.
    DIFF1 = P_DATE - DATE1.
    DIFF2 = P_DATE - DATE2.
    IF DIFF1 = DIFF2. 
    UTTER_CLOSE = DATE1. " or date2 either
    ELSEIF DIFF1 > DIFF2.
      UTTER_CLOSE = DATE2.
    ELSEIF DIFF1 < DIFF2.
      UTTER_CLOSE = DATE1.
    ENDIF.
    WRITE : / 'Key Date ' , P_DATE.
    WRITE : / 'Lower Closest Date ' , DATE1.
    WRITE : / 'Upper Closest Date ' , DATE2.
    WRITE : / 'Utter Close Date based on key date ', P_DATE , ' is ' , UTTER_CLOSE.
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7
    ilesh Nandaniya
    Edited by: ilesh 24x7 on Sep 19, 2009 3:54 PM

  • Function module to verify if date is valid.

    Anyone know a function module to verify if date is valid?thx

    hiiii
    This function module will be useful.check.
    FM CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
    EXPORTING
    date = pre_date
    EXCEPTIONS
    plausibility_check_failed = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e002(0s) WITH pre_date.
    ENDIF.
    reward if useful
    thx
    twinkal

  • ABAP Function Module Example to move data from one Cube into Another

    Hi experts,
    Can any please help out in this ..?
    A Simple ABAP Function Module Example to move data from one Cube into Another Cube
    (How do i send the data from one client to another client using Function moduel).
    Thanks
    -Upen.
    Moderator message: too vague, help not possible, please describe problems in all technical detail when posting again, BI related? ("cube"), also search for information before asking.
    Edited by: Thomas Zloch on Oct 29, 2010 1:19 PM

    This is the start routine to duplicate records in two currencies.
    DATA: datew   TYPE /bi0/oidateto,
          datew2  TYPE rsgeneral-chavl,
          fweek   TYPE rsgeneral-chavl,
          prodhier TYPE /bi0/oiprod_hier,
          market  TYPE /bic/oima_seg,
          segment TYPE /bic/oizsegment.
    DATA: BEGIN OF S_DATA_PACK OCCURS 0.
            INCLUDE STRUCTURE /BIC/CS8ZSDREV.
    DATA: END OF S_DATA_PACK.
    S_DATA_PACK[] = DATA_PACKAGE[].
      REFRESH DATA_PACKAGE.
      LOOP AT S_DATA_PACK.
        move-corresponding s_data_pack to DATA_PACKAGE.
        if DATA_PACKAGE-loc_currcy = 'EUR'.
          DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
          DATA_PACKAGE-CURRENCY = 'USD'.
          APPEND DATA_PACKAGE.
          DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalloc.
          DATA_PACKAGE-CURRENCY = 'EUR'.
          APPEND DATA_PACKAGE.
        else.
          DATA_PACKAGE-netval_inv = DATA_PACKAGE-/bic/zsdvalgrc.
          DATA_PACKAGE-CURRENCY = 'USD'.
          APPEND DATA_PACKAGE.
        endif.
      ENDLOOP.
    This is to load Quantity field
    RESULT = COMM_STRUCTURE-BILL_QTY.
    This is to load Value field
    RESULT = COMM_STRUCTURE-NETVAL_INV.
    UNIT = COMM_STRUCTURE-currency.

  • Standard function module for checking the sales organization and plant

    Hi all,
        Does have standard function module for checking the relationship between sales organization and plant?
    Thanks a lot!
    Nina

    hi
    good
    check these BAPIS
    BAPI_SALESGROUP_GET_DETAIL     Sales Group: Display Name                                                
    BAPI_SALESOFFICE_GET_DETAIL    Sales Office: Display Name                                               
    BAPI_SALESOFFICE_GRP_EXIST     Sales Office / Sales Group: Existence Check                              
    BAPI_SALESORG_EXIST            Sales Organization: Existence Check                                      
    BAPI_SALESORG_GET_DETAIL       Sales Organization: Display Data                                         
    BAPI_SALESORG_OFFICE_EXIST     Sales Organization / Sales Office: Existence Check                       
    PLANT=>
    BAPI_PROMO_GETSITEPLANNING     Detailed Data for the Plants Involved in a Promotion   
    thanks
    mrutyun^

  • Function module to find out DATA BASE size, free space, used size

    Is there any function module to find out DATA BASE , free space, used size
    FM that gives all the details of the Date base
    what data base, what is the size, free space, used space etc...
    instead of writing case by case for each data base. based on  CASE SY-DBSYS.

    Hi,
    Check this FM:
    DB02_ORA_SELECT_DBA_SEGMENT
    alternatively u can check the tcode: DB02
    thanks|
    Mahesh

  • Function module to check whether Goods Receipt of a Purchase Order is done.

    Hi,
    Is there any function module to check whether Goods Receipt of a Purchase Order is already done?
    Taking into consideration reversals.
    Thanks.

    Hi,
    I think u can do this by using a simple select query.
    u have to go in EKBE table.
    put the PO no. in field EBELN + EBELP(line item)  and get the material docuement no.  in field BELNR + BUZEI(line item).
    Thanks
    Jitendra

Maybe you are looking for

  • Expanding text tree

    I would like to create a tree menu with an image acting as the plus and minus. Any help would be appreciated. I am very new to dreamweaver, so please be gentle!! :)

  • Multiple key level associations

    Hi, I am getting the below error during the consistency check. Table, X, has multiple key level associations. Can anyone please let me know the reason for the same. Also, when I drag the physical tables from the physical layer to the BMM Layer, there

  • Library refuses to load

    When I launch iPhoto, all I get is the message 'loading photos' and the black spinning wheel. I've tried to export the library to a new folder, but as the Source list is now blank, there's nothing to highlight. I've also tried starting iPhoto whilst

  • IPod refuses to play a certain song which plays fine in iTunes

    20gb iPod colour refuses to play a song I downloaded from the iTunes store, "Through the Fire and Flames" by Dragonforce. It plays perfectly in iTunes, but whenever I want to play it on my iPod, it automatically skips to the next song, despite not ha

  • BEx query design: defining complex filters?

    Is it possible to define complex filters in a query definition? By complex I mean using logical operators (AND, OR, NOT) Example: report giving sales results I want to have (Customers from Germany <b> AND </b> product type A) <b> OR </b> (Customers f