Lossing data after calling fork

Hi,
I'm writing netwoork application and each in my application I have hash table.
each time I fork child the data get losst some how each entry in the hash table should have socket and some other information.
I did print the contints of the hash table in the parnt and the child process ... they do look diffrent.
any reason why!!!!!!! please help
Thanks
Husam Senussi

Hi,
I'm writing netwoork application and each in my application I have hash table.
each time I fork child the data get losst some how each entry in the hash table should have socket and some other information.
I did print the contints of the hash table in the parnt and the child process ... they do look diffrent.
any reason why!!!!!!! please help
Thanks
Husam Senussi

Similar Messages

  • What's the details of the return data after calling Application.RegisteredFunctions?

    Application.RegisteredFunctions returns 3 columns. The last column is described as "Strings specifying the data types of the return values, and the number and data types of the arguments". Does anybody know the details of it? Is there a table
    showing which string specifies which data type? Thanks!

    From MSDN:
    Data Types
    The pxTypeText argument specifies the data type of the return value and the data types of all arguments to the DLL function or code resource. The first character of
    pxTypeText specifies the data type of the return value. The remaining characters indicate the data types of all the arguments. For example, a DLL function that returns a floating-point number and takes an integer and a floating-point number as
    arguments would require "BIB" for the pxTypeText argument.
    The data types and structures used by Excel to exchange data with XLLs are summarized in the following two tables.
    The first table lists the types supported in all versions of Excel.
    Data type
    Pass by value
    Pass by ref (pointer)
    Comments
    Boolean
    A
    L
    short [int] (0=false or 1=true)
    double
    B
    E
    char *
    C, F
    Null-terminated ASCII byte string
    unsigned char *
    D, G
    Counted ASCII byte string
    unsigned short [int]
    H
    16-bit WORD
    [signed] short [int]
    I
    M
    16-bit signed integer
    [signed long] int
    J
    N
    32-bit signed integer
    FP
    K
    Floating-point array structure
    Array
    O
    Three arguments are passed:
    unsigned short int *
    unsigned short int *
    double []
    XLOPER
    P
    Variable-type worksheet values and arrays
    R
    Values, arrays, and range references
    In Excel 2007 the following data types were introduced to support the larger grids and long Unicode strings.
    Data type
    Pass by value
    Pass by ref (pointer)
    Comments
    unsigned short *
    C%, F%
    Null-terminated Unicode wide-character string
    unsigned short *
    D%, G%
    Counted Unicode wide-character string
    FP12
    K%
    Larger grid floating-point array structure
    Array
    O%
    Three arguments are passed:
    signed int * / RW *
    signed int * / COL *
    double []
    XLOPER12
    Q
    Variable-type worksheet values and arrays
    U
    Values, arrays, and range references
    Starting in Excel 2010 the following data types were introduced:
    Data Type
    Pass by value
    Pass by ref (pointer)
    Comments
    XLOPER12
    X
    The asynchronous handle is used to track a pending asynchronous function call by Excel and the XLL.The existence of the parameter type in the type string also designates the function as asynchronous.For more information about asynchronous functions, see
    Asynchronous User-Defined Functions.
    The string types F, F%, G, and G% are used for arguments that are modified-in-place.
    When working with the data types displayed in the previous table, be aware of the following:
    The C-language declarations assume that your compiler uses 8-byte doubles, 2-byte short integers, and 4-byte long integers by default.
    All functions in DLLs and code resources are called using the __stdcall calling convention.
    Any function that returns a data type by reference, that is, that returns a pointer to something, can safely return a null pointer. Excel interprets a null pointer as a #NUM! error.
    Charles Excel MVP The Excel Calculation Site http://www.decisionmodels.com/

  • After call commit sql , data can not flush to disk

    I use berkey db which support sql . It's version is db-5.1.19.
    1, Open a database.
    2. Create a table.
    3. exec "begin;" sql
    4. exec sql which is insert record into table
    5. exec "commit;" sql
    6. copy database file (SourceDB_912_1.db and SourceDB_912_1.db-journal) to Local Disk of D, then use a tool of dbsql to open the database.
    7. use select sql to check data, there is no record in table.
    1
    sqlite3 * m_pDB;
    int nRet = sqlite3_open_v2(strDBName.c_str(), & m_pDB,SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,NULL);
    2
    string strSQL="CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );";
    char * errors;
    nRet = sqlite3_exec(m_pDB, strSQL.c_str(), NULL, NULL, &errors);
    3
    nRet = sqlite3_exec(m_pDB, "begin;", NULL, NULL, &errors);
    4
    nRet = sqlite3_exec(m_pDB, "INSERT INTO TBLClientAccount (ClientId,AccountId) VALUES('dd','ddd'); ", NULL, NULL, &errors);
    5
    nRet = sqlite3_exec(m_pDB, "commit;", NULL, NULL, &errors);
    Edited by: 887973 on Sep 27, 2011 11:15 PM

    Hi,
    Here is a simple test case program I used based on your description:
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include "sqlite3.h"
    int error_handler(sqlite3*);
    int main()
         sqlite3 *m_pDB;
         const char *strDBName = "C:/SRs/OTN Core 2290838 - after call commit sql , data can not flush to disk/SourceDB_912_1.db";
         char * errors;
         sqlite3_open_v2(strDBName, &m_pDB, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
         error_handler(m_pDB);
         sqlite3_exec(m_pDB, "CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );", NULL, NULL, &errors);
         error_handler(m_pDB);
         sqlite3_exec(m_pDB, "begin;", NULL, NULL, &errors);
         error_handler(m_pDB);
         sqlite3_exec(m_pDB, "INSERT INTO TBLClientAccount (ClientId,AccountId) VALUES('dd','ddd'); ", NULL, NULL, &errors);
         error_handler(m_pDB);
         sqlite3_exec(m_pDB, "commit;", NULL, NULL, &errors);
         error_handler(m_pDB);
         //sqlite3_close(m_pDB);
         //error_handler(m_pDB);
    int error_handler(sqlite3 *db)
         int err_code = sqlite3_errcode(db);
         switch(err_code) {
         case SQLITE_OK:
         case SQLITE_DONE:
         case SQLITE_ROW:
              break;
         default:
              fprintf(stderr, "ERROR: %s. ERRCODE: %d.\n", sqlite3_errmsg(db), err_code);
              exit(err_code);
         return err_code;
    }Than I copied the SourceDB_912_1.db database and the SourceDB_912_1.db-journal directory containing the environment files (region files, log files) to D:\, opened the database using the "dbsql" command line tool, and queried the table; the data is there:
    D:\bdbsql-dir>ls -al
    -rw-rw-rw-   1 acostach 0 32768 2011-10-12 12:51 SourceDB_912_1.db
    drw-rw-rw-   2 acostach 0     0 2011-10-12 12:51 SourceDB_912_1.db-journal
    D:\bdbsql-dir>C:\BerkeleyDB\db-5.1.19\build_windows\Win32\Debug\dbsql SourceDB_912_1.db
    Berkeley DB 11g Release 2, library version 11.2.5.1.19: (August 27, 2010)
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    dbsql> .tables
    TBLClientAccount
    dbsql> .schema TBLClientAccount
    CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );
    dbsql> select * from TBLClientAccount;
    dd|dddI do not see where the issue is. The data can be successfully retrieved, it is present in the database.
    Could you try putting in the sqlite3_close() call and see if you still get the error?
    Did you remove the __db.* files from the SourceDB_912_1.db-journal directory?
    Did you use PRAGMA synchronous, and if so, what is the value you set?
    If this is still an issue for you, please describe in more detail the exact steps needed to get this reproduced and provide a simple stand-alone test case program that reproduces it.
    Regards,
    Andrei

  • Work Process tries to restart but fails - Operating system call fork:restar

    Hi
      We have a ECC 5.0 system running on v5r4 (6.40 kernel level 159).  Some of the work processes fail and then try to restart and fail again. Thus there are many job log entries in both SAP and OS/400.
    The OS/400 logs mention the PASE (unix executable environment) and MCH3203.
    SAP mentions Operating system call fork:restart
    OSS has note #884359 which mentions a palitative but despite being at 6.40 level 159 the parameter profile as/4/wp_max_restart is said to be "unknown" by RZ10.
    We are making sure we are up to date with the APAR II14126 just in case this is the issue.
    It did start after the time change but we are not sure this is the root cause.
    We are also considering getting upto kernel 171.
    Anyone else seen this issue?
    thanks
    Matthew Milne

    We see those problems once a while, and usually they are gone when you restart the instance or after an IPL. You should report the problem to IBM, they will probably be interested in the LIC log entries that come along with the error (STRSST - Start a Service Tool - Licensed Internal Code Log). II14126 is probably a good start (for example, MF40759).
    The profile parameter as4/wp_max_restart is only known to the kernel, because it is not intended as a permament setting, but only as a temporary workaround for the problem in the PASE environment. That's why RZ11 does not know about the parameter and reports it as unknown.
    Kind regards,
    Christian Bartels.

  • The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.

     We developed a SSIS Package to pull the data From Oracle source to Sql Server 2012. Here we used ADO.Net source to pull the records from Source but getting the below error after pulling some 40K records.
      [ADO NET Source [2]] Error: The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.
    [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. 
     The PrimeOutput method on ADO NET Source returned error code 0xC02090F5. 
     The component returned a failure code when the pipeline engine called PrimeOutput(). 
    The meaning of the failure code is defined by the component, 
    but the error is fatal and the pipeline stopped executing. 
     There may be error messages posted before this with more 
    information about the failure.
    Anything that we can do to fix this?

    Hi,
      Tried both....
      * Having schema type as Nvarchar(max). - Getting the same error.
      * Instead of ADO.Net Source used OLEDB Source with driver as " Oracle Provide for OLE DB" Getting error as below.
           [OLE DB Source [478]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
           [SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on OLE DB Source returned error code 0xC0202009.  The component returned a failure
    code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the
    failure.
    Additional Info:
       * Here the Source task is getting failed not the conversion or destination task.
    Thanks,
    Loganathan A.

  • How to stored data after clicking checkbox  save in database table

    TYPE-pools: slis.
    tables:mkpf,mseg,mard,COWB_COMP.
    TYPES: BEGIN OF tp_data,
          mblnr LIKE mseg-mblnr,
         matnr LIKE mseg-matnr,
         werks LIKE mard-werks,
         lgort LIKE mard-lgort,
         lgpbe LIKE mard-lgpbe,
         charg LIKE mseg-charg,
         bwart LIKE mseg-bwart,
         budat LIKE mkpf-budat,
         menge LIKE mseg-menge,
         meins LIKE mseg-meins,
         kostl LIKE mseg-kostl,
         aufnr LIKE mseg-aufnr,
         rsnum LIKE mseg-rsnum,
         endkz like COWB_COMP-endkz,
    END OF tp_data,
    tp_tbl_data TYPE STANDARD TABLE OF tp_data.
    *data: t_data like ztable occurs 0 with header line.
    Constants
    Data objects (variable declarations and definitions)
    Report data to be shown.
    DATA: it_data TYPE STANDARD TABLE OF tp_data.
    Heading of the report.
    DATA: t_heading TYPE slis_t_listheader.
    ========================== Selection Screen ==========================
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:smblnr FOR mseg-mblnr MODIF ID m1,
                   smatnr FOR mseg-matnr MODIF ID m2,
                   swerks FOR mard-werks MODIF ID m3,
                   slgort FOR mard-lgort MODIF ID m4,
                   slgpbe FOR mard-lgpbe MODIF ID m5,
                   scharg FOR mseg-charg MODIF ID m6,
                   sbwart FOR mseg-bwart MODIF ID m7,
                   skostl FOR mseg-kostl MODIF ID m8,
                   saufnr FOR mseg-aufnr MODIF ID m9,
                   srsnum FOR mseg-rsnum MODIF ID m10.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS:pre RADIOBUTTON GROUP radi USER-COMMAND ucomm DEFAULT 'X',
               pse RADIOBUTTON GROUP radi,
               bps RADIOBUTTON GROUP radi.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETER:layout TYPE i.
    SELECTION-SCREEN END OF BLOCK b3.
    =========================== Event Blocks =============================
    AT selection-SCREEN.
    start-OF-selection.
    PERFORM get_data USING it_data.
    END-OF-selection.
    PERFORM build_alv USING it_data t_heading.
    =========================== Subroutines ==============================
    *&      Form  get_data
          Gets the information to be shown in the report.
    FORM get_data USING t_data TYPE tp_tbl_data.
      SELECT msegmblnr msegmatnr mardwerks mardlgort mardlgpbe msegcharg msegbwart mkpfbudat
        msegmenge  msegmeins msegkostl msegaufnr mseg~rsnum
      INTO CORRESPONDING FIELDS OF TABLE t_data
      FROM mseg
      JOIN mard ON mardmatnr EQ msegmatnr
                   JOIN mkpf ON msegmblnr EQ mkpfmblnr
                   WHERE mseg~matnr IN smatnr.
    ENDFORM.                    " get_data
    *&      Form  build_alv
          Builds and display the ALV Grid.
    FORM build_alv USING t_data TYPE tp_tbl_data
          t_heading  TYPE slis_t_listheader.
    ALV required data objects.
      DATA: w_title   TYPE lvc_title,
            w_comm    TYPE slis_formname,
            w_status  TYPE slis_formname,
            x_layout  TYPE slis_layout_alv,
            t_event    TYPE slis_t_event,
            t_fieldcat TYPE slis_t_fieldcat_alv,
            t_sort     TYPE slis_t_sortinfo_alv.
      REFRESH t_fieldcat.
      REFRESH t_event.
      REFRESH t_sort.
      CLEAR x_layout.
      CLEAR w_title.
    Field Catalog
      PERFORM set_fieldcat2 USING:
            1 'MBLNR' 'MBLNR' 'MSEG' space space space space space space space space space space space space t_fieldcat ,
            2 'MATNR' 'MATNR' 'MSEG' space space space space space space space space space space space space  t_fieldcat ,
            3 'WERKS' 'WERKS' 'MARD' space space space space space space space space space space space space  t_fieldcat,
            4 'LGORT' 'LGORT' 'MARD' space space space space space space space space space space space space t_fieldcat ,
            5 'LGPBE' 'LGPBE' 'MARD' space space space space space space space space space space space space t_fieldcat ,
            6 'CHARG' 'CHARG' 'MSEG' space space space space space space space space space space space space t_fieldcat ,
            7 'BWART' 'BWART' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            8 'BUDAT' 'BUDAT' 'MKPF' space  space space space space space space space space space space space t_fieldcat,
            9 'MENGE' 'MENGE' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            10 'MEINS' 'MEINS' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            11 'KOSTL' 'KOSTL' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            12 'AUFNR' 'AUFNR' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            13 'RSNUM' 'RSNUM' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
        14 'ENDKZ' 'ENDKZ' 'COWB_COMP' space space 'select' 'Select this row' 'Sel' 'Select this row' space space space 'X' 'X' space t_fieldcat.
    Layout
      x_layout-zebra = 'X'.
    Top of page heading
      PERFORM set_top_page_heading USING t_heading t_event.
    Events
      PERFORM set_events USING t_event.
    GUI Status
      w_status = ''.
    User commands
      w_comm   = 'USER_COMMAND'.
    Order
    Example
    PERFORM set_order USING '<field>' 'IT_DATA' 'X' space space t_sort.
      PERFORM set_order USING 'MBLNR' 'IT_DATA' 'X' space 'X' t_sort.
    PERFORM set_order USING 'EBELN' 'IT_DATA' 'X' space 'X' t_sort.
    PERFORM set_order USING 'EBELP' 'IT_DATA' 'X' space space t_sort.
    Displays the ALV grid
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program       = sy-repid
        it_fieldcat              = t_fieldcat
        is_layout                = x_layout
        it_sort                  = t_sort
        i_callback_pf_status_set = w_status
        i_callback_user_command  = w_comm
        i_save                   = 'X'
        it_events                = t_event
        i_grid_title             = w_title
      TABLES
        t_outtab                 = t_data
      EXCEPTIONS
        program_error            = 1
        OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " build_alv.
    *&      Form  set_top_page_heading
          Creates the report headings.
    FORM set_top_page_heading USING t_heading TYPE slis_t_listheader
          t_events  TYPE slis_t_event.
      DATA: x_heading TYPE slis_listheader,
            x_event   TYPE LINE OF slis_t_event.
    Report title
      CLEAR t_heading[].
      CLEAR x_heading.
      x_heading-typ = 'H'.
      x_heading-info = 'Reporte Prueba'(001).
      APPEND x_heading TO t_heading.
    Program name
      CLEAR x_heading.
      x_heading-typ = 'S'.
      x_heading-KEY = 'Program: '.
      x_heading-info = sy-repid.
      APPEND x_heading TO t_heading.
    User who is running the report
      CLEAR x_heading.
      x_heading-typ = 'S'.
      x_heading-KEY = 'User: '.
      x_heading-info = sy-uname.
      APPEND x_heading TO t_heading.
    Date of execution
      CLEAR x_heading.
      x_heading-typ = 'S'.
      x_heading-KEY = 'Date: '.
      WRITE sy-datum TO x_heading-info.
      APPEND x_heading TO t_heading.
    Time of execution
      CLEAR x_heading.
      x_heading-typ = 'S'.
      x_heading-KEY = 'Time: '.
      WRITE sy-uzeit TO x_heading-info.
      APPEND x_heading TO t_heading.
    Top of page event
      x_event-name = slis_ev_top_of_page.
      x_event-FORM = 'TOP_OF_PAGE'.
      APPEND x_event TO t_events.
    ENDFORM.
    *&      Form  set_events
          Sets the events for ALV.
          The TOP_OF_PAGE event is alredy being registered in
          the set_top_page_heading subroutine.
    FORM set_events USING t_events TYPE slis_t_event.
      DATA: x_event   TYPE LINE OF slis_t_event.
    Example
    clear x_event.
    x_event-name = .
    x_event-form = .
    append x_event to t_event.
    ENDFORM.
    *&      Form  set_order
          Adds an entry to the order table.
    FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot
          t_sort TYPE slis_t_sortinfo_alv.
      DATA: x_sort TYPE slis_sortinfo_alv.
      CLEAR x_sort.
      x_sort-fieldname = p_fieldname.
      x_sort-tabname   = p_tabname.
      x_sort-UP = p_up.
      x_sort-down = p_down.
      x_sort-subtot = p_subtot.
      APPEND x_sort TO t_sort.
    ENDFORM.                    "set_order
    *&      Form  set_fieldcat2
          Adds an entry to the field catalog.
    FORM set_fieldcat2 USING p_colpos p_fieldname p_ref_fieldname p_ref_tabname
          p_outputlen p_noout
          p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
          p_hotspot p_showasicon p_checkbox p_edit
          p_dosum
          t_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: wa_fieldcat TYPE slis_fieldcat_alv.
      CLEAR wa_fieldcat.
    General settings
      wa_fieldcat-fieldname = p_fieldname.
      wa_fieldcat-col_pos = p_colpos.
      wa_fieldcat-no_out = p_noout.
      wa_fieldcat-HOTSPOT = p_hotspot.
      wa_fieldcat-CHECKBOX = p_checkbox.
      wa_fieldcat-ICON = p_showasicon.
      wa_fieldcat-do_sum = p_dosum.
    Set reference fieldname, tablenam and rollname.
    If p_ref_tabname is not given, the ref_fieldname given is a data element.
    If p_ref_tabname is given, the ref_fieldname given is a field of a table. In case ref_fieldname is not given, it is copied from the fieldname.
      IF p_ref_tabname IS INITIAL.
        wa_fieldcat-rollname =   p_ref_fieldname.
      ELSE.
        wa_fieldcat-ref_tabname = p_ref_tabname.
        IF p_ref_fieldname EQ space.
          wa_fieldcat-ref_fieldname =   wa_fieldcat-fieldname.
        ELSE.
          wa_fieldcat-ref_fieldname =   p_ref_fieldname.
        ENDIF.
      ENDIF.
    Set output length.
      IF NOT p_outputlen IS INITIAL.
        wa_fieldcat-outputlen = p_outputlen.
      ENDIF.
    Set text headers.
      IF NOT p_seltext_m IS INITIAL.
        wa_fieldcat-seltext_m = p_seltext_m.
      ENDIF.
      IF NOT p_seltext_l IS INITIAL.
        wa_fieldcat-seltext_l = p_seltext_l.
      ENDIF.
      IF NOT p_seltext_s IS INITIAL.
        wa_fieldcat-seltext_s = p_seltext_s.
      ENDIF.
      IF NOT p_reptext_ddic IS INITIAL.
        wa_fieldcat-reptext_ddic = p_reptext_ddic.
      ENDIF.
      IF NOT p_ddictxt IS INITIAL.
        wa_fieldcat-ddictxt = p_ddictxt.
      ENDIF.
    Set as editable or not.
      IF p_edit IS NOT INITIAL.
        wa_fieldcat-INPUT     = 'X'.
        wa_fieldcat-EDIT     = 'X'.
      ENDIF.
      APPEND wa_fieldcat TO t_fieldcat.
    ENDFORM.                   "set_fieldcat2
    =========================== Subroutines called by ALV ================
    *&      Form  top_of_page
          Called on top_of_page ALV event.
          Prints the heading.
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        i_logo             = 'XXXXX'
        it_list_commentary = t_heading.
    ENDFORM.                    " alv_top_of_page
    *&      Form  user_command
          Called on user_command ALV event.
          Executes custom commands.
    FORM user_command USING r_ucomm     LIKE sy-ucomm
          rs_selfield TYPE slis_selfield.
    ENDFORM.                    "user_command
    this is my code, how to store data after clicking checkbox in databasetable,
    how to write that cide.
    plz send me code.

    hi!,
    use MODIFY to update data into the data base table.
    regards
    anjali

  • Error reading data after submit.

    Hi All,
    I have a problem getting some data after i submit a standard report FPO4.
    Here the issue is with a file that is getting created by a dynamic report created and called internally by a report on the same path every time dynamically. say (/devabap/if/out/XXXX.0 for the first time and the next time we run the report file name would be /devabap/if/out/XXXX.1 etc.2,3,4,5,). I am now using the FM: FILE_GET_NAME to get the name and then proceeding further to get my output.
    But when i am trying to use the above function module for a single run i am getting the correct result as ther is only one file present in the path.If i run the same report with different variants parallely in background then in the application server there are there are two or more files already created for two different run's as said above ( .0 and .1) the logic is such that i have to get the latest file and so a wrong file is getting picked up at the time of parallel run.
    Note: When i Submit the transaction the ouput screen along with the data contains the File path & File Name as said above.I am trying to get the file name from the submit screen as the file is generated dynamically. For change in the instance (run) again there will be change in the file name. So system is not identifying the correct file. The dynamic program that is getting created and placing the file in the path is opened in another session (NEW) and hence i am not a ble to use any of the methods like ( SET/GET Parameters) also the IMPORT/EXPORT statements.
    The flow of the execution is (Program A --> Standard Transaction B --> Dynamically created Program C --> File is getting created) . Here i want the file name that program c is creating in my zprogram A.
    Could any one please advise?
    Regards,
    Vijay

    Hi All,
    I have a problem getting some data after i submit a standard report FPO4.
    Here the issue is with a file that is getting created by a dynamic report created and called internally by a report on the same path every time dynamically. say (/devabap/if/out/XXXX.0 for the first time and the next time we run the report file name would be /devabap/if/out/XXXX.1 etc.2,3,4,5,). I am now using the FM: FILE_GET_NAME to get the name and then proceeding further to get my output.
    But when i am trying to use the above function module for a single run i am getting the correct result as ther is only one file present in the path.If i run the same report with different variants parallely in background then in the application server there are there are two or more files already created for two different run's as said above ( .0 and .1) the logic is such that i have to get the latest file and so a wrong file is getting picked up at the time of parallel run.
    Note: When i Submit the transaction the ouput screen along with the data contains the File path & File Name as said above.I am trying to get the file name from the submit screen as the file is generated dynamically. For change in the instance (run) again there will be change in the file name. So system is not identifying the correct file. The dynamic program that is getting created and placing the file in the path is opened in another session (NEW) and hence i am not a ble to use any of the methods like ( SET/GET Parameters) also the IMPORT/EXPORT statements.
    The flow of the execution is (Program A --> Standard Transaction B --> Dynamically created Program C --> File is getting created) . Here i want the file name that program c is creating in my zprogram A.
    Could any one please advise?
    Regards,
    Vijay

  • How to save data after clicking checkbox stored in databasetable

    TYPE-pools: slis.
    tables:mkpf,mseg,mard.
    TYPES: BEGIN OF tp_data,
          mblnr LIKE mseg-mblnr,
         matnr LIKE mseg-matnr,
         werks LIKE mard-werks,
         lgort LIKE mard-lgort,
         lgpbe LIKE mard-lgpbe,
         charg LIKE mseg-charg,
         bwart LIKE mseg-bwart,
         budat LIKE mkpf-budat,
         menge LIKE mseg-menge,
         meins LIKE mseg-meins,
         kostl LIKE mseg-kostl,
         aufnr LIKE mseg-aufnr,
         rsnum LIKE mseg-rsnum,
         checkbox TYPE c,
      __mark,
    END OF tp_data,
    tp_tbl_data TYPE STANDARD TABLE OF tp_data.
    Constants
    Data objects (variable declarations and definitions)
    Report data to be shown.
    DATA: it_data TYPE STANDARD TABLE OF tp_data.
    Heading of the report.
    DATA: t_heading TYPE slis_t_listheader.
    ========================== Selection Screen ==========================
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:smblnr FOR mseg-mblnr MODIF ID m1,
                   smatnr FOR mseg-matnr MODIF ID m2,
                   swerks FOR mard-werks MODIF ID m3,
                   slgort FOR mard-lgort MODIF ID m4,
                   slgpbe FOR mard-lgpbe MODIF ID m5,
                   scharg FOR mseg-charg MODIF ID m6,
                   sbwart FOR mseg-bwart MODIF ID m7,
                   skostl FOR mseg-kostl MODIF ID m8,
                   saufnr FOR mseg-aufnr MODIF ID m9,
                   srsnum FOR mseg-rsnum MODIF ID m10.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS:pre RADIOBUTTON GROUP radi USER-COMMAND ucomm DEFAULT 'X',
               pse RADIOBUTTON GROUP radi,
               bps RADIOBUTTON GROUP radi.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETER:layout TYPE i.
    SELECTION-SCREEN END OF BLOCK b3.
    =========================== Event Blocks =============================
    AT selection-SCREEN.
    start-OF-selection.
    PERFORM get_data USING it_data.
    END-OF-selection.
    PERFORM build_alv USING it_data t_heading.
    =========================== Subroutines ==============================
    *&      Form  get_data
          Gets the information to be shown in the report.
    FORM get_data USING t_data TYPE tp_tbl_data.
      SELECT msegmblnr msegmatnr mardwerks mardlgort mardlgpbe msegcharg msegbwart mkpfbudat
        msegmenge  msegmeins msegkostl msegaufnr mseg~rsnum
      INTO CORRESPONDING FIELDS OF TABLE t_data
      FROM mseg
      JOIN mard ON mardmatnr EQ msegmatnr
                   JOIN mkpf ON msegmblnr EQ mkpfmblnr
                   WHERE mseg~matnr IN smatnr.
    ENDFORM.                    " get_data
    *&      Form  build_alv
          Builds and display the ALV Grid.
    FORM build_alv USING t_data TYPE tp_tbl_data
          t_heading  TYPE slis_t_listheader.
    ALV required data objects.
      DATA: w_title   TYPE lvc_title,
            w_comm    TYPE slis_formname,
            w_status  TYPE slis_formname,
            x_layout  TYPE slis_layout_alv,
            t_event    TYPE slis_t_event,
            t_fieldcat TYPE slis_t_fieldcat_alv,
            t_sort     TYPE slis_t_sortinfo_alv.
      REFRESH t_fieldcat.
      REFRESH t_event.
      REFRESH t_sort.
      CLEAR x_layout.
      CLEAR w_title.
    Field Catalog
      PERFORM set_fieldcat2 USING:
            1 'MBLNR' 'MBLNR' 'MSEG' space space space space space space space space space space space space t_fieldcat ,
            2 'MATNR' 'MATNR' 'MSEG' space space space space space space space space space space space space  t_fieldcat ,
            3 'WERKS' 'WERKS' 'MARD' space space space space space space space space space space space space  t_fieldcat,
            4 'LGORT' 'LGORT' 'MARD' space space space space space space space space space space space space t_fieldcat ,
            5 'LGPBE' 'LGPBE' 'MARD' space space space space space space space space space space space space t_fieldcat ,
            6 'CHARG' 'CHARG' 'MSEG' space space space space space space space space space space space space t_fieldcat ,
            7 'BWART' 'BWART' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            8 'BUDAT' 'BUDAT' 'MKPF' space  space space space space space space space space space space space t_fieldcat,
            9 'MENGE' 'MENGE' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            10 'MEINS' 'MEINS' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            11 'KOSTL' 'KOSTL' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            12 'AUFNR' 'AUFNR' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            13 'RSNUM' 'RSNUM' 'MSEG' space  space space space space space space space space space space space t_fieldcat,
            14 '__MARK' 'XFELD' space space space 'Select' 'Select this row' 'Sel' 'Select this row' space space space 'X' 'X' space t_fieldcat.
    Layout
      x_layout-zebra = 'X'.
    Top of page heading
      PERFORM set_top_page_heading USING t_heading t_event.
    Events
      PERFORM set_events USING t_event.
    GUI Status
      w_status = ''.
    User commands
      w_comm   = 'USER_COMMAND'.
    Order
    Example
    PERFORM set_order USING '<field>' 'IT_DATA' 'X' space space t_sort.
    PERFORM set_order USING 'LIFNR' 'IT_DATA' 'X' space 'X' t_sort.
    PERFORM set_order USING 'EBELN' 'IT_DATA' 'X' space 'X' t_sort.
    PERFORM set_order USING 'EBELP' 'IT_DATA' 'X' space space t_sort.
    Displays the ALV grid
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program       = sy-repid
        it_fieldcat              = t_fieldcat
        is_layout                = x_layout
        it_sort                  = t_sort
        i_callback_pf_status_set = w_status
        i_callback_user_command  = w_comm
        i_save                   = 'X'
        it_events                = t_event
        i_grid_title             = w_title
      TABLES
        t_outtab                 = t_data
      EXCEPTIONS
        program_error            = 1
        OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " build_alv.
    *&      Form  set_top_page_heading
          Creates the report headings.
    FORM set_top_page_heading USING t_heading TYPE slis_t_listheader
          t_events  TYPE slis_t_event.
      DATA: x_heading TYPE slis_listheader,
            x_event   TYPE LINE OF slis_t_event.
    Report title
      CLEAR t_heading[].
      CLEAR x_heading.
      x_heading-typ = 'H'.
      x_heading-info = 'Reporte Prueba'(001).
      APPEND x_heading TO t_heading.
    Program name
      CLEAR x_heading.
      x_heading-typ = 'S'.
      x_heading-KEY = 'Program: '.
      x_heading-info = sy-repid.
      APPEND x_heading TO t_heading.
    User who is running the report
      CLEAR x_heading.
      x_heading-typ = 'S'.
      x_heading-KEY = 'User: '.
      x_heading-info = sy-uname.
      APPEND x_heading TO t_heading.
    Date of execution
      CLEAR x_heading.
      x_heading-typ = 'S'.
      x_heading-KEY = 'Date: '.
      WRITE sy-datum TO x_heading-info.
      APPEND x_heading TO t_heading.
    Time of execution
      CLEAR x_heading.
      x_heading-typ = 'S'.
      x_heading-KEY = 'Time: '.
      WRITE sy-uzeit TO x_heading-info.
      APPEND x_heading TO t_heading.
    Top of page event
      x_event-name = slis_ev_top_of_page.
      x_event-FORM = 'TOP_OF_PAGE'.
      APPEND x_event TO t_events.
    ENDFORM.
    *&      Form  set_events
          Sets the events for ALV.
          The TOP_OF_PAGE event is alredy being registered in
          the set_top_page_heading subroutine.
    FORM set_events USING t_events TYPE slis_t_event.
      DATA: x_event   TYPE LINE OF slis_t_event.
    Example
    clear x_event.
    x_event-name = .
    x_event-form = .
    append x_event to t_event.
    ENDFORM.
    *&      Form  set_order
          Adds an entry to the order table.
    FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot
          t_sort TYPE slis_t_sortinfo_alv.
      DATA: x_sort TYPE slis_sortinfo_alv.
      CLEAR x_sort.
      x_sort-fieldname = p_fieldname.
      x_sort-tabname   = p_tabname.
      x_sort-UP = p_up.
      x_sort-down = p_down.
      x_sort-subtot = p_subtot.
      APPEND x_sort TO t_sort.
    ENDFORM.                    "set_order
    *&      Form  set_fieldcat2
          Adds an entry to the field catalog.
    FORM set_fieldcat2 USING p_colpos p_fieldname p_ref_fieldname p_ref_tabname
          p_outputlen p_noout
          p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
          p_hotspot p_showasicon p_checkbox p_edit
          p_dosum
          t_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: wa_fieldcat TYPE slis_fieldcat_alv.
      CLEAR wa_fieldcat.
    General settings
      wa_fieldcat-fieldname = p_fieldname.
      wa_fieldcat-col_pos = p_colpos.
      wa_fieldcat-no_out = p_noout.
      wa_fieldcat-HOTSPOT = p_hotspot.
      wa_fieldcat-CHECKBOX = p_checkbox.
      wa_fieldcat-ICON = p_showasicon.
      wa_fieldcat-do_sum = p_dosum.
    Set reference fieldname, tablenam and rollname.
    If p_ref_tabname is not given, the ref_fieldname given is a data element.
    If p_ref_tabname is given, the ref_fieldname given is a field of a table. In case ref_fieldname is not given, it is copied from the fieldname.
      IF p_ref_tabname IS INITIAL.
        wa_fieldcat-rollname =   p_ref_fieldname.
      ELSE.
        wa_fieldcat-ref_tabname = p_ref_tabname.
        IF p_ref_fieldname EQ space.
          wa_fieldcat-ref_fieldname =   wa_fieldcat-fieldname.
        ELSE.
          wa_fieldcat-ref_fieldname =   p_ref_fieldname.
        ENDIF.
      ENDIF.
    Set output length.
      IF NOT p_outputlen IS INITIAL.
        wa_fieldcat-outputlen = p_outputlen.
      ENDIF.
    Set text headers.
      IF NOT p_seltext_m IS INITIAL.
        wa_fieldcat-seltext_m = p_seltext_m.
      ENDIF.
      IF NOT p_seltext_l IS INITIAL.
        wa_fieldcat-seltext_l = p_seltext_l.
      ENDIF.
      IF NOT p_seltext_s IS INITIAL.
        wa_fieldcat-seltext_s = p_seltext_s.
      ENDIF.
      IF NOT p_reptext_ddic IS INITIAL.
        wa_fieldcat-reptext_ddic = p_reptext_ddic.
      ENDIF.
      IF NOT p_ddictxt IS INITIAL.
        wa_fieldcat-ddictxt = p_ddictxt.
      ENDIF.
    Set as editable or not.
      IF p_edit IS NOT INITIAL.
        wa_fieldcat-INPUT     = 'X'.
        wa_fieldcat-EDIT     = 'X'.
      ENDIF.
      APPEND wa_fieldcat TO t_fieldcat.
    ENDFORM.                   "set_fieldcat2
    =========================== Subroutines called by ALV ================
    *&      Form  top_of_page
          Called on top_of_page ALV event.
          Prints the heading.
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        i_logo             = 'XXXXX'
        it_list_commentary = t_heading.
    ENDFORM.                    " alv_top_of_page
    *&      Form  user_command
          Called on user_command ALV event.
          Executes custom commands.
    FORM user_command USING r_ucomm     LIKE sy-ucomm
          rs_selfield TYPE slis_selfield.
    Example Code
    Executes a command considering the sy-ucomm.
    CASE r_ucomm.
       WHEN '&IC1'.
         Set your "double click action" response here.
         Example code: Create and display a status message.
         DATA: w_msg TYPE string,
               w_row(4) TYPE n.
         w_row = rs_selfield-tabindex.
         CONCATENATE 'You have clicked row' w_row
                     'field' rs_s lfield-fieldname
                     'with value' rs_selfield-value
                     INTO w_msg SEPARATED BY space.
         MESSAGE w_msg TYPE 'S'.
    ENDCASE.
    End of example code.
    ENDFORM.                    "user_command
    this is mycode,mblnr, matnr and checkbox both field had created in database table
    then save data after clicking checkbox data stored in database table,and next clickin checkboxes are no change. this my requirment.
    plz send me code .

    Try this
    In user_command form...
    LOOP AT IT_DATA.
    IF  CHECKBOX __MARK EQ 'X'.
    write logic wht u want....
    ENDIF.
    ENDLOOP.

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • I am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    i am trying to generate purchase order and i create a BAPI also which is active.
    But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".

    Hi,
    Yeah i tried my Z_BAPI in R3 and then giving some ERROR.
    This is my CODE-
    FUNCTION ZBAPIPOTV2.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(POHD) TYPE  ZPOHD OPTIONAL
    *"     VALUE(POITEM) TYPE  ZPOITEM OPTIONAL
    *"  TABLES
    *"      RETURN STRUCTURE  BAPIRET1 OPTIONAL
    data: ls_pohd type bapimepoheader,
             ls_pohdx TYPE bapimepoheaderx,
             lt_poit TYPE TABLE OF bapimepoitem,
             lt_poitx TYPE TABLE OF bapimepoitemx,
             ls_poit TYPE bapimepoitem,
             ls_poitx TYPE bapimepoitemx.
       MOVE-CORRESPONDING pohd to ls_pohd.
       MOVE-CORRESPONDING poitem to ls_poit.
       ls_pohdx-comp_code = 'x'.
       ls_pohdx-doc_type = 'x'.
       ls_pohdx-vendor = 'x'.
       ls_pohdx-purch_org = 'x'.
       ls_pohdx-pur_group = 'x'.
       ls_poit-po_item = '00010'.
       APPEND ls_poit to lt_poit.
       ls_poitx-po_item = '00010'.
       ls_poitx-po_itemx = 'x'.
       ls_poitx-material = 'x'.
       ls_poitx-plant = 'x'.
       ls_poitx-quantity = 'x'.
       APPEND ls_poitx to lt_poitx.
    CALL FUNCTION 'BAPI_PO_CREATE1'
       EXPORTING
         POHEADER                     = ls_pohd
        POHEADERX                    =  ls_pohdx
    *   POADDRVENDOR                 =
    *   TESTRUN                      =
    *   MEMORY_UNCOMPLETE            =
    *   MEMORY_COMPLETE              =
    *   POEXPIMPHEADER               =
    *   POEXPIMPHEADERX              =
    *   VERSIONS                     =
    *   NO_MESSAGING                 =
    *   NO_MESSAGE_REQ               =
    *   NO_AUTHORITY                 =
    *   NO_PRICE_FROM_PO             =
    *   PARK_COMPLETE                =
    *   PARK_UNCOMPLETE              =
    * IMPORTING
    *   EXPPURCHASEORDER             =
    *   EXPHEADER                    =
    *   EXPPOEXPIMPHEADER            =
      TABLES
        RETURN                       = return
        POITEM                       = lt_poit
        POITEMX                      = lt_poitx
    *   POADDRDELIVERY               =
    *   POSCHEDULE                   =
    *   POSCHEDULEX                  =
    *   POACCOUNT                    =
    *   POACCOUNTPROFITSEGMENT       =
    *   POACCOUNTX                   =
    *   POCONDHEADER                 =
    *   POCONDHEADERX                =
    *   POCOND                       =
    *   POCONDX                      =
    *   POLIMITS                     =
    *   POCONTRACTLIMITS             =
    *   POSERVICES                   =
    *   POSRVACCESSVALUES            =
    *   POSERVICESTEXT               =
    *   EXTENSIONIN                  =
    *   EXTENSIONOUT                 =
    *   POEXPIMPITEM                 =
    *   POEXPIMPITEMX                =
    *   POTEXTHEADER                 =
    *   POTEXTITEM                   =
    *   ALLVERSIONS                  =
    *   POPARTNER                    =
    *   POCOMPONENTS                 =
    *   POCOMPONENTSX                =
    *   POSHIPPING                   =
    *   POSHIPPINGX                  =
    *   POSHIPPINGEXP                =
    *   SERIALNUMBER                 =
    *   SERIALNUMBERX                =
    *   INVPLANHEADER                =
    *   INVPLANHEADERX               =
    *   INVPLANITEM                  =
    *   INVPLANITEMX                 =
    ENDFUNCTION.
    i am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)". 

  • BOM Data after explosion

    Hi Gurus,
    I am working on to get BOM information in BI and using a FM which is calling Function  CS_BOM_EXPL_MAT_V2.
    Here is the entire FM.
    FUNCTION ybwpp_bom_exp_itm_3rd_lvl.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     REFERENCE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     REFERENCE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     REFERENCE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     REFERENCE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"     REFERENCE(I_REMOTE_CALL) TYPE  SBIWA_FLAG OPTIONAL
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  YPPBW_MAST_STPO OPTIONAL
    *"  EXCEPTIONS
    *"      ERROR_PASSED_TO_MESS_HANDLER
    *"      NO_MORE_DATA
    ======================================================================
    Function Module Name - YBWPP_BOM_EXP_ITM_3RD_LVL                     *
    ===============================REVISIONS==============================
                Cut                                                      *
    Programmer  Over   Date    MOC#  Description                         *
    ======================================================================
    Maximum number of lines for DB table
      STATICS: s_s_if TYPE srsc_s_if_simple,
    counter
              s_counter_datapakid LIKE sy-tabix,
    cursor
              s_cursor TYPE cursor.
      DATA: lt_stb TYPE STANDARD TABLE OF stpox WITH HEADER LINE,
            lt_matcat TYPE STANDARD TABLE OF cscmat WITH HEADER LINE.
      DATA wa_mast_stpo TYPE yppbw_mast_stpo.
    initialization mode (first call by sapi) or data transfer mode
    (following calls) ?
      IF i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
       CHECK datasource VALIDITY
        CASE i_dsource.
          WHEN 'YBWPPBOMITMMASTSTPO'.
          WHEN OTHERS.
            IF 1 = 2.
              MESSAGE e009(r3).
            ENDIF.
          This is a typical log call. Write every error message like
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_dsource            "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
        APPEND LINES OF i_t_select TO s_s_if-t_select.
    Fill parameter buffer for data extraction calls
        s_s_if-requnr    = i_requnr.
        s_s_if-dsource = i_dsource.
        s_s_if-maxsize   = i_maxsize.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF i_t_fields TO s_s_if-t_fields.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        IF s_counter_datapakid = 0.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
          LOOP AT s_s_if-t_select INTO l_s_select.
            CASE l_s_select-fieldnm.
              WHEN 'YYMATNR'.
                MOVE-CORRESPONDING l_s_select TO r_matnr.
                APPEND r_matnr.
              WHEN 'YYWERKS'.
                MOVE-CORRESPONDING l_s_select TO r_werks.
                APPEND r_werks.
              WHEN 'YYSTLAN'.
                MOVE-CORRESPONDING l_s_select TO r_stlan.
                APPEND r_stlan.
              WHEN 'YYSTLAL'.
                MOVE-CORRESPONDING l_s_select TO r_stlal.
                APPEND r_stlal.
            ENDCASE.
          ENDLOOP.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
    *-- Fill the Range Table for Plants.
          r_werks-sign = 'I'.
          r_werks-option = 'EQ'.
          r_werks-low =  '1027'.
          APPEND r_werks.
          r_werks-low =  '1028'.
          APPEND r_werks.
          r_werks-low =  '1037'.
          APPEND r_werks.
          r_werks-low =  '1042'.
          APPEND r_werks.
          r_werks-low =  '1043'.
          APPEND r_werks.
          r_werks-low =  '1077'.
          APPEND r_werks.
          r_werks-low =  '1088'.
          APPEND r_werks.
          r_werks-low =  '1315'.
          APPEND r_werks.
    *-- Retrive Valid Material Number, Plant, BoM Usage & Alternative UoM
          OPEN CURSOR WITH HOLD s_cursor FOR
              SELECT matnr werks stlan stlal
              FROM mast
              WHERE matnr IN r_matnr AND
                    werks IN r_werks AND
                    stlan IN r_stlan AND
                    stlal IN r_stlal.
        ENDIF.                 "First data package ?
    Fetch records into interface table.
        FETCH NEXT CURSOR s_cursor
                   INTO TABLE  gt_mast
                   PACKAGE SIZE s_s_if-maxsize.
        IF sy-subrc NE 0.
          CLOSE CURSOR s_cursor.
          RAISE no_more_data.
        ENDIF.
        LOOP AT gt_mast INTO  wa_mast.
    *-- Get BOM explosion for material
          CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
            EXPORTING
              capid                 = 'STD1'
              datuv                 = sy-datum
              mktls                 = 'X'
              mehrs                 = 'X'
              mtnrv                 = wa_mast-matnr
             stlal                 = wa_mast-stlal
             stlan                 = wa_mast-stlan
             werks                 = wa_mast-werks
            TABLES
              stb                   = lt_stb
              matcat                = lt_matcat
            EXCEPTIONS
              alt_not_found         = 1
              call_invalid          = 2
              material_not_found    = 3
              missing_authorization = 4
              no_bom_found          = 5
              no_plant_data         = 6
              no_suitable_bom_found = 7
              conversion_error      = 8
              OTHERS                = 9.
          IF sy-subrc = 0.
    *-- Get BOM item record
            PERFORM get_bom_item_stpo TABLES lt_stb .
          ENDIF.
         MOVE-CORRESPONDING   wa_mast TO wa_mast_stpo.
          LOOP AT lt_stb.
            CLEAR wa_mast_stpo.
            PERFORM move_mast_records_finaltab USING wa_mast_stpo.
            PERFORM move_bom_exp_to_finaltab USING lt_stb
                                                   wa_mast_stpo.
           MOVE-CORRESPONDING   lt_stb TO wa_mast_stpo.
            READ TABLE gt_stpo INTO wa_stpo
                              WITH KEY stlty = lt_stb-stlty
                                       stlnr = lt_stb-stlnr
                                       stlkn = lt_stb-stlkn
                                       stpoz = lt_stb-stpoz.
            IF sy-subrc = 0.
              PERFORM move_stpo_to_finaltab USING wa_mast_stpo.
             MOVE-CORRESPONDING   wa_stpo TO wa_mast_stpo.
            ENDIF.
            APPEND wa_mast_stpo TO e_t_data.
            CLEAR  e_t_data.
          ENDLOOP.
        ENDLOOP.
        s_counter_datapakid = s_counter_datapakid + 1.
      ENDIF.
    ENDFUNCTION.
    I am not getting any output. Can someone please tell me what am I doing wrong in here.
    Thanks
    Edited by: Ray_Ray on Jul 30, 2010 1:02 AM

    Hi,
    I am not sure as to what values are getting passed into your function module because all the cursor statements look OK.
    My suggestion would be that you put a break-point at the function module for BOM CS_BOM_EXPL_MAT_V2 and then go to RSA3. Provide your datasource and execute it. At the breakpoint you should be able to see if the values that are getting passed are valid or not and whether this function module is returning any value. Also, check if your internal table gs_nast is getting any values or not after the fetch cursor statement.

  • Default space after calling the sub template

    Hi All,
    I am calling sub template in the header of rtf report. Even though there is no spaces between header and report title, when previewing it displays a gap between the output of sub template and report title. In the sub template there is no spaces. Is it by default rtf creates spaces after calling sub template in header?
    Thanks,
    Sushil

    Even if i use simple <?call@inlines:HeaderENF?> <?end call?> <?import:file:C:/map/Header-Landscapem1.rtf?>  command in rtf header, there is still spaces between sub template values and AAA.
      AAA....
    The sub template has following code:
    <?template:Header?>
    <?param:dw_date; string?>
    DW REFRESH DATE: <?$dw_date?>
    <?end template?>
    I am using 11.1.1.6.4.
    Is it by default there will be spaces after calling the sub template?

  • Missing Response Data  after PBM Excution

    Hi @ all,
    after manual execution of a simple Process (BPM) in NWDS ( see Screenshots).
    SAP BPM: the Automated activity calls an Integarted Configuration in AEX, and the process ist successfully completed.
    SAP PO: the messages are delivered. (Web Services Call), ( Sender Channel SOAP XI 3.0)
    The Problem is, i miss the response Data after the process execution.
    Thanks a lot
    Kind regards
    Abdel

    Hi,
    i need help to solve this issue.
    Thank you
    Abdel

  • Has anybody experienced camera drivers wont work after calling Camera.getCamera() so many times?

    Using Flash Player on Windows machines, since version Flash Player 11.4 - Flash Player 15 (ActiveX version), and every version after that we have experienced an issue in which Hauppauge PCIe cameras and Videology cameras or other non-standard cameras fail to work with Flash Player after calling getCamera() so many times. For example, we get the camera, and publish a netstream for 10 minutes, then we set the camera to null. Later we call the camera again and after doing this 25 times, or 100 times, the camera driver just seems to fail, and Flash Player acts like it is streaming the camera, but the NetStream info indicates that zero bytes of video data was streamed indicating that there were no pixels that came from the camera.
    Has anybody else experienced this issue to where you have to restart the browser or the Windows process in order for Flash Player to be able to getCamera() properly again?

    Yes, it appears that others have experienced a similar issue. Adobe has not yet confirmed that this is a bug, but it is being tracked here:
    Bug#3850401 - Handle leak with video.attachCamera leading to inoperable camera

  • Call FM destination often disconnected after calling failed

    Dears,
      when i call RFC registered in .net with sap connector, it is often disconnected auto. after calling failed.
      then we should re-start RFC server in .NET, and the connection (RFC destination)will be ok then
      what tools could i use to trace these and any advice ?
    BR

    Hi,
      when i execute RFC with empty table parameters, it is ok.
    But it give error 'data not received' when set some data in the table parameter and then the connection is shutdown.
      ths for your tool .

Maybe you are looking for

  • Connecting 2 RV042 to different subnet and DSL connections

    Small office, 2 RV042, 2 DSL connections. 1 is used striclty for the business side, and the other is for our CCTV network. They also have seperate DSL connections as we have 2 external IP address for clients to connect remotely. We don't want to take

  • About Orders05 outbound Idoc.

    Hi, I am using an outbound idoc of basic type Orders05 with an extension of the idoc header segment.This outbound idoc will get triggered once a PO is saved and sent through EDI. I have to do an enhancement wherein I have to populate the mode of tran

  • After highlighted text in reader I want to erase the highlight-how?

    How do I erase a highlight in reader?

  • Not include digital booklets in smart playlists?

    I don't know if there's any way to do this, but I have smart playlists created, which are based on certain genres, or only include certain artists - but they always include the digital booklets from these artists, and I can't just get rid of the digi

  • Cannot create Apple ID for Students

    What is the proper format for uploading csv file to Apple ID for Students? I keep getting error that says, "Parent email address is not valid format." I am using standard email format: [email protected]