Help needed on workin with LDBs using call through Function Module LDB_PROC

Hi All
I am new to Logical Databases. I found on net that I can use a dynamic call to a Logical Database using Function Module
"LDB_PROCESS".
I tried implementing the same using the following logic.
REPORT  zsa_test2.
TABLES: pernr.
SELECT-OPTIONS s_pernr FOR pernr-pernr.
DATA: callback TYPE TABLE OF ldbcb,
           callback_wa LIKE LINE OF callback.
callback_wa-ldbnode     = 'PERNR'.
callback_wa-get            = 'X'.
callback_wa-cb_prog     = sy-repid.
callback_wa-cb_form     = 'CALLBACK_PERNR'.
APPEND callback_wa TO callback.
START-OF-SELECTION.
  CALL FUNCTION 'LDB_PROCESS'
       EXPORTING
            ldbname                       = 'PNP'
         VARIANT                       = ' '
         EXPRESSIONS              = TEXPR
         FIELD_SELECTION        = FSEL
       TABLES
            callback                         = callback
         SELECTIONS                 = SELTAB
    EXCEPTIONS
         LDB_NOT_REENTRANT      = 1
         LDB_INCORRECT               = 2
         LDB_ALREADY_RUNNING  = 3
         LDB_ERROR                      = 4
         LDB_SELECTIONS_ERROR = 5
         LDB_SELECTIONS_NOT_ACCEPTED = 6
         VARIANT_NOT_EXISTENT      = 7
         VARIANT_OBSOLETE            = 8
         VARIANT_ERROR                  = 9
         FREE_SELECTIONS_ERROR = 10
         CALLBACK_NO_EVENT         = 11
         CALLBACK_NODE_DUPLICATE     = 12
         OTHERS                                       = 13.
  IF sy-subrc <> 0.
   WRITE: 'Exception with SY-SUBRC', sy-subrc.
  ENDIF.
*&      Form  CALLBACK_SPFLI
      text
     -->NAME       text
     -->WA         text
     -->EVT        text
     -->CHECK      text
FORM callback_pernr USING name  TYPE ldbn-ldbnode
                                            wa    TYPE pernr
                                            evt   TYPE c
                                            check TYPE c.
  BREAK-POINT.
  WRITE: / wa-pernr.
  ULINE.
ENDFORM.                    "CALLBACK_SPFLI
But I am unable to transfer the control to the subroutine. The break-point isn't reached.
Can someone please guide me? Am I using the wrong node or something??

look at the below code ..
pass  sstab  to the selection in the FM
data cbtab type table of ldbcb.
data wa_cbtab like line of cbtab.
data sstab type table of rsparams.
data wa_sstab like line of sstab.
wa_cbtab-ldbnode  = 'SPFLI'.
wa_cbtab-get      = 'X'.
wa_cbtab-get_late = ' '.
wa_cbtab-cb_prog  = sy-cprog.
wa_cbtab-cb_form  = 'CB_SPFLI'.
append wa_cbtab to cbtab.
wa_cbtab-ldbnode  = 'SFLIGHT'.
wa_cbtab-get      = 'X'.
wa_cbtab-get_late = ' '.
wa_cbtab-cb_prog  = sy-cprog.
wa_cbtab-cb_form  = 'CB_SFLIGHT'.
append wa_cbtab to cbtab.
wa_sstab-selname  = 'AIRP_FR'.
wa_sstab-kind     = 'S'.
wa_sstab-sign     = 'I'.
wa_sstab-option   = 'EQ'.
wa_sstab-low      = 'FRA'.
append wa_sstab to sstab.
call function 'LDB_PROCESS'
  exporting
    ldbname     = 'F1S'
  tables
    callback    = cbtab
    selections  = sstab .
form cb_spfli  using  nodename  type ldbn-ldbnode
                      wa_spfli  type spfli
                      mode      type c
                      selected  type c.
   write: / wa_spfli-carrid,
            wa_spfli-connid,
            wa_spfli-airpfrom,
            wa_spfli-airpto.
