Invert Date

Hi experts,
I would like to change the dates in my table so that they appear in the correct format. They appear in my database table as YY.YY.MMDD e.g. 20.07.10.25 for today's date. I would like to do a direct insertion into the table of the correct format i.e. 25.10.2007. I know how to select the incorrect dates. What's left is for me to change the dates and put them back into the db in the correct format, probably from an internal table.
Thanx in advance.

Hi
try like this. it will solve your problem
start-of-selection.
data: lv_date type sy-datum.
data: lv_formatdate(10) type c.
data: var1(4) type c,
var2(2) type c,
var3(2) type c.
lv_date = sy-datum.
var1 = lv_date+(4).
var2 = lv_date+4(2).
var3 = lv_date+6(2).
concatenate var3 var2 var1 into lv_formatdate separated by '.'. " By changing here Var position you can get your required output
Ex: var1 var2 var3
etc
Or try like this
Use this statement
date = 18012007
date1 like sy-datum.
write : date using edit mask '__.__.____'
        to date1,               
Output : 18.01.2007
CONVERSION_EXIT_IDATE_INPUT to convert date to Date format.
Regards
Pavan

Similar Messages

  • Inverte - Date function in Update Rules

    Hi All,
    We are writing a code for converting the data into a date field using INVERTE-DATE function.
    The field GDATU in the Table TCURR needs to be converted.
    GDATU - Date As of Which the Exchange Rate Is Effective. This is not in proper format, hence we used the below code to converte in to a proper one.
    TABLES: TCURR.
    DATA: tcurr_tab TYPE TABLE OF tcurr.
    data: date_normal type sy-datum.
    FIELD-SYMBOLS
    <tcurr_wa> TYPE tcurr.
    SELECT gdatu FROM tcurr INTO corresponding fields of
    TABLE tcurr_tab.
    SORT tcurr_tab BY gdatu.
    LOOP AT tcurr_tab ASSIGNING <tcurr_wa>.
    break-point.
    CONVERT INVERTED-DATE <tcurr_wa>-gdatu
    INTO DATE date_normal.  "move that to normal date field
    write:/ date_normal.    "take a normal date field
    ENDLOOP.
    when I check for this code... it gives us the below error message
    E:Variants with INVERTED-DATE are no longer supported in the OO context.
    Use TRANSLATE ... USING '1928374664738291' instead
    Can anyone suggest me what could be done to solve this issue.
    Thanks,
    Maddy

    Hi Maddy,
    If you do F1 help for 'Inverted-Date' you will get the reason as:
    Cannot Convert Dates
    The statements CONVERT DATE and CONVERT INVERTED DATE are not allowed.
    An error message occurs in ABAP Objects if the following syntax is used:
    CONVERT DATE f1 INTO INVERTED-DATE f2.
    CONVERT INVERTED-DATE f2 INTO DATE f1.
    Correct syntax:
    CONSTANTS comp_nine(20) TYPE c VALUE '09182736455463728190'.
    f2 = f1.
    TRANSLATE f2 USING comp_nine.
    f1 = f2.
    TRANSLATE f1 USING comp_nine.
    Reason:
    Date conversions are used mainly to influence the sort sequence in in internal tables. This function can be replaced by the additions ASCENDING or DESCENDING of the statement SORT. If required, you can easily program the nines complement yourself using TRANSLATE.
    Regards,
    Saba

  • What is the use of inverted date format

    In table TCURR - Exchange rates, the field GDATU - Date As of Which the Exchange Rate Is Effective is stored as an inverted date. So 01/01/2008 is actually stored as 79919898.
    What is the use of inverted dates. Why does SAP use them. Why not just use normal date format? If I want the latest record from the table, instead of sorting by descending, I actually have to sort by ascending because the date is stored in inverted format.

    Hi,
    Inverted date is a old concept which helps in soring the dates sometimes. but now ASCENDING and DESCENDING sorting is more easy and quick. Check this application help. maybe useful for you
    1. CONVERT DATE f1 INTO INVERTED-DATE f2.
    2. CONVERT INVERTED-DATE f1 INTO DATE f2.
    Effect
    Calculates the nine's complement of the internal date format (YYYYMMDD - for more information about internal display, meaning and initial values of types, see TYPES) and places it in the field f2. For example, 19950511 becomes 80049488 and 80049488 becomes 19950511.
    In the inverse date format, the most recent date has the numerically smallest value. You can make use of this effect when sorting dates.
    Note
    The technique of manipulating the sort sequence of dates by inverting the internal date format is now rarely used. You can sort internal tables in order of ascending or descending date values much more efficiently using the ... ASCENDING or ... DESCENDING additions to the SORT statement.
    Example
    DATA DATE_INV LIKE SY-DATUM.
    CONVERT DATE SY-DATUM INTO INVERTED-DATE DATE_INV.
    Suppose, for example, SY-DATUM contains the date 11.05.1995 in its internal format 19950511. After execution of the CONVERT statement, DATE_INV would contain the internal format 80049488.
    //Kothand

  • CONVERT INVERTED-DATE

    Hi Experts,
                    can anybody explain below example..
    DATA: odate TYPE d VALUE '19955011',
               idate LIKE odate.
    CONVERT DATE odate INTO INVERTED-DATE idate.
    CONVERT INVERTED-DATE idate INTO DATE odate.
    Thanks in advance..
    shobha henry

    Hi,
    Convert date routine is mainly used in case you are querying date field in a currency table example TCURR.
    Assume an internal table containing following dates:
    18.3.2006
    17.3.2006
    19.3.2006.
    If we sort the internal table by date ascending, then the sequence would be:
    17.3.2006, 18.3.2006 and 19.3.2006.
    Now in another internal table have another internal table with actual date and converted date. Convert the actual date into inverted date and populate into the second field.
    Now if you give a sort ascending by the converted date field the sequence will be:
    19.3.2006, 18.3.2006 and 17.3.2006. This means the latest(youngest) gets on top.
    This will be very useful when querying currency table to find latest exchange rates / exchange rate between a given period.
    TABLES: tcurr.
    PARAMETERS: p_date LIKE sy-datum.
    DATA: c_date LIKE sy-datum.
    SELECT SINGLE ukurs INTO tcurr-ukurs FROM tcurr WHERE
                                              kurst = '1001' AND
                                              fcurr = 'DEM' AND
                                              tcurr = 'USD' AND
                                              gdatu = p_date.
    WRITE:/ tcurr-ukurs.
    CONVERT DATE p_date INTO INVERTED-DATE c_date.
    SELECT SINGLE ukurs INTO tcurr-ukurs FROM tcurr WHERE
                                              kurst = '1001' AND
                                              fcurr = 'DEM' AND
                                              tcurr = 'USD' AND
                                              gdatu = c_date.
    WRITE:/ tcurr-ukurs.
    Put a breakpoint after convert statement and see for yourself.
    Thanks and regards,
    S. Chandra Mouli.

  • Convert Date

    Hi,
    In a FM 'J_1I6_DETERMINE_EXCISE_RATE', There is a statement   'CONVERT DATE date INTO INVERTED-DATE date_j'. the value of date is '20070813' and the date is converted to '79929186' in date_j.
    If this date is converted, in the next select query in the FM is not picking up the record.
    I wanted to get this select query pick the record from the table.
    Can anybody tell me the logic behind this??.
    Regards,
    Sai

    Hi,
    Declare a global variable of type sy-datum.
    data: l_tempdate type sy-datum.
    Before moving to the FM 'J_1I6_DETERMINE_EXCISE_RATE' save the data field into l_tempdate.
    Now in the following select query use the date l_tempdate.
    <b>Reward points if this helps,</b>
    Kiran

  • Date field valid possibilities

    I am trying to create a date field and have a calendar date picker to pick the date.  How do I define the field to get the calendar date picker?
    I see where to put in a default value where I can create a query to select a date (select to_char(sysdate +1, 'DD-MON-YY') from dual).
    Any help would be appreciated.

    Hi Nandita,
    Dear Nandita,
    The dates are just stored as "inverted dates"
    This is even implemented as pure ABAP statements:
    CONVERT date to inverted date ... and
    CONVERT inverted date to date.
    See the documentation on these keywords. It is just the 9er complement of the real date, example from your question ( 80039898):
    99999999
    -19960101
    80039898 => value for GDATU.
    Please assign points if it useful.
    Regards
    Ravinagh Boni

  • Using of CONVERT DATE

    Hello,
    I have two questions relating to a part of a source code, which I have to analyze:
      CONVERT DATE INTAB-DATUM INTO INVERTED-DATE DAT_INV.
      SELECT SINGLE * FROM TCURR WHERE KURST = INTAB-KURST AND          
                                       FCURR = INTAB-WAEKZ AND          
                                       TCURR = EUR AND
                                       GDATU = DAT_INV.
    I don`t know the command CONVERT DATE INTAB-DATUM INTO INVERTED-DATE DAT_INV. For what purpose do I need this command?
    Another question is the SELECT-command. I always thought, that it is necessary to specify a workarea where the result of the Select-Command will be saved. Is that wrong?
    Thanks for your help.
    Regards,
    Tobias

    Hi, here is the explanation for your two queries:
    1. You can actually go for F1 help for this and get some idea...
      In some cases (for example, when sorting dates in descending order), it is useful to convert a date from     format D to an inverted date by using the keyword CONVERT.
    EX:  DATA: odate TYPE d VALUE '19955011',
          idate LIKE odate.
    DATA field(8).
    field = odate.
    WRITE / field.
    CONVERT DATE odate INTO INVERTED-DATE idate.
    field = idate.
    WRITE / field.
    CONVERT INVERTED-DATE idate INTO DATE odate.
    field = odate.
    WRITE / field.
    Output:
    19955011
    80044988
    19955011
    2. If you mention a table under TABLES declaration, then it means that a workarea with the same table name has been created and hence when u don't specify INTO TABLE, it won't give any error. But if u don't specify the tablename under TABLES it will show error..
    If you check in your program the table might have been declared under TABLES..
    Hope this helps..

  • "valid from" date field in TCURR

    Hi All,
    I was looking out the Valid from field in TCURR table but couldn't figure out the format of the way the dates are stored in SAP for this field. Here is how they looked:
    Valid from
    80039898
    80039898
    80039898
    79929778
    I tried to change the format in excel after downloading the table but that didn't help much.
    All answers will be duly rewarded with points.
    Thanks,
    N

    Hi Nandita,
    Dear Nandita,
    The dates are just stored as "inverted dates"
    This is even implemented as pure ABAP statements:
    CONVERT date to inverted date ... and
    CONVERT inverted date to date.
    See the documentation on these keywords. It is just the 9er complement of the real date, example from your question ( 80039898):
    99999999
    -19960101
    80039898 => value for GDATU.
    Please assign points if it useful.
    Regards
    Ravinagh Boni

  • Examples of Date operations

    Hi all,
    I got a new development, which deals with Date operations only.
    So, can anybody please send me the Commands used to do the date and time operations with Examples.
    \[removed by moderator\]
    Thanks in advance..
    Jagan mohan.
    Edited by: Jan Stallkamp on Jul 29, 2008 5:25 PM

    Hi
    Check this Report
    REPORT demo_data_date_time .
    date calculation
    DATA: ultimo TYPE d.
    ultimo      = sy-datum.
    ultimo+6(2) = '01'.
    ultimo      = ultimo - 1.
    WRITE ultimo.
    ULINE.
    time calculation
    DATA: diff TYPE i,
          seconds TYPE i,
          hours TYPE i.
    DATA: t1 TYPE t VALUE '200000',
          t2 TYPE t VALUE '020000'.
    diff = t2 - t1.
    seconds = diff MOD 86400.
    hours = seconds / 3600.
    WRITE: / text-001, hours.
    ULINE.
    convert date
    DATA: odate TYPE d VALUE '19955011',
          idate LIKE odate.
    DATA  field(8) TYPE c.
    field = odate.   WRITE / field.
    CONVERT DATE odate INTO INVERTED-DATE idate.
    field = idate.   WRITE / field.
    CONVERT INVERTED-DATE idate INTO DATE odate.
    field = odate.   WRITE / field.
    Hope this Helps .
    Praveen

  • Problem about extended IDOC(urgent)

    Hi experts,
    i have idoctype,extended idoc,and one include.. i need modify that according to the requirement.. here i will give the idoctype and extended idoc type and include program .. please help me where exactly i need to do the change and what are the steps required for the requirement..
    Exact Requirement: Modify the program which populates the idoctype invoice02 and extension zinvoice02 , if netvalue is zero(vbrp-netwr = 0) then populate the idoc segment E1EDP01.E1EDP26 , BETRG WITH QUALF = # 011' WITH ZERO VALUE. curently segment is not populated.
    Please help me in this and explain the steps required for this.
    idoctype:invoice02
    extended idoc:zinvoice02
    include:ZXEDFU02
                                   Here i am giving the include program
    CASE dobject-kschl.
      WHEN 'ZGRI' OR 'ZGDF' OR 'ZGRN' OR 'ZGAE'.
        t_int_edidd[] = int_edidd[].
        t_xtvbdpr[] = xtvbdpr[].
        ta_xvbdkr = xvbdkr.
        CASE int_edidd-segnam.
          WHEN 'E1EDK01'.
            ta_e1edk01 = int_edidd-sdata.
            PERFORM get_shipment_data.
            PERFORM get_route_data.
            int_edidd[] = t_int_edidd[].
          WHEN 'E1EDP01'.
    Update segment E1EDP01
    1. Update field E1EDP01-PSTYP
    2. Accumulated net weight & quantity of batch split items against
    E1EDP01 segment of the main invoice item.
            ta_e1edp01 = int_edidd-sdata.
            i_tabix = sy-tabix.
            CLEAR: ta_e1edp02.                                  "DIAG01+
            PERFORM update_segment_e1edp01.
            MOVE ta_e1edp01 TO t_int_edidd-sdata.
            MODIFY t_int_edidd INDEX i_tabix TRANSPORTING sdata.
    Populate segment Z1EDP08
    Fields: ZZDESPACTY_A, ZZACTYUOM
            PERFORM validate_segment USING control_record_out-idoctp
                                      control_record_out-cimtyp
                                      'Z1EDP08'
                                CHANGING n_subrc.
            CHECK n_subrc EQ 0.
            PERFORM calc_invoice_item_zzdespacty_a.             "DIAG02+
            int_edidd[] = t_int_edidd[].                        "DIAG02+
          WHEN 'E1EDP02'.                                       "DIAG01+
            IF int_edidd-sdata(3) = '016'.                      "DIAG01+
              ta_e1edp02 = int_edidd-sdata.                     "DIAG01+
            ENDIF.                                              "DIAG01+
          WHEN 'E1EDP19'.
    Populate segment Z1EDL24
    Fields: Material Characteristics or Material Class '001'.
            PERFORM validate_segment USING control_record_out-idoctp
                                     control_record_out-cimtyp
                                     'Z1EDL24'
                                     CHANGING n_subrc.
            IF n_subrc EQ 0.
              ta_e1edp19 = int_edidd-sdata.
              CASE ta_e1edp19-qualf.
                WHEN '002'.
                  PERFORM get_mat_characteristic USING ta_e1edp19-idtnr.
                  PERFORM fill_segment_z1edl24.
                  int_edidd[] = t_int_edidd[].
                WHEN OTHERS.
              ENDCASE.
            ENDIF.
          WHEN 'E1EDP26'.
    Populate segment E1EDP26
    Fields: BETRG
            i_tabix = sy-tabix.
            ta_e1edp26 = int_edidd-sdata.
           IF ta_e1edp26-qualf = '001'. "Gross Price which is always present
              PERFORM fill_segment_e1edp26.
              int_edidd[] = t_int_edidd[].
            ENDIF.
          WHEN 'E1EDP08'.
    Populate Segment Z1EDL37                                             *
    Fields: Bespoke fields from Handling Unit (VEKP)
            PERFORM validate_segment USING control_record_out-idoctp
                                      control_record_out-cimtyp
                                      'Z1EDL37'
                                CHANGING n_subrc.
            CHECK n_subrc EQ 0.
            ta_e1edp08 = int_edidd-sdata.
            PERFORM fill_segment_z1edl37.
    Populate Segment Z1EDP08                                             *
    Fields: Total Despatch Activity                                      *
           PERFORM validate_segment USING control_record_out-idoctp
                                     control_record_out-cimtyp
                                     'Z1EDP08'
                               CHANGING n_subrc.
           CHECK n_subrc EQ 0.
           PERFORM calc_invoice_item_acty_total.
            int_edidd[] = t_int_edidd[].
          WHEN OTHERS.
        ENDCASE.
      WHEN 'ZGDW'.
    Line above added line below removed - Assyst 73789
    WHEN 'ZGIN'.
        t_int_edidd[] = int_edidd[].
        t_xtvbdpr[] = xtvbdpr[].
        ta_xvbdkr = xvbdkr.
        CASE int_edidd-segnam.
    Start SU02
          WHEN 'E1EDK01'.
            ta_e1edk01 = int_edidd-sdata.
            i_tabix = sy-tabix.
    Get the conversion factor
            PERFORM modify_exchange_rate.
            MOVE ta_e1edk01 TO t_int_edidd-sdata.
            MODIFY t_int_edidd INDEX i_tabix TRANSPORTING sdata.
            int_edidd[] = t_int_edidd[].
    End SU02
    *************************************************************SAM01 START
          WHEN 'E1EDP02'.
    Populate segment Z1EDP02
    Fields: Reason code for sales order
            ta_e1edp02 = int_edidd-sdata.
            CASE ta_e1edp02-qualf.
              WHEN '002'.
                PERFORM fill_segment_z1edp02.
                PERFORM append_int_edidd TABLES t_int_edidd
                                         USING  'Z1EDP02'
                                                ta_z1edp02.
                int_edidd[] = t_int_edidd[].
              WHEN OTHERS.
            ENDCASE.
    ***************************************************************SAM01 END
        ENDCASE.
    Start of JvdM01
      WHEN 'ZGII'.                                              "JvdM01
        t_int_edidd[] = int_edidd[].
        t_xtvbdpr[] = xtvbdpr[].
        ta_xvbdkr = xvbdkr.
        CASE int_edidd-segnam.
          WHEN 'E1EDK01'.
    Populate segment Z1EDKSH and Z1REM_STE_CDE
    Fields: Shipment Number for Invoice
            Reason code for sales order
            ta_e1edk01 = int_edidd-sdata.
            PERFORM fill_segment_z1edksh_ds.
            PERFORM append_int_edidd TABLES t_int_edidd
                                     USING 'Z1EDKSH'
                                            ta_z1edksh.
            PERFORM fill_segment_z1rem_ste_cde.
            PERFORM append_int_edidd TABLES t_int_edidd
                                     USING  'Z1REM_STE_CDE'
                                            ta_z1rem_ste_cde.
            int_edidd[] = t_int_edidd[].
          WHEN 'E1EDKA1'.
    Populate segment Z1EDKA1
    Fields: Customer Account Group
            ta_e1edka1 = int_edidd-sdata.
            CASE ta_e1edka1-parvw.
              WHEN 'RE'.   "Bill To Party
                PERFORM fill_segment_z1edka1.
                PERFORM append_int_edidd TABLES t_int_edidd
                                         USING 'Z1EDKA1'
                                                ta_Z1EDKA1.
                int_edidd[] = t_int_edidd[].
            ENDCASE.
          WHEN 'E1EDP01'.
    Read segment E1EDP01 for use later                  "JVDM02
            ta_e1edp01 = int_edidd-sdata.
          WHEN 'E1EDP02'.
    Populate segment Z1EDP02
    Fields: Reason code for sales order
            ta_e1edp02 = int_edidd-sdata.
            CASE ta_e1edp02-qualf.
              WHEN '002'.
                PERFORM fill_segment_z1edp02.
                PERFORM append_int_edidd TABLES t_int_edidd
                                         USING  'Z1EDP02'
                                                ta_z1edp02.
                int_edidd[] = t_int_edidd[].
              WHEN OTHERS.
            ENDCASE.
          WHEN 'E1EDP19'.
    Populate segment Z1EDL24 and Z1EDP01                  "JVDM02
    Fields: Pack Size Activity for Material
            Total Activity for Invoice Item
            ta_e1edp19 = int_edidd-sdata.
            CASE ta_e1edp19-qualf.
              WHEN '002'.
                PERFORM fill_segm_z1edl24_and_z1edp01.
                PERFORM append_int_edidd TABLES t_int_edidd
                                         USING  'Z1EDL24'
                                                ta_z1edl24.
                PERFORM append_int_edidd TABLES t_int_edidd
                                         USING  'Z1EDP01'
                                                ta_z1edp01.
                int_edidd[] = t_int_edidd[].
              WHEN OTHERS.
            ENDCASE.
        ENDCASE.
    End JvdM01
    ENDCASE.
    Start SU02 Code Comment for implementing IR 340
    **mpc01 - start of insert
    start assyst 73789
    *IF dobject-kschl = 'ZGDW'."amersham invoices
    **IF dobject-kschl = 'ZGIN'."amersham invoices
    end assyst 73789
    CASE int_edidd-segnam.
      for the organisation data header
       WHEN 'E1EDK14'.
         MOVE int_edidd-sdata TO ta_e2edk14.
        where is qualifying organisation = 003 (delivering company code).
         IF ta_e2edk14-qualf = '003' AND ta_e2edk14-orgid NE space.
           SELECT SINGLE waers
             INTO t001-waers
             FROM t001
            WHERE bukrs = ta_e2edk14-orgid.
           IF sy-subrc = 0.
             t_int_edidd[] = int_edidd[].
            get the billing date for the invoice
             LOOP AT t_int_edidd WHERE segnam = 'E1EDK02'.
               MOVE t_int_edidd-sdata TO ta_e1edk02.
               IF ta_e1edk02-qualf = '009'."billing date
                 w_fkdat = ta_e1edk02-datum.
                 EXIT.
               ENDIF.
             ENDLOOP.
            if no invoice date use current date
             IF w_fkdat IS INITIAL.
               w_fkdat = sy-datum.
             ENDIF.
            change the general document header
             LOOP AT t_int_edidd WHERE segnam = 'E1EDK01'.
               i_tabix = sy-tabix.
               MOVE t_int_edidd-sdata TO ta_e1edk01.
              set the field to the default currency code for the company
               ta_e1edk01-hwaer = t001-waers.
              if the default value equals the idoc currency then exit
               IF t001-waers = ta_e1edk01-curcy.
                 EXIT.
               ENDIF.
              get the exchange rates
               SELECT *
                 INTO TABLE t_tcurr
                 FROM tcurr
                WHERE kurst = 'NYB1'                 " SU01
                 WHERE KURST = 'GEBU'                 " SU01
                  AND fcurr = ta_e1edk01-curcy
                  AND tcurr = t001-waers.
               IF sy-subrc NE 0."no values found
                error the idoc
                 MESSAGE e400(vf) WITH c_exchange_rate_error
                         RAISING error_message_received.
                 EXIT.
               ENDIF.
               LOOP AT t_tcurr.
                convert to date from inverted date to normal date format.
                 CALL FUNCTION 'CONVERSION_EXIT_INVDT_OUTPUT'
                      EXPORTING
                           input  = t_tcurr-gdatu
                      IMPORTING
                           output = w_datum.
                 CONCATENATE w_datum+6(4)
                             w_datum+3(2)
                             w_datum(2)
                        INTO t_tcurr-datum.
                 MODIFY t_tcurr.
               ENDLOOP.
              sort the exchange rates with the newest first.
               SORT t_tcurr BY datum DESCENDING.
              read the first value in the table ie the newest.
               LOOP AT t_tcurr WHERE datum <= w_fkdat.
                 EXIT.
               ENDLOOP.
               IF sy-subrc NE 0."no values found
                error the idoc
                 MESSAGE e400(vf) WITH c_exchange_rate_error
                         RAISING error_message_received.
                 EXIT.
               ENDIF.
    Start SU01
    Get the Exchange rate from the function module and populate
    E1EDK01 TABLE
               w_fcurr = ta_e1edk01-curcy.
               call function 'CONVERT_TO_LOCAL_CURRENCY'
                    exporting
                         date             = w_fkdat
                         foreign_amount   = '0'
                         foreign_currency = w_fcurr
                         local_currency   = t001-waers
                         type_of_rate     = 'GEBU'
                    importing
                         exchange_rate    = t_tcurr-ukurs
                    exceptions
                         no_rate_found    = 1
                         overflow         = 2
                         no_factors_found = 3
                         no_spread_found  = 4
                         derived_2_times  = 5
                         others           = 6.
    End SU01
               ta_e1edk01-wkurs = t_tcurr-ukurs.
              change the header data in segment
               MOVE ta_e1edk01 TO t_int_edidd-sdata.
              update the current idoc segment
               MODIFY t_int_edidd INDEX i_tabix TRANSPORTING sdata.
               EXIT.
             ENDLOOP.
            update all of the idoc segments
             int_edidd[] = t_int_edidd[].
           ENDIF.
         ENDIF.
    ENDCASE.
    *ENDIF.
    **mpc01 - end of insert
    End SU02 Code Comment for implementing IR 340

    Hi Venu,
      Try with this code.
      If vbrp-netwr = 0.
    <b>  WHEN 'E1EDP26.
      CASE ta_e1edp26-qualf.
    ta_e1edp26 = int_edidd-sdata.
    WHEN '011'.
    PERFORM append_int_edidd TABLES t_int_edidd
    USING 'e1edp26'
    ta_e1edp26.
    int_edidd[] = t_int_edidd[].
    ENDCASE.</b>
    ENDIF.
    Thanks
    Manju.

  • Opening balance differs  with closing balance

    Hi
    I have a scenario where opening and closing balance (Previous period/year)of g/l accounts are different  (for differernt currencies except company code currencies) .It is a customized report where the system is taking the value of recently maintained  Exchange rate for calcualting opening balance (based on sy- datum ) while closing balance is calculated with the formula (Opening + Debit Amt  - Credit Amt.)
    Requirement is that closing balance should be  equal to opening balance of next Period /Year
    Kinldly let me know how to solve this problem
    Thanks in advance
    Regards
    Praveen P C

    Hi Milind,
    Thanks for the valuable reply.
    Through debugging I  came to know what you have mentioned. But, in my case, the reason why it fetches the wrong exchange rate, lies with the valid_from field in T_curr table. The dates are stored in a different format(Inverted Date) in the T_Curr table. Is there any way that I can directly bring the closing balance of the previous period/year as the opening balance of the next period ?
    Regards,
    Praveen P C

  • Function module CREDIT_INT_RATE_DETERMINE

    Hello,
    I'd like to have more information about the field FBFROM in the function module CREDIT_INT_RATE_DETERMINE used to calculate the interest. It should be the Date from which interest rates are calculated but I don't understand the meaning.
    I have a custom program with this function module and in theis custom program I have a defauel for this field. Is it correct?
    Thanks a lot.

    Hello,
    This is a good question from you although the query looks to be simple. Please review my analysis below :
    1. First of all, there is no Function Module documentation for the FM CREDIT_INT_RATE_DETERMINE and hence i had to check the source code of this function module.
    2. If you check the source code, you can see that the value of the field FBFROM is stored from the table field T056P-DATAB (Effective-From Date).
    3. Now, please navigate to the Domain DATUM_INV, by double clicking the field DATAB in TCode SE11.
    4. Double clcik again on the Domain DATUM_INV (Inverted Date) to see the Dictionary details of this Domain.
    5. Here you can see the Conversion Routine INVDT.
    6. Double Click on this Conversion Routine and you can see two FM's (CONVERSION_EXIT_INVDT_INPUT, CONVERSION_EXIT_INVDT_OUTPUT)
    7. Please 'Test' the Function Module CONVERSION_EXIT_INVDT_INPUT and input date as today's/system date and you can see an output in some numerals, which is the result of 99999999 - sysdate (your input). Please check the source code of this function module for the constant value of variable 'houtput'.
    8. The resultant value is stored in the table T056P.
    Please note that Inverted Date functionality is generally used if the table fields are not defined in date format Data Type. When the date is required as an output, the stored inverted date is again inverted to its original format.
    I hope i am clear in my explanation above. Please come back if you have further doubts in this regard.
    Best regards,
    Suresh Jayanthi.

  • Policy-map issue on 7507

    I have a 7507 that has policy maps for matching voice for QoS. A show access-list shows that traffic is being matched. A show interface shows that packets are being dropped. The end result is though, that latency is high and call quality is suffering. A show queueing on the interface shows that no packets are being dropped. Any suggestions?

    class-map match-all 2505PlanoRd
    match access-group name PlanoRd2505-voice
    policy-map 2505PlanoRd
    class 2505PlanoRd
    priority 192
    class class-default
    fair-queue
    interface Serial5/0/0/5:0
    bandwidth 1536
    ip address xx.xx.xx.xx 255.255.255.252
    no ip redirects
    no ip unreachables
    load-interval 30
    service-policy output 2505PlanoRd
    ip access-list extended PlanoRd2505-voice
    permit ip any any dscp ef
    permit ip any any dscp cs6
    permit ip any host xx.xx.xx.xx
    Core-1#sh access-list PlanoRd2505-voice
    Extended IP access list PlanoRd2505-voice
    10 permit ip any any dscp ef (124045 matches)
    20 permit ip any any dscp cs6 (9779 matches)
    30 permit ip any host xx.xx.xx.xx (93010 matches)
    Core-1#sh queueing int s5/0/0/5:0
    Interface Serial5/0/0/5:0 queueing strategy: VIP-based fair queueing
    Serial5/0/0/5:0 queue size 0
    pkts output 0, wfq drops 0, nobuffer drops 0
    WFQ: aggregate queue limit 384 max available buffers 384
    Priority Class: limit 48 qsize 0 pkts output 0 drops 0
    Non-Priority Class: limit 336 qsize 0 pkts output 0 drops 0
    available bandwidth 1344
    Class 0: weight 8750 limit 336 qsize 0 pkts output 0 drops 0
    Core-1#sh int s5/0/0/5:0
    Serial5/0/0/5:0 is up, line protocol is up
    Hardware is cyBus CT3
    Internet address is xx.xx.xx.xx
    MTU 1500 bytes, BW 1536 Kbit, DLY 20000 usec,
    reliability 255/255, txload 72/255, rxload 12/255
    Encapsulation HDLC, crc 16, loopback not set
    Keepalive set (10 sec)
    Last input 00:00:00, output 00:00:00, output hang never
    Last clearing of "show interface" counters never
    Input queue: 0/75/0/32 (size/max/drops/flushes); Total output drops: 510996
    Queueing strategy: Class-based queueing
    Output queue: 0/40 (size/max)
    30 second input rate 77000 bits/sec, 57 packets/sec
    30 second output rate 439000 bits/sec, 78 packets/sec
    80041948 packets input, 17598546217 bytes, 0 no buffer
    Received 0 broadcasts, 0 runts, 9 giants, 0 throttles
    696964 input errors, 38821 CRC, 302664 frame, 92 overrun, 1 ignored, 355377 abort
    113990388 packets output, 96683334345 bytes, 0 underruns
    0 output errors, 0 collisions, 10 interface resets
    0 output buffer failures, 3437585 output buffers swapped out
    10 carrier transitions no alarm present
    Timeslot(s) Used: 1-24, Transmitter delay is 0 flags
    non-inverted data
    This is standard VoIp transport selection based on dscp.

  • A logic problem help

    hello experts,
    i have a problem with a logic
    here I have to pass the VBRK-WAERK and VBRK-FKDAT into TCURR-FCURR and TCURR-GDATU, but here the FKDAT and GDATU are of not the same data type and another specification is that
    >GDATU is in the inverted date format i have to convert it to date format but how ? and another problem is even if i convert it , i have one more specification given my functional consultant is that the FKDAT will be in some precise date like ( 23.10.2008) where as the GDATU will be in the starting date of the month like (01.10.2008 means it denotes the whole) , so here i have to make the FKDAT to the starting date of its months but how?.
    please kindly help me with some detail explaination , here this is the specification given to me.
    "To get the value part
    Pass VBRK-WAERK and VBRK-FKDAT into TCURR-FCURR and TCURR-GDATU for TCURR-KURST=ZCUS. Get UKURS for corresponding entry in INR"
    please kindly explain me with 'for all entries' and the complete logic joining the two tables to achive the specification.
    Thanks in advance

    Hi,
    for date conversion you can take help from this..
    CONVERSION_EXIT_PDATE_OUTPUT
    Eg: input = 24012008 and output = 24.01.2008
    CONVERT_DATE_FORMAT
    Eg: input = 20080201 and output = 01.02.2008
    CONVERSION_EXIT_SDATE_OUTPUT
    Eg: input = 20070201 and output = 01.FEB.2007
    CONVERSION_EXIT_IDATE_INPUT
    Eg: input = 01.02.2008 and Output = 20080201
    CONVERSION_EXIT_LDATE_OUTPUT
    Eg: input = 20070301 and output = 01. March 2007
    CONVERSION_EXIT_PDATE_OUTPUT
    Eg: input = 20070301 and output = 03.01.2007
    now to match the data type you can use the function module...
    CONVERSION_EXIT_INVDT_INPUT    Conversion exit routine for inverted date (INPUT)
    CONVERSION_EXIT_INVDT_OUTPUT   Conversion exit routine for inverted date (OUTPUT)
    Regards,
    Arunima

  • Function Module to convert currency

    Hi all,
    I need to convert all currency to 'EURO'.Could you please anybody help me in this regard.whather is there any function module?.
    Regards.
    Reddy Prasad.

    HI,
    Please try this .
    FWOS_CURRENCY_DECIMALS_READ :All the currency amounts are stored in SAP tables as CURR(n,2) (the same as DEC(n,2)). So before any arithmetic operation value should be adjusted using the real decimals number for the given currency (stored in TCURX).
    Conversion Rates by type and date are stored in TCURR (+factors). Standard type is M. Date is stored in inverted format (the most recent date has the numerically smallest value). ABAP code to convert dates:
    convert date p_date into inverted-date w_date.
    convert inverted-date w_date into date p_date.
    CONVERT_TO_LOCAL_CURRENCY :the only difference between CONVERT_TO_LOCAL_CURRENCY and CONVERT_TO_FOREIGN_CURRENCY seems to be the following:
    Foreign currency is TCURR-FCURR (From Currency)
    Local Currency is TCURR-TCURR (To Currency)
    So result will be slightly different for the both functions (two rates stored in the TCURR: e.g. JPY->USD rate is 0.00880, USD->JPY rate is 122.00000). Better to use CONVERT_TO_LOCAL_CURRENCY, because multiplication is more exact operation than division.
    CONVERT_TO_FOREIGN_CURRENCY :Both conversion functions can return also selected rate and factors
    reward all helpfull answers,
    regards .
    Jay

Maybe you are looking for

  • I'm having a problem with loops and indexes. (indices? ha)

    I'm building a Frequency Histogram table. I have a Histogram method below me, but it's showing up errors for the lines I put in bold. The error is "cannot find "i" variable". What should I do? Thanks in advance for the help. public void histogram(int

  • Sales order creation with ref. to contract. Quantity related issue

    Hii All, I am creating sales order with ref. to contract. But i can enter more quantity than that mentioned in the contract. Here i need the system should give a warning while saving the order. I refered the thread Sales Order Against Contract In thi

  • Can i install mictodoft on a usb key

    I wont to install windows on my laptop but I don't wont it on my hard drive can I install it on a USB key

  • Macbook Pro and New Wireless band

    I have a MBP 2.1, that is the first of the Duo core's, and apparently the 'n' band does not work with the card in my laptop. Will Apple provide an option to upgrade the airport hardware, or is that impossible.

  • Render blank page in report

    Hi, I am designing a report that displays page number in page footer. The report only has 4 data rows that spans half a page. When I export the report in Excel format, two pages are created with page one has data and blank footer and page two has no