Function module for comparing contents of two internal tables

Hi All,
Is there any function module to compare contents of two internal tables of same structure?
If yes please let me know.
Thanks in advance.
Amol

Hi
call SE16 with table TFTIT in order to get a full list (it will be long...)
A list of FMs with parameters can be found in table FUNCT.
Finally go to sm37rsdf4
that will give you all the function modules with description
Here is the list:
http://www.erpgenie.com/abap/functions.htm
hope this helps...
Regards
CSM Reddy

Similar Messages

  • Using for all entries of two internal tables in where clause of the select

    Hi experts,
    My requirement is, need to select Marc-minbe and wrpl-sobst, for all the entries of the two internal tables it_mara , and it_t001w.
    here is the select queries i have used,
    select matnr normt from  mara into it_mara for all entries in it_data where normt = it_data-normt.
    select konnr werks from t001w into it_t001w for all entries in it_data where konnr = it_data-konnr.
    now i need to select minbe of marc table and sobse of wrpl table for all the entries of above internal tables, it_mara and it_t001w, using both matnr of it_mara and werks of it_t001w in where condition.
    Pls advise how i can do it.
    Thanks.
    Moderator message: very basic, please work on this yourself first, these forums are not a substitute for ABAP training.
    Edited by: Thomas Zloch on Dec 6, 2010 9:38 AM

    Hi
    call SE16 with table TFTIT in order to get a full list (it will be long...)
    A list of FMs with parameters can be found in table FUNCT.
    Finally go to sm37rsdf4
    that will give you all the function modules with description
    Here is the list:
    http://www.erpgenie.com/abap/functions.htm
    hope this helps...
    Regards
    CSM Reddy

  • 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 to find the columns in Internal table

    Hi Group,
    Is there any function module which displays the columns of the internal table. I guess there is one cos when we debug any program and select the "Tables" button while debugging and enter an internal table and then do a "Find" the pop up which comes up shows the internal table columns. As this functionality is in the debugger which I cannot debug hence was wondering if some one has come across any such function module. Thanks in advance.
    Regards,
    Ankur Bhandari
    [email protected]

    Hi again,
    1. In the above FM
       Pass Program as SY-REPID (U cann pass other prg name also)
    in FieldName Pass the name of the internal table
       eg. 'ITAB'
    2. This FM will give u the details of the
       internal table.
       The u can display the COMPONENTS table
       using ALV or anyother method u like.
    Regards,
    Amit M.

  • Function module for no of entries in a table

    is there any function module by which we can get the number of entries in a database table?

    Hi,
    You can use like:
    select count(*)from dbtab into cnt.
    which will return u the no. of records.
    Regards,
    Renjith Michael.

  • Function module for finding number of records in table

    Do we have any function module to find number of records in a table?
    Thanks,
    Shweta

    use the EM_GET_NUMBER_OF_ENTRIES. You just have to write your table name into the input table IT_TABLES in the TABNAME field

  • Function module for move internal table records into MSexcel file

    Hi all,
    Tell me the function module which is used to
    move internal table records in to MSexcel file.
    Give the sample program...

    Please search the forum for FM  "GUI_DOWNLOAD" You will get tons of threads with sample code.
    Also take a look into SAP_CONVERT_TO_XLS_FORMAT
    Thanks

  • Is their any function module for deleting condition record i am trying

    Hi Experts,
    Is their any function module for deleting condition record i am trying  this way.......
    DATA: TABLE (4) TYPE C.
    DATA: KNUM LIKE KONH-KNUMH
    DATA: K_VEWE LIKE T681-KVEWE VALUE 'A'.
    DATA: T681_STR LIKE T681.
    DATA: LV_NUM TYPE I.
    GET PARAMETERS
    PARAMETERS: TABNO LIKE T681-KOTABNR.
    PARAMETERS: TESTMODE DEFAULT 'X' AS CHECKBOX.
    REFRESH INT_KNUMH.
    Select single * from T681 into T681_STR
    where kvewe = K_VEWE AND
    KOTABNR = TABNO.
    IF SY-SUBRC NE 0.
    WRITE: / 'No entry in T681 for number ', TABNO.
    WRITE: / 'Check whether corresponding condition table exists.'.
    EXIT.
    ENDIF.
    TABLE = T681_STR-KOTAB.
    SELECT KNUMH FROM (TABLE) INTO KNUM.
    SELECT SINGLE * FROM KONH WHERE KNUMH = KNUM.
    IF SY-SUBRC NE 0.
    INT_KNUMH-KNUMH = KNUM.
    COLLECT INT_KNUMH.
    ENDIF.
    ENDSELECT.
    DESCRIBE TABLE INT_KNUMH LINES LV_NUM.
    IF LV_NUM EQ 0.
    WRITE: / 'No inconsistent entries found.'.
    WRITE: / 'Each record in the condition table has a corresponding.'.
    WRITE: / 'entry in the KONH table.'.
    EXIT.
    ENDIF.
    LOOP AT INT_KNUMH.
    IF TESTMODE IS INITIAL.
    DELETE FROM (TABLE) WHERE
    KNUMH = INT_KNUMH-KNUMH.
    IF SY-SUBRC = 0.
    WRITE: / 'KNUMH =', INT_KNUMH-KNUMH(10), ' deleted from table ' ,TABLE.
    ELSE.
    WRITE: / 'DELETE: SY-SUBRC is', SY-SUBRC , ' FOR KNUMH = ' .
    WRITE: INT_KNUMH-KNUMH(10).
    ENDIF.
    ELSE.
    WRITE: / 'TESTRUN: KNUMH =', INT_KNUMH-KNUMH(10).
    ENDIF.
    ENDLOOP.
    is their any Standerd Function module  for comparing  tables if the condition record not exist in it has to exit if it is their then compare  those two tables if not exist in one table also that has  to be delete  the condition record
    Please let me know .....

    Hi,
       You can use Function module PRICING_CHECK to check condition record. Do a where-used list on it to see how to call it.
    Regards
    Kiran Sure

  • Creation of function module for updating the ztable

    Hi,
    I am sending the requirement for ceation of function module for updating the ztable.
    Requirement----
    Table Updation rule (New record)
    While creating a new record the calling function will export the following to the table handling function.
    Table field     Probable Values
    ZORDERNO------->     Sales Delivery no in case of sales orderShipment no in case of transfer order
    UNAME----
    >     User ID
    ZORDTYPE----
    >     SALEOR in case of sales orderTRANSF in case of transfer order
    ZREFDOCNO----
    >Sales Order no in case of sales orderPurchase Order no in case of transfer order
    ZREFDOCNO1----
    >Delivery no in case of transfer order
    The table handling function will calculate the following fields
    Table field     Probable Values
    ZREQNO----
    >Running serial number (incremented by 1 for each new record)
    ZREQDAT     -
    >System date
    ZREQTIME----
    >     System time
    ZSTATUS----
    >OPEN (for all new records)
    Before inserting a new record the table handling function will always check if a previous record exists for the same order / shipment no. if record exists the function will not insert a new record.
    Table Updation rule (Status Update)
    While updating a record the calling function will export the following to the table handling function.
    Table field     Probable Values
    ZORDERNO----
    >Sales order no in case of sales orderShipment no in case of transfer order
    ZSTATUS----
    >CANCEL if cancellation successfulERROR if cancellation not possible (order already processed)
    The table handling function will calculate the following fields
    Table field     Probable Values
    ZSTATDAT----
    >System date
    ZSTATTIME----
    >     System time

    Do you have to create/update new record in Ztable through Function Module ?
    or you need to write FM only for validation?
    Any how, you need to create a Program with Input values for the fields of Ztable, and for rest of fields the Value can be calculated based on input as per your requirement.
    Let me know clearly what exactly u need ?
    Regards,
    Kiran

  • Displaying contents of two int. tables in same screen using grid display

    Hello everyone,
       Can anyone give me any idea how we can print contents of two internal tables of different structures in same screen while we are using GRID display fm. This is working fine in LIST display with fm's like REUSE_ALV_BLOCK_LIST_INIT , BLOCK_LIST_APPEND and BLOCK_LIST_DISPLAY. But what about the same in Grid display?

    Hi,
    You have to define two containers in a single Screen.
    Define two containers on a single screen
    DATA: ok_code LIKE sy-ucomm,
          g_container TYPE scrfname VALUE 'CUSTOM2',
          grid1  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container.
    DATA: i_cat            TYPE kkblo_t_fieldcat,
          i_fieldcatalog   TYPE lvc_t_fcat,
          ws_fcat        TYPE lvc_s_fcat,
           wa_layout     TYPE lvc_s_layo.
    DATA:
          g_container1 TYPE scrfname VALUE 'CUSTOM3',
          grid2  TYPE REF TO cl_gui_alv_grid,
          g_custom_container1 TYPE REF TO cl_gui_custom_container.
    DATA: i_cat1            TYPE kkblo_t_fieldcat,
          i_fieldcatalog1   TYPE lvc_t_fcat,
          wa_layout1        TYPE lvc_s_layo.
    Display firstALV
      wa_layout-grid_title = text-029.
      wa_layout-zebra      = 'X'.  "Output rows with alternating colors
      wa_layout-no_author  = 'X'.  "Allow users to enter global layouts
      wa_layout-sel_mode   = 'A'.
      wa_layout-cwidth_opt = 'X'.
      ws_repid = sy-repid.
    *Function module to get the field catalog in the kkblo_t_fieldcat format
      CALL FUNCTION 'K_KKB_FIELDCAT_MERGE'
           EXPORTING
                i_callback_program     = ws_repid
                i_tabname              = 'WS_OPEN_SUM'
                i_inclname             = ws_repid
           CHANGING
                ct_fieldcat            = i_cat
           EXCEPTIONS
                inconsistent_interface = 1
                OTHERS                 = 2.
      IF sy-subrc <> 0.
        MESSAGE e000 WITH text-003.
      ENDIF.
    *Function module to get the field catalog in the lvc_t_fieldcat format
      CALL FUNCTION 'LVC_TRANSFER_FROM_KKBLO'
           EXPORTING
                it_fieldcat_kkblo = i_cat
           IMPORTING
                et_fieldcat_lvc   = i_fieldcatalog
           EXCEPTIONS
                it_data_missing   = 1
                OTHERS            = 2.
      IF sy-subrc <> 0.
        MESSAGE e000 WITH text-003.
      ENDIF.
      LOOP AT i_fieldcatalog INTO ws_fcat.
        IF ws_fcat-fieldname = 'BALANCE'.      "#CCE
    #CCE - IF required
          ws_fcat-do_sum = 'X'.
          MODIFY i_fieldcatalog FROM ws_fcat.
        ENDIF.
      ENDLOOP.
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
         EXPORTING container_name = g_container.
        CREATE OBJECT grid1
                  EXPORTING i_parent = g_custom_container.
        CALL METHOD grid1->set_table_for_first_display
                 EXPORTING
                     is_layout = wa_layout
                 CHANGING
                     it_fieldcatalog  = i_fieldcatalog
                     it_outtab        =  i_open_sum.
      ENDIF.
    Display second ALV
      wa_layout1-grid_title = 'SAP R/3 (GLPCT) Totals'.
      wa_layout1-zebra      = 'X'.  "Output rows with alternating colors
      wa_layout1-no_author  = 'X'.  "Allow users to enter global layouts
      wa_layout1-sel_mode   = 'A'.
      wa_layout1-cwidth_opt = 'X'.
      ws_repid = sy-repid.
    *Function module to get the field catalog in the kkblo_t_fieldcat format
      CALL FUNCTION 'K_KKB_FIELDCAT_MERGE'
           EXPORTING
                i_callback_program     = ws_repid
                i_tabname              = 'WS_GLPCT_CHK'
                i_inclname             = ws_repid
           CHANGING
                ct_fieldcat            = i_cat1
           EXCEPTIONS
                inconsistent_interface = 1
                OTHERS                 = 2.
      IF sy-subrc <> 0.
        MESSAGE e000 WITH text-003.
      ENDIF.
    *Function module to get the field catalog in the lvc_t_fieldcat format
      CALL FUNCTION 'LVC_TRANSFER_FROM_KKBLO'
           EXPORTING
                it_fieldcat_kkblo = i_cat1
           IMPORTING
                et_fieldcat_lvc   = i_fieldcatalog1
           EXCEPTIONS
                it_data_missing   = 1
                OTHERS            = 2.
      IF sy-subrc <> 0.
        MESSAGE e000 WITH text-003.
      ENDIF.
      LOOP AT i_fieldcatalog1 INTO ws_fcat.
        CASE ws_fcat-fieldname.
          WHEN 'HSLVT'.
            ws_fcat-do_sum = 'X'.
          WHEN 'HSL01' OR 'HSL02' OR 'HSL03' OR 'HSL04' OR
               'HSL05' OR 'HSL06' OR 'HSL07' OR 'HSL08' OR
               'HSL09' OR 'HSL10' OR 'HSL11' OR 'HSL12' OR
               'HSL13' OR 'HSL14' OR 'HSL15' OR 'HSL16' .
            ws_fcat-no_out = 'X'.
          WHEN 'RBUKRS' OR 'RACCT' OR 'RPRCTR' .
            ws_fcat-key = 'X'.
        ENDCASE.
        MODIFY i_fieldcatalog1 FROM ws_fcat.
      ENDLOOP.
      IF g_custom_container1 IS INITIAL.
        CREATE OBJECT g_custom_container1
         EXPORTING container_name = g_container1.
        CREATE OBJECT grid2
                  EXPORTING i_parent = g_custom_container1.
        CALL METHOD grid2->set_table_for_first_display
                 EXPORTING
                     is_layout = wa_layout1
                 CHANGING
                     it_fieldcatalog  = i_fieldcatalog1
                     it_outtab        =  i_glpct_chk.
      ENDIF.
    Then call the screen
      Call Screen 9000.
    Regards
    Subramanian

  • Function module for transfering a file contents into another?

    Hi all,
       Is there a Function module for transfering a file contents into another?That is the whole content from a file to other??
    Regards,
    Shashank.

    Hi,
    I think there is no such FM. You need to read the data in internal table and then write it in another file.
    Regards,
    Atish

  • Function Modules for Actual, Plan, Budget Cost over internal orders

    Dear All,
    I need a function module for getting the Actual, Plan, Budget Costs for the internal orders assigned.
    I want to fetch the cost related to internal order which is assigned to project C projects in PLM.

    hai tehre are no such funcion moduels
    u have to select from bpge and bpja tables
    and sum up them
    afzal

  • Function Module for .xlsx to Internal table

    Hi Gurus,
    Please let me know if there is any function module for .xlsx to internal table.
    Kind regards,
    Varun

    Hi,
    try the below FM's
    ALSM_EXCEL_TO_INTERNAL_TABLE
    TEXT_CONVERT_XLS_TO_SAP
    Thanks,
    Vinayaka

  • Compare two internal tables

    hi everybody
    i have two internal tables  ITAB1 AND ITAB2
    I WANT TO COMPARE THE CONTENTS OF THESE INTERNAL TABLES HOW TO DO THIS
    REGARDS
    HRIDHANJILI

    Hello Hridhayanjili
    The most detailed comparison is to use the same logic as change documents are prepared. Assuming both of your itabs are of structure struc_a. Then define the following type:
    TYPES: BEGIN OF ty_s_itab_di. 
    INCLUDE TYPE struc_a.
    TYPES: CHIND  TYPE bu_chind.
    TYPES: END OF ty_s_itab_di.
    TYPES: ty_t_itab_di  TYPE STANDARD TABLE OF ty_s_itab_di
                         WITH DEFAULT KEY.
    DATA: 
      gt_itab_old  TYPE ty_t_itab_di, 
      gt_itab_new  TYPE ty_t_itab_di.
    Fill itabs gt_Itab_old with the corresponding data of itab1 and gt_itab_new with the corresponding data of itab2.
    Very important: sort you itabs either by all key fields or by all fields.
    Call function CHANGEDOCUMENT_PREPARE_TABLES with the following parameters
    - CHECK_INDICATOR = ' '
    - TABLE_NEW = gt_Itab_new
    - TABLE_OLD = gt_itab_old
    The function module will remove identical lines from both itabs. New entries in gt_itab_New will have CHIND = 'I' and deleted entries in gt_itab_old will have CHIND = 'D'.
    Read the documentation of the function module and play around with it. You will see that this a quite easy yet powerful approach for comparing itabs.
    Regards
    Uwe

Maybe you are looking for

  • Type of Memory

    I have a bonehead question or two. I am upgrading a Wallstreet for my son -- 266 mHz, 64 MB, 14" screen, 1GB Cache -- and am wondering if I can use the old/no longer used memory from my G4 Titanium in the Wallstreet. I suspect not -- but I just have

  • Portrait followed by Landscape content in iBooks Author

    Preparing to ePublish, using the Contemporary template (I think is how it started), and since modified (only) the chapter layout for my heading preferences.  Started in Portrait mode and imported all my text (cut and paste from a Word doc, because I

  • MacBookPro external video with bootcamp issue

    I need some help figuring out how to use an external DVI monitor while running bootcamp xp pro. I have connected a monitor and an external keyboard and tried rebooting with it connected and also just closing the laptop, but cannot get any video to ap

  • Why cant i connect my macbook to the internet

    i tried to connect my new macbook to my home wifi but if wont work. what should i do ?

  • Trouble installing AE CC for Mavericks

    Hey there, I recently downloaded the patch for AE CC Mavericks. I was able to get AE to boot up once, but for some reason it ran in trial mode. Now, every time I run AE I get prompted with the "Your Trial has Ended" screen. Signing into my account do