Current Position:Home > Functional module to get table entries in another system

Functional module to get table entries in another system

Update:11-30Source: network consolidation
Advertisement
Hi all,
Is there any functional module with which we can get the data of a table which
belongs to another system(Using RFC calls)
Thanks and Regads, Pradeep

The Best Answer

Advertisement
Hi  Pradeep
            you can acess another table in the database directly .Follow this way.
1 transaction code : dbco   : configuration about database that you would like to connect
2.tell basis team to set system file (example Oracle )  to know the database.
3.coding , you can use code below to select the data from another database by native SQL .
PARAMETERS dbs TYPE dbcon-con_name default 'SDB'.
DATA carrid_wa TYPE scarr-carrid.
DATA lv_int  TYPE i.
*Types
data: begin of ty_equi,
equipment(25) type c,
SERIALENERGY(25) type c,
end of ty_equi.
*Internal Tables
data it_equi like table of ty_equi.
data wa_equi like line of it_equi.
DATA dbtype TYPE dbcon_dbms.
SELECT SINGLE dbms
       FROM dbcon
       INTO dbtype
       WHERE con_name = dbs.
IF dbtype = 'ORA'.
  TRY.
      EXEC SQL.
        CONNECT TO :dbs
      ENDEXEC.
      IF sy-subrc <> 0.
        RAISE EXCEPTION TYPE cx_sy_native_sql_error.
      ENDIF.
      EXEC SQL.
        OPEN dbcur FOR
          SELECT
                 EQUIPMENT,
                 SERIALENERGY
                 FROM emd.meter
      ENDEXEC.
      DO.
        EXEC SQL.
          FETCH NEXT dbcur INTO :wa_EQUI
        ENDEXEC.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
          WRITE: /
          wa_equi-equipment,
          wa_equi-SERIALENERGY.
        ENDIF.
      ENDDO.
      EXEC SQL.
        CLOSE dbcur
      ENDEXEC.
      EXEC SQL.
        DISCONNECT :dbs
      ENDEXEC.
    CATCH cx_sy_native_sql_error.
      MESSAGE `Error in Native SQL.` TYPE 'I'.
  ENDTRY.
ENDIF.
Best Regards
wiboon
  • Functional module to get table entries in another system Update:11-30

    Hi all, Is there any functional module with which we can get the data of a table which belongs to another system(Using RFC calls) Thanks and Regads, PradeepHi  Pradeep             you can acess another table in the database directly .Follow this way.

  • Function module to find table entries associated with transport request Update:11-30

    Hi all,    I have requirement, like we have created a table and maintenance view for that table - and made entries in that table.    now we want to know all the entries made in the table are associated with transport request or not.   how to do it pr

  • Function Module to select all entries in  ALV output Update:11-30

    Hi,   I have an ALV report and Select ALL and Deselect ALL Buttons added to it .   When the Select ALL button is pressed,all entries of the ALV report should be selected.   When the Deselect ALL button is pressed,all entries of the ALV report should

  • Function module to get table description Update:10-11

    Is there any function module to get table description on passing table nameHi, We need to use : 'G_RW_TABLE_DESCRIPTION_GET' function module. we pass the table name and the language. call function 'G_RW_TABLE_DESCRIPTION_GET'     exporting       rw_t

  • Attach function module to a table field Update:11-30

    Hi guys,         I need to add a function module to a table field as a F4 help. The function module i like to attach is K_GROUP_SELECT. Like it works in the transaction KS13 Function module-->   ‘K_GROUP_SELECT’ Please reply urgent will be rewarded w

  • Crystal Reports Based on SAP Function Module and Transperant Tables Update:11-30

    Hi, I need to develop reports based on SAP trasperant tables and to filter the records I require to use one of the function module in SAP. I have created parameters in Crystal reports that are required for the function to execute and are included in

  • How to create ENQUEUE function module for s567 table Update:11-30

    Hi Experts, Anyone Plz tell the steps how to create a ENQUEUE function module for the table s567. Its somewht urgent, plz help me. <REMOVED BY MODERATOR> Mohana Edited by: Alvaro Tejada Galindo on Mar 10, 2008 4:21 PMHi, You can create a lock on a o

  • How to find the function module for standard tables. Update:11-30

    Hi Could any one please tell me how to find the standard function module to update the standard tables Thanks & Regards SowmyaHi sowmya, To find the function modules for standard tables you go for a where used list of that particular table and check

  • Function module for no of entries in a table Update:10-11

    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.Read other 7 answers

  • Function module which sort the entries in Table maintance generator Update:11-30

    hi     I want to know the function module which is used to sort the entirs in table maintance genrator. ThanksHi, Go to the TMG program .You can change the code there. Rgds, AnvershaRead other 3 answers