PERIOD_AND_DATE_CONVERT_OUTPUT

Hi All,
i am using 'PERIOD_AND_DATE_CONVERT_OUTPUT' function module to convert date as like 'day 15.08.1947' / 'month15.08.1947' / 'year 15.08.1947'
the problem is when i am printing date format using this function module in smartform
quanitiy fields are getting distrubed like 34,000.00 but quantity should come like (34.000,00).
please help me in this......
thanks in advanced....................
Edited by: dcpkusuma on Jul 22, 2011 1:08 PM

How are these two related, after a call to a function to adjust date displays?
Edited by: DaveL on Jul 22, 2011 3:30 PM

Similar Messages

  • Purchase Order

    Hi all,
    i have two doubts related to the purchase order.
    1. How to know the Status of the purchase order
    ex: Open , Closed
    2. How to get the Purchasing Quantity (KOMV-KAWRT)
    Please Advice me..
    Many thanks for all of your help.
    Regards,
    Lakshma.

    Hi
    Here is the code to find out the open purchase order.
    List of open purchase orders for a given plant/delivery period      *
      A purchase order is open when the delivery completed indicator = ' '*(field elikz.ekpo = space)
    Tables
    TABLES: EKKO,                          "Purchase order - header"
            EKPO,                          "Purchase order - lines"
            EKET,                          "Purchase order - delivery date"
            EKBE,                          "Purchase order - history
            LFA1,                          "Supplier - general info"
            STXH,                          "Text table - header info"
            T001W,                         "Plant description table
            MARA,                          "Material master
            MAKT,                          "Material description table
            T163X.
    DATA: BEGIN OF TXTF_HEADER.            "Purchase order header texts
            INCLUDE STRUCTURE THEAD.
    DATA: END OF TXTF_HEADER.
    DATA: BEGIN OF TXTF_LINES OCCURS 2.    "Purchase order header texts
            INCLUDE STRUCTURE TLINE.
    DATA: END OF TXTF_LINES.
    DATA: WNAME(70),
          WLPEIN(1),
          WEINDT(10),
          WMENGE LIKE EKET-MENGE,
          WBISMT LIKE MARA-BISMT,
          W_HISTORY(1).
    SELECT-OPTIONS : S-EINDT FOR EKET-EINDT.
    SELECT-OPTIONS : S-WAERS FOR EKKO-WAERS.
    FIELD-GROUPS : HEADER, GROUP1.
    INSERT EKPO-WERKS
           EKET-LPEIN
           EKET-EINDT
           EKPO-EBELN
           EKPO-EBELP
           EKPO-MATNR
           EKKO-WAERS
           EKKO-WKURS
           EKKO-KUFIX
           EKKO-BEDAT INTO HEADER.
    INSERT EKKO-SPRAS
           EKKO-EKGRP
           T163X-EPSTP
           EKPO-TXZ01
           EKPO-KONNR
           EKPO-KTPNR
           EKET-MENGE
           EKPO-MEINS
           EKPO-LGORT
           EKET-WEMNG
           EKPO-NETPR
           EKPO-PEINH
           EKPO-BPRME
           EKPO-NETWR
           EKKO-LIFNR
           W_HISTORY  INTO GROUP1.
    General data
    INITIALIZATION.
    EM_SELKB = 'X'.
    EM_SELKK = ' '.
    EM_SELKL = ' '.
    EM_SELKA = ' '.
    Start of program
    START-OF-SELECTION.
    Read purchase order items for this plant with delivery completed
    indicator = space
    GET EKPO.
      SELECT * FROM T163X WHERE SPRAS EQ SY-LANGU
                          AND   PSTYP EQ EKPO-PSTYP.
        EXIT.
      ENDSELECT.
      IF SY-SUBRC NE 0.
        T163X-EPSTP = EKPO-PSTYP.
      ENDIF.
      CHECK S-WAERS.
    GET EKET.
      CHECK S-EINDT.
      IF EKPO-ELIKZ = ' ' AND EKPO-LOEKZ = ' '.
       if eket-wemng = 0 and eket-wamng = 0.
            CLEAR : W_HISTORY.
            SELECT * FROM EKBE WHERE EBELN = EKPO-EBELN
                               AND   EBELP = EKPO-EBELP.
               EXIT.
            ENDSELECT.
            IF SY-SUBRC = 0.
               MOVE '*' TO W_HISTORY.
            ENDIF.
            EXTRACT GROUP1.
       endif.
      ENDIF.
    END-OF-SELECTION.
    Sort by plant - delivery date
      SORT.
      FORMAT INTENSIFIED OFF.                      "PPL26041995
      LOOP.
      read vendor
        SELECT SINGLE * FROM  LFA1
               WHERE  LIFNR       = EKKO-LIFNR.
        IF SY-SUBRC <> 0.
          MOVE '???' TO LFA1-NAME1.
        ENDIF.
      search old materialnumber if needed
        SELECT SINGLE * FROM  MARA
               WHERE  MATNR       = EKPO-MATNR.
        IF SY-SUBRC <> 0.
          MOVE '???' TO WBISMT.
        ELSE.
          MOVE MARA-BISMT TO WBISMT.
        ENDIF.
      read purchase order header text - first 2 lines of delivery text
        CLEAR TXTF_LINES.
        CLEAR TXTF_HEADER.
        REFRESH TXTF_LINES.
        MOVE EKPO-EBELN TO WNAME.
        MOVE EKPO-EBELP TO WNAME+10.
        SELECT SINGLE * FROM STXH
             WHERE TDID     = 'F04' AND
                   TDOBJECT = 'EKPO' AND
                   TDNAME   = WNAME AND
                   TDSPRAS  = EKKO-SPRAS.
        IF SY-SUBRC = 0.
          CALL FUNCTION 'READ_TEXT'
               EXPORTING
                    ID              = 'F04 '
                    LANGUAGE        = EKKO-SPRAS
                    OBJECT          = 'EKPO      '
                    NAME            = WNAME
               IMPORTING
                    HEADER          = TXTF_HEADER
               TABLES
                    LINES           = TXTF_LINES
               EXCEPTIONS
                    ID              = 01
                    LANGUAGE        = 02
                    NAME            = 03
                    NOT_FOUND       = 04
                    OBJECT          = 05
                    REFERENCE_CHECK = 06.
        ENDIF.
        READ TABLE TXTF_LINES INDEX 1.
    print list
        RESERVE 3 LINES.
        AT NEW EKPO-WERKS.
          SELECT SINGLE * FROM T001W WHERE WERKS = EKPO-WERKS.
          IF SY-SUBRC NE 0. CLEAR T001W. ENDIF.
          NEW-PAGE.
        ENDAT.
        CLEAR WEINDT.
        CLEAR WLPEIN.
        AT NEW EKET-EINDT.
          CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_OUTPUT'
               EXPORTING
                    INTERNAL_DATE   = EKET-EINDT
                    INTERNAL_PERIOD = EKET-LPEIN
               IMPORTING
                    EXTERNAL_DATE   = WEINDT
                    EXTERNAL_PERIOD = WLPEIN.
        ENDAT.
        WRITE: /    WLPEIN,
                  3 WEINDT,
                 13 SY-VLINE(1),
                 14 EKPO-EBELN,
                 25 EKPO-EBELP+3(2),
                 28 T163X-EPSTP,
                 31 EKPO-MATNR,
    add old material number
               52 wbismt,
                 62 EKET-MENGE,
                 80 EKPO-MEINS,
                 85 EKKO-LIFNR,
                116 SY-VLINE(1),
              127 txtf_lines-tdline(40),
                118 EKKO-WAERS,
                122 EKPO-NETPR,
                142 EKPO-PEINH,
                152 EKPO-BPRME,
                157 EKPO-NETWR,
                177 EKKO-WKURS,
                190 EKKO-KUFIX,
                193 EKKO-BEDAT,
                206 EKKO-EKGRP,
                211 SY-VLINE,
                216 W_HISTORY.
    add storage location
              171 sy-vline, ekpo-lgort,
              178 sy-vline.
        READ TABLE TXTF_LINES INDEX 2.
        SELECT SINGLE * FROM MAKT WHERE MATNR = EKPO-MATNR
                                  AND   SPRAS = SY-LANGU.
        IF SY-SUBRC NE 0.
          MOVE EKPO-TXZ01 TO MAKT-MAKTX.
        ENDIF.
        WMENGE = EKET-MENGE - EKET-WEMNG.
        IF EKPO-KONNR = SPACE.
          WRITE:/13 SY-VLINE(1),
                  MAKT-MAKTX(30) UNDER EKPO-MATNR,
                  WMENGE     UNDER EKET-MENGE,
                  LFA1-NAME1 UNDER EKKO-LIFNR,
            126 sy-vline(1),
                txtf_lines-tdline(40) under txtf_lines-tdline,
              116 SY-VLINE(1),
            171 sy-vline(1),
              211 SY-VLINE(1).
        ELSE.
          WRITE:/13 SY-VLINE(1),
                ekpo-konnr under ekpo-ebeln,
                ekpo-ktpnr+3(2) under ekpo-ebelp,
                  MAKT-MAKTX(30) UNDER EKPO-MATNR,
                  WMENGE     UNDER EKET-MENGE,
                  LFA1-NAME1 UNDER EKKO-LIFNR,
            126 sy-vline(1),
                txtf_lines-tdline(40) under txtf_lines-tdline,
            167 sy-vline(1),
              116 SY-VLINE(1),
              211 SY-VLINE(1).
        ENDIF.
        ULINE /13(207).
        AT END OF EKET-EINDT.
           ULINE 1(12).
        ENDAT.
      ENDLOOP.
    print delivery date with first line.
    TOP-OF-PAGE.
       CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_OUTPUT'
            EXPORTING
                 INTERNAL_DATE   = EKET-EINDT
                 INTERNAL_PERIOD = EKET-LPEIN
            IMPORTING
                 EXTERNAL_DATE   = WEINDT
                 EXTERNAL_PERIOD = WLPEIN.
      CALL FUNCTION 'Z_PRINT_TITEL'               "PPL24041995
           EXPORTING PROGNAME = 'ZMCH0089'         "PPL24041995
                     TEXTTYPE = 'T'                "PPL24041995
                     ORG_PROGNAME = ' '
                     PARAM_1  = EKPO-WERKS                "PPL24041995
                     PARAM_2  = T001W-NAME2                "PPL24041995
                     PARAM_3  = ' '                "PPL24041995
                     PARAM_4  = ' '                "PPL24041995
                     PARAM_5  = ' '.               "PPL24041995
    Reward if helpful.
    Chandralekha

  • First date field in va01

    Hi all,
       i have a requirement i.e i have to show the FIRST DATE  of sales order line item
    but am unable to find out the table name , when i pressed F1 i found that a structure name i.e. RV45A and field ETDAT but i want database table and correct field name.
    plz its urgent.
    Regards,
    Amit

    Data come from database table VBEP, it is mapped in sap transaction to your desired field :
    CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_OUTPUT'
         EXPORTING                               
              INTERNAL_DATE   = VBEP-EDATU       
              INTERNAL_PERIOD = VBEP-PRGRS       
         IMPORTING                               
              EXTERNAL_DATE   = VB_ETDAT         
              EXTERNAL_PERIOD = VB_PRGBZ.    
    and back if changed in dynpro
    CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_INPUT'
         EXPORTING                               
              EXTERNAL_DATE   = RV45A-ETDAT      
              EXTERNAL_PERIOD = RV45A-PRGBZ      
         IMPORTING                               
              INTERNAL_DATE   = VBEP-EDATU       
              INTERNAL_PERIOD = VBEP-PRGRS
    Regards

  • LSMW issues for Sch. Ageement (Transaction VA31)

    Hi ALL,
    I am trying for the first time to create a LSMW to upload the Scheduling agreement. Could you pl guide me as to how exactly we map the Ship-to-party and Sold-to-party in BVBPAKOM structure?
    I know that we will need to use Partner Type Field i.e. PARVW , if so how can we have one field mapped to two different values i.e. SP and WE at header level?
    Also did you do this in one step using this program RVINVB10? How did you manage multiple lines on the scheduling agreement ?
    One more problem that I am encountering is that its giving a message Shipping condition '01' is not defined.
    The file contains the Shipping condition as '01', however the transaction maintains the Shipping condition as 'STANDARD' against the value of '01'. How to solve them ??
    Any input is greatly appreciated.
    BR
    Tanmoy

    Hi,
        Regarding the error: Period indicator S is not defined. I have discussed with the functional team without success. However in the debugger I note that the error is getting generated at the execution of this Function Module.
    CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_OUTPUT'
       EXPORTING
         INTERNAL_DATE   = FVBAKKOM-VDATU
         INTERNAL_PERIOD = FVBAKKOM-VPRGR
       IMPORTING
         EXTERNAL_DATE   = DA_KETDAT
         EXTERNAL_PERIOD = DA_KPRGBZ.
    Here the value for:
    FVBAKKOM-VDATU  is in the YYYYMMDD internal format
    FVBAKKOM-VPRGR is S, however the internal_period is of type TPRG-PRGRS which has fixed values of:
    1     Day
    2     Week
    3     Month
    4     Posting period
    5     Planning calendar period
    BR
    Tanmoy

  • Displaying date as period in screen period

    Dear gurus ,
    I have a field in a screen that i made that is date .
    Now i want to display it as period . For example if it is 10.12.2008 to be as 12.2008 .
    I use the FM 'PERIOD_AND_DATE_CONVERT_OUTPUT' but it doesn't work .
    It display the date like  ' 8 .00.10.2' .
    Look my code ....
    DATA : T_DATE  LIKE VBRK-ERDAT.
    DATA : T_TYPE TYPE C.
    PAI
    PROCESS ON VALUE-REQUEST.
       FIELD T_TYPE MODULE T1.
       FIELD T_DATE MODULE T2.
    *&      Module  T1  INPUT
          text
    MODULE T1 INPUT.
         CALL FUNCTION 'ME_VALUES_TPRG'
              IMPORTING
                   E_LPEIN = T_TYPE.
    ENDMODULE.                 " T1  INPUT
    *&      Module  T2  INPUT
          text
    MODULE T2 INPUT.
        DATA : T_1     LIKE RV45A-ETDAT.
        DATA : T_P     LIKE RV45A-PRGBZ.
         CLEAR TPRG.
         SELECT SINGLE * FROM TPRG WHERE SPRAS EQ SY-LANGU
                                AND PRGBZ EQ T_TYPE.
         CALL FUNCTION 'F4_DATE'
              IMPORTING
                   SELECT_DATE = T_DATE.
         IF SY-SUBRC NE 0.
            MESSAGE S845(06).
            EXIT.
         ENDIF.
         IF NOT T_DATE IS INITIAL.
            CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_OUTPUT'
                 EXPORTING
                      INTERNAL_DATE = T_DATE
                      INTERNAL_PERIOD = TPRG-PRGRS
                 IMPORTING
                      EXTERNAL_DATE =    T_1
                      EXTERNAL_PERIOD =  T_P.
         ENDIF.
        MOVE T_1 TO T_DATE.
    ENDMODULE.                 " T2  INPUT
    Thanks a lot ...

    Hi,
    Declare variale of length 6.
    Thanks
    Sriram Ponna.

  • Country specific date format

    Hi,
       Please help me as i require to display dates are per the country , for eg if it is US the date should be dd/mm/yyyy else for other countries like india it should be dd.mm.yyyy .
    Regards
    Abhishek

    I know this is an old thread, but thought I would add my on comments:
    This code example shows how to create a country specific date format.
    Also see table T005 and field DATFM / Domain DATFM
    DATA: external_date  LIKE  rvdat-extdatum,
          country  LIKE  t005-land1,
          internal_date  LIKE  syst-datum,
          internal_period LIKE  tprg-prgrs .
          internal_date = sy-datum.
          internal_period = 1.
          country = 'DO'. "Dominican Republic
    CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_OUTPUT'
      EXPORTING
        country                  = country     " Enter Country Code Here
        internal_date            = internal_date
        internal_period          = internal_period   " Default this value to one
      LANGUAGE                 = SYST-LANGU
      I_PERIV                  = I_PERIV
      I_WERKS                  = I_WERKS
      I_MRPPP                  = I_MRPPP
      IMPORTING
        external_date            = external_date     " The date formated for the country will be in this field
      EXTERNAL_PERIOD          = EXTERNAL_PERIOD
      EXTERNAL_PRINTTEXT       = EXTERNAL_PRINTTEXT
    EXCEPTIONS
      DATE_INVALID             = 1
      PERIODE_INVALID          = 2

  • Date after 3 years...function module needed

    Hi
    i need to find the date after 3 years from today. please let me know how (function module or class) to do this.
    thanks

    hi,
    <b>
      Use this function module.
    RE_ADD_MONTH_TO_DATE
    old date = sy-datum ( any date u want ).
    months = 36</b>
    <b>U can also use other FM</b>
    Date Manipulation
                SD_DATETIME_DIFFERENCE
                 DAYS_BETWEEN_TWO_DATES
                 MONTHS_BETWEEN_TWO_DATES.
                 RE_ADD_MONTH_TO_DATE
                 CALCULATE_DATE
                 HR_JP_MONTH_BEGIN_END_DATE
                  LAST_DAY_OF_MONTHS
                  ADD_TIME_TO_DATE
    CONVERT_DATE_TO_ALPHA_NUMERIC
    PERIOD_AND_DATE_CONVERT_OUTPUT
    CONVERSION_EXIT_LDATE_OUTPUT
    DATE_TO_DAY
    CCM_GO_BACK_MONTHS
    SD_DATETIME_DIFFERENCE
    Give the difference in Days and Time for 2 dates
    FIMA_DAYS_AND_MONTHS_AND_YEARS
    Get number of days. Year, Months between two dates.
    <b>
    Mark Helpfull Answers</b>
    Regards
    Message was edited by: Manoj Gupta
    Message was edited by: Manoj Gupta

Maybe you are looking for