Any function module to calculate delivery date?

Hello all,
I think BAPI_PO_CREATE doesn't have ability to determine the delivery date by itself and needs delivery date be fed to it instead. I have a requirement to create a STO with a feed from a 3rd party system that doesn't specify the delivery date at the receiving plant. Could anyone help me identify a function module that returns the delivery date?
Thanks,
Rohit

Hi Rohit,
It is the same function module that is also called by the form MEPO_DEFAULT_DELIVERY_DATE. I thought that it would be better to call the whole form, since it performs more checks than just calling MD_CHECK_DELIVERY_DATE.
MD_CHECK_DELIVERY_DATE is called with E_DISPODATUM = sy-datlo, i.e. the local date of the user.
BR
Raf

Similar Messages

  • 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 for Changing delivery date

    Hi Friends ,
        I am held up with a scenario of changing the delivery date while creating purchase order. Could you please suggest any function module to change the delivery date in purchase order if it is less than 5 days.
    With Regards ,
    Sudhir S
    Moderator message: please do some own research before asking.
    Edited by: Thomas Zloch on Feb 21, 2011 11:45 AM

    Hi praveen for u r requirement there is no need of any FM
    Try this code
    parameters:
      p_date like sy-datum,
      p_no type i.
    data:
      w_date like sy-datum.
    w_date = p_date - p_no.
    write: / w_date .
    it is enogh for u r requirement
    plzz reward if it is usefull...
    for any further quiries my mail id is [email protected]
    plzz dont forget to reward

  • Function module to calculate due date of FI document

    Hi All
    I need a function module to calculate the due date of FI document considering BSId Zterm ( Payment terms ) Document date , Basline date .
    Regards,
    chitra

    call function 'FI_TERMS_OF_PAYMENT_PROPOSE'
      exporting
        i_bldat         = gv_bldat
        i_budat         = gv_budat
        i_cpudt         = sy-datum
        i_zfbdt         = gv_zfbdt
        i_zterm         = gv_terms_paym
        i_bukrs         = gv_comp_code
      importing
        e_zbd1t         = gv_zbd1t
        e_zbd2t         = gv_zbd2t
        e_zbd3t         = gv_zbd3t.
    faede-shkzg = 'H'.
      faede-koart = 'K'.
      faede-zfbdt = gv_zfbdt.
      faede-zbd1t = gv_zbd1t.
      faede-zbd2t = gv_zbd2t.
      faede-zbd3t = gv_zbd3t.
      faede-bldat = gv_bldat.
      call function 'DETERMINE_DUE_DATE'
        exporting
          i_faede = faede
        importing
          e_faede = faede.
    *    if sy-subrc eq 0.
      duedate = faede-netdt. <<<<<< ------

  • Is there any function module to download abap data to a word document?

    Hi all,
    I know that the downloading to word can be done by ole automation...But is there any function module in sap which can do the same....?? please let me know your expert comments.......

    Hello Rich,
    I have tried the function module word_ole_formletter ..but i am facing a problem...once i execute the program i can see that the data is coming to word document but it is coming in read only mode and again reverting back to a blank document as was befor the data is coming to word document..Can you suggest where i am going wrong...Also I tried to debug the function module but the break point is not coming to the function module ....

  • Function Module to Calculate Due Date from Payment Terms?

    I'm writing an aged debtor report as the SAP standard one isn't quite right for our requirements.  Is there a function module that will calculate the payment due date if I give it the payment terms and the base line date?
    I did a search in SE37 but couldn't see one which fitted my requirements (I was searching on CALCDUEDATE and variantions of).
    Any suggestions welcome, thanks.
    Gill

    Hi,
    Use the FM FI_TERMS_OF_PAYMENT_PROPOSE for calculating the Payment due date
    call function 'FI_TERMS_OF_PAYMENT_PROPOSE'
      exporting
        i_bldat         = gv_bldat
        i_budat         = gv_budat
        i_cpudt         = sy-datum
        i_zfbdt         = gv_zfbdt
        i_zterm         = gv_terms_paym
        i_bukrs         = gv_comp_code
      importing
        e_zbd1t         = gv_zbd1t
        e_zbd1p         = gv_zbd1p
        e_zbd2t         = gv_zbd2t
        e_zbd3t         = gv_zbd3t.
    Regards,
    Dwaraka.S

  • FUnction Module to Calculate future date after 'x' years

    Hi Gurus,
    Can anyone tell me the Standard Function Module which will take today's date as i/p & return the date after 10 years.
    e.g say input date is 18.05.2010 & input year is 10.
                 output = 17.05.2020
    Regards,
    Rohit.

    why would it be in 10 years 17.05.2010 and not 18.05.2010 ??
    which logic do you want to use to calculate the 10 years after ?
    kind regards
    arthur

  • Is there any function module to get the data from st06?

    Hi,
    I'm new to this forum.
    I would like to know if there is a way (maybe some function modules) to collect information like system architecture, and databases as displayed in transaction st06?
    I would like to call it from external program in order to view part of the data available in st06.
    Thanks,
    Erez Gordon.

    have a look at function group SMON.
    Not sure if these are remote enabled, otherwise create a wrapper function module (RFC).
    Edited by: Micky Oestreich on Dec 11, 2008 9:37 AM

  • Any Function Module to translate variable data in smartform

    Hi All,
    I am working with smartform.
    My requirement is, when user logins with Japan language.
    then all the data  ( text template and variable data )  should be in Japan .
    By using  SE63 ,i can translate only text data.  How about the variable data in smartform?
    Please suggest any solution.
    Regards,
    Kishan

    Hope you are passing the variable from print program. If not then do the same. and in the print program do the below thing.
       wf_spras = sy-langu.
    CALL FUNCTION 'CONVERSION_EXIT_ISOLA_OUTP
          EXPORTING
               input  = wf_spras
          IMPORTING
               output = wf_language.
      SET LANGUAGE wf_language.
    wa_control_parameters-langu = wf_spras.
    PS : wa_control_parameter , you pass through control_parameters, in to the SMARTFORM calling FM .
    Make sure that the data, which u fill into the variable you are talking about in maintained in the log on language also.

  • 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

  • Function module to predict the date for a given date

    hi friends,
    is there any function module to predict the date
    means  for example if i enter one date  , what will be the date
    after 4 months(say)  to the given date.
    my requirement is when a person is hired today (10.06.2008)
    and if he is under probationary for 6 months, then on what date he comes into the permenant employee's list(predicted date after date 6 months)

    Date calculations
    DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
    DATE_IN_FUTURE Calculate a date N days in the future.
    RP_CALC_DATE_IN_INTERVAL Add days/months to a date
    RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date
    SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
    MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
    DATE_CREATE Calculates a date from the input parameters:
    Example: DATE_CREATE
    CALL FUNCTION 'DATE_CREATE'
    EXPORTING
       anzahl_jahre  = 1
       anzahl_monate = 2
       anzahl_tage   = 3
       datum_ein     = '20010101'
    IMPORTING
       datum_aus     = l_new_date.
       Result:
       l_new_date = 20020304
    Example: MONTH_PLUS_DETERMINE
    data: new_date type d.
    CALL FUNCTION 'MONTH_PLUS_DETERMINE'
    EXPORTING
    months = -5 " Negative to subtract from old date, positive to add
    olddate = sy-datum
    IMPORTING
    NEWDATE = new_date.
    write: / new_date.

  • Function module to calculate available budget

    Hi everyone
    Is anybody aware if there is any function module which calculates the available budget from the report alr_87013558?
    thanks and kind regards

    thanks Paolo
    yea, i tried to debug that report but in vain
    is there any other way?
    I could get the value assigned, the budget value but not the actual
    So was wondering if anybody can help me
    thanks for your help

  • 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 change the date format

    hi guys
    is there any function module to change the date format
    from 08/28/2007(mm/dd/yyyy)
    to August 28, 2007.
    regards
    vamsi

    hi vamsi.,
    Use  CONVERSION_EXIT_SDATE_OUTPUT to get the month name,
    but it will give short form of the month name.
    if you want <b>long description of the month</b>,
    use this peice of code.
    PARAMETERS: V_DATUM(07) TYPE C. "(example input:12-2007)
      DATA:     V_MON(2)  TYPE C,
                V_YEAR(4)      TYPE  C,
                V_MONTHNAME(10) TYPE C,
                V_FULLDATE(30) type c.
    WRITE  V_DATUM+0(2) TO V_MON.
    SELECT SINGLE LTX FROM T247 INTO V_MONTHNAME
    WHERE        SPRAS = SY-LANGU
         AND       MNR  = V_MON.
    CONCATENATE  V_MONTHNAME  v_datum+3(4)
                      INTO V_FULLDATE  SEPARATED BY SPACE.  "(example output : December 2007)
                      write: v_fulldate.
    <i><b>Reawrd points if useful</b></i>
    Chandra

  • Function module to calculate withholding taxes

    Hi all,
    Can anyone please tell me if there is any function module to calculate withholding taxes?
    Thanks,
    Diogo LF Moreira

    Hi,
    You can use the function module FI_WITHHOLDING_TAX_CALCULATION
    Regards,
    SDNer

