Regarding Function module for validating Date

Hi ,
Cananybody tell me that is there any function mdoule for validating the BGDDA and ENDDA.

dear ,
See if you are using it in the input parameter then you dont need to validate .
Beacuse selection option has that option .
secondlly if you are checking internally then is could be done simplly by if condition
regds ankit

Similar Messages

  • Any function module for  validation

    Hi,
    I am new to ABAP.
    Can any body tell me whether there is any built in function module for
    field validation.
    Thanks in advance
    Archana

    Hi,
    u can validate the field values using at selectiion-screen
    •     AT SELECTION-SCREEN
    When user enters the values in the fields of selection screen and clicks on execute button, this event gets triggered. This event is basically for checking the values entered by the user for the fields of the selection screen i.e., data validity checking. This event is for entire selection screen.  For example:
    You are accepting carrid, connid, fldate from user and you don’t want to proceed if user enters no value for carrid and fldate.  Using AT SELECTION-SCREEN can do this.
    Select-options: carrid1 for sflight-carrid,
              Connid1 for sflight-connid,
              F1date1 for sflight-f1date.
    AT SELECTION-SCREEN.
    If carrid1-low ne ‘  ’ and fldate1-low = ‘  ’.
        Error message.
    Endif.
    In this case, if both the fields are entered blank, then the user gets error message.
    Basically, this event is for many fields on selection screen.  Usually, it is for the fields which are logically related.
    •     AT SELECTION-SCREEN ON  <field>
    When you want to check for specific value of a field. For example, carrid should be in the range of ‘LH’ and ‘SQ’. This can be done in this event.  Basically, this event is for checking individual fields. You can have many AT selection-screen events in your program (i.e., for each field specified in the Select-Options).
    Select-Options carrid1 for sflight-carrid.
    AT SELECTION-SCREEN.
    If carrid1-low ne ‘LH’ and carrid1-high ne ‘SQ’.
       Error message.
    Endif.
    Here the system will not proceed on entering wrong values.
    Regards,
    Sruthi

  • Function Modules for Format Date, Month Name and Quarter value.

    Hi All,
    1. I am getting the date field from the Flatfile, so i need to format the date to YYYYMMDD. Is there any Function module for that in BW.
    2. Based on the above Formated Date i have to find out the Name of the Month like JANUARY, FEBUARY etc.
    3. Based on the same above Formated Date i need to find out the Quarter like 1, 2 etc.
    Could you please let me know if any function modules are there for the above questions in BW not in ABAP, why i mention is some Function modules are there in ABAP but not in BW.
    Thanks in advance.
    Regards,
    srinivas

    Hi ,
    1.If your input date format is MMDDYYYY then Use SDATE as conversion routine in trans strucutre to convert into YYYYMMDD.
    2.By passing year as input parameter for the following FM you would get all the months with text.Using READ statement in routine you can get month name
    MONTH_NAMES_GET
    3.For Quarters you can use the following FM:
    TSTR_PERIODS_QUARTERS
    hope it helps...
    regards,
    Raju

  • Regarding Function Module for Locking ( enque)

    Hi,
    I am facing a Problem that is when iam running Call transaction one popup is coming because some other user currently editing that Tcode at that time i need to lock tcode using enque specially for table . If suppose some other user editing at that time it will shoe that popup and it will exit from their with out doing any other process For that i need Function module for Lock and Delock.
    thanks in advance,
    murali krishna.

    So in this example, I am doing a loop and check for a lock, if I don't get one, I wait for 5 seconds, this loop continues untill 30 seconds, no lock then it quits and gives message.
    report zrich_0001.
    data: counter type i.
    parameters: p_equnr type equi-equnr.
    start-of-selection.
      clear counter.
      do.
    Exhausted,  no luch in getting a lock, get of of DO loop.
        if counter > 6.
          sy-subrc = 1.
          exit.
        endif.
    Try for lock
        call function 'ENQUEUE_EIEQUI'
          exporting
            mode_equi            = 'E'
            mandt                = sy-mandt
            equnr                = p_equnr
       _wait                = 'X'
          exceptions
            foreign_lock         = 1
            system_failure       = 2
            others               = 3.
    Got a lock, get out of DO loop.
       if sy-subrc  = 0.
          exit.
        endif.
    Still here?  Then wait another 5 seconds
        wait up to 5 seconds.
        counter = counter  + 1.
      enddo.
    Report status
      case sy-subrc.
        when  0.
          message s001(00) with 'Lock could not be established'.
        when  1.
          message i001(00) with 'Lock could not be established'.
      endcase.
    Regards,
    rewards point

  • Function Module for Discount Date

    Hi,
         Can somebody tell me whether there is any function module for determining the Discount Date (DATS) and Payment Due Date(DATS) based on Payment Terms (ZTERM)?
    Thanks,
    John.

    FI_FIND_PAYMENT_CONDITIONS
    DETERMINE_DUE_DATE

  • Function Module for selecting date by day

    Is there any function module to choose date by day. for example if I give today's date the FM should give me next thursday's date.
    Thanks
    Tharani

    this works good........
    *& Report  YCHATEST                                                    *
    REPORT  YCHATEST
    data:day like DTRESR-WEEKDAY.
    parameters:curr_dat like sy-datum default sy-datum.
    CALL FUNCTION 'DATE_TO_DAY'
      EXPORTING
        DATE          = CURR_DAT
    IMPORTING
       WEEKDAY       = day.
    write : / day.
    case day.
    when 'Monday'.
       CURR_DAT = CURR_DAT + 3.
    when 'Tuesday'.
       CURR_DAT = CURR_DAT + 2.
    when 'Wed.'.
       CURR_DAT = CURR_DAT + 1.
    when 'Thursday'.
       CURR_DAT = CURR_DAT + 7.
    when 'Friday'.
       CURR_DAT = CURR_DAT + 6.
    when 'Sat.'.
       CURR_DAT = CURR_DAT + 5.
    when 'Sunday'.
       CURR_DAT = CURR_DAT + 4.
    endcase.
      write :/ CURR_DAT.

  • Function module for comparing dates and times

    Hi,
    I have a date and time stamp in one filed for example as below:
    20070125183045
    (the first 8 are date in YYYYMMDD format, the next 6 is time in HHMMSS format). Now I want to compare this value to another such value in terms of date and time. First I want to compare dates and then times. Do you know any function module that can serve this purpose?
    Thanks very much!

    You can compare these using the function module DURATION_DETERMINE.  This fuction will give you the difference, and it can be in a view different units, such as the difference in days, months, etc.
    Funciton module takes in Start date and time and end date and time.
    Regards,
    RIch HEilman

  • Function module for convert date as sap internal format ?

    Hi All,
    Is there any standard function module to convert the date filed as SAP internal date?
    My problem is while uploading data from excel sheet date filed can be any format
    for exp: dd/mm/yyyy or mm/dd/yyyy or yyyy/dd/mm or dd-mm-yyyy,mm-dd-yyyy
                 dd-mm-yyyy or dd.mm.yyyy or mm.dd.yyyy  etc...
    In our case there is no particular format in excel it can be differ for each user. I know we have few FM's in standard.
    But those are not working for my req. pls help me if you have any idea.
    Thanks in advance.
    Regards,
    Venkat Mote.

    Hi Venkatesh,
    Can you please check with the following function module. For my case, it is working fine.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
      EXPORTING
        datum = p_gs_date
        dtype = 'DATS'
      IMPORTING
        idate = p_gs_date
    Hope it helps to you.
    Regards
    Rajkumar Narasimman

  • Function Module for Delivery date update

    Hi all,
    Can anybody help me to solve my problem. My requirement is to update order delivery date for a partner. But I am not getting any FM for that and not getting the table name also where I can update delivery date value. If you have any known FM or any suggestion please tell me.
    Thanks in advance
    Chandan

    Hi,
    The function module is
    <b>/1CRMG0/CUST_CHAN_WRT_I01</b>
    Best Regards,
    Johnny.

  • Error while activation Function module for generic data extraction

    Hi,
    I have created a generic data source ZMATERIAL in which i have selected the Extraction by Function module. I copied the function module RSAX_BIW_GET_DATA_SIMPL to ZMATERIAL_FM, but when i activate this module it gives me error
    REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
    The main program of the function "Z_BWGENDATAMATERIAL" does not begin with "FUNCTION-POOL".
    Please help me in this.

    Hi Dipika,
                  I think a similar issue is discussed
    Refer this thread
    REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
    Compiling INCLUDE progam
    question related to includes
    question related to includes
    Hope these helps
    Regards
    Karthik

  • Function modules for Master Data

    Does anyone know of any function modules that can be used to
    update master data, i.e. change attribute values.
    Obviously it can be done without going through a MD load, because you can manually edit master data directly in BW, but I was wondering if anyone knows of any function modules available to do this ...
    Thanks for you help.
    Mark.

    hi Mark,
    take a look how to doc 'How to... update Master Data during upload of transaction data', there is sample code
    https://websmp202.sap-ag.de/~sapdownload/011000358700002766042003E/HowToUplMasterDataTransact.pdf
    you may need RSDDS_ATTRIBUTES_ACTIVATE to activate data.
    hope this helps.
    REPORT Z_UPLOAD_ATTR .
    data: begin of custattr occurs 5000.
            include structure /BI0/MD_SOLD_TO.   "M-view
    data: end   of custattr.
    start-of-selection.
    *fill internal table – all values in internal format (e.g. leading zeros)
    custattr-D_SOLD_TO  = '0000006000'.
    custattr-D_COUNTRY  = 'US'.
    custattr-D_INDUSTRY = '111'.
    append custattr.
    custattr-D_SOLD_TO  = '0000006001'.
    custattr-D_COUNTRY  = 'CA'.
    custattr-D_INDUSTRY = '222'.
    append custattr.
    call function 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
         exporting
              i_iobjnm               = '0D_SOLD_TO'
              i_tabclass             = 'M'
         tables
              i_t_table              = custattr
         exceptions
              attribute_name_error   = 1
              iobj_not_found         = 2
              generate_program_error = 3
              others                 = 4.

  • BP - CP:  function modul for relationship-data ?

    Hello forum,
    we have relations between bp and cp. And in this relationship we have the
    contact data like phone/mail etc.
    Is there a function modul which gives me this relationship-data ?
    Thanks
    Gerd

    Hi Gerd,
    Try the FM "BAPI_BUPA_ADDRESS_GETDETAIL", In this FM you need to pass the address GUID and the partner number whic you will get from the table BUT020.
    In order to get the address GUID use the FM "BAPI_BUPA_ADDRESS_GET_NUMBERS" and pass the CP number.
    <b>Reward points if my post helps!!</b>
    Best regards,
    Vikash

  • Function module for sales data

    Hi
      I am new to BW. I have to write a FM for BW Team.
    Here are the parameters:
    VBAK-ERDAT
    VBAP-VKORG
    MARA-MATKL
    I have to select all the data that match the above selection criteria and then display the summary as
    For the date range entered and for each plant I have to display no. of orders.
    BW Team wants detailed as well as summary data. What I am thinking is to write a FM that returns two internal tables - 1) Detailed data and 2) Summary data.
    If I write like this, can the data source handle two internal tables?
    Thanks
    Naga

    Hi Naga
    Its always better to use two individual targets with a single infosource to avoid
    confusions like siggi suggested Just place a Start Routine in the update rules level
    and filter the data one is for Item and another is summaraised if they want both the
    things then they will map this targets into a multiprovider or infoset depends on the
    requirement..
    Hope itz Helps..!
    Regards
    KISHORE M REDDY
    **Winners Don't Do Different things,They Do things Differently...!**
    > Siggi
    >
    > If I use one cube, How would I differentitate
    >  between detailed and summary data?
    >
    > Thanks
    > Naga

  • Reg Function module for getting date

    Hi,
    My requirement is, If I entered some date I need to get past three months number of days.
    Eg: if I entered 26thDec,2007
    I need to get number of days form October 1st to 26th Dec.
    Regards,
    sarath.

    try this code
    REPORT ztest .
    DATA : lv_date TYPE syst-datum ,
           lv_tmp  TYPE i          .
    PARAMETERS : p_date TYPE syst-datum OBLIGATORY .
    CALL FUNCTION 'ADD_TIME_TO_DATE'
      EXPORTING
        i_idate = p_date
        i_time  = '3'
        i_iprkz = '2' "Month
      IMPORTING
        o_idate = lv_date.
    lv_tmp = lv_date - p_date .
    WRITE : 'Diff in days ' , lv_tmp .

  • Functional Module for Delivery date update

    Hi all,
    Can anybody help me to solve my problem. My requirement is to update order delivery date for a partner. But I am not getting any FM for that and not getting the table name also where I can update delivery date value. If you have any known FM or any suggestion please tell me.
    Thanks in advance
    Chandan

    Hi all,
    Can anybody help me to solve my problem. My requirement is to update order delivery date for a partner. But I am not getting any FM for that and not getting the table name also where I can update delivery date value. If you have any known FM or any suggestion please tell me.
    Thanks in advance
    Chandan