endform.
form cb_sflight  using  nodename   type ldbn-ldbnode
                        wa_sflight type sflight
                        mode       type c
                        selected   type c.
   write: /3 wa_sflight-fldate,
             wa_sflight-seatsmax,
             wa_sflight-seatsocc.
endform.

Similar Messages

  • Upload data from excel with vba by calling a function module

    Hello all,
    i have a problem with the function module "ALSM_EXCEL_TO_INTERNAL_TABLE". I will call this function module with vba to load data from excel to sap with a Buttonclick. I have copied this function module and set it remotable. But i can´t call it from excel.
    Can you give me some tips how can i
    upload data from excel with vba by click a button.
    The problem seems the function: call method cl_gui_frontend_services=>clipboard_import in the function module, because when i comment this function call the vba-call is true but no results. 
    How can I call the function module correct with vba?
    Thanks a lot for your tips!!!!
    Chris
    Message was edited by:
            Christoph Kirschner

    HI
    Uploading data directly from Excel file format
    * Upload data direct from excel.xls file to SAP
    REPORT ZEXCELUPLOAD.
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
                begcol TYPE i DEFAULT 1 NO-DISPLAY,
                begrow TYPE i DEFAULT 1 NO-DISPLAY,
                endcol TYPE i DEFAULT 100 NO-DISPLAY,
                endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    * Tick don't append header
    PARAMETERS: kzheader AS CHECKBOX.
    DATA: BEGIN OF intern OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern.
    DATA: BEGIN OF intern1 OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern1.
    DATA: BEGIN OF t_col OCCURS 0,
           col LIKE alsmex_tabline-col,
           size TYPE i.
    DATA: END OF t_col.
    DATA: zwlen TYPE i,
          zwlines TYPE i.
    DATA: BEGIN OF fieldnames OCCURS 3,
            title(60),
            table(6),
            field(10),
            kz(1),
          END OF fieldnames.
    * No of columns
    DATA: BEGIN OF data_tab OCCURS 0,
           value_0001(50),
           value_0002(50),
           value_0003(50),
           value_0004(50),
           value_0005(50),
           value_0006(50),
           value_0007(50),
           value_0008(50),
           value_0009(50),
           value_0010(50),
           value_0011(50),
           value_0012(50),
           value_0013(50),
           value_0014(50),
           value_0015(50),
           value_0016(50),
           value_0017(50),
           value_0018(50),
           value_0019(50),
           value_0020(50),
           value_0021(50),
           value_0022(50),
           value_0023(50),
           value_0024(50),
           value_0025(50),
           value_0026(50),
           value_0027(50),
           value_0028(50),
           value_0029(50),
           value_0030(50),
           value_0031(50),
           value_0032(50),
           value_0033(50),
           value_0034(50),
           value_0035(50),
           value_0036(50),
           value_0037(50),
           value_0038(50),
           value_0039(50),
           value_0040(50),
           value_0041(50),
           value_0042(50),
           value_0043(50),
           value_0044(50),
           value_0045(50),
           value_0046(50),
           value_0047(50),
           value_0048(50),
           value_0049(50),
           value_0050(50),
           value_0051(50),
           value_0052(50),
           value_0053(50),
           value_0054(50),
           value_0055(50),
           value_0056(50),
           value_0057(50),
           value_0058(50),
           value_0059(50),
           value_0060(50),
           value_0061(50),
           value_0062(50),
           value_0063(50),
           value_0064(50),
           value_0065(50),
           value_0066(50),
           value_0067(50),
           value_0068(50),
           value_0069(50),
           value_0070(50),
           value_0071(50),
           value_0072(50),
           value_0073(50),
           value_0074(50),
           value_0075(50),
           value_0076(50),
           value_0077(50),
           value_0078(50),
           value_0079(50),
           value_0080(50),
           value_0081(50),
           value_0082(50),
           value_0083(50),
           value_0084(50),
           value_0085(50),
           value_0086(50),
           value_0087(50),
           value_0088(50),
           value_0089(50),
           value_0090(50),
           value_0091(50),
           value_0092(50),
           value_0093(50),
           value_0094(50),
           value_0095(50),
           value_0096(50),
           value_0097(50),
           value_0098(50),
           value_0099(50),
           value_0100(50).
    DATA: END OF data_tab.
    DATA: tind(4) TYPE n.
    DATA: zwfeld(19).
    FIELD-SYMBOLS: <fs1>.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT intern.
        intern1 = intern.
        CLEAR intern1-row.
        APPEND intern1.
      ENDLOOP.
      SORT intern1 BY col.
      LOOP AT intern1.
        AT NEW col.
          t_col-col = intern1-col.
          APPEND t_col.
        ENDAT.
        zwlen = strlen( intern1-value ).
        READ TABLE t_col WITH KEY col = intern1-col.
        IF sy-subrc EQ 0.
          IF zwlen > t_col-size.
            t_col-size = zwlen.
    *                          Internal Table, Current Row Index
            MODIFY t_col INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t_col LINES zwlines.
      SORT intern BY row col.
      IF kzheader = 'X'.
        LOOP AT intern.
          fieldnames-title = intern-value.
          APPEND fieldnames.
          AT END OF row.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO zwlines TIMES.
          WRITE sy-index TO fieldnames-title.
          APPEND fieldnames.
        ENDDO.
      ENDIF.
      SORT intern BY row col.
      LOOP AT intern.
        IF kzheader = 'X'
        AND intern-row = 1.
          CONTINUE.
        ENDIF.
        tind = intern-col.
        CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
        ASSIGN (zwfeld) TO <fs1>.
        <fs1> = intern-value.
        AT END OF row.
          APPEND data_tab.
          CLEAR data_tab.
        ENDAT.
      ENDLOOP.
      CALL FUNCTION 'DISPLAY_BASIC_LIST'
           EXPORTING
                file_name     = filename
           TABLES
                data_tab      = data_tab
                fieldname_tab = fieldnames.
    *-- End of Program
    <b>Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT</b>
    *Title : Excel Uploading
    TYPES:   BEGIN OF t_datatab,
             col1(25)  TYPE c,
             col2(30)  TYPE c,
             col3(30)  TYPE c,
             col4(30)  TYPE c,
             col5(30)  TYPE c,
             col6(30)  TYPE c,
             col7(30) TYPE c,
             col8(30)  TYPE c,
             col9(30)  TYPE c,
             col10(30)  TYPE c,
             col11(30)    TYPE c,
           END OF t_datatab.
    DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
          wa_datatab TYPE t_datatab.
    Data : p_table type t_datatab occurs 0 with header line.
    DATA : gd_scol   TYPE i VALUE '1',
           gd_srow   TYPE i VALUE '1',
           gd_ecol   TYPE i VALUE '256',
           gd_erow   TYPE i VALUE '65536'.
    DATA: it_tab TYPE filetable,
          gd_subrc TYPE i.
    field-symbols : <fs>.
    *Selection screen definition
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:  p_file LIKE rlgrap-filename
                   DEFAULT 'c:test.xls' OBLIGATORY.   " File Name
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      REFRESH: it_tab.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title     = 'Select File'
          default_filename = '*.xls'
          multiselection   = ' '
        CHANGING
          file_table       = it_tab
          rc               = gd_subrc.
      LOOP AT it_tab INTO p_file.
    *    so_fpath-sign = 'I'.
    *    so_fpath-option = 'EQ'.
    *    append so_fpath.
      ENDLOOP.
    START-OF-SELECTION.
      PERFORM upload_excel_file TABLES   it_datatab
                                 USING   p_file
                                         gd_scol
                                         gd_srow
                                         gd_ecol
                                         gd_erow.
    * END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3,
                wa_datatab-col4,
                wa_datatab-col5,
                wa_datatab-col6,
                wa_datatab-col7,
                wa_datatab-col8,
                wa_datatab-col9,
                wa_datatab-col10,
                wa_datatab-col11.
      ENDLOOP.
    *&      Form  UPLOAD_EXCEL_FILE
    *       upload excel spreadsheet into internal table
    *      -->P_TABLE    Table to return excel data into
    *      -->P_FILE     file name and path
    *      -->P_SCOL     start column
    *      -->P_SROW     start row
    *      -->P_ECOL     end column
    *      -->P_EROW     end row
    FORM upload_excel_file TABLES   p_table
                           USING    p_file
                                    p_scol
                                    p_srow
                                    p_ecol
                                    p_erow.
      DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.
    * Has the following format:
    *             Row number   | Colum Number   |   Value
    *      i.e.     1                 1             Name1
    *               2                 1             Joe
      DATA : ld_index TYPE i.
    * Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename                = p_file
          i_begin_col             = p_scol
          i_begin_row             = p_srow
          i_end_col               = p_ecol
          i_end_row               = p_erow
        TABLES
          intern                  = LT_INTERN
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'Error Uploading file'.
        EXIT.
      ENDIF.
      IF lt_intern[] IS INITIAL.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'No Data Uploaded'.
        EXIT.
      ELSE.
        SORT lt_intern BY row col.
        LOOP AT lt_intern.
         MOVE lt_intern-col TO ld_index.
         assign component ld_index of structure
         p_table to <fs>.
    move : lt_intern-value to <fs>.
    *     MOVE lt_intern-value TO p_table.
          AT END OF row.
            APPEND p_table.
            CLEAR p_table.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "UPLOAD_EXCEL_FILE
    Regards
    Pavan

  • Send mail using CL_BCS through function module, run in background task.

    Hi,
    I am running a function module in Background task. in this function module I am sending mail using CL_BCS class.
    but mail is not generated. if I run the same function Module in foreground mail generated successfully....
    can anyone please tell me the reason behind this.

    Hi i realise that The LIST_TO_ASCII thing is not working correctly in background because the the list-processing in beckground is working not the same as in dialog i think.
    I can only get the last page of the list out when running in background. Any solution to this?
    my code:
        CALL FUNCTION 'LIST_TO_ASCI'
             EXPORTING
                  list_index         = sy-lsind
             TABLES
                 list_dyn_ascii = downtab
             EXCEPTIONS
                  empty_list         = 1
                  list_index_invalid = 2
                  OTHERS             = 3.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
    Thanks ,
    LH

  • Help needed to debug Communication Channel using Seeburger modules

    Hi ALL
    Can you please, help debug the following communication channel using File adapter & seeBurger module.
    Adapter Framework caught exception: I/O operation failed : java.lang.ClassNotFoundException: com.sap.engine.messaging.impl.spi.transport.PasswordCredentialImpl -
    Loader Info -
    ClassLoader name: [sap.com/com.sap.aii.af.app] Living status: alive Direct parent loaders:   [system:Frame]   [service:servlet_jsp]   [service:ejb]   [library:com.sap.xi.util.misc]   [service:com.sap.aii.adapter.xi.svc] Resources:   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/EJBContainer/applicationjars/com.sap.aii.af.ejb.jar   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/servlet_jsp/AdapterFramework/root/WEB-INF/classes   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/servlet_jsp/AdapterFramework/root/WEB-INF/lib/com.sap.aii.af_api.jar -
    Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.services.rmi_p4.exception.P4BaseRuntimeException: I/O operation failed : java.lang.ClassNotFoundException: com.sap.engine.messaging.impl.spi.transport.PasswordCredentialImpl -
    Loader Info -
    ClassLoader name: [sap.com/com.sap.aii.af.app] Living status: alive Direct parent loaders:   [system:Frame]   [service:servlet_jsp]   [service:ejb]   [library:com.sap.xi.util.misc]   [service:com.sap.aii.adapter.xi.svc] Resources:   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/EJBContainer/applicationjars/com.sap.aii.af.ejb.jar   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/servlet_jsp/AdapterFramework/root/WEB-INF/classes   /usr/sap/KPX/DVEBMGS00/j2ee/cluster/apps/sap.com/com.sap.aii.af.app/servlet_jsp/AdapterFramework/root/WEB-INF/lib/com.sap.aii.af_api.jar
    Your help is greatly appreciated!
    Thank you,
    Patrick

    Hi Patrick,
    It seems that your seeburger instalation was not successfull.
    Try installing it again and make all the libraries are there.
    Regards,
    Luismier
    Edited by: Luismier on Aug 26, 2009 10:57 PM
    Edited by: Luismier on Aug 26, 2009 11:16 PM

  • Call a special function in the dll using Call Library Function Node????

    Dear all,
          I am calling a special function in the dll using call library function node. There is a input parameter that it is a enum type in this function. I don't know how to deal this parameter for calling this function.Has anybody solved this problem?Please advise!
          I am appreciated of you anytime. 

    Most of the times an enum is just a U8/U16/U32, internally so probably you can call it with just a U8/U16/U32 or something. For the correct value you have to look at the definition.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • When I use Call Library Function Node in real time, is the DLL loaded once for all or load every time it is called?

    When I use Call Library Function Node in real time, is the DLL loaded once for all or load every time when it is called?
    I have a time critical real time application, in which I use a piece of DLL function developed by C++.  It is OK?  Could any senior developer assure me?
    Thank you in advance.
    Solved!
    Go to Solution.

    qing_shan61 wrote:
    When I use Call Library Function Node in real time, is the DLL loaded once for all or load every time when it is called?
    Once
    qing_shan61 wrote:
    I have a time critical real time application, in which I use a piece of DLL function developed by C++.  It is OK?
    OK
    Be sure that all DLL calls are thread safe (do not perform calls in UI thread).
    Also for real-time application you need real-time OS.
    Andrey.

  • Can we call a Function Module with in a loop

    Hi,
    Can we call a Function Module within a loop . Does it reduces the performance.
    Can you please guide regarding this.
    With Best Regards
    Mamatha.

    hi Mamatha,
      You can call .. but it is better to avoid calling it within a loop...
    Loop at it_tab.
       call function 'CONVERSION_EXIT_ALPHA_INPUT'
        exporting
          input  = it_tab-vbeln.
        importing
          output = it_tab-vbeln.
    endloop.
    Regards,
    Santosh
    Message was edited by:
            Santosh Kumar Patha

  • I need to know thelist of bapi's and function modules used for transaction

    I need to know thelist of bapi's and function modules used for transaction in order to use these FM or BAPI in reading some fields of equipment master and functional loocation.Can any one suggest me some methods...or do i need to write  a report for the same.

    Steps to find the BAPI/function modules used in a transaction
    1) Find the package of the transaction thro' SE93.
    For example the package for the transaction VA03 is VA
    2) Go to Se80, key-in the package (say VA)
    3) You can see the function modules under the folder finction group and
    you can see the BAPI's under the folder Business Engineering-> Business Objects-> double click on the released methods of the Business Objects

  • Use call library function node

    I try to use call library function node to call a function in DLL and retrieve info stored in the C structure data type, can I do it? If yes, how ? Thanks.

    Have a look at the article Configuring the Call Library Function Node

  • How to find the year ago measure with out using time series functions

    hi all
    is there any way to find year ago sales with out using time series functions like ago
    Thanks
    Sreedhar

    Hello Madan,
    Thanks for the reply.
    It still doesn't consider the product into account.
    My columns are as below
    Prod Week End DATE Current Sales Prior Sales % Change
    A 12/4/2010 100 0
    A 12/11/2010 200 100
    A 12/18/2010 300 200
    B 12/4/2010 400 300(this value is not for prod B, i want this to b 0 aswell. But we get product A's last sale amount)
    Is there any way this can be done. I have tried evaluate,MSUM.
    I cannot build a time dimension as all I have is a view.
    Thanks,
    Deep

  • Can i call a function module of SAP?

    Hi, i have a question... Can i call a function module of SAP... I need print a document from a device, can i call the function module of SAP in order that me it prints it?
    Thanks,

    Hi Victor,
    you can use the GenericSync Example of the MDK. This calls the Module to verify the user directly. Generic Sync is exactly for that purpose: call a BADI directly and no usage of SyncBO. Be aware, that you - out of the box- sync your app data as well at that moment, because a sync runs both - generic and smartsync. Even worse: even when you have nothing to sync in Generic Sync - so nothing to print - it will call the function module for generic sync as long as it is registered.
    Well,  anyway, this is the way to call a function module separate.
    If it works with you rparticular print module? I have no idea, but if this is a normal function module - well, it should be ok.
    Hope this helps.
    Regards,
    Oliver

  • Is it necessary to use the standard function modules always?

    Hi All,
       Suppose i can retrieve the BUSINEES PARTNER ID from the table BUT000 with the help of 'BP_GUID' field through a select query statement. 
    Now is it necessary to use a standard function module to retrieve the same data. what about the performance? which is the better solution. to implement our own code or to use the function module available.
    Please someone clarify me about this issue.
    Regards,
    Sharry.

    If you'd ask the question in general it's obvious that there is no good answer as it always would depend on the circumstance. However, as you've posted your question in the performance tuning forum, let's look at your question in this context first. I think it's fairly safe to say, that in almost 100% of the cases a standard function module will not be as fast as any well implemented and custom tailored code. If in doubt, just try reading the code of the function module you want to read; most likely you will find lots of unnecessary fluff in there, often they read data that you don't even need.
    And as far as buffering is concerned, that can also be an issue. E.g. let's say you do a massive read of distinct business partners and you only need the data once for each partner. Obviously buffering is silly in this case and it might even slow down your program, because the implemented buffering is not necessarily well implemented. I've come across a few cases, where the buffer tables where standard tables with no efficient read access (so no sorted table or hash table) and once tons of data were buffered, it actually took a moment to look up if the record already was buffered (just to find it wasn't there yet).
    Now most of the times this slowdown is not an issue as the lookup is still fast compared to the (usually) prevalent database accesses with their slower IO timing. But another factor to consider is memory consumption and why buffer data in memory (and waste it), if you can't use the buffer anyway? So when I do use standard function modules, I usually try to see what they retain in global memory, to better understand if I need to call some initialization/clearing/refresh function...
    Note also that often you need to process lots of data, but don't find a standard function module for "mass access", so you need to read your object one by one. Obviously that's another good candidate for implementing your own queries, where you can process the data in packages.
    So what might be the reason to use a standard function module? Well, often it's required because the logic is so complex that it would take you too much time to implement it (not to mention that we often simply don't know all the logic that's coded in there). Another advantage is that you might get independent of the data model. E.g. for IDoc interfaces SAP switched in some release the tables where the data is stored. So if you had coded your own queries to get IDoc data, they wouldn't have worked after this particular release upgrade. The standard function on the other hand, checks both the old and new tables, so by using it you would have been fine.
    The one major caveat I'd give though is to always check whether the function module is released or at least documented to some degree. I.e. if it's not released, SAP won't support it and does not guarantee that the interface or logic stays the same. In my experience lots of functions I do want to use are not released (or documented), but I will still use them because they seem to be the best alternative in certain scenarios.
    Cheers, harald

  • System failure, during call of function module RSWR_RFC_SERVICE_TEST

    Hi Team,
         I am working with BW and Portal Integration, with the Netweaver
    2004s SP 11 version. I have a issue when i run the RSPOR_SETUP program
    to test the configuration.
    The error is on status 5 and 12, i get the following error:
    System failure, during call of function module RSWR_RFC_SERVICE_TEST,
    and when i enter at the dev_jrfc.trc log file, i have the following
    error:
    Exception thrown [Tue Jul 10 16:12:16,687]:Exception thrown by
    application running in JCo Server
    java.lang.RuntimeException: call FM RSWR_RFC_SERVICE_TEST to ProgId
    smxpedvc_PORTAL_EPD on host smxpedvc.grupoempresarialangeles.com.mx
    with SSO not authorized: No login module succeeded.
            at
    com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest
    (RFCDefaultRequestHandler.java:79)
            at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequest
    (RFCJCOServer.java:156)
            at com.sap.mw.jco.JCO$Server.dispatchRequest(JCO.java:7785)
            at com.sap.mw.jco.MiddlewareJRfc$Server.dispatchRequest
    (MiddlewareJRfc.java:2405)
            at com.sap.mw.jco.MiddlewareJRfc$Server.listen
    (MiddlewareJRfc.java:1728)
            at com.sap.mw.jco.JCO$Server.listen(JCO.java:8145)
            at com.sap.mw.jco.JCO$Server.work(JCO.java:8265)
            at com.sap.mw.jco.JCO$Server.loop(JCO.java:8212)
            at com.sap.mw.jco.JCO$Server.run(JCO.java:8128)
            at com.sap.engine.core.thread.impl3.ActionObject.run
    (ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute
    (SingleThread.java:100)
            at com.sap.engine.core.thread.impl3.SingleThread.run
    (SingleThread.java:170)
    Could you help me to solve this issue.
    Thanks so much.

    Have you checked the user that is used to connect from J2EE back to ABAP?
    I had a similar problem, went into the Visual Administrator and found the incorrect password (or possibly outdated password) was being used to communicate back to ABAP, and updating that sorted out my problem.
    Hope this helps.
    Cheers,
    Andrew

  • Error when call RFC Function module in R/3

    Dear All,
    We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
    we are facing the error "Error while lookup Exception during processing the payload. Error when calling an adapter by using the communication channel CC_PPPI_MES_RFC_Rcvr (Party: , Service: WCD_320, Object ID: 16563889b449328eac76caa6a3bc592e) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'."
    This is the first time we are doing this configuration.
    Could you please let me know what woulbe the reason.

    read the original message
    We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
    I am talking about the above Receiver RFC channel which you guys are using to call R/3 from XI. That where you need to change the commit parameter

  • Call RFC Function Module in R/3 via XI during Mapping

    Hi,
    I have an XI scenario where I have to fill the IDoc ADRMAS03 in XI and send it to R/3. Unfortunately the sender system does not provide the required address number (ADRNR) for the Business Partner, only the Business Partner number. Therefore I want to call a Function Module in R/3 during the mapping in order to get the ADRNR.
    Does anybody know which RFC-Function Module I can call in R/3 4.6c providing the Busness Partner number in order to get the ADRNR?
    Thanks.
    Alex

    Hi,
    no need for RFC lookup it's better to do as he wants
    (inside an exit in R3) - just my point of view
    BTW
    don't use a FM just find a table with both values
    and create a select statement youself
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Maybe you are looking for

  • After reformatting hard drive, iPod syncs very slowly with iTunes

    A couple of months ago I had to reformat my computer's hard drive. I keep all my music files on an external hard drive. After reformatting, the man who did this for me reloaded iTunes for me and imported all my music back into my iTunes library. It s

  • "Startup disk out of application memory" error

    A friend was copying a large block of files from his startup disk to an external backup drive when a message popped up in the Finder warning that "the startup disk has no more space available for application memory". The message went on to list the o

  • Masked QuickTime movies not displaying correctly...

    Hi there, I'm still a relative novice with Keynote, but am quickly learning that this is a seriously great application! I haven't encountered any real problems so far, except the one I'm about to describe - and I'd really appreciate any help you coul

  • About Apple iTunes

    I Was having a problem today trying to Update App's for My Apple iPhone 4 32GB in Apple iTunes on My 2009 24inch Apple iMac Computer, I Had App's for My Apple iPhone 4 32GB & when I Try to Update them The App's would not Update on Apple iTunes so I W

  • LR5 4x6 printing problem on Epson R3000

    I am having a problem printing on 4x6 paper from LR5.3. I am running OS X Mavericks, and I'm using an Epson R3000. When I print using the standard 4x6, sheet feeder setting, Landscape or Portrait as appropriate, no rotate, the image prints on the low