Maybe you are looking for

  • Copy and paste of images still broken?

    I use Firefox 14 and Windows XP, and I can't copy and paste images from the web into, say, a Word document. I used to do this all the time for knitting patterns, and it's very frustrating to have lost this function. I see from the knowledge database

  • PLEASE PLEASE! HELP .. iTunes gone CRAZY!

    I downloaded 3 videos from LOST and all downloaded fine. The next day I tried again (3 more), but my internet conection failed and the videos were left on hold. EVERYTIME I go to ADVANCE --> Check for Purchases ... It sort of names one by one, and th

  • Windows Media Player on Mac OS X Tiger

    I recently downloaded Windows Media Player onto my Macbook in hopes of being able to upload music from my Sandisk Sansa Mp3 player to my harddrive, but the program only plays video files, and doesn't even recognize that something is attached when I p

  • How do I move iTunes to new Mac from ext drive?

    I bought a new Macbook Air and need help moving my iTunes library from an external drive to the new computer. (My old Macbook Pro ran out of disk space so I moved the entire library to the other drive).  Now that I have new Air, how do I properly mov

  • Line Input Hardware Unrecognized after 10.6.2 Update

    Both my Macs (Pro and iMac) don't recognize Line Input hardware (headset and stand alone mics) after the last update. Under Midi Setup, mute is unchecked and all other settings appear normal. I do lots of recording and this is a huge problem...HELP!