Maybe you are looking for

  • CERT_TRUST_IS_NOT_SIGNATURE_VALID when installing a 3rd-party cert in Windows 2008 Domain Controller

    Hello, I'm facing with a problem while trying to install a 3rd-party digital certificate on a Windows 2008 Domain Controller. Basically, I'm following this TechNet http://technet.microsoft.com/en-us/library/cc783835(v=ws.10).aspx 1) I did create the

  • Frequent segfaults caused by gpu

    Everything seems stable on start up but as programs run longer they become more likely to segfault. Tabs in chromium begin to segfault constantly and Firefox crashes almost as soon as its opened and all other programs crash but more sporadically. I a

  • Customizing Master Contract Management - SAP Banking 6.0

    Hello, i am customizing the Master Contract Management in Banking 6.0 - especially the Effective Cash Pooling Feature. On defining the restriction rules i have a problem: How do i define the methods and the rule-id's for Cash Pooling. Where is the co

  • Release procedure reset after flag delivery completion indicator is set

    Hello Exports, We have following shenario. There are 2 release strategies 1. < 20 Lacs - S1 2. >20 Lacs - S2 We create a PO having two line items. Release strategy was S2 Then the first item in the PO is deleted. Then GR is done for the 2nd item part

  • Sm_SolmanSID error 503 when executing external command

    Hello, On one of my managed system (my productive ECC), I have the following error ,everyday at 20:00, for the user SM_SolamnSID. "Error 503 when executing external command on (xpgid=0,convid=.)" The role ZSAP_SOLMAN_READ has been given to this user.