Records modify

Hi ,
I have scenario.
In selection screen i m providing vendor details. I want to display the records based on selection screen and there i have to create, modify or delete the records. Can u give the solution.
thnaks in advance
dhanu

hi,
you probabaly have to create one table maintenance report for a z table which contains vendor details.
look at the following code.
REPORT zca0m_zca0fcstftop NO STANDARD PAGE HEADING
                                MESSAGE-ID zcsv_usrtbl_maintain.
Type pools                                                           *
TYPE-POOLS : slis.                          " Used for ALV display
Tables
TABLES: zca0fcstftop,
        dd04t,                         "R/3 DD: Data element texts
        tactt.                         "Activities that can be protected
internal tables
DATA: BEGIN OF wa_zca0fcstftop .
        INCLUDE STRUCTURE zca0fcstftop.
DATA: END OF wa_zca0fcstftop.
DATA: t_zca0fcstftop LIKE STANDARD TABLE OF wa_zca0fcstftop.
DATA: BEGIN OF i_fcode OCCURS 0,
        fcode LIKE sy-ucomm,
      END OF i_fcode.
*Record for variant selection
DATA : BEGIN OF ws_variant,
         selected TYPE c,
         variant  LIKE ltdx-variant,  "Variant name
         text     LIKE ltdxt-text,    "Variant description
       END OF ws_variant.
*Table for variant selection
data : itab_variant LIKE STANDARD TABLE OF ws_variant WITH HEADER LINE.
Variant selection pop-up global variables
DECLARATION OF TABLECONTROL 'VARIANT_CNTL' ITSELF
CONTROLS: variant_cntl TYPE TABLEVIEW USING SCREEN 0200.
LINES OF TABLECONTROL 'VARIANT_CNTL'
DATA:     g_variant_cntl_lines  LIKE sy-loopc.
DATA:grid1 TYPE REF TO  cl_gui_alv_grid ,
     g_custom_container TYPE REF TO cl_gui_custom_container.
Work fields
DATA: table_name LIKE dd02l-tabname,   "To store table name
      field_name LIKE dd03l-fieldname, "To Store Field Name
      act_auth LIKE tactz-actvt,       "To pass Activity ID
      tab_maint LIKE dd02l-tabname,    "To pass Table Name to be Maintd.
      wg_confirm_ind,                  "To trap User responses
      flag,                            "To trap changes made to an entry
      f_copy,                          "To Identify 'COPY' Command Use
      f_select,                        "To decide between Select-options
                                       " and Internal Table
      l_transaction_code LIKE tstc-tcode,
      v_langu LIKE sy-langu,
      v_repid LIKE sy-repid,
      s_variant TYPE disvariant.
DATA: ok_code LIKE sy-ucomm.
DATA:selected_rows TYPE lvc_t_row  ,
     sel_rows TYPE lvc_t_row WITH HEADER LINE.
DATA:t_lines TYPE i.
Constants                                                            *
CONSTANTS :
           c_x TYPE c VALUE 'X',             " Constant 'X'.
           c_f TYPE c VALUE 'F'.             " Constant 'F'.
Parameters and Selection Options
*Selection Screen for table maintenance
*Selection option for Plant
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-b01.
PARAMETERS:  p_werks   LIKE zca0fcstftop-werks OBLIGATORY.
SELECT-OPTIONS: s_prdfml  FOR zca0fcstftop-product_family,
                s_bmach   FOR zca0fcstftop-base_machine,
                s_factop FOR zca0fcstftop-factory_top,
                s_optval  FOR zca0fcstftop-option_value,
                s_week    FOR zca0fcstftop-week.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-b02.
PARAMETERS     : p_varant LIKE ltdx-variant.          " ALV variant
SELECTION-SCREEN END OF BLOCK block2.
At selection screen                                                  *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varant.
  PERFORM alv_variant_f4 CHANGING p_varant.
AT SELECTION-SCREEN ON p_werks .
Validating Plant on the selection screen
  PERFORM validate_plant.
Initialization
INITIALIZATION.
Check Authorization for the Transaction
Authorization Check For T Code
  SELECT tcode
     INTO l_transaction_code
     FROM tstc UP TO 1 ROWS
     WHERE pgmna = sy-repid.
  ENDSELECT.
  AUTHORITY-CHECK OBJECT 'S_TCODE'
                      ID 'TCD' FIELD l_transaction_code.
  IF sy-subrc NE 0.
    MESSAGE e001 WITH l_transaction_code.
  ENDIF.
  v_langu = sy-langu.                             " language
  v_repid = sy-repid .                            " abap Program name
Start Of Selection
START-OF-SELECTION.
  CALL SCREEN 0050.
*&      Form  validate_plant                                           *
      Validating Plant on the selection screen                       *
FORM validate_plant .
  DATA : l_werks LIKE t001w-werks.                          " Plant
  IF p_werks IS NOT INITIAL.
    SELECT SINGLE werks
        FROM t001w
        INTO l_werks
        WHERE werks EQ p_werks.
    IF sy-subrc NE 0.
      MESSAGE e100(ra) WITH text-001 .
    ENDIF.
  ENDIF.
  AUTHORITY-CHECK OBJECT 'Z_PP_PLANT'
           ID 'ACTVT' FIELD '03'
           ID 'WERKS' FIELD p_werks
           ID 'TCD' FIELD l_transaction_code.
  IF sy-subrc NE 0.
    MESSAGE e000(oo) WITH 'No authorization for plant:'(e80) p_werks.
  ENDIF.
ENDFORM.                    " validate_plant
*&      Form  get_data                                                 *
      Get data                                                       *
FORM get_data .
  SELECT * FROM zca0fcstftop
    INTO TABLE t_zca0fcstftop
    WHERE werks           = p_werks
      AND product_family IN s_prdfml
      AND base_machine   IN s_bmach
      AND factory_top    IN s_factop
      AND option_value   IN s_optval
      AND week           IN s_week.
ENDFORM.                    " get_data
*&      Form  fill_fcode
FORM fill_fcode USING    value(p_0029).
  i_fcode-fcode = p_0029.
  APPEND i_fcode.
  CLEAR i_fcode.
ENDFORM.                               " fill_fcode
*&      Module  STATUS_0100  OUTPUT
MODULE status_0100 OUTPUT.
  SET PF-STATUS 'UPDATE'.
  CLEAR flag.
ENDMODULE.                             " STATUS_0100  OUTPUT
*&      Module  MODIFY_0100  OUTPUT
MODULE modify_0100 OUTPUT.
  IF sy-ucomm = 'CHNG' OR
       sy-ucomm = 'PICK'.
    LOOP AT SCREEN.
      CHECK screen-group1 = 'CHG'.
      screen-required = '0'.
      screen-output   = '1'.
      screen-input    = '0'.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
Check if you are in create mode & if yes then set the screen elements
as mandatory
  IF ok_code = 'CREA'.
    LOOP AT SCREEN.
      CHECK screen-group1 = 'CHG'.
      screen-required = '1'.
      screen-output   = '1'.
      screen-input    = '1'.
      MODIFY SCREEN.
    ENDLOOP.
  ENDIF.
ENDMODULE.                             " MODIFY_0100  OUTPUT
*&      Module  Check_Exit  INPUT
      text
MODULE check_exit INPUT.
  IF ( sy-ucomm = 'BACK' OR sy-ucomm = 'CANC' OR sy-ucomm = 'EXIT' ) AND
       ( flag = 'Y' ).
    CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
      EXPORTING
        defaultoption  = 'Y'
        textline1      = text-008
        textline2      = text-009
        titel          = text-004
        cancel_display = ' '
      IMPORTING
        answer         = wg_confirm_ind.
    CASE wg_confirm_ind.
      WHEN 'J'.                                             "Yes
        sy-ucomm = 'SAVE'.
        CLEAR flag.
      WHEN 'N'.                                             "No
        sy-ucomm = 'BACK'.
        CLEAR flag.
    ENDCASE.
  ENDIF.
ENDMODULE.                             " Check_Exit  INPUT
*&      Module  Exit_0100  INPUT
      text
MODULE exit_0100 INPUT.
  SET SCREEN 0. LEAVE SCREEN.
ENDMODULE.                             " Exit_0100  INPUT
*&      Module  USER_COMMAND_0100  INPUT
      text
MODULE user_command_0100 INPUT.
  CASE sy-ucomm.
    WHEN 'SAVE'.                       "Save
    Check to see if the user has the appropriate authorization
      IF p_werks NE zca0fcstftop-werks.
      could not update - not in selection
        MESSAGE e000(oo) WITH 'Entry not within selection'.
        SET SCREEN 0. LEAVE SCREEN.
        PERFORM get_data.
      ENDIF.
      IF f_copy = 'X'.
        INSERT zca0fcstftop.
        IF sy-subrc = 0.
          MESSAGE s004.
          PERFORM initialize.
          SET SCREEN 0. LEAVE SCREEN.
          PERFORM get_data.
        ELSE.
          MESSAGE w005.
        ENDIF.
      ELSE.
        MODIFY zca0fcstftop.
        IF sy-subrc = 0.
          MESSAGE s004.
          PERFORM initialize.
          SET SCREEN 0. LEAVE SCREEN.
          PERFORM get_data.
        ELSE.
          MESSAGE w005.
        ENDIF.
      ENDIF.
      PERFORM get_data.
    WHEN 'BACK'.                       "Back
      SET SCREEN 0. LEAVE SCREEN.
    WHEN 'CANC'.                       "Cancel
      SET SCREEN 0. LEAVE SCREEN.
    WHEN OTHERS.
  ENDCASE.
  COMMIT WORK.
ENDMODULE.                             " USER_COMMAND_0100  INPUT
*&      Form  Initialize
FORM initialize.
  CLEAR :   table_name,
            field_name,
            wg_confirm_ind,
            f_copy,
            flag,
            t_zca0fcstftop,
            zca0fcstftop,
            wa_zca0fcstftop,
            i_fcode.
  REFRESH: t_zca0fcstftop.
ENDFORM.                               " Initialize
*&      Form  alv_variant_f4
      text
     <--P_VARIANT  text
FORM alv_variant_f4  CHANGING variant.
  DATA: rs_variant LIKE disvariant.
  DATA nof4 TYPE c.
  CLEAR nof4.
  LOOP AT SCREEN.
    IF screen-name = 'VARIANT'.
      IF screen-input = 0.
        nof4 = 'X'.
      ENDIF.
    ENDIF.
  ENDLOOP.
  rs_variant-report   = sy-repid.
  rs_variant-username = sy-uname.
  CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
    EXPORTING
      is_variant = rs_variant
      i_save     = 'A'
    IMPORTING
      es_variant = rs_variant
    EXCEPTIONS
      OTHERS     = 1.
  IF sy-subrc = 0 AND nof4 EQ space.
    variant = rs_variant-variant.
  ENDIF.
ENDFORM.                               " ALV_VARIANT_F4
*&      Module  STATUS_0050  OUTPUT
      text
MODULE status_0050 OUTPUT.
In this module Initialize the container and put the grid in it
  DATA:grid_layout  TYPE lvc_s_layo,
       fieldcat TYPE lvc_t_fcat,
       wa_fieldcat LIKE LINE OF fieldcat.
  PERFORM set_auth.
  SET PF-STATUS 'UPD_0050' EXCLUDING i_fcode.
  SET TITLEBAR 'UPD_0050'.
  IF g_custom_container IS INITIAL .
    CREATE OBJECT g_custom_container
       EXPORTING
          container_name = 'FTDATA'.
    CREATE OBJECT grid1
       EXPORTING
        i_parent = g_custom_container.
  ELSE.
    CALL METHOD grid1->free.
    CALL METHOD g_custom_container->free.
    CREATE OBJECT g_custom_container
       EXPORTING
          container_name = 'FTDATA'.
    CREATE OBJECT grid1
       EXPORTING
        i_parent = g_custom_container.
  ENDIF.
Every time refresh The variables
  PERFORM initialize.
  PERFORM get_data.
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name = 'ZCA0FCSTFTOP'
    CHANGING
      ct_fieldcat      = fieldcat.
  grid_layout-grid_title = text-t01.
  grid_layout-sel_mode = 'A'.
  grid_layout-stylefname = 'CT'.
  s_variant-report   = sy-repid.
  s_variant-username = sy-uname.
  s_variant-variant  = p_varant.
  CALL METHOD grid1->set_table_for_first_display
    EXPORTING
      i_structure_name = 'ZCA0FCSTFTOP'
      is_layout        = grid_layout
      is_variant       = s_variant
      i_save           = 'A'
    CHANGING
      it_outtab        = t_zca0fcstftop
      it_fieldcatalog  = fieldcat.
  Create Object to receive events and link them to handler methods.
  When the ALV Control raises the event for the specified instance
  the corresponding method is automatically called.
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_button_click FOR grid1.
ENDMODULE.                 " STATUS_0050  OUTPUT
*&      Module  USER_COMMAND_0050  INPUT
MODULE user_command_0050 INPUT.
  CALL METHOD grid1->get_selected_rows
    IMPORTING
      et_index_rows = selected_rows.
  DESCRIBE TABLE selected_rows LINES t_lines.
  IF t_lines > 1 .
    MESSAGE e048(zcsv_sfdr).
  ENDIF.
Clear Header
  CLEAR wa_zca0fcstftop.
  sel_rows[] = selected_rows .
  READ TABLE sel_rows INDEX 1.
  READ TABLE t_zca0fcstftop INTO wa_zca0fcstftop INDEX sel_rows-index.
  CASE ok_code.
    WHEN 'EXIT'.
      PERFORM exit_program.
    WHEN 'CREA'.
      CLEAR zca0fcstftop.
      ok_code = sy-ucomm.
      zca0fcstftop-werks = p_werks.
      CALL SCREEN 100.
    WHEN 'COPY'.
      MOVE wa_zca0fcstftop TO zca0fcstftop .
      CLEAR wa_zca0fcstftop.
      f_copy = 'X'.
      CALL SCREEN 100.
    WHEN 'CHNG'.
      CHECK NOT wa_zca0fcstftop IS INITIAL.
      MOVE wa_zca0fcstftop TO zca0fcstftop .
      CLEAR wa_zca0fcstftop.
      ok_code = sy-ucomm.
      CALL SCREEN 100.
    WHEN 'DELE'.
      CHECK NOT wa_zca0fcstftop IS INITIAL.
      CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
        EXPORTING
          defaultoption  = 'N'
          textline1      = text-005
          textline2      = text-006
          titel          = text-007
          cancel_display = ' '
        IMPORTING
          answer         = wg_confirm_ind.
      IF wg_confirm_ind EQ 'J'.
        DELETE zca0fcstftop FROM wa_zca0fcstftop .
        IF sy-subrc EQ 0.
          MESSAGE s004.
        ELSE.
          MESSAGE e005.
        ENDIF.
      ELSEIF wg_confirm_ind EQ 'N'.
      ENDIF.
  ENDCASE.
  CLEAR ok_code.
ENDMODULE.                 " USER_COMMAND_0050  INPUT
*&      Form  exit_program
FORM exit_program .
  CALL METHOD g_custom_container->free.
  CALL METHOD cl_gui_cfw=>flush.
  SET SCREEN 0.
  LEAVE SCREEN.
ENDFORM.                    " exit_program
*&      Form  set_auth
FORM set_auth.
  REFRESH: i_fcode.
Check authorization for change
  MOVE '02' TO act_auth.        "02 --> Change
  MOVE 'ZCA0FCSTFTOP' TO tab_maint.
  AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
    ID 'ACTVT' FIELD act_auth
    ID 'TABLE' FIELD tab_maint.
  IF sy-subrc NE 0.
    PERFORM fill_fcode USING 'CHNG'.
  ENDIF.
Check for authorization for create
  MOVE '01' TO act_auth.        "01 --> Create
  MOVE 'ZCA0FCSTFTOP' TO tab_maint.
  AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
    ID 'ACTVT' FIELD act_auth
    ID 'TABLE' FIELD tab_maint.
  IF sy-subrc NE 0.
    PERFORM fill_fcode USING 'CREA'.
    PERFORM fill_fcode USING 'COPY'.
  ENDIF.
Check for authorization for delete
  MOVE '06' TO act_auth.        "06 --> Delete
  MOVE 'ZCA0FCSTFTOP' TO tab_maint.
  AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
    ID 'ACTVT' FIELD act_auth
    ID 'TABLE' FIELD tab_maint.
  IF sy-subrc NE 0.
    PERFORM fill_fcode USING 'DELE'.
  ENDIF.
ENDFORM.                    " set_auth
*&      Module  check_change  INPUT
MODULE check_change INPUT.
  flag = 'Y'.
ENDMODULE.                 " check_change  INPUT
Regards,
Vikas.
plz reward if helpful

Similar Messages

  • How to display records modified in a workspace(version)?

    We have an application, which modified the records for a version of the database (By using "EXEC DBMS_WM.EnableVersioning").
    What is the best way to view the records which have been changed in a version from Oracle Sql developer?

    <hbj:button                               id="button Id"
         text="button text"
         width="250px"
         tooltip="any help text"
    onClientClick="JavaScript:window.open('specify which window to open - name');"
         disabled="false"
            design="STANDARD"/>
    javascript window.open is used to open a new window.

  • Recording modified webcam videos

    Hi there,
    Is there a possibility - instead of attaching a camera [via
    ns.attachcamera()] to a netstream - to "attach" e.g. BitmapData to
    netstream. The reason is, that I use BitmapData's .draw method to
    get the webcam video in order to change it, such as with the
    .treshold method. And I want to record and save these altered
    bitmaps (as a video) on the FMS instead the original webcam video.
    This URL gives a good example what I mean!! ...
    http://www.adobe.com/devnet/flash/articles/webcam_motion.html
    Two videos are shown, the left one is the original from the
    webcam, the right one the "modified" video. Only the modified video
    shall be recorded via the netstream .publish method.
    Thanks for any help.

    Hope someone answers you.... I have the exact same question.
    JJ

  • SQL datetime update when record modified???

    I'm have a difficult time figuring out how I can update the
    datetime value
    in previously entered records using the current datetime in
    MSSQL 2005.
    Currently I'm making an inventory webpage using DW CS3,
    ASP.NET 1.1.
    Inventory is added and I've made a page to audit inventory. I
    can scan an
    item, it will be displayed, then I can change quantities or
    locations and
    submit the datagrid changes. The changes all take effect just
    fine, but the
    datetime stamp stays the same.
    I've read that the MSSQL 2005 does not change the to the
    current datetime on
    update, only on insert new record.
    How can I make this happen? Where might I add script for SQL
    such as. Can
    I use the EVENT - On.Update.Command under the datagrid Tag?
    update dbo.PARTS
    set audit_date = getdate()
    where ID = @paramid
    Any help would be greatly appreciated.
    Thanks
    Casey Swett

    Added the following trigger and works great! Thanks for the
    help!
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    GO
    ALTER TRIGGER [dbo].[PARTS_WAV_PARTS] ON [dbo].[PARTS]
    after UPDATE
    AS
    update PARTS set audit_date = getdate()
    from PARTS JOIN inserted on PARTS.ID = inserted.ID
    "bregent" <[email protected]> wrote in
    message
    news:fpv4b9$kb2$[email protected]..
    > Consider using an update trigger.

  • Modifying record in MDM using JAVA API

    hello all
    I have created record in MDM using JAVA API now I want to update record using API. I used ModifyRecordCommand. But this requires input as Record but I have RecordID of the record to be modified. How do I get Record value from RecordID.

    Hi,
                      You can use RetrieveRecordsByIdCommand to get the record by Record Id.
                RetrieveRecordsByIdCommand recordbyidcom = new  RetrieveRecordsByIdCommand(con);
                recordbyidcom.setSession(session);
                recordbyidcom.addId(recordid);
                recordbyidcom.setResultDefinition(resultdefinition);
                recordbyidcom.execute();
                RecordResultSet rs = recordbyidcom.getRecords();
                Record record = rs.getRecord(0);
                //Modify the record
                record.setFieldValue(fieldid,value);
                ModifyRecordCommand modify = new ModifyRecordCommand(con);
                modify.setSession(session);
                modify.setRecord(record);
                modify.execute();
    Regards,
    Sreenivasulu Thimmanapalli.
    Edited by: Sreenivasulu Thimmanapalli on Dec 8, 2008 2:36 AM

  • Force record to be indexed

    Hi,
    I'm working on portal 10gr3 and I face a problem with the 'portal.wwsbr_api.set_attribute'.
    I'm able to set an attribute through this procedure but, the modified record is not take into account when index are update. The record modified is on table 'portal.wwv_thingattributes'.
    Is there a way to flag a record to be take into when indexes are updated ?
    I have a lot of update to do (correction of inconsistencies on translated data) and can ask a dba to perform some tasks if necessary.
    Thank you for any help, Eddy.

    Yep. Theres an option ImageAlign of the ActionPainter, Options infront or behind.

  • Selecting modified data on TEVEN

    Hi Gurus,
    I`m BW but I need some HR help.
    I have to extract the manualy modified time records (Infotype 2011). THe information needed is the employee, username (the one that changed the record), date of record change, new date and new time and so on.
    So we found the table TEVEN, it has all the fields we need (PERNR, LDATE, LTIME, UNAME, AEDTM).
    To filter the records that was manually changed we just set ORIGF = M
    The issue is: When you change a record on TR PA61 a new record is created (and the old one have the STOKZ set to "X" to mark it as historical. And just it.
    For the first record that is Ok: I just need the new record (modified) and I can select them by AEDTM . But when someone change the second record I have no way to identify the changed record, there is a new ID, new dates, new username and so on.
    I need selecting all new record AND all records that receive an "X" on STOKZ, because I need updating this data on BW. Someone have any idea?
    Thanks in foward guys..

    In the standard the fields UNAME and AEDTM are only be written in the
    database table TEVEN using the manual changing (transaction PA61).
    The storage at the database of IT2001 is different in comparison to
    other infotypes. In case of a change of the IT2011 the original record
    is canceled and marked with 'STOKZ') and a new record is created. The
    new record contains the current data of the fields UNAME and AEDTM. The
    canceled record is not being changed and remains constant in table
    TEVEN.
    Unfortunately there is no special functionality for reporting of IT2011
    provided.
    So STOKZ is your best option for changed or cancelled records!

  • Modify the field value in itab1 using itab2

    Hi experts
    I need some help.
    My question is : I have ITAB1 contains IBLNO field it is a legacy value.
    I want to modify this field.
    Another internal table  ITAB2 contains sap, legacy value of IBLNO(Cross refrenced table).my requirement is  IBLNO of  ITAB1 is modified with corresponding sap IBLNO in ITAB2.
    plz help
    Durga Parsad

    Hi Durga,
    You want to get following results -
    1. You have ITAB1 containing IBLNO.
    2. ITAB2 has IBLNO.
    3. Modify ITAB1-IBLNO from ITAB2-IBLNO.
    4. There must be some common value between the two tables. It has to be there otherwise the two records won't match.
    Kindly find the following code for doing so -
    LOOP AT ITAB2 INTO WA_ITAB2.
    * Modify ITAB1 from workarea of ITAB2 for matching records
      MODIFY ITAB1 FROM WA_ITAB2     
        TRANSPORTING IBLNO                " Modify only IBLNO of ITAB1 for matching records
        WHERE FIELD1 = WA_ITAB2-FIELD1.   " Some common field between the ITAB1 & workarea of ITAB2  
      CLEAR WA_ITAB2.
    ENDLOOP.
    Hope this helps.
    PS If the answer solves your query, plz close the thread by rewarding each reply and marking it Solved.
    Regards

  • Re:How do we maintain track records by selected user

    Hi,
    I am using Jdev11.1.2.3.0
    I have a requirement which actually needs to keep track of all the items selected by a user.means if any user is changed the existing record or else if he creates any new record or delete any record,at that time i have to maintain one record about the user details and what he is modified the existing record,modified date and time.so how can i maintain the log.can anyone please help me out.
    Thanks,
    G.Shilpa.

    Hi Nitish,
    Thanks for the reply.I used history columns also.but i need to maintain separate log to track all the details.is there any business logic to maintain?
    Thanks,
    G.Shilpa.

  • Modify DB in chunk

    HI All ,
    I have large internal table (like 1000000 records ) and i want to modify DB table from it ,
    what i want is to do the modify in chunk i.e. to do commit after 1000 recorded each time .
    what is the best way to do that ?
    Regards
    Chris

    Hi
    I have some additional questions ,
    1. to do the modify in chunk it is good approach ?
    MODIFY is INSERT+UPDATE, that means if a record in internal table doesn't exist it'll be inserted: that can be or can't be a risk: I don't know your goal.
    I prefer to use UPDATE if I needs to update existing record only, so if perpahs a wrong record is loaded in the internal table it won't be inserted, and so I can avoid to do a select to check if a record exists or doesn't exists.
    But if you doesn't need to care about it and so u need to insert and update a record: MODIFY is better.
    2. i use modify from table in my program do i need to do read before update and just to modify the changes records
    This is the concept below: if you need to change the existing records only, u make sure the record uploaded in the internal tables are in dictionary table too: how to do it depends on your program, i.e. how u've uploaded them, else u should check it before using MODIFY
    3. the DO statements is not risky (like go to infinite loop ).
    Every time a do cycle is used it needs to use a condition exit: in my sample I've used a counter... else a infinite loop is sure.
    Max

  • Making system to use the latest Infotype Record for the Current Period

    Hello,
    I would like to know how the system behave if there is a record modified in the middle of the Pay Period, which record would the PY schema use? Ex: in IT0009 EE has selected multiple Bank Transfer. He say 100$ Bank 1 and Rest to Bank 2. In the middle if the Pay period, the EE comes and makes changes to his Bank Transfer, as he closed the account in Bank1, he creates new Bank and transfers 100$. Now when the PY run, it think both Banks (Bank1 prev and Bank 1 current ) are valid and tries to send 100$ to each back and sends rest to Bank2. Which is not correct. This issue happens when someone changes their record in the middle of the period. So It is assumed to change the process to not to change in the middle of the period. It has to be effecting of 1st of next period.
    But I want to check is there anyway we can make the system to use the latest one if it finds multiple record for the same period?
    any suggestion please.
    Thank you.
    Raj

    Hi Donnie,
    This system actually delimits the previous record but since the change is happened in the middle of the period, but record are considered as active.
    For Ex: The Pay Period is 01/01/2009 to 01/15/2009 and There was a record for Bank1 for that period and user comes and creates a new record on 01/05/2009 for Bank1. Now for this payperiod since its with the period both records are becoming active. So system uses both the records and deducts. Hope you get what I'm saying.
    Thanks,
    Raj

  • How to attached class or function module in FD03

    Hi Guys
    I want to attached CL_ATTACHMENT_LIST for retriving attachment list from fd03 please help to attached the function module in my program?
    regards
    Piroz
    report zfir_aged_debtors no standard page heading
                             line-size 255.
    Type group
    type-pools:
      slis.                        " ALV types
    Tables
    tables:
      adrc,               " Addresses
      bsad,               " Accounting: Customer secondary index (Cleared)
      bsid,               " Accounting: Customer secondary index (Open)
      kna1,               " Customer master: General data
      knkk,               " Customer master: Credit management
      knvk.               " Customer master: Contact persons
    Types
    types:
      begin of ty_bsadbsid,
        bukrs like bsad-bukrs,              " Company code
        kunnr like bsad-kunnr,              " Customer
        gjahr like bsad-gjahr,              " Fiscal year
        belnr like bsad-belnr,              " Accounting document number
        buzei like bsad-buzei,              " Line item
        budat like bsad-budat,              " Posting date
        bldat like bsad-bldat,              " Document date
        waers like bsad-waers,              " Currency
        xblnr like bsad-xblnr,              " Reference
        shkzg like bsad-shkzg,              " Debit/credit indicator
        dmbtr like bsad-dmbtr,              " Amount
        zfbdt like bsad-zfbdt,              " Baseline date for due date
                                            " calculation
        zbd1t like bsad-zbd1t,              " Cash discount days 1
        zbd2t like bsad-zbd2t,              " Cash discount days 2
        zbd3t like bsad-zbd3t,              " Net payment terms period
        rebzg like bsad-rebzg,              " Number of the invoice
        rebzt like bsad-rebzt,              " Follow on document type
      end of ty_bsadbsid,
      ty_it_bsadbsid type ty_bsadbsid occurs 0,
      begin of ty_merged,
        kunnr      like kna1-kunnr,         " Customer number
        name1      like adrc-name1,         " Name
        city1      like adrc-city1,         " City
        post_code1 like adrc-post_code1,    " Post code
        street     like adrc-street,        " Street
        house_num1 like adrc-house_num1,    " House number
        tel_number like adrc-tel_number,    " Telephone number
        fax_number like adrc-fax_number,    " Fax number
        namev      like knvk-namev,         " First name
        namew      like knvk-name1,         " Last name
        telf1      like knvk-telf1,         " Telephone number
        klimk      like knkk-klimk,         " Credit limit
        skfor      like knkk-skfor,         " Total receivables
        total      like bsad-dmbtr,         " Total amount
        rast1      like bsad-dmbtr,         " Amount period 1
        rast2      like bsad-dmbtr,         " Amount period 2
        rast3      like bsad-dmbtr,         " Amount period 3
        rast4      like bsad-dmbtr,         " Amount period 4
        rast5      like bsad-dmbtr,         " Amount period 5
        rast6      like bsad-dmbtr,         " Amount period 6
      end of ty_merged,
      ty_it_merged type ty_merged occurs 0.
    Internal tables
    data:
    Internal table to store customer line items from BSAD and BSID
      it_bsadbsid type ty_it_bsadbsid,
    Internal table to store field catalog for ALV function call
      it_fieldcat type slis_t_fieldcat_alv,
    Internal table to store summarised data for report output
      it_merged   type ty_it_merged.
    Structures
    data:
    Display variant structures
      st_tvariant  like disvariant,
      st_variant   like disvariant.
    Constants
    constants:
      co_delim_dash    type c
                       value '-',
      co_false         type c                      " False
                       value space,
      co_koart_d       like faede-koart            " Customer account type
                       value 'D',
      co_save_u        type c                      " User display variant
                       value 'U',                  " saving allowed.
      co_shkzg_h       like bsid-shkzg             " Debit/Credit indicator
                       value 'H',                  " for credit
      co_shkzg_s       like bsid-shkzg             " Debit/Credit indicator
                       value 'S',                  " for debit
      co_selected      type c                      " Value of selected radio
                       value 'X',                  " button or checkbox
      co_true          type c                      " True
                       value co_selected.
    Variables
    data:
      va_exit          type c.
    Selection screen definition
    selection-screen: begin of block b1 with frame title text-001.
    select-options:
      s_kunnr for bsad-kunnr.                     " Customer number
    parameters:
      p_kkber like knkk-kkber,                    " Credit control area
      p_pafkt like knvk-pafkt,                    " Contact function
      p_datum like sy-datum.                      " Report date
    selection-screen: begin of line,
                      comment 01(30) text-006,
                      position pos_low.
    parameters:
      rastbis1 like rfpdo1-allgrogr               " Due date sorted 1
               default '000',
      rastbis2 like rfpdo1-allgrogr               " Due date sorted 2
               default '000',
      rastbis3 like rfpdo1-allgrogr               " Due date sorted 3
               default '000',
      rastbis4 like rfpdo1-allgrogr               " Due date sorted 4
               default '000',
      rastbis5 like rfpdo1-allgrogr               " Due date sorted 5
               default '000'.
    selection-screen: end of line.
    selection-screen: end of block b1,
                      begin of block b2 with frame title text-002.
    parameters:
      p_varint like disvariant-variant.           " Display variant.
    selection-screen: end of block b2.
    Initialisation
    initialization.
    Provide default periods for due date sorted list.
      rastbis1 = 0.
      rastbis2 = 30.
      rastbis3 = 60.
      rastbis4 = 90.
      rastbis5 = 120.
    Default report date to current.
      p_datum = sy-datlo.
    Default credit control area to BP01.
      p_kkber = 'BP01'.
    At selection screen on value request for
    at selection-screen on value-request for p_varint.
    Provide display variant list for this program.
      call function 'REUSE_ALV_VARIANT_F4'
        exporting
          is_variant = st_variant
          i_save     = co_save_u
        importing
          e_exit     = va_exit
          es_variant = st_tvariant
        exceptions
          not_found  = 2.
      if sy-subrc eq 2.
        message id sy-msgid type 'S'
                number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      else.
        if va_exit eq space.
          st_variant = st_tvariant.
          p_varint = st_tvariant-variant.
        endif.
      endif.
    At selection screen
    at selection-screen.
    Load display variant.
      if not p_varint is initial.
        move st_variant to st_tvariant.
        move p_varint to st_tvariant-variant.
        call function 'REUSE_ALV_VARIANT_EXISTENCE'
          exporting
            i_save     = co_save_u
          changing
            cs_variant = st_tvariant.
        st_variant = st_tvariant.
      else.
        clear st_variant.
        st_variant-report = sy-repid.
      endif.
      if p_kkber is initial.
      Ensure credit control area is specified.
        message e000(zgen) with 'Credit control area must be specified'.
      endif.
      if p_pafkt is initial.
      Ensure contact person function is specified.
        message e000(zgen) with 'Contact person function must be specified'.
      endif.
    Start of selection
    start-of-selection.
    Extract open customer items from BSID
      select bukrs kunnr gjahr belnr buzei budat bldat waers xblnr shkzg
             dmbtr zfbdt zbd1t zbd2t zbd3t rebzg rebzt
             from  bsid
             into  table it_bsadbsid
             where kunnr in s_kunnr
             and   budat le p_datum.
    Extracct cleared customer items from BSAD
      select bukrs kunnr gjahr belnr buzei budat bldat waers xblnr shkzg
             dmbtr zfbdt zbd1t zbd2t zbd3t rebzg rebzt
             from  bsad
             appending table it_bsadbsid
             where kunnr in s_kunnr
             and   budat le p_datum
             and   augdt ge p_datum.
    Ensure that items were not selected twice while getting data from the
    open and cleared items tables (Only if transaction occured during
    report run).
      sort it_bsadbsid by bukrs belnr gjahr buzei.
      delete adjacent duplicates from it_bsadbsid
             comparing bukrs belnr gjahr buzei.
      if it_bsadbsid[] is initial.
      No data found for selection
        message s001(zgen).
        exit.
      endif.
    Merge data for report output
      perform merge_data tables it_bsadbsid
                                it_merged.
    Build field catalog
      perform build_field_catalog tables it_fieldcat.
    Output report via ALV
      perform output_report_via_alv tables it_fieldcat
                                           it_merged.
    *&      Form  merge_data
          text
    form merge_data  tables   pa_it_bsadbsid type ty_it_bsadbsid
                              pa_it_merged   type ty_it_merged.
    Local work areas
    data:
      lwa_bsadbsid type ty_bsadbsid,
      lwa_merged   type ty_merged.
    Local structures
    data:
      lst_faede    like faede.
    Local variables
    data:
      lva_daysover type i,
      lva_merged_tabix like sy-tabix.
      loop at pa_it_bsadbsid into lwa_bsadbsid.
      Lookup merged entry for customer
        clear lwa_merged.
        read table pa_it_merged into lwa_merged
                                with key kunnr = lwa_bsadbsid-kunnr
                                binary search.
        lva_merged_tabix = sy-tabix.
        if sy-subrc ne 0.
        Create new merged record for customer
          lwa_merged-kunnr = lwa_bsadbsid-kunnr.
        Get customer details from KNA1
          clear kna1.
          select single *
                 from   kna1
                 where  kunnr eq lwa_bsadbsid-kunnr.
        Get customer address details from ADRC
          clear adrc.
          select single *
                 from   adrc
                 where  addrnumber eq kna1-adrnr
                 and    date_from  le p_datum.
          lwa_merged-name1      = adrc-name1.
          lwa_merged-city1      = adrc-city1.
          lwa_merged-post_code1 = adrc-post_code1.
          lwa_merged-street     = adrc-street.
          lwa_merged-house_num1 = adrc-house_num1.
          lwa_merged-tel_number = adrc-tel_number.
          lwa_merged-fax_number = adrc-fax_number.
        Get credit limit details from KNKK
          clear knkk.
          select single *
                 from   knkk
                 where  kunnr eq lwa_bsadbsid-kunnr
                 and    kkber eq p_kkber.
          lwa_merged-klimk = knkk-klimk.
          lwa_merged-skfor = knkk-skfor.
        Get customer contact person details from KNVK
          clear knvk.
          select single *
                 from   knvk
                 where  kunnr eq lwa_bsadbsid-kunnr
                 and    pafkt eq p_pafkt.
          lwa_merged-namev = knvk-namev.
          lwa_merged-namew = knvk-name1.
          lwa_merged-telf1 = knvk-telf1.
          insert lwa_merged into pa_it_merged index lva_merged_tabix.
        endif.
      Interpret debit/credit indicator
        case lwa_bsadbsid-shkzg.
          when co_shkzg_h.
          Credit
            lwa_bsadbsid-dmbtr = 0 - lwa_bsadbsid-dmbtr.
          when co_shkzg_s.
          Debit
        endcase.
      Perform ageing
        clear lst_faede.
        move-corresponding lwa_bsadbsid to lst_faede.
        lst_faede-koart = co_koart_d.
        call function 'DETERMINE_DUE_DATE'
          exporting
            i_faede = lst_faede
          importing
            e_faede = lst_faede
          exceptions
            others  = 1.
        lva_daysover = p_datum - lst_faede-netdt.
      Accumulate total.
        add lwa_bsadbsid-dmbtr to lwa_merged-total.
        if lva_daysover le rastbis1.
          add lwa_bsadbsid-dmbtr to lwa_merged-rast1.
        else.
          if lva_daysover le rastbis2 or
             rastbis3 is initial.
            add lwa_bsadbsid-dmbtr to lwa_merged-rast2.
          else.
            if lva_daysover le rastbis3 or
               rastbis4 is initial.
              add lwa_bsadbsid-dmbtr to lwa_merged-rast3.
            else.
              if lva_daysover le rastbis4 or
                 rastbis5 is initial.
                add lwa_bsadbsid-dmbtr to lwa_merged-rast4.
              else.
                if lva_daysover le rastbis5.
                  add lwa_bsadbsid-dmbtr to lwa_merged-rast5.
                else.
                  add lwa_bsadbsid-dmbtr to lwa_merged-rast6.
                endif.
              endif.
            endif.
          endif.
        endif.
      Update the merged record
        modify pa_it_merged from lwa_merged index lva_merged_tabix.
      endloop.
    endform.                    " merge_data
    *&      Form  build_field_catalog
          text
    form build_field_catalog tables pa_it_fieldcat type slis_t_fieldcat_alv.
    Local work areas
      data:
        lwa_fieldcat   type slis_fieldcat_alv.
    --WG1K903216: Start Insert-
      data: v_datum type datum,
            v_mdmth type datum,
            v_datxt type string,
            v_noday type i.
    --WG1K903216: End Insert---
      refresh pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'KUNNR'.
      lwa_fieldcat-ref_tabname   = 'KNA1'.
      lwa_fieldcat-ref_fieldname = 'KUNNR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '1'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'NAME1'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'NAME1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '2'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'CITY1'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'CITY1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '3'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'POST_CODE1'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'POST_CODE1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '4'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'STREET'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'STREET'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '5'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'HOUSE_NUM1'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'HOUSE_NUM1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '6'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'TEL_NUMBER'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'TEL_NUMBER'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '7'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'FAX_NUMBER'.
      lwa_fieldcat-ref_tabname   = 'ADRC'.
      lwa_fieldcat-ref_fieldname = 'FAX_NUMBER'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '8'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'NAMEV'.
      lwa_fieldcat-ref_tabname   = 'KNVK'.
      lwa_fieldcat-ref_fieldname = 'NAMEV'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '9'.
      lwa_fieldcat-seltext_l     = 'Contact first name'.
      lwa_fieldcat-seltext_m     = 'Contact Fname'.
      lwa_fieldcat-seltext_s     = 'Ctct Fname'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'NAMEW'.
      lwa_fieldcat-ref_tabname   = 'KNVK'.
      lwa_fieldcat-ref_fieldname = 'NAME1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '10'.
      lwa_fieldcat-seltext_l     = 'Contact last name'.
      lwa_fieldcat-seltext_m     = 'Contact Lname'.
      lwa_fieldcat-seltext_s     = 'Ctxt Lname'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'TELF1'.
      lwa_fieldcat-ref_tabname   = 'KNVK'.
      lwa_fieldcat-ref_fieldname = 'TELF1'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '11'.
      lwa_fieldcat-seltext_l     = 'Contact phone no.'.
      lwa_fieldcat-seltext_m     = 'Contact phone'.
      lwa_fieldcat-seltext_s     = 'Ctct Phne'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'KLIMK'.
      lwa_fieldcat-ref_tabname   = 'KNKK'.
      lwa_fieldcat-ref_fieldname = 'KLIMK'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '12'.
      lwa_fieldcat-seltext_l     = 'Credit limit'.
      lwa_fieldcat-seltext_m     = 'Credit limit'.
      lwa_fieldcat-seltext_s     = 'Crdt limit'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'SKFOR'.
      lwa_fieldcat-ref_tabname   = 'KNKK'.
      lwa_fieldcat-ref_fieldname = 'SKFOR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '13'.
      lwa_fieldcat-seltext_l     = 'Credit used'.
      lwa_fieldcat-seltext_m     = 'Credit used'.
      lwa_fieldcat-seltext_s     = 'Crdt used'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'TOTAL'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '14'.
      lwa_fieldcat-seltext_l     = 'Total'.
      lwa_fieldcat-seltext_m     = 'Total'.
      lwa_fieldcat-seltext_s     = 'Total'.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST1'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '15'.
    --WG1K903216: Start Delete-
    concatenate '<'
                 rastbis2
                 into lwa_fieldcat-seltext_l
                 separated by space.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis2.
    Always use the middle of the report month as a heading reference date.
      concatenate p_datum+0(6) '15' into v_mdmth.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '+'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST2'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '16'.
    --WG1K903216: Start Delete-
    concatenate rastbis1
                 rastbis2
                 into lwa_fieldcat-seltext_l
                 separated by co_delim_dash.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis1.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '+'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST3'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '17'.
    --WG1K903216: Start Delete-
    concatenate rastbis2
                 rastbis3
                 into lwa_fieldcat-seltext_l
                 separated by co_delim_dash.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis2.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '-'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST4'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '18'.
    --WG1K903216: Start Delete-
    concatenate rastbis3
                 rastbis4
                 into lwa_fieldcat-seltext_l
                 separated by co_delim_dash.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis3.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '-'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST5'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '19'.
    --WG1K903216: Start Delete-
    concatenate rastbis4
                 rastbis5
                 into lwa_fieldcat-seltext_l
                 separated by co_delim_dash.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis4.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '-'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
      clear lwa_fieldcat.
      lwa_fieldcat-tabname       = 'PA_IT_MERGED'.
      lwa_fieldcat-fieldname     = 'RAST6'.
      lwa_fieldcat-ref_tabname   = 'BSAD'.
      lwa_fieldcat-ref_fieldname = 'DMBTR'.
      lwa_fieldcat-row_pos       = '1'.
      lwa_fieldcat-col_pos       = '20'.
    --WG1K903216: Start Delete-
    concatenate '>'
                 rastbis5
                 into lwa_fieldcat-seltext_l
                 separated by space.
    --WG1K903216: End Delete---
    --WG1K903216: Start Insert-
      clear: v_datum,
             v_datxt.
      v_noday = rastbis5.
      call function 'ZWAG_DATE_CALCULATOR'
        exporting  i_datum         = v_mdmth
                   i_noday         = v_noday
                   i_oprnd         = '-'
        importing  e_datum         = v_datum
        exceptions invalid_operand = 1.
      call function 'ZWAG_END_MONTH'
        exporting  i_datum         = v_datum
        importing  e_datum         = v_datum
                   e_datxt         = v_datxt
        exceptions invalid_date    = 1.
      concatenate 'Due By' v_datxt into lwa_fieldcat-seltext_l
        separated by space.
    --WG1K903216: End Insert---
      lwa_fieldcat-seltext_m     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-seltext_s     = lwa_fieldcat-seltext_l.
      lwa_fieldcat-ddictxt       = 'L'.
      append lwa_fieldcat to pa_it_fieldcat.
    endform.                    " build_field_catalog
    *&      Form  output_report_via_alv
          text
    form output_report_via_alv
                        tables pa_it_fieldcat type slis_t_fieldcat_alv
                               pa_it_merged   type ty_it_merged.
    Local variables
      data:
        lva_repid    like sy-repid,
        lva_formname type slis_formname.
      lva_repid = sy-repid.
      lva_formname = 'USER_COMMAND'.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program      = lva_repid
          i_callback_user_command = lva_formname
          i_save                  = 'A'
          is_variant              = st_variant
          it_fieldcat             = pa_it_fieldcat[]
        tables
          t_outtab                = pa_it_merged
        exceptions
          program_error           = 1
          others                  = 2.
    endform.                    " output_report_via_alv

    Hi shiva
    Thanks for your help,
    Can you check this coding and revert me back ASAP Please.
    REPORT BDS_GOS_CONNECTION.
    DATA : logical_system LIKE BAPIBDS01-log_system.
           CLASSNAME LIKE BAPIBDS01-CLASSNAME
           OBJKEY LIKE SWOTOBJID-objkey.
    PARAMETERS: pa_lo_sys BAPIBDS01-log_system,
                pa_class like BPIBDS01-CLASSNAME,
                pa_objkey like swotobjidobjkey.
    AT SELECTION-SCREEN.
    CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'
             EXPORTING
                  bor_id             = bor_id
             IMPORTING
                  logical_sytem      = pa_lo_sys.
                  classname          = pa_class.
                  objkey            = pa_objkey.
             EXCEPTIONS
                  no_objects_found     = 1
                  internal_error       = 2
                  internal_gos_error   = 3.
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                 WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    clear v_attno1.
    i_object1-typeid = 'BUS2012'.
    i_object1-catid  = 'BO'.
    i_object1-instid = i_yItem-docno.
    call method cl_gos_attachment_query=>count_for_object
       exporting
        is_object = i_object1
        ip_arl    = space
       receiving
        rt_stat   = i_stat1.
    read table i_stat1 into wa_stat1 index 1.
    if sy-subrc eq c_0.
        move wa_stat1-counter to v_attno1.
    endif.             
    CALL METHOD cl_gos_attachment_query=>count_for_object
    EXPORTING
    is_object = object
    ip_arl =    space
    RECEIVING
    rt_stat = lt_stat.
    READ TABLE lt_stat INDEX 1 into ls_stat.
    count = ls_stat-counter.
    *The object has to be a concatenation of your document, like this:
    CONCATENATE object-instid tab-gjahr INTO object-instid.
    ELSE.
    CONCATENATE tab-bukrs tab-belnr tab-gjahr INTO
    object-instid.
    ENDIF.

  • Not able to load objects

    I have written code to load in an object but this keeps giving me exceptions when i run the code to try and display the data from the object read in. My code is below:
    Thanks
    //--- cFaceRecGUIMain.java ---
    //--- Edmund Smith 23/08/04 ---
    //--- The GUI for the face recognition sofware contains buttons and ---
    //--- display area for an image of a face ---
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class cFaceRecGUIMain extends JFrame implements ActionListener {
    //Create menu bar items
    private JMenuItem jmiLoadPicture, jmiExit, jmiEdit;
    //Recognize Button
    private JButton jbtRecognize;
    //Labels with info about picture
    private String lblName, lblDOB, lblNI, lblStaffID;
    //Panel to hold an image
    private ImagePanel imagePanel = new ImagePanel();
    //File Chooser
    JFileChooser jFileChooser = new JFileChooser();
    //BitmapReader
    //cGetBytes getBytes = new cGetBytes();
    //Face database
    cFaceRecData faceDatabase = new cFaceRecData();
    //Set default window sizes
    final int xSize = 600;
    final int ySize = 400;
    //Array for holding pixels
    int pixels[];
    //Labels for menu items
    final String lbljmiLoadPicture = "Load Picture for recogniton";
    final String lbljmiExit = "Exit";
    final String lbljmiEdit = "Edit face database";
    //Create the frame to enter details about people
    cFaceRecGUIEDetails enterDetailsFrame = new cFaceRecGUIEDetails();
    //BitmapReader
    cGetBytes getImageBytes = new cGetBytes();
    //Main method
    public static void main(String[] args)
    cFaceRecGUIMain programFrame = new cFaceRecGUIMain();
    programFrame.pack();
    programFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    programFrame.setTitle("Face Recognizer");
    programFrame.setSize(600, 400);
    programFrame.setVisible(true);
    //Constructor
    public cFaceRecGUIMain() {
    //Initialize menu bar
    JMenuBar jmb = new JMenuBar();
    setJMenuBar(jmb);
    //Add menus
    JMenu fileMenu = new JMenu("File");
    fileMenu.setMnemonic('F');
    jmb.add(fileMenu);
    JMenu faceMenu = new JMenu("Face");
    fileMenu.setMnemonic('A');
    jmb.add(faceMenu);
    JMenu helpMenu = new JMenu("Help");
    fileMenu.setMnemonic('H');
    jmb.add(helpMenu);
    //Add menu items
    fileMenu.add(jmiLoadPicture =
    new JMenuItem(lbljmiLoadPicture, 'L'));
    fileMenu.addSeparator();
    fileMenu.add(jmiExit = new JMenuItem(lbljmiExit, 'X'));
    faceMenu.add(jmiEdit = new JMenuItem(lbljmiEdit, 'E'));
    //Set keyboard accelerators
    jmiExit.setAccelerator(
    KeyStroke.getKeyStroke(KeyEvent.VK_E, ActionEvent.CTRL_MASK));
    jmiLoadPicture.setAccelerator(
    KeyStroke.getKeyStroke(KeyEvent.VK_L, ActionEvent.CTRL_MASK));
    //Set up new panel
    imagePanel.setBorder(new TitledBorder("Face"));
    //Lay components on panel
    imagePanel.setImageIcon(new ImageIcon("C:/Documents and Settings/" +
    "Edmund Smith/My Documents/aface.bmp"));
    imagePanel.add(jbtRecognize = new JButton("Recognize"),
    BorderLayout.SOUTH);
    setTitle("Face Recognizer");
    //Labels to hold info
    JPanel lblsAboutImagePanel = new JPanel();
    lblsAboutImagePanel.setBorder(new TitledBorder("Details"));
    lblsAboutImagePanel.setLayout(new GridLayout(4, 2));
    lblsAboutImagePanel.add(new JLabel("Name"));
    lblsAboutImagePanel.add(new JLabel(lblName));
    lblsAboutImagePanel.add(new JLabel("DOB"));
    lblsAboutImagePanel.add(new JLabel(lblDOB));
    lblsAboutImagePanel.add(new JLabel("National insurance number"));
    lblsAboutImagePanel.add(new JLabel(lblNI));
    lblsAboutImagePanel.add(new JLabel("Staff ID"));
    lblsAboutImagePanel.add(new JLabel(lblStaffID));
    //Add the different panels to the frame
    getContentPane().setLayout(new BorderLayout());
    getContentPane().add(imagePanel, BorderLayout.WEST);
    getContentPane().add(lblsAboutImagePanel, BorderLayout.CENTER);
    //Register listeners
    jmiExit.addActionListener(this);
    jmiLoadPicture.addActionListener(this);
    jmiEdit.addActionListener(this);
    //Create the frame where you can enter the details of a person
    enterDetailsFrame.pack();
    enterDetailsFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    enterDetailsFrame.setTitle("Set up database");
    enterDetailsFrame.setSize(xSize, ySize);
    class edfClosingListener extends WindowAdapter {
    public void windowClosing(WindowEvent e) {
    //Check to see if the record has been changed
    if (enterDetailsFrame.isRecordModified)
    JOptionPane.showConfirmDialog(
    null,
    "Do you want to save changes to this record?",
    "Face datbase",
    JOptionPane.YES_NO_CANCEL_OPTION);
    if (enterDetailsFrame.newPeople.size() > 0)
    //create a temporary array to store the new people
    person[] newPersons = new
    person[enterDetailsFrame.newPeople.size()];
    //Copy the people in the vector to the array
    person tempPerson;
              for (int i = 0; i < newPersons.length; i++)
    tempPerson =
    (person)enterDetailsFrame.newPeople.elementAt(i);
    newPersons.path = tempPerson.path;
    newPersons[i].personsName = tempPerson.personsName;
    newPersons[i].personsDOB = tempPerson.personsDOB;
    newPersons[i].personsNI = tempPerson.personsNI;
    newPersons[i].personsStaffID = tempPerson.personsStaffID;
    //Create new database
    allPeople outPeople =
    new allPeople(enterDetailsFrame.peopleInfo, newPersons);
    //Save the database with the added records
    enterDetailsFrame.faceDatabase.saveDatabase(outPeople);
    else
    //Save the database with the same number of records
    enterDetailsFrame.faceDatabase.saveDatabase(
    enterDetailsFrame.peopleInfo);
    //Set the actions to happen when windows are closed
    enterDetailsFrame.addWindowListener(new edfClosingListener());
    closeWindow closeMainFrame = new closeWindow();
    addWindowListener(closeMainFrame);
    public void actionPerformed(ActionEvent e)
    String actionCommand = e.getActionCommand();
    if (e.getSource() instanceof JMenuItem) {
    if (lbljmiExit.equals(actionCommand))
    System.exit(0);
    else if (lbljmiLoadPicture.equals(actionCommand))
    open();
    else if (lbljmiEdit.equals(actionCommand)) {
    enterDetailsFrame.setVisible(true);
    //No records have been modified
    enterDetailsFrame.isRecordModified = false;
    //Open a file
    private void open() {
    if (jFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
    try {
    //Get the file name
    String fileName = jFileChooser.getSelectedFile().getPath();
    //Display the image
    ImageIcon imagei = new ImageIcon(fileName);
    imagePanel.setImageIcon(imagei);
    //Set size of array for holiding bytes in the image
    pixels =
    new int[51 * 55];
    //Get the pixels
    // getBytes.getBMPImage(new FileInputStream(new File(fileName)), pixels);
    catch (Exception e) {
    System.out.print(e);
    class ImagePanel extends JPanel {
    //Label to hold the face
    private JLabel jlblFace = new JLabel();
    //Constructor
    public ImagePanel() {
    setLayout(new BorderLayout());
    add(jlblFace, BorderLayout.CENTER);
    //Set image and show it
    public void setImageIcon(ImageIcon icon) {
    jlblFace.setIcon(icon);
    Dimension dimension =
    new Dimension(icon.getIconWidth(), icon.getIconHeight());
    jlblFace.setPreferredSize(dimension);
    //--- cFaceRecGUIEDetails.java ---
    //--- Edmund Smith 06/10/04 ---
    //--- Allows the user to enter details about a person, view the ---
    //--- database and add people to the database ---
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.border.*;
    import java.util.*;
    class cFaceRecGUIEDetails extends JFrame implements KeyListener, ActionListener
    //Buttons to navigate the database
    private JButton jbtPrevious, jbtNext;
    //Button to load a face
    private JButton jbtLoadFace;
    //Fields to display info about the person
    private JTextField jtfName, jtfDOB, jtfNI, jtfStaffID;
    //Panel to hold an image
    private ImagePanel imagePanel = new ImagePanel();
    //File Chooser
    private JFileChooser jFileChooser = new JFileChooser();
    //Variable to tell whether record has been modified
    boolean isRecordModified = false;
    //Tells which record current being veiwed/changed
    int currentRecord = 0;
    //Stores new people to be added to database
    Vector newPeople = new Vector();
    //Face database
    cFaceRecData faceDatabase;
    public allPeople peopleInfo;
    //Default Constructor
    public cFaceRecGUIEDetails()
    //Get the face database
    faceDatabase = new cFaceRecData();
    peopleInfo = faceDatabase.restoreDatabase();
    //Panel to hold two buttons to navigate the database
    JPanel jpButtons = new JPanel();
    //Add navigation buttons to panel
    jpButtons.setLayout(new FlowLayout());
    jpButtons.add(jbtPrevious = new JButton());
    jpButtons.add(jbtNext = new JButton());
    //Set button text
    jbtPrevious.setText("<");
    jbtNext.setText(">");
    //Panel to hold details about the person
    JPanel jpDetails = new JPanel();
    jpDetails.setBorder(new TitledBorder("Details"));
    jpDetails.setLayout(new GridLayout(4, 2));
    jpDetails.add(new JLabel("Name"));
    jpDetails.add(jtfName = new JTextField());
    jpDetails.add(new JLabel("DOB"));
    jpDetails.add(jtfDOB = new JTextField());
    jpDetails.add(new JLabel("National insurance number"));
    jpDetails.add(jtfNI = new JTextField());
    jpDetails.add(new JLabel("StaffID"));
    jpDetails.add(jtfStaffID = new JTextField());
    try
    jtfName.setText(peopleInfo.people[currentRecord].personsName);
    /* jtfDOB.setText(String.valueOf(
    peopleInfo.people[currentRecord].personsDOB));
    jtfNI.setText(String.valueOf(
    peopleInfo.people[currentRecord].personsNI));
    jtfStaffID.setText(String.valueOf(
    peopleInfo.people[currentRecord].personsStaffID));*/
    catch (Exception e)
    System.out.print(e);
    imagePanel.setBorder(new TitledBorder("Face"));
    imagePanel.add(jbtLoadFace = new JButton("Load Face"));
    //Main body panel
    JPanel jpBody = new JPanel();
    jpBody.add(imagePanel, BorderLayout.WEST);
    jpBody.add(jpDetails, BorderLayout.CENTER);
    //Place panels on frame
    getContentPane().setLayout(new BorderLayout());
    getContentPane().add(jpBody, BorderLayout.CENTER);
    getContentPane().add(jpButtons, BorderLayout.SOUTH);
    //Register listeners
    jbtLoadFace.addActionListener(this);
    jbtPrevious.addActionListener(this);
    jbtNext.addActionListener(this);
    //jtfName.addKeyListener(this);
    jtfDOB.addKeyListener(this);
    jtfNI.addKeyListener(this);
    jtfStaffID.addKeyListener(this);
    public void actionPerformed(ActionEvent e)
    boolean goOn = false;
    if (e.getSource() == jbtLoadFace)
    isRecordModified = true;
    setTitle("Set up datbase: Record Modified");
    if (e.getSource() == jbtPrevious || e.getSource() == jbtNext)
    if (isRecordModified == true)
    int result = JOptionPane.showConfirmDialog(
    null,
    "Do you want to save changes to this record?",
    "Face datbase",
    JOptionPane.YES_NO_CANCEL_OPTION);
    switch (result)
    case JOptionPane.YES_OPTION:
    saveRecordChanges();
    goOn = true;
    break;
    case JOptionPane.NO_OPTION:
    goOn = true;
    break;
    if (goOn == true)
    //If user has not cancelled move to another record
    if (e.getSource() == jbtPrevious)
    moveForwardToRecord(true);
    else
    moveForwardToRecord(false);
    public void saveRecordChanges()
    boolean alreadyInDatabase = false;
    //Put the values in the field into the database
    try
    if (currentRecord < peopleInfo.people.length)
    alreadyInDatabase = true;
    peopleInfo.people[currentRecord].personsName =
    jtfName.getText();
    peopleInfo.people[currentRecord].personsDOB =
    Integer.parseInt(jtfDOB.getText());
    peopleInfo.people[currentRecord].personsNI =
    Integer.parseInt(jtfNI.getText());
    peopleInfo.people[currentRecord].personsStaffID =
    Integer.parseInt(jtfStaffID.getText());
    catch (Exception e)
    System.out.print(e);
    if (alreadyInDatabase = false)
    newPeople.add(new person("", jtfName.getText(),
    Integer.parseInt(jtfDOB.getText()),
    Integer.parseInt(jtfNI.getText()),
    Integer.parseInt(jtfStaffID.getText())));
    public void moveForwardToRecord(boolean forward)
    isRecordModified = false;
    setTitle("Set up datbase");
    if (forward)
    else
    public void keyPressed(KeyEvent e)
    isRecordModified = true;
    setTitle("Set up datbase: Record Modified");
    public void keyReleased(KeyEvent e) {
    public void keyTyped(KeyEvent e) {
    //Open a file
    private void open()
    if (jFileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
    String fileName = jFileChooser.getSelectedFile().getPath();
    imagePanel.setImageIcon(new ImageIcon(fileName));
    isRecordModified = true;
    setTitle("Set up datbase: Record Modified");
    //--- cFaceRecData.java ---
    //--- Edmund Smith 18/11/04 ---
    //--- Stores and retrives info about a person and their face ---
    import java.io.*;
    import java.util.*;
    class cFaceRecData
    //The location of the database
    final String dbPath = "C:/Documents and Settings/" +
    "Edmund Smith/My Documents/fdatabase.dat";
    //The data
    allPeople inPeople;
    //Saves the file
    void saveDatabase(allPeople outPeople)
    try
    //Object output stream
    ObjectOutputStream out =
    new ObjectOutputStream(new FileOutputStream(dbPath));
    //Write the object
    out.writeObject(outPeople);
    //Close the object output stream
    out.close();
    catch (IOException ex)
    System.out.println(ex);
    //Opens the file
    allPeople restoreDatabase()
    try
    //Object input steam
    ObjectInputStream in =
    new ObjectInputStream(new FileInputStream(dbPath));
    //Get the database
    inPeople = (allPeople)in.readObject();
    //Close the input stream
    in.close();
    catch (IOException ex)
    System.out.println(ex);
    catch (ClassNotFoundException ex)
    System.out.println(ex);
    //Return the database
    return inPeople;
    //Holds the info about a person
    class person
    //Stores the location of the image on disk
    String path;
    //Stores the name of a person
    String personsName;
    //Stores the dob of a person, their NI no, and employee ID
    int personsDOB, personsNI, personsStaffID;
    //Default constructor
    public person(String inPath, String inName, int inDOB, int inNI,
    int inStaffID)
    //Stores the values which passed in
    path = inPath;
    personsName = inName;
    personsDOB = inDOB;
    personsNI = inNI;
    personsStaffID = inStaffID;
    //The database
    class allPeople
    person[] people;
    int numPeople;
    //Default constructor
    public allPeople(person[] persons)
    //Create the array to hold the people
    people = new person[persons.length];
    for (int i = 0; i < persons.length; i++)
    people[i] = new person(persons[i].path,
    persons[i].personsName,
    persons[i].personsDOB,
    persons[i].personsStaffID,
    persons[i].personsNI);
    //Updates the database
    public allPeople(allPeople thePeople, person[] persons)
    //Create the array to hold the people
    int totalPeople = thePeople.people.length + persons.length;
    people = new person[totalPeople];
    for (int i = 0; i < totalPeople; i++)
    if (i < thePeople.people.length)
    people[i] = new person(thePeople.people[i].path,
    thePeople.people[i].personsName,
    thePeople.people[i].personsDOB,
    thePeople.people[i].personsStaffID,
    thePeople.people[i].personsNI);
    else
    people[i] = new person(persons[i].path,
    persons[i].personsName,
    persons[i].personsDOB,
    persons[i].personsStaffID,
    persons[i].personsNI);

    When posting code to the forum, please use the code button.
    Also, post the exception message and indicate the line that gives the error.

  • Synchronizing with Outlook Calendar and Contacts

    Hello,
    For the past few days I've been having problems synchronizing my BB Torch 9810 with my Outlook 2010 calendar and contacts. This is only recent, and it might be the result of a problem I had with Office, and the fact that the Deskitop Manager was not recognizing the Outlook profile. Now all that has been solved by running a Repair Tool in Office.
    However, I calendar appointments and contacts are no synchronizing properly. With the Calendar, only recurrent items in the BB get transferred to Outllok, like birhtdays and bill payment reminders. I tried all the possible options: synchronize one way from device to PC, replace all entries on PC with BB entries, all entries and upcoming only.
    Other details: I have two email accounts in my BB, a btinternet.com and gmail.com.
    What I have done:
    Removed both accounts and re-added them (re-booting device in the process)
    Deleted the Research in Motion folder in %userprofile%\AppData\Local
    Because I had multiple calendars, in the Service Book I deleted the CICAL entries for Facebook (don't know how that got there) and gmail, leaving only the btinternet.com
    I made sure that btinternet.,com was my default in emails and calendars in Default Services.#
    Made sure that the folders to synchronize are the correct ones in the Desktop Manager options
    Most frustrating is that I don't get any error messages, not even in the logs.
    I am using Blackberry Torch 9810, OS 7.1 bundle 2061
    When I set up the gmail account, it gives me an option to synchronize a calendar, which I don't use. But when I set up the btinternet account, I have no option to synchronize the calenar, only contacts and the option is greyed out (picture).
    Here is the last sync log:
    20:52:58.094 Logging Verbosity Set To '4' - Logging Enabled
    20:52:58.094 SyncAPI logging for product
    20:52:58.094 Sync started at 15/05/2013 20:52:58 (15/05/2013 19:52:58 UTC)
    20:52:58.094 SDK Version is 7.1
    20:52:58.094 Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
    20:56:11.836 Logging Verbosity Set To '2' - Logging Enabled
    20:56:25.048 SyncObject::StartSync
    20:56:25.048 Synchronization Thread Running
    20:56:25.048 Sync Engine Starting
    20:56:25.078 Starting Loading Contracts
    20:56:25.078 Ending Loading Contracts
    20:56:25.078 Starting Translator Verification
    20:56:25.088 Ending Translator Verification
    20:56:25.088 Starting App Validation
    20:56:25.118 Ending App Validation
    20:56:25.118 Starting Sync Status Checks
    20:56:25.118 Begin Sync
    20:56:25.118 Engine working - message event complete for messageId 15006 Getting status information from BlackBerry Calendar
    20:56:25.118 Engine working - message event complete for messageId 15008 Loading field information from 'BlackBerry Calendar' application
    20:56:25.128 Engine working - message event complete for messageId 13000
    20:56:25.128 Engine working - message event complete for messageId 15008 Loading field information from 'Outlook Calendar' application
    20:56:25.168 Engine working - message event complete for messageId 13000
    20:56:25.288
    20:56:25.288 Performing Normal Sync of 'Calendar'. Sync Status before performing synchronization:
    20:56:25.328 Engine working - message event complete for messageId 15006 Getting status information from Outlook Calendar
    20:56:25.338 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:10, recId = 00000000E4E539086D19C24BAF84262E95827323441F3800
    20:56:25.338 Engine working - message event complete for messageId 15011 Read sync status for 1 records
    20:56:25.338 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:10, recId = 00000000E4E539086D19C24BAF84262E95827323641F3800
    20:56:25.338 Engine working - message event complete for messageId 15011 Read sync status for 2 records
    20:56:25.338 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323841F3800
    20:56:25.348 Engine working - message event complete for messageId 15011 Read sync status for 3 records
    20:56:25.348 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323A41F3800
    20:56:25.348 Engine working - message event complete for messageId 15011 Read sync status for 4 records
    20:56:25.348 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323C41F3800
    20:56:25.348 Engine working - message event complete for messageId 15011 Read sync status for 5 records
    20:56:25.348 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323E41F3800
    20:56:25.348 Engine working - message event complete for messageId 15011 Read sync status for 6 records
    20:56:25.348 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732304203800
    20:56:25.348 Engine working - message event complete for messageId 15011 Read sync status for 7 records
    20:56:25.348 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732324203800
    20:56:25.348 Engine working - message event complete for messageId 15011 Read sync status for 8 records
    20:56:25.348 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732344203800
    20:56:25.358 Engine working - message event complete for messageId 15011 Read sync status for 9 records
    20:56:25.358 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732364203800
    20:56:25.358 Engine working - message event complete for messageId 15011 Read sync status for 10 records
    20:56:25.358 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732384203800
    20:56:25.358 Engine working - message event complete for messageId 15011 Read sync status for 11 records
    20:56:25.358 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323A4203800
    20:56:25.358 Engine working - message event complete for messageId 15011 Read sync status for 12 records
    20:56:25.358 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323C4203800
    20:56:25.358 Engine working - message event complete for messageId 15011 Read sync status for 13 records
    20:56:25.358 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323E4203800
    20:56:25.368 Engine working - message event complete for messageId 15011 Read sync status for 14 records
    20:56:25.368 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732304213800
    20:56:25.368 Engine working - message event complete for messageId 15011 Read sync status for 15 records
    20:56:25.368 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732324213800
    20:56:25.368 Engine working - message event complete for messageId 15011 Read sync status for 16 records
    20:56:25.368 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732344213800
    20:56:25.368 Engine working - message event complete for messageId 15011 Read sync status for 17 records
    20:56:25.368 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732364213800
    20:56:25.368 Engine working - message event complete for messageId 15011 Read sync status for 18 records
    20:56:25.368 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732384213800
    20:56:25.368 Engine working - message event complete for messageId 15011 Read sync status for 19 records
    20:56:25.368 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323A4213800
    20:56:25.378 Engine working - message event complete for messageId 15011 Read sync status for 20 records
    20:56:25.378 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323C4213800
    20:56:25.378 Engine working - message event complete for messageId 15011 Read sync status for 21 records
    20:56:25.378 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323E4213800
    20:56:25.378 Engine working - message event complete for messageId 15011 Read sync status for 22 records
    20:56:25.378 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732304223800
    20:56:25.378 Engine working - message event complete for messageId 15011 Read sync status for 23 records
    20:56:25.378 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732324223800
    20:56:25.378 Engine working - message event complete for messageId 15011 Read sync status for 24 records
    20:56:25.378 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732344223800
    20:56:25.388 Engine working - message event complete for messageId 15011 Read sync status for 25 records
    20:56:25.388 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732364223800
    20:56:25.388 Engine working - message event complete for messageId 15011 Read sync status for 26 records
    20:56:25.388 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732384223800
    20:56:25.388 Engine working - message event complete for messageId 15011 Read sync status for 27 records
    20:56:25.388 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323A4223800
    20:56:25.388 Engine working - message event complete for messageId 15011 Read sync status for 28 records
    20:56:25.388 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323C4223800
    20:56:25.388 Engine working - message event complete for messageId 15011 Read sync status for 29 records
    20:56:25.388 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323E4223800
    20:56:25.398 Engine working - message event complete for messageId 15011 Read sync status for 30 records
    20:56:25.398 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732304233800
    20:56:25.398 Engine working - message event complete for messageId 15011 Read sync status for 31 records
    20:56:25.398 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732324233800
    20:56:25.398 Engine working - message event complete for messageId 15011 Read sync status for 32 records
    20:56:25.398 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732344233800
    20:56:25.398 Engine working - message event complete for messageId 15011 Read sync status for 33 records
    20:56:25.398 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732364233800
    20:56:25.398 Engine working - message event complete for messageId 15011 Read sync status for 34 records
    20:56:25.398 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732384233800
    20:56:25.398 Engine working - message event complete for messageId 15011 Read sync status for 35 records
    20:56:25.398 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323A4233800
    20:56:25.408 Engine working - message event complete for messageId 15011 Read sync status for 36 records
    20:56:25.408 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323C4233800
    20:56:25.408 Engine working - message event complete for messageId 15011 Read sync status for 37 records
    20:56:25.408 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323E4233800
    20:56:25.408 Engine working - message event complete for messageId 15011 Read sync status for 38 records
    20:56:25.408 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732304243800
    20:56:25.408 Engine working - message event complete for messageId 15011 Read sync status for 39 records
    20:56:25.408 ModInfo: From Translator: ModInfo = 2013/05/15 19:16:28, recId = 00000000E4E539086D19C24BAF84262E9582732324243800
    20:56:25.408 Engine working - message event complete for messageId 15011 Read sync status for 40 records
    20:56:25.408 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732344243800
    20:56:25.408 Engine working - message event complete for messageId 15011 Read sync status for 41 records
    20:56:25.408 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732364243800
    20:56:25.418 Engine working - message event complete for messageId 15011 Read sync status for 42 records
    20:56:25.418 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732384243800
    20:56:25.418 Engine working - message event complete for messageId 15011 Read sync status for 43 records
    20:56:25.418 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323A4243800
    20:56:25.418 Engine working - message event complete for messageId 15011 Read sync status for 44 records
    20:56:25.418 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323C4243800
    20:56:25.418 Engine working - message event complete for messageId 15011 Read sync status for 45 records
    20:56:25.418 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323E4243800
    20:56:25.418 Engine working - message event complete for messageId 15011 Read sync status for 46 records
    20:56:25.418 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732304253800
    20:56:25.418 Engine working - message event complete for messageId 15011 Read sync status for 47 records
    20:56:25.418 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732324253800
    20:56:25.418 Engine working - message event complete for messageId 15011 Read sync status for 48 records
    20:56:25.418 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732344253800
    20:56:25.428 Engine working - message event complete for messageId 15011 Read sync status for 49 records
    20:56:25.428 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732364253800
    20:56:25.428 Engine working - message event complete for messageId 15011 Read sync status for 50 records
    20:56:25.428 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732384253800
    20:56:25.428 Engine working - message event complete for messageId 15011 Read sync status for 51 records
    20:56:25.428 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323A4253800
    20:56:25.428 Engine working - message event complete for messageId 15011 Read sync status for 52 records
    20:56:25.428 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323C4253800
    20:56:25.428 Engine working - message event complete for messageId 15011 Read sync status for 53 records
    20:56:25.428 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323E4253800
    20:56:25.428 Engine working - message event complete for messageId 15011 Read sync status for 54 records
    20:56:25.428 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732304263800
    20:56:25.438 Engine working - message event complete for messageId 15011 Read sync status for 55 records
    20:56:25.438 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732324263800
    20:56:25.438 Engine working - message event complete for messageId 15011 Read sync status for 56 records
    20:56:25.438 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732344263800
    20:56:25.438 Engine working - message event complete for messageId 15011 Read sync status for 57 records
    20:56:25.438 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732364263800
    20:56:25.438 Engine working - message event complete for messageId 15011 Read sync status for 58 records
    20:56:25.438 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732384263800
    20:56:25.438 Engine working - message event complete for messageId 15011 Read sync status for 59 records
    20:56:25.438 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323A4263800
    20:56:25.438 Engine working - message event complete for messageId 15011 Read sync status for 60 records
    20:56:25.448 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323C4263800
    20:56:25.448 Engine working - message event complete for messageId 15011 Read sync status for 61 records
    20:56:25.448 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323E4263800
    20:56:25.448 Engine working - message event complete for messageId 15011 Read sync status for 62 records
    20:56:25.448 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732304273800
    20:56:25.448 Engine working - message event complete for messageId 15011 Read sync status for 63 records
    20:56:25.448 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732324273800
    20:56:25.448 Engine working - message event complete for messageId 15011 Read sync status for 64 records
    20:56:25.448 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732344273800
    20:56:25.448 Engine working - message event complete for messageId 15011 Read sync status for 65 records
    20:56:25.448 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732364273800
    20:56:25.448 Engine working - message event complete for messageId 15011 Read sync status for 66 records
    20:56:25.448 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732384273800
    20:56:25.458 Engine working - message event complete for messageId 15011 Read sync status for 67 records
    20:56:25.458 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E95827323A4273800
    20:56:25.458 Engine working - message event complete for messageId 15011 Read sync status for 68 records
    20:56:25.458 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E95827323C4273800
    20:56:25.458 Engine working - message event complete for messageId 15011 Read sync status for 69 records
    20:56:25.458 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E95827323E4273800
    20:56:25.458 Engine working - message event complete for messageId 15011 Read sync status for 70 records
    20:56:25.458 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732304283800
    20:56:25.458 Engine working - message event complete for messageId 15011 Read sync status for 71 records
    20:56:25.458 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732324283800
    20:56:25.458 Engine working - message event complete for messageId 15011 Read sync status for 72 records
    20:56:25.458 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E9582732344283800
    20:56:25.468 Engine working - message event complete for messageId 15011 Read sync status for 73 records
    20:56:25.468 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E9582732364283800
    20:56:25.468 Engine working - message event complete for messageId 15011 Read sync status for 74 records
    20:56:25.468 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E9582732384283800
    20:56:25.468 Engine working - message event complete for messageId 15011 Read sync status for 75 records
    20:56:25.468 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E95827323A4283800
    20:56:25.468 Engine working - message event complete for messageId 15011 Read sync status for 76 records
    20:56:25.468 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E95827323C4283800
    20:56:25.468 Engine working - message event complete for messageId 15011 Read sync status for 77 records
    20:56:25.468 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E95827323E4283800
    20:56:25.468 Engine working - message event complete for messageId 15011 Read sync status for 78 records
    20:56:25.468 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732304293800
    20:56:25.478 Engine working - message event complete for messageId 15011 Read sync status for 79 records
    20:56:25.478 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732324293800
    20:56:25.478 Engine working - message event complete for messageId 15011 Read sync status for 80 records
    20:56:25.478 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732344293800
    20:56:25.478 Engine working - message event complete for messageId 15011 Read sync status for 81 records
    20:56:25.478 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732364293800
    20:56:25.488 Engine working - message event complete for messageId 15011 Read sync status for 82 records
    20:56:25.488 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732384293800
    20:56:25.488 Engine working - message event complete for messageId 15011 Read sync status for 83 records
    20:56:25.488 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E95827323A4293800
    20:56:25.488 Engine working - message event complete for messageId 15011 Read sync status for 84 records
    20:56:25.488 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E95827323C4293800
    20:56:25.488 Engine working - message event complete for messageId 15011 Read sync status for 85 records
    20:56:25.488 ModInfo: From Translator: ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E95827323E4293800
    20:56:25.488 Engine working - message event complete for messageId 15011 Read sync status for 86 records
    20:56:25.488 ModInfo: From Translator: ModInfo = 2013/05/15 18:31:09, recId = 00000000E4E539086D19C24BAF84262E95827323442A3800
    20:56:25.498 Engine working - message event complete for messageId 15011 Read sync status for 87 records
    20:56:25.498 ModInfo: From Translator: ModInfo = 2013/05/15 19:58:54, recId = 00000000E4E539086D19C24BAF84262E95827323042B3800
    20:56:25.498 Engine working - message event complete for messageId 15011 Read sync status for 88 records
    20:56:25.498 Engine working - message event complete for messageId 13000
    20:56:25.498 Engine working - message event complete for messageId 15003 Read 1 records
    20:56:25.498 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:10, recId = 00000000E4E539086D19C24BAF84262E95827323441F3800
    20:56:25.498 ModInfo: original previous ModInfo is = 2013/05/15 17:46:10
    20:56:25.498 Engine working - message event complete for messageId 15003 Read 2 records
    20:56:25.498 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:10, recId = 00000000E4E539086D19C24BAF84262E95827323641F3800
    20:56:25.498 ModInfo: original previous ModInfo is = 2013/05/15 17:46:10
    20:56:25.508 Engine working - message event complete for messageId 15003 Read 3 records
    20:56:25.508 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323841F3800
    20:56:25.508 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.508 Engine working - message event complete for messageId 15003 Read 4 records
    20:56:25.508 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323A41F3800
    20:56:25.508 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.508 Engine working - message event complete for messageId 15003 Read 5 records
    20:56:25.508 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323C41F3800
    20:56:25.508 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.508 Engine working - message event complete for messageId 15003 Read 6 records
    20:56:25.508 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323E41F3800
    20:56:25.508 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.508 Engine working - message event complete for messageId 15003 Read 7 records
    20:56:25.508 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732304203800
    20:56:25.508 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.518 Engine working - message event complete for messageId 15003 Read 8 records
    20:56:25.518 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732324203800
    20:56:25.518 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.518 Engine working - message event complete for messageId 15003 Read 9 records
    20:56:25.518 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732344203800
    20:56:25.518 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.518 Engine working - message event complete for messageId 15003 Read 10 records
    20:56:25.518 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732364203800
    20:56:25.518 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.518 Engine working - message event complete for messageId 15003 Read 11 records
    20:56:25.518 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732384203800
    20:56:25.518 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.528 Engine working - message event complete for messageId 15003 Read 12 records
    20:56:25.528 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323A4203800
    20:56:25.528 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.528 Engine working - message event complete for messageId 15003 Read 13 records
    20:56:25.528 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323C4203800
    20:56:25.528 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.528 Engine working - message event complete for messageId 15003 Read 14 records
    20:56:25.528 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323E4203800
    20:56:25.528 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.528 Engine working - message event complete for messageId 15003 Read 15 records
    20:56:25.528 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732304213800
    20:56:25.528 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.538 Engine working - message event complete for messageId 15003 Read 16 records
    20:56:25.538 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732324213800
    20:56:25.538 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.538 Engine working - message event complete for messageId 15003 Read 17 records
    20:56:25.538 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732344213800
    20:56:25.538 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.538 Engine working - message event complete for messageId 15003 Read 18 records
    20:56:25.538 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732364213800
    20:56:25.538 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.538 Engine working - message event complete for messageId 15003 Read 19 records
    20:56:25.538 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E9582732384213800
    20:56:25.538 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.548 Engine working - message event complete for messageId 15003 Read 20 records
    20:56:25.548 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:11, recId = 00000000E4E539086D19C24BAF84262E95827323A4213800
    20:56:25.548 ModInfo: original previous ModInfo is = 2013/05/15 17:46:11
    20:56:25.548 Engine working - message event complete for messageId 15003 Read 21 records
    20:56:25.548 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323C4213800
    20:56:25.548 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.548 Engine working - message event complete for messageId 15003 Read 22 records
    20:56:25.548 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323E4213800
    20:56:25.548 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.548 Engine working - message event complete for messageId 15003 Read 23 records
    20:56:25.548 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732304223800
    20:56:25.548 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.558 Engine working - message event complete for messageId 15003 Read 24 records
    20:56:25.558 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732324223800
    20:56:25.558 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.558 Engine working - message event complete for messageId 15003 Read 25 records
    20:56:25.558 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732344223800
    20:56:25.558 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.558 Engine working - message event complete for messageId 15003 Read 26 records
    20:56:25.558 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732364223800
    20:56:25.558 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.568 Engine working - message event complete for messageId 15003 Read 27 records
    20:56:25.568 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732384223800
    20:56:25.568 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.568 Engine working - message event complete for messageId 15003 Read 28 records
    20:56:25.568 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323A4223800
    20:56:25.568 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.568 Engine working - message event complete for messageId 15003 Read 29 records
    20:56:25.568 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323C4223800
    20:56:25.568 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.568 Engine working - message event complete for messageId 15003 Read 30 records
    20:56:25.568 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323E4223800
    20:56:25.568 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.568 Engine working - message event complete for messageId 15003 Read 31 records
    20:56:25.568 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732304233800
    20:56:25.568 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.578 Engine working - message event complete for messageId 15003 Read 32 records
    20:56:25.578 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732324233800
    20:56:25.578 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.578 Engine working - message event complete for messageId 15003 Read 33 records
    20:56:25.578 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732344233800
    20:56:25.578 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.578 Engine working - message event complete for messageId 15003 Read 34 records
    20:56:25.578 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732364233800
    20:56:25.578 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.578 Engine working - message event complete for messageId 15003 Read 35 records
    20:56:25.588 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E9582732384233800
    20:56:25.588 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.588 Engine working - message event complete for messageId 15003 Read 36 records
    20:56:25.588 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323A4233800
    20:56:25.588 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.588 Engine working - message event complete for messageId 15003 Read 37 records
    20:56:25.588 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323C4233800
    20:56:25.588 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.588 Engine working - message event complete for messageId 15003 Read 38 records
    20:56:25.588 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:12, recId = 00000000E4E539086D19C24BAF84262E95827323E4233800
    20:56:25.588 ModInfo: original previous ModInfo is = 2013/05/15 17:46:12
    20:56:25.588 Engine working - message event complete for messageId 15003 Read 39 records
    20:56:25.588 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732304243800
    20:56:25.588 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.598 Engine working - message event complete for messageId 15003 Read 40 records
    20:56:25.598 ModInfo: untruncated previous ModInfo = 2013/05/15 19:16:28, recId = 00000000E4E539086D19C24BAF84262E9582732324243800
    20:56:25.598 ModInfo: original previous ModInfo is = 2013/05/15 19:16:28
    20:56:25.598 Engine working - message event complete for messageId 15003 Read 41 records
    20:56:25.598 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732344243800
    20:56:25.598 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.598 Engine working - message event complete for messageId 15003 Read 42 records
    20:56:25.598 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732364243800
    20:56:25.598 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.598 Engine working - message event complete for messageId 15003 Read 43 records
    20:56:25.598 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732384243800
    20:56:25.598 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.598 Engine working - message event complete for messageId 15003 Read 44 records
    20:56:25.598 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323A4243800
    20:56:25.598 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.608 Engine working - message event complete for messageId 15003 Read 45 records
    20:56:25.608 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323C4243800
    20:56:25.608 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.608 Engine working - message event complete for messageId 15003 Read 46 records
    20:56:25.608 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323E4243800
    20:56:25.608 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.608 Engine working - message event complete for messageId 15003 Read 47 records
    20:56:25.608 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732304253800
    20:56:25.608 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.608 Engine working - message event complete for messageId 15003 Read 48 records
    20:56:25.608 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732324253800
    20:56:25.608 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.608 Engine working - message event complete for messageId 15003 Read 49 records
    20:56:25.608 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732344253800
    20:56:25.608 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.608 Engine working - message event complete for messageId 15003 Read 50 records
    20:56:25.618 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732364253800
    20:56:25.618 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.618 Engine working - message event complete for messageId 15003 Read 51 records
    20:56:25.618 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732384253800
    20:56:25.618 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.618 Engine working - message event complete for messageId 15003 Read 52 records
    20:56:25.618 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323A4253800
    20:56:25.618 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.618 Engine working - message event complete for messageId 15003 Read 53 records
    20:56:25.618 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323C4253800
    20:56:25.618 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.618 Engine working - message event complete for messageId 15003 Read 54 records
    20:56:25.618 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323E4253800
    20:56:25.618 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.618 Engine working - message event complete for messageId 15003 Read 55 records
    20:56:25.618 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732304263800
    20:56:25.618 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.628 Engine working - message event complete for messageId 15003 Read 56 records
    20:56:25.628 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732324263800
    20:56:25.628 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.628 Engine working - message event complete for messageId 15003 Read 57 records
    20:56:25.628 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732344263800
    20:56:25.628 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.628 Engine working - message event complete for messageId 15003 Read 58 records
    20:56:25.628 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732364263800
    20:56:25.628 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.628 Engine working - message event complete for messageId 15003 Read 59 records
    20:56:25.628 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E9582732384263800
    20:56:25.628 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.628 Engine working - message event complete for messageId 15003 Read 60 records
    20:56:25.628 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323A4263800
    20:56:25.628 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.638 Engine working - message event complete for messageId 15003 Read 61 records
    20:56:25.638 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323C4263800
    20:56:25.638 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.638 Engine working - message event complete for messageId 15003 Read 62 records
    20:56:25.638 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:13, recId = 00000000E4E539086D19C24BAF84262E95827323E4263800
    20:56:25.638 ModInfo: original previous ModInfo is = 2013/05/15 17:46:13
    20:56:25.638 Engine working - message event complete for messageId 15003 Read 63 records
    20:56:25.638 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732304273800
    20:56:25.638 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.638 Engine working - message event complete for messageId 15003 Read 64 records
    20:56:25.638 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732324273800
    20:56:25.638 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.638 Engine working - message event complete for messageId 15003 Read 65 records
    20:56:25.638 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732344273800
    20:56:25.638 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.648 Engine working - message event complete for messageId 15003 Read 66 records
    20:56:25.648 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732364273800
    20:56:25.648 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.648 Engine working - message event complete for messageId 15003 Read 67 records
    20:56:25.648 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732384273800
    20:56:25.648 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.648 Engine working - message event complete for messageId 15003 Read 68 records
    20:56:25.648 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E95827323A4273800
    20:56:25.648 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.648 Engine working - message event complete for messageId 15003 Read 69 records
    20:56:25.648 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E95827323C4273800
    20:56:25.648 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.648 Engine working - message event complete for messageId 15003 Read 70 records
    20:56:25.648 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E95827323E4273800
    20:56:25.648 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.648 Engine working - message event complete for messageId 15003 Read 71 records
    20:56:25.648 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732304283800
    20:56:25.648 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.658 Engine working - message event complete for messageId 15003 Read 72 records
    20:56:25.658 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:14, recId = 00000000E4E539086D19C24BAF84262E9582732324283800
    20:56:25.658 ModInfo: original previous ModInfo is = 2013/05/15 17:46:14
    20:56:25.658 Engine working - message event complete for messageId 15003 Read 73 records
    20:56:25.658 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E9582732344283800
    20:56:25.658 ModInfo: original previous ModInfo is = 2013/05/15 17:46:58
    20:56:25.658 Engine working - message event complete for messageId 15003 Read 74 records
    20:56:25.658 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E9582732364283800
    20:56:25.658 ModInfo: original previous ModInfo is = 2013/05/15 17:46:58
    20:56:25.658 Engine working - message event complete for messageId 15003 Read 75 records
    20:56:25.658 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E9582732384283800
    20:56:25.658 ModInfo: original previous ModInfo is = 2013/05/15 17:46:58
    20:56:25.668 Engine working - message event complete for messageId 15003 Read 76 records
    20:56:25.668 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E95827323A4283800
    20:56:25.668 ModInfo: original previous ModInfo is = 2013/05/15 17:46:58
    20:56:25.668 Engine working - message event complete for messageId 15003 Read 77 records
    20:56:25.668 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E95827323C4283800
    20:56:25.668 ModInfo: original previous ModInfo is = 2013/05/15 17:46:58
    20:56:25.668 Engine working - message event complete for messageId 15003 Read 78 records
    20:56:25.668 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:58, recId = 00000000E4E539086D19C24BAF84262E95827323E4283800
    20:56:25.668 ModInfo: original previous ModInfo is = 2013/05/15 17:46:58
    20:56:25.668 Engine working - message event complete for messageId 15003 Read 79 records
    20:56:25.668 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732304293800
    20:56:25.668 ModInfo: original previous ModInfo is = 2013/05/15 17:46:59
    20:56:25.668 Engine working - message event complete for messageId 15003 Read 80 records
    20:56:25.668 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732324293800
    20:56:25.668 ModInfo: original previous ModInfo is = 2013/05/15 17:46:59
    20:56:25.678 Engine working - message event complete for messageId 15003 Read 81 records
    20:56:25.678 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732344293800
    20:56:25.678 ModInfo: original previous ModInfo is = 2013/05/15 17:46:59
    20:56:25.678 Engine working - message event complete for messageId 15003 Read 82 records
    20:56:25.678 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732364293800
    20:56:25.678 ModInfo: original previous ModInfo is = 2013/05/15 17:46:59
    20:56:25.678 Engine working - message event complete for messageId 15003 Read 83 records
    20:56:25.678 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E9582732384293800
    20:56:25.678 ModInfo: original previous ModInfo is = 2013/05/15 17:46:59
    20:56:25.678 Engine working - message event complete for messageId 15003 Read 84 records
    20:56:25.678 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E95827323A4293800
    20:56:25.678 ModInfo: original previous ModInfo is = 2013/05/15 17:46:59
    20:56:25.678 Engine working - message event complete for messageId 15003 Read 85 records
    20:56:25.678 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E95827323C4293800
    20:56:25.678 ModInfo: original previous ModInfo is = 2013/05/15 17:46:59
    20:56:25.678 Engine working - message event complete for messageId 15003 Read 86 records
    20:56:25.688 ModInfo: untruncated previous ModInfo = 2013/05/15 17:46:59, recId = 00000000E4E539086D19C24BAF84262E95827323E4293800
    20:56:25.688 ModInfo: original previous ModInfo is = 2013/05/15 17:46:59
    20:56:25.688 Engine working - message event complete for messageId 15003 Read 87 records
    20:56:25.688 ModInfo: untruncated previous ModInfo = 2013/05/15 18:31:09, recId = 00000000E4E539086D19C24BAF84262E95827323442A3800
    20:56:25.688 ModInfo: original previous ModInfo is = 2013/05/15 18:31:09
    20:56:25.688 Engine working - message event complete for messageId 15003 Read 88 records
    20:56:25.688 ModInfo: untruncated previous ModInfo = 2013/05/15 19:58:541043524122, recId = 00000000E4E539086D19C24BAF84262E95827323042B3800
    20:56:25.688 ModInfo: truncated previous ModInfo is = 2013/05/15 19:58:54
    20:56:25.698 Engine working - message event complete for messageId 13000
    20:56:25.698 Sync information for application 'Calendar' in translator 'BlackBerry' --
    20:56:25.698 Number of newly added records since last sync (New): 0
    20:56:25.698 Number of records modified since last sync (Modified): 0
    20:56:25.698 Number of records deleted since last sync (Deleted): 0
    20:56:25.698 Sync information for application 'Calendar' in translator 'Outlook' --
    20:56:25.698 Number of newly added records since last sync (New): 0
    20:56:25.698 Number of records modified since last sync (Modified): 0
    20:56:25.698 Number of records deleted since last sync (Deleted): 0
    20:56:25.698 Performing one-way sync
    20:56:25.698 Number of conflicting records : 0
    20:56:25.698 Number of 'Calendar' records to be deleted from 'BlackBerry': 0
    20:56:25.698 Number of 'Calendar' records to be deleted from 'Outlook': 0
    20:56:25.698 Engine working - message event complete for messageId 13000
    20:56:25.698 End Sync Status Check
    20:56:25.698 Ending Sync Status Checks
    20:56:25.698 Starting Conversions
    20:56:25.698 Engine working - message event complete for messageId 15001 Converting BlackBerry Calendar data
    20:56:25.708 Engine working - message event complete for messageId 15001 Converting Outlook Calendar data
    20:56:25.708 Engine working - message event complete for messageId 15001 Converting BlackBerry Calendar data
    20:56:25.708 Engine working - message event complete for messageId 15001 Converting Outlook Calendar data
    20:56:25.708 Engine working - message event complete for messageId 15001 Converting BlackBerry Calendar data
    20:56:25.708 Engine working - message event complete for messageId 15001 Converting Outlook Calendar data
    20:56:25.708 Engine working - message event complete for messageId 15001 Converting BlackBerry Calendar data
    20:56:25.708 Engine working - message event complete for messageId 15001 Converting Outlook Calendar data
    20:56:25.708 Engine working - message event complete for messageId 13000
    20:56:25.718 Ending Conversions
    20:56:25.718 Engine working - message event complete for messageId 15013 Preparing sync preview
    20:56:25.898 Engine working - message event complete for messageId 13000
    20:56:25.898 SyncPreviewContract::LoadRecords - Msg_ExplicitEmptyString
    20:56:25.898 SyncPreviewContract::LoadRecords - syncStatus ActionDbRecord loop
    20:56:25.898 SyncPreviewContract::LoadRecords - syncStatus MergeConflictDbRecord loop
    20:56:25.898 Engine working - message event complete for messageId 13000
    20:56:25.898 SyncPreviewContract::LoadRecords - Msg_ExplicitEmptyString
    20:56:25.908 SyncPreviewContract::LoadRecords - syncStatus ActionDbRecord loop
    20:56:25.908 SyncPreviewContract::LoadRecords - syncStatus MergeConflictDbRecord loop
    20:56:25.908 Engine waiting for user input - WPF message event raised for SyncPreview
    20:56:25.908 Engine working - message event complete for SyncPreviewEvent
    20:56:25.908 Starting Data Updates
    20:56:25.908 Engine working - message event complete for messageId 15002 Updating BlackBerry Calendar data
    20:56:25.908 Starting Status Update for BlackBerry Calendar
    20:56:25.908 Starting Match Order
    20:56:25.908 Ending Match Order
    20:56:25.908 Starting Merge
    20:56:25.908 Ending Merge
    20:56:25.908 Starting Source Translator DB Updates
    20:56:25.918 Ending Source Translator DB Updates
    20:56:25.918 Engine working - message event complete for messageId 15002 Updating Outlook Calendar data
    20:56:25.918 Starting Destination Translator DB Updates
    20:56:25.928 Ending Destination Translator DB Updates
    20:56:25.928 Start Source and Destination Status DB Updates
    20:56:25.928 End Source and Destination Status DB Updates
    20:56:25.928
    20:56:25.928 Sync Status of 'Calendar' after performing synchronization
    20:56:25.928 Synchronized 88 records in 'Calendar'.
    20:56:25.928 CSYNCSTATUS: Contract 65538 has src=0, dst=0 errors
    20:56:25.938 Engine working - message event complete for messageId 13000
    20:56:25.938 Engine working - message event complete for messageId 15014 Completing Synchronization Actions.
    20:56:25.938 Ending Status Update for BlackBerry Calendar
    20:56:25.968 Ending Data Updates
    20:56:25.988 Sync Engine Completed
     Screenshot

    Many thanks. I just spent a couple of hours waiting for Apple technician on the phone, and they said you need to upgrade to Outlook 2003. I do not know if it will still work if I do it, but I will try. What did they say to you on the phone.

  • Data transfer from sap r/3 into excel sheet for mi01

    hi gurus,
       as i  am a xi consultant i got requirement to write a program for data transfer from sap r/3 into excel sheet for MI01.can any body help me by giving sample code or example for this requirement.please help me.

    Hi Rohit,
    This is an upload program and it has used both function modules to upload from an excel to R3 and to download from R3 onto excel.
    GUI_UPLOAD
    GUI_DOWNLOAD
    are the function modules used.
    Hope this helps,
    *Output:        Downloads error records onto presentation server,
    *               Displays report with number of success and error records
    REPORT ZMCG047CONTR NO STANDARD PAGE HEADING
                                   LINE-SIZE 255
                                   MESSAGE-ID ZM.
    *&       Table declarations
    TABLES : T001W,     "Plants/Branches
             T024E,     "Purchasing Organizations
             T001.      "Company Codes
    *              TYPE-POOLS  DECLARATION
    TYPE-POOLS : SLIS.
    *                       Types  Declaration                            *
    TYPES: BEGIN OF T_RECORD,    "record storing contract info
            LIFNR(010),      "Vendor Number
            EVART(004),      "Agreement Type
            EKORG(004),      "Purchasing Organization
            EKGRP(003),      "Purchasing Group
            WERKS(004),      "Plant
            LGORT(004),      "Storage Location
            KDATB(010),      "Valid start Date
            KDATE(010),      "Valid End Date
            ZTERM(004),      "Payment Terms
            KTWRT(020),      "Target Value
            EPSTP(001),      "Item Category
            EMATN(018),      "Material Number
            KTMNG(017),      "Target Quantity
            NETPR(014),      "Net Price
            PEINH(006),      "Net Price Unit
            BPRME(003),      "Net Price Order Price Unit
            IDNLF(035),      "Vendor Material number
            WEBRE(001),      "GR Based-IV
            MEPRF(001),      "Pricing Date Category
            LTEX1(040),      "Info Text
            DATAB(010),      "Valid From
            DATBI(010),      "Valid To
            KSCHL(004),      "Condition Type
            KBETR(016),      "Condition Rate if scale is not given
            KONWA(005),      "Currency
            KPEIN(005),      "Condition Pricing Unit
            KMEIN(003),      "Condition Unit of Measure
            KSTBM(019),      "Scale
            KBETR_01(016),   "Scale Rate
            DEL_FLAG,        "Delete Flag Indicator
            ERR_MSG(100),    "Error Message
          END OF T_RECORD,
          BEGIN OF T_ERR_RECORD,   "to have error records stored
             LIFNR(010),      "Vendor Number
             EVART(004),      "Agreement Type
             EKORG(004),      "Purchasing Organization
             EKGRP(003),      "Purchasing Group
             WERKS(004),      "Plant
             LGORT(004),      "Storage Location
             KDATB(010),      "Valid start Date
             KDATE(010),      "Valid End Date
             ZTERM(004),      "Payment Terms
             KTWRT(020),      "Target Value
             EPSTP(001),      "Item Category
             EMATN(018),      "Material Number
             KTMNG(017),      "Target Quantity
             NETPR(014),      "Net Price
             PEINH(006),      "Net Price Unit
             BPRME(003),      "Net Price Order Price Unit
             IDNLF(035),      "Vendor Material number
             WEBRE(001),      "GR Based-IV
             MEPRF(001),      "Pricing Date Category
             LTEX1(040),      "Info Text
             DATAB(010),      "Valid From
             DATBI(010),      "Valid To
             KSCHL(004),      "Condition Type
             KBETR(016),      "Condition Rate if scale is not given
             KONWA(005),      "Currency
             KPEIN(005),      "Condition Pricing Unit
             KMEIN(003),      "Condition Unit of Measure
             KSTBM(019),      "Scale
             KBETR_01(016),   "Scale Rate
             DEL_FLAG,        "Delete Flag Indicator
             ERR_MSG(100),    "Error Message
          END OF T_ERR_RECORD,
          BEGIN OF T_LOEKZ,    "To have deletion indicators for materials
              LOEKZ(001),    "Deletion indicator in purchasing document
              EMATN(018),    "Material Number
              WERKS(004),    "Plant
              LGORT(004),    "Storage Location
              BSTYP(001),    "Purchasing document category
          END OF T_LOEKZ,
          BEGIN OF T_MATNR,  " Type definition to store details of materials
               MATNR(018),    "Material Number
          END OF T_MATNR,
          BEGIN OF T_T001,   " Type definition for company codes
              BUKRS(004),    " Company Code
          END OF T_T001,
          BEGIN OF T_ZMVXREF,   "Cross-Reference table type
              D_ALTKN(10),      "Legacy Vendor Number
              D_BUKRS(4),       "Legacy Company Code
              M_ALTKN(10),      "SAP Company Code
          END OF T_ZMVXREF,
          BEGIN OF T_LFA1,    "Master data of vendors
              LIFNR(10),      "Vendor Number
          END OF T_LFA1,
    *  Type Declaration for T024E (Company Codes)
           BEGIN OF T_T024E,
             EKORG   LIKE   T024E-EKORG,     "Purchasing organization
             BUKRS   LIKE   T024E-BUKRS,     "Company Code
           END OF T_T024E,
    *  Type Declaration for t001w (Plant)
           BEGIN OF T_T001W,
             WERKS  LIKE  T001W-WERKS,            "Plant
           END OF T_T001W,
    *  Type Declatation for String Line
           BEGIN OF T_STR1,                                     "#EC NEEDED
             SLINE(6000) TYPE C,
           END OF T_STR1.
    TYPES:  BEGIN OF T_BDCDATA.  "BDC Data
            INCLUDE STRUCTURE BDCDATA.
    TYPES:  END OF T_BDCDATA.
    *       Internal Tables  Declaration                                  *
    DATA:
    *      Internal table to store input file data
           I_RECORD TYPE STANDARD TABLE OF T_RECORD INITIAL SIZE 0,
    *      Internal table to capture errors
           I_ERR_REC TYPE STANDARD TABLE OF T_ERR_RECORD INITIAL SIZE 0,
    *      Internal table to check for deletion indicators
           I_LOEKZ TYPE STANDARD TABLE OF T_LOEKZ INITIAL SIZE 0,
    *      Internal table to check for material numbers
           I_MATNR TYPE STANDARD TABLE OF T_MATNR INITIAL SIZE 0,
    *      Internal table used for storing Cross-Reference data of Vendor
           I_ZMVXREF TYPE STANDARD TABLE OF T_ZMVXREF INITIAL SIZE 0,
    *      Internal table for holding Vendor Numbers from Master table
           I_LFA1 TYPE STANDARD TABLE OF T_LFA1 INITIAL SIZE 0,
    *      Internal table for holding Purchase Org and Company Codes
           I_T024E TYPE STANDARD TABLE OF T_T024E INITIAL SIZE 0,
    *      Internal table for holding Plants
           I_T001W TYPE STANDARD TABLE OF T_T001W INITIAL SIZE 0,
    *      Internal table for storing a list of Company Codes
           I_T001 TYPE STANDARD TABLE OF T_T001 INITIAL SIZE 0,
    *      Internal table used for ALV Reporting
           I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    *      Internal table used for holding List Header
           I_LISTHEADER TYPE SLIS_T_LISTHEADER,    "EC NEEDED
    *      Internal table to hold ALV Event
           I_ALV_EVENT TYPE SLIS_T_EVENT,
    *      Internal table to hold Sort Info for ALV Report
           I_SORT TYPE SLIS_T_SORTINFO_ALV,
    *      Internal table for BDC Data
           I_BDCDATA TYPE STANDARD TABLE OF T_BDCDATA INITIAL SIZE 0,
    *      Internal table for messages
           I_MESSTAB TYPE TABLE OF BDCMSGCOLL,
    *      Internal table for String line
           I_STR1 TYPE STANDARD TABLE OF T_STR1 INITIAL SIZE 0.
    *       Work Area Declaration                                         *
    DATA:
    *  Work Area to hold data for the Open Contract
          WA_RECORD TYPE T_RECORD,
    *  Work Area to hold previous record data
          WA_RECORDPREV TYPE T_RECORD,
    *  Work Area to hold errors
          WA_ERR_REC TYPE T_ERR_RECORD,
    *  Work Area to hold the Deletion Indicator of materials
          WA_LOEKZ TYPE T_LOEKZ,
    *  Work Area to hold Material numbers of required materials
          WA_MATNR TYPE T_MATNR,      "EC NEEDED
    *  Work Area to hold errors occured while performing BDC
          WA_MESSTAB TYPE BDCMSGCOLL,
    *  Work Area to hold field catalog for ALV Reports
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    *  Work Area to hold list header data for ALV reports
          WA_LISTHEADER TYPE SLIS_LISTHEADER,
    *  Work Area to hold ALV Event
          WA_ALV_EVENT LIKE LINE OF I_ALV_EVENT,  "EC NEEDED
    *  Work Area to hold Layout of ALV Report
          WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
    *  Work Area to hold Cross-Reference data of Vendor
          WA_ZMVXREF TYPE T_ZMVXREF,
    *  Work Area to hold Vendor Numbers from Master table
          WA_LFA1 TYPE T_LFA1,    "EC NEEDED
    *  Work Area to hold Purchase Org and Company Codes
          WA_T024E TYPE T_T024E,
    *  Work Area to hold Company Codes
          WA_T001 TYPE T_T001,
    *  Work Area to hold Plants
          WA_T001W TYPE T_T001W,
    *  Work Area to hold Sort Info for ALV Report
          WA_SORT TYPE SLIS_SORTINFO_ALV,
    *  Work Area to hold BDC Data
          WA_BDCDATA TYPE T_BDCDATA,
    *  Work Area for String line
          WA_STR1 TYPE T_STR1.
    *       Variables  Declaration                                        *
    DATA: V_ERRMSG(500),           "To temporarily store the error message
          V_CONV_DATE(10) TYPE C,  "To capture the converted date format
          V_DATE LIKE SY-DATUM,
          V_REPID LIKE SY-REPID,   "holds report id
          V_CROSS_REFERENCE_ERROR TYPE I,  " cross-reference error
          V_INPUTERROR_FLAG VALUE '',      " input error status
          V_FILENAME TYPE STRING,          " File Name
          VEN_FLAG(1),                       " at new status
          MAT_FLAG(1),                      " at new status
          V_IND(2) TYPE N,                 " index of table control
          V_IND2(2) TYPE N,                " index of table control
          V_IND3(2) TYPE N,                " index of table control
          V_EVRTP1(20),
          V_EPSTP1(20),
          V_EMATN1(20),
          V_KTMNG1(20),
          V_NETPR1(20),
          V_PEINH1(20),
          V_BPRME1(20),
          V_TCSELFLAG1(20),
          V_KSCHL2(20),
          V_KBETR2(20),
          V_KONWA2(20),
          V_KPEIN2(20),
          V_KMEIN2(20),
          V_SELKZ2(20),
          V_KBETR3(20),
          V_KSTBM3(20),
          V_LINE TYPE I,
          V_STR TYPE X VALUE '09',
          V_EXIST TYPE C,
          V_EXIST1 TYPE C,
          V_ISDIR TYPE C,
          V_ISDIR1 TYPE C.
    *       Constants  Declaration                                        *
    CONSTANTS: C_TCODE(5) VALUE 'ME31K', "Trx code - Open Contract Creation
               C_TRUE     VALUE 'X',       " Del_Flag indicator
               C_LOEKZ_MARKED VALUE 'X',   "Deletion indicator for material
               C_INPUTERROR_FLAG_YES VALUE 'X',  "Input File Indicator
               C_VEN_ERR1 VALUE 1,    "Error Indicator
               C_16(2)    VALUE '16',
               C_VEN_ERR2 VALUE 2,    "Error Indicator
               C_VEN_ERR3 VALUE 3,    "Error Indicator
               C_VEN_SUCS VALUE 0,    "Success Indicator
               C_SUCCESS  LIKE SY-SUBRC VALUE '0',
               C_STRUE    VALUE 'S',  "Del_flag for SAP Errors
               C_YTRUE    VALUE 'Y',  "Del_flag for Success Records
               C_MSGTYP_E VALUE 'E',  "holds error message type
               C_MSGTYP_S VALUE 'S',  "holds success message type
               C_BSTYP    VALUE 'K',  "Purchasing Document type is Contract
               C_BACKGROUND VALUE 'N', "Background mode
               C_FOREGROUND VALUE 'A', "All Screen mode
               C_ERRORS   VALUE 'E',   "Error screen mode
               C_WK(2)    VALUE 'WK'. "Value Contract
    *        Selection Screen                                             *
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-033.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS:
    *              Plant
                   S_WERKS FOR T001W-WERKS OBLIGATORY,
    *              Purchase Organization
                   S_EKORG FOR T024E-EKORG OBLIGATORY.
    *              Company Code
    PARAMETER      P_BUKRS LIKE T001-BUKRS OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 3.
    PARAMETER RB_SERVE RADIOBUTTON GROUP RBX DEFAULT 'X' USER-COMMAND U1.
    SELECTION-SCREEN COMMENT 6(19)  TEXT-036.
    SELECTION-SCREEN POSITION 37.
    PARAMETER RB_LOCAL RADIOBUTTON GROUP RBX.
    SELECTION-SCREEN COMMENT 40(13) TEXT-035.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    PARAMETERS:
    *    Parameter holding Input File name
              P_FILE LIKE RLGRAP-FILENAME
                     OBLIGATORY
                     LOWER CASE
                     DEFAULT 'C:\'
                     MODIF ID G1,
              P_FILE1 LIKE RLGRAP-FILENAME
                      OBLIGATORY
                      LOWER CASE
                      DEFAULT '/celestica/interface/corp/in/work/'
                      MODIF ID G2,
    *    Parameter specifying Mode of calling the Transaction.
              P_MODE DEFAULT 'N' OBLIGATORY,
    *    Check box used to test the input file.
              P_TEST AS CHECKBOX DEFAULT 'X',
    *    Parameter holding Filename for holding Input File Errors
              P_IPERR LIKE RLGRAP-FILENAME
                      OBLIGATORY
                      LOWER CASE
                      DEFAULT 'C:\'
                      MODIF ID G1,
              P_IPERR1 LIKE RLGRAP-FILENAME
                     OBLIGATORY
                     LOWER CASE
                     DEFAULT '/celestica/interface/corp/in/work/047_Err.txt'
                     MODIF ID G2.
    SELECTION-SCREEN END OF BLOCK B2.
    *        AT Selection Screen  Events                                  *
    *  Loop the screen to activate relative paths
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF RB_SERVE = C_TRUE AND SCREEN-GROUP1 = 'G1'.
          SCREEN-OUTPUT = 0.
          SCREEN-ACTIVE = 0.
          SCREEN-INPUT = 0.
        ELSEIF RB_LOCAL = C_TRUE AND SCREEN-GROUP1 = 'G2'.
          SCREEN-OUTPUT = 0.
          SCREEN-ACTIVE = 0.
          SCREEN-INPUT = 0.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN ON BLOCK B2.
    *  Checking Access Authorization for the user
      CALL FUNCTION 'ZU_DATA_ACCESS_AUTH_CHECK'
           EXPORTING
                ACTVT        = C_16
                P_BUKRS      = P_BUKRS
           TABLES
                S_WERKS      = S_WERKS
                S_EKORG      = S_EKORG
           EXCEPTIONS
                BUKRS_FAILED = 1
                VKORG_FAILED = 2
                VTWEG_FAILED = 3
                EKORG_FAILED = 4
                WERKS_FAILED = 5
                LGNUM_FAILED = 6
                OTHERS       = 7.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    AT SELECTION-SCREEN ON P_BUKRS.
      IF NOT P_BUKRS IS INITIAL.
        SELECT SINGLE BUKRS INTO T001
                            FROM T001
                            WHERE BUKRS EQ P_BUKRS.
        IF SY-SUBRC NE 0.
          MESSAGE I000 WITH TEXT-089.
          STOP.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    * Search Help to select Input File path.
      PERFORM GET_FILE_NAME USING P_FILE.
    * Check for the existence of the file.
      IF RB_LOCAL EQ C_TRUE.
        CALL FUNCTION 'TMP_GUI_GET_FILE_EXIST'
             EXPORTING
                  FNAME          = P_FILE
             IMPORTING
                  EXIST          = V_EXIST
                  ISDIR          = V_ISDIR
             EXCEPTIONS
                  FILEINFO_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.
        IF V_ISDIR IS INITIAL.
          IF V_EXIST IS INITIAL.
            MESSAGE I000 WITH TEXT-018.
            STOP.
          ENDIF.
        ELSEIF V_ISDIR EQ C_TRUE.
          MESSAGE I000 WITH TEXT-068.
          STOP.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_IPERR.
    * Search Help to select Input Error File path.
      PERFORM GET_FILE_NAME USING P_IPERR.
    AT SELECTION-SCREEN.
    * Validate Transaction Mode
      IF  P_MODE <> C_BACKGROUND AND
          P_MODE <> C_FOREGROUND AND
          P_MODE <> C_ERRORS.
        MESSAGE I000 WITH TEXT-034.
        STOP.
      ENDIF.
    START-OF-SELECTION.
    * Get the Input File Data
      V_FILENAME = P_FILE.
      PERFORM UPLOAD_FLATFILE_DATA TABLES I_RECORD
                                   USING V_FILENAME.
    * Sorting the data by all fields
      SORT I_RECORD.
    * Ensuring the padding of the empty spaces before the vendor No
      CLEAR WA_RECORD.
      LOOP AT I_RECORD INTO WA_RECORD.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  INPUT  = WA_RECORD-LIFNR
             IMPORTING
                  OUTPUT = WA_RECORD-LIFNR.
        MODIFY I_RECORD FROM WA_RECORD
                        INDEX SY-TABIX
                        TRANSPORTING LIFNR.
        CLEAR WA_RECORD.
      ENDLOOP.
    * Input file validation
      PERFORM VALIDATE_FLATFILE_DATA.
      IF P_TEST = C_TRUE.
        IF I_ERR_REC[] IS INITIAL.
          MESSAGE I000 WITH TEXT-032.
          STOP.
        ELSE.
    *  Display all the error records at the input level.
          PERFORM DISPLAY_INPERR_RECORDS.
    *  Download Error File
          PERFORM DOWNLOAD_ERROR_FILE.
        ENDIF.
      ELSE.
    * Build BDC Data
        PERFORM BUILD_BDC_DATA.
    * Download Error File
        PERFORM DOWNLOAD_ERROR_FILE.
    * Display the status report.
        PERFORM DISPLAY_PROCESSED_RECORDS.
      ENDIF.
    END-OF-SELECTION.
      REFRESH:  I_RECORD,
                I_ERR_REC,
                I_LOEKZ,
                I_MATNR,
                I_ZMVXREF,
                I_LFA1,
                I_T024E,
                I_FIELDCAT,
                I_LISTHEADER,
                I_ALV_EVENT,
                I_SORT,
                I_BDCDATA,
                I_MESSTAB,
                I_STR1.
      FREE: I_RECORD,
            I_ERR_REC,
            I_LOEKZ,
            I_MATNR,
            I_ZMVXREF,
            I_LFA1,
            I_T024E,
            I_FIELDCAT,
            I_LISTHEADER,
            I_ALV_EVENT,
            I_SORT,
            I_BDCDATA,
            I_MESSTAB,
            I_STR1.
    *&      Form  GET_file_name
    *       Fetches the file and path from the presentation system
    *  -->  p1        Path along with the file name
    FORM GET_FILE_NAME USING L_FILE LIKE RLGRAP-FILENAME.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                MASK             = ',*.TXT,*.txt.'
                MODE             = 'O'
                TITLE            = TEXT-011
           IMPORTING
                FILENAME         = L_FILE
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
      CASE SY-SUBRC.
        WHEN 1.
          MESSAGE I000 WITH TEXT-084.
          STOP.
        WHEN 2.
          MESSAGE I000 WITH TEXT-085.
          STOP.
        WHEN 3.
          MESSAGE I000 WITH TEXT-086.
          STOP.
        WHEN 4.
          MESSAGE I000 WITH TEXT-087.
          STOP.
      ENDCASE.
    ENDFORM.                    " GET_file_name
    *&      Form  upload_flatfile_data
    *       Uploading data from Flat File
    FORM UPLOAD_FLATFILE_DATA
                          TABLES I_L_RECORD STRUCTURE WA_RECORD
                          USING L_FILENAME TYPE STRING.
      DATA WA_L_RECORD TYPE T_RECORD.
    * Upload the Flat file data
      IF RB_LOCAL EQ C_TRUE. "File is on the Local System
        CALL FUNCTION 'GUI_UPLOAD'
             EXPORTING
                  FILENAME                = L_FILENAME
                  FILETYPE                = 'ASC'
                  HAS_FIELD_SEPARATOR     = 'X'
             TABLES
                  DATA_TAB                = I_L_RECORD
             EXCEPTIONS
                  FILE_OPEN_ERROR         = 1
                  FILE_READ_ERROR         = 2
                  NO_BATCH                = 3
                  GUI_REFUSE_FILETRANSFER = 4
                  INVALID_TYPE            = 5
                  NO_AUTHORITY            = 6
                  UNKNOWN_ERROR           = 7
                  BAD_DATA_FORMAT         = 8
                  HEADER_NOT_ALLOWED      = 9
                  SEPARATOR_NOT_ALLOWED   = 10
                  HEADER_TOO_LONG         = 11
                  UNKNOWN_DP_ERROR        = 12
                  ACCESS_DENIED           = 13
                  DP_OUT_OF_MEMORY        = 14
                  DISK_FULL               = 15
                  DP_TIMEOUT              = 16
                  OTHERS                  = 17.
        CASE SY-SUBRC.
          WHEN 0.
            DESCRIBE TABLE I_L_RECORD LINES V_LINE.
            IF V_LINE EQ 0.
              MESSAGE I000 WITH TEXT-065.
              STOP.
            ENDIF.
          WHEN 1.
            MESSAGE I000 WITH TEXT-068.
            STOP.
          WHEN 2.
            MESSAGE I000 WITH TEXT-069.
            STOP.
          WHEN 3.
            MESSAGE I000 WITH TEXT-070.
            STOP.
          WHEN 4.
            MESSAGE I000 WITH TEXT-071.
            STOP.
          WHEN 5.
            MESSAGE I000 WITH TEXT-072.
            STOP.
          WHEN 6.
            MESSAGE I000 WITH TEXT-073.
            STOP.
          WHEN 7.
            MESSAGE I000 WITH TEXT-074.
            STOP.
          WHEN 8.
            MESSAGE I000 WITH TEXT-075.
            STOP.
          WHEN 9.
            MESSAGE I000 WITH TEXT-076.
            STOP.
          WHEN 10.
            MESSAGE I000 WITH TEXT-077.
            STOP.
          WHEN 11.
            MESSAGE I000 WITH TEXT-078.
            STOP.
          WHEN 12.
            MESSAGE I000 WITH TEXT-079.
            STOP.
          WHEN 13.
            MESSAGE I000 WITH TEXT-080.
            STOP.
          WHEN 14.
            MESSAGE I000 WITH TEXT-081.
            STOP.
          WHEN 15.
            MESSAGE I000 WITH TEXT-082.
            STOP.
          WHEN 16.
            MESSAGE I000 WITH TEXT-083.
            STOP.
        ENDCASE.
        CLEAR V_LINE.
      ELSEIF RB_SERVE EQ C_TRUE. "File is on the Application Server
        P_MODE = C_BACKGROUND.
        OPEN DATASET P_FILE1 FOR INPUT IN TEXT MODE.
        CHECK SY-SUBRC EQ C_SUCCESS.
        CLEAR WA_STR1.
        DO.
          READ DATASET P_FILE1 INTO WA_STR1.
          IF SY-SUBRC <> 0.      " NE SUCCESS.
            EXIT.
          ELSEIF SY-SUBRC EQ C_SUCCESS.
            APPEND WA_STR1 TO I_STR1.
            CLEAR WA_STR1.
          ENDIF.                  " ENDIF on SY-SUBRC 0 Check.
        ENDDO.                    " ENDDO
        DELETE I_STR1 WHERE SLINE EQ ' '.
        DESCRIBE TABLE I_STR1 LINES V_LINE.
        IF V_LINE EQ 0.
          MESSAGE S000 WITH TEXT-065.
          STOP.
        ENDIF.
        LOOP AT I_STR1 INTO WA_STR1.
          CLEAR: WA_L_RECORD.
          SPLIT WA_STR1-SLINE AT V_STR
          INTO WA_L_RECORD-LIFNR
               WA_L_RECORD-EVART
               WA_L_RECORD-EKORG
               WA_L_RECORD-EKGRP
               WA_L_RECORD-WERKS
               WA_L_RECORD-LGORT
               WA_L_RECORD-KDATB
               WA_L_RECORD-KDATE
               WA_L_RECORD-ZTERM
               WA_L_RECORD-KTWRT
               WA_L_RECORD-EPSTP
               WA_L_RECORD-EMATN
               WA_L_RECORD-KTMNG
               WA_L_RECORD-NETPR
               WA_L_RECORD-PEINH
               WA_L_RECORD-BPRME
               WA_L_RECORD-IDNLF
               WA_L_RECORD-WEBRE
               WA_L_RECORD-MEPRF
               WA_L_RECORD-LTEX1
               WA_L_RECORD-DATAB
               WA_L_RECORD-DATBI
               WA_L_RECORD-KSCHL
               WA_L_RECORD-KBETR
               WA_L_RECORD-KONWA
               WA_L_RECORD-KPEIN
               WA_L_RECORD-KMEIN
               WA_L_RECORD-KSTBM
               WA_L_RECORD-KBETR_01
               WA_L_RECORD-DEL_FLAG
               WA_L_RECORD-ERR_MSG.
          APPEND WA_L_RECORD TO I_L_RECORD.
          CLEAR: WA_L_RECORD,
                  WA_STR1.
        ENDLOOP.
        REFRESH I_STR1.
        CLOSE DATASET P_FILE1.
      ENDIF.
    ENDFORM.
    *&      Form  BDC_DYNPRO
    *       Data populated into i_bdcdata table for program
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-PROGRAM  = PROGRAM.
      WA_BDCDATA-DYNPRO   = DYNPRO.
      WA_BDCDATA-DYNBEGIN = C_TRUE.
      APPEND WA_BDCDATA TO I_BDCDATA.
    ENDFORM.
    *&      Form  BDC_FIELD
    *       Data populated into i_bdcdata table for fields
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO I_BDCDATA.
    ENDFORM.
    *&      Form  convert_date
    *       Converting the data from the file format to mm/dd/yyyy format
    *      <--P_wa_record_kdatb  Source Date
    *      <--p_l_conv_date      Target Date
    FORM CONVERT_DATE USING L_DATE
                            L_TAR_DATE.
      CONCATENATE L_DATE+0(2)
                  L_DATE+3(2)
                  L_DATE+6(4)
                  INTO L_TAR_DATE.
    ENDFORM.                    " convert_date
    *&      Form  validate_flatfile_data
    *       Validating the input file
    FORM VALIDATE_FLATFILE_DATA.
      DATA: L_TODAY LIKE SY-DATUM,
            L_STARTDATE_C LIKE SY-DATUM,
            L_ENDDATE_C LIKE SY-DATUM,
            L_ENDDATE_C1 LIKE SY-DATUM,
            L_STARTDATE_C1 LIKE SY-DATUM,
            L_STARTDATE(8),
            L_ENDDATE(8).
    * Fetch indicator for all records on the material, plant & storage
    * location combination.
      IF NOT I_RECORD[] IS INITIAL.
        REFRESH I_LOEKZ.
        SELECT EMATN            " Material Number
               WERKS            " Plant
               LGORT            " Storage Location
               BSTYP            " Purchasing Document Category
               LOEKZ            " Deletion indicator
          INTO TABLE I_LOEKZ
          FROM EKPO
          FOR ALL ENTRIES IN I_RECORD
          WHERE EMATN = I_RECORD-EMATN
            AND WERKS = I_RECORD-WERKS
            AND LGORT = I_RECORD-LGORT
            AND BSTYP = C_BSTYP
            AND LOEKZ = C_LOEKZ_MARKED.
        IF SY-SUBRC EQ 0.
          SORT I_LOEKZ BY EMATN WERKS LGORT BSTYP LOEKZ.
        ENDIF.
    * Fetching Plants for all entries in the selection screen
        REFRESH I_T001W.
        SELECT WERKS  "Plant
            INTO TABLE I_T001W
            FROM T001W
            WHERE WERKS IN S_WERKS.
        IF SY-SUBRC EQ 0.
          SORT I_T001W BY WERKS.
        ENDIF.
    * Fetching materials for the plants listed in flat file
        REFRESH I_MATNR.
        SELECT MATNR          " Material Number
          INTO TABLE I_MATNR
          FROM MARC
          FOR ALL ENTRIES IN I_RECORD
          WHERE WERKS = I_RECORD-WERKS.
        IF SY-SUBRC EQ 0.
          SORT I_MATNR BY MATNR.
        ENDIF.
    * Fetching Company Codes for repective Purchase Organizations
        REFRESH I_T024E.
        SELECT EKORG       "  Purchase Organization
               BUKRS       "  Company Code
            INTO TABLE I_T024E
            FROM T024E
            WHERE EKORG IN S_EKORG.
        IF SY-SUBRC EQ 0.
          SORT I_T024E BY EKORG.
        ENDIF.
    * Fetching SAP Data using Legacy Data.
        REFRESH I_ZMVXREF.
        SELECT D_ALTKN
               D_BUKRS
               M_ALTKN
            INTO TABLE I_ZMVXREF
            FROM ZMVXREF
            FOR ALL ENTRIES IN I_RECORD
            WHERE D_ALTKN = I_RECORD-LIFNR.
        IF SY-SUBRC EQ 0.
          SORT I_ZMVXREF BY D_ALTKN D_BUKRS.
        ENDIF.
    * Fetching Vendors from LFA1
        IF NOT I_ZMVXREF[] IS INITIAL.
          REFRESH I_LFA1.
          SELECT LIFNR
             INTO TABLE I_LFA1
             FROM LFA1
             FOR ALL ENTRIES IN I_ZMVXREF
             WHERE LIFNR = I_ZMVXREF-M_ALTKN.
          IF SY-SUBRC EQ 0.
            SORT I_LFA1 BY LIFNR.
          ENDIF.
        ENDIF.
    * Start Validating the flat file
        CLEAR: WA_RECORD,
               WA_T024E,
               WA_ZMVXREF,
               WA_LFA1,
               WA_LOEKZ,
               WA_MATNR.
        LOOP AT I_RECORD INTO WA_RECORD.
          L_TODAY = SY-DATUM.
          L_STARTDATE = WA_RECORD-KDATB.
          L_ENDDATE = WA_RECORD-KDATE.
          IF WA_RECORD-DEL_FLAG IS INITIAL.
            READ TABLE I_T001W INTO WA_T001W
                               WITH KEY WERKS = WA_RECORD-WERKS
                               BINARY SEARCH.
            IF SY-SUBRC EQ 0.
    *   Cross-Reference check performed for the given Vendors
              READ TABLE I_T024E INTO WA_T024E
                                 WITH KEY EKORG = WA_RECORD-EKORG
                                 BINARY SEARCH.
              IF SY-SUBRC NE 0.
                V_CROSS_REFERENCE_ERROR = C_VEN_ERR3.
              ELSE.
                READ TABLE I_ZMVXREF INTO WA_ZMVXREF
                            WITH KEY D_ALTKN = WA_RECORD-LIFNR
                                     D_BUKRS = P_BUKRS
                            BINARY SEARCH.
                IF SY-SUBRC EQ 0.
                  READ TABLE I_LFA1 INTO WA_LFA1
                             WITH KEY LIFNR = WA_ZMVXREF-M_ALTKN
                             BINARY SEARCH.
                  IF SY-SUBRC EQ 0.
                    V_CROSS_REFERENCE_ERROR = C_VEN_SUCS.
                  ELSE.
                    V_CROSS_REFERENCE_ERROR = C_VEN_ERR2.
                  ENDIF.
                ELSE.
                  V_CROSS_REFERENCE_ERROR = C_VEN_ERR1.
                ENDIF.
              ENDIF.
    * Legacy Vendor could not be mapped
              IF V_CROSS_REFERENCE_ERROR EQ C_VEN_ERR1.
            V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES. "Inp.file err. occurd
                WA_RECORD-DEL_FLAG = C_TRUE.
                WA_RECORD-ERR_MSG = TEXT-007.
                MODIFY I_RECORD FROM WA_RECORD
                                TRANSPORTING DEL_FLAG
                                             ERR_MSG
                                WHERE LIFNR = WA_RECORD-LIFNR.
    * Legacy Vendor is mapped but the obtained SAP vendor doesn't exist.
              ELSEIF V_CROSS_REFERENCE_ERROR EQ C_VEN_ERR2.
    *           Inp.file err. occurd
                V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                WA_RECORD-DEL_FLAG = C_TRUE.
                WA_RECORD-ERR_MSG = TEXT-008.
                MODIFY I_RECORD FROM WA_RECORD
                                TRANSPORTING DEL_FLAG
                                             ERR_MSG
                                WHERE LIFNR = WA_RECORD-LIFNR.
    * Purchase Organization doesn't exist in T024E.
              ELSEIF V_CROSS_REFERENCE_ERROR EQ C_VEN_ERR3.
    *             Inp.file err. occurd
                V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                WA_RECORD-DEL_FLAG = C_TRUE.
                WA_RECORD-ERR_MSG = TEXT-014.
                MODIFY I_RECORD FROM WA_RECORD
                                TRANSPORTING DEL_FLAG
                                             ERR_MSG
                                WHERE EKORG = WA_RECORD-EKORG.
    * Vendor is mapped and validated successfully
              ELSEIF V_CROSS_REFERENCE_ERROR EQ C_VEN_SUCS.
    * Checking for the deletion indicator for that record
                CONCATENATE WA_RECORD-KDATB+6(4)
                            WA_RECORD-KDATB+3(2)
                            WA_RECORD-KDATB+0(2)
                            INTO
                            L_STARTDATE.
                MOVE L_STARTDATE TO L_STARTDATE_C.
                CONCATENATE WA_RECORD-KDATB+6(4)
                            WA_RECORD-KDATB+0(2)
                            WA_RECORD-KDATB+3(2)
                            INTO
                            L_STARTDATE_C1.
                CONCATENATE WA_RECORD-KDATE+6(4)
                            WA_RECORD-KDATE+3(2)
                            WA_RECORD-KDATE+0(2)
                            INTO
                            L_ENDDATE.
                MOVE L_ENDDATE TO L_ENDDATE_C.
                CONCATENATE WA_RECORD-KDATE+6(4)
                            WA_RECORD-KDATE+0(2)
                            WA_RECORD-KDATE+3(2)
                            INTO
                            L_ENDDATE_C1.
                READ TABLE I_LOEKZ INTO WA_LOEKZ WITH KEY
                                                 EMATN = WA_RECORD-EMATN
                                                 WERKS = WA_RECORD-WERKS
                                                 LGORT = WA_RECORD-LGORT
                                                 BINARY SEARCH.
                IF SY-SUBRC EQ 0.
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-003.
                  WA_RECORD-DEL_FLAG = C_TRUE.    "marking the record
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                                ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE
                                    AND ZTERM = WA_RECORD-ZTERM
                                    AND KTWRT = WA_RECORD-KTWRT
                                    AND EPSTP = WA_RECORD-EPSTP
                                    AND EMATN = WA_RECORD-EMATN.
    * Validating the Purchasing Organization for Blank/Null
                ELSEIF WA_RECORD-EKORG IS INITIAL.
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-010.
                  WA_RECORD-DEL_FLAG = C_TRUE.
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE
                                    AND ZTERM = WA_RECORD-ZTERM
                                    AND KTWRT = WA_RECORD-KTWRT
                                    AND EPSTP = WA_RECORD-EPSTP
                                    AND EMATN = WA_RECORD-EMATN.
    * Validating the Plant for Blank/Null
                ELSEIF WA_RECORD-WERKS IS INITIAL.
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-039.
                  WA_RECORD-DEL_FLAG = C_TRUE.
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE
                                    AND ZTERM = WA_RECORD-ZTERM
                                    AND KTWRT = WA_RECORD-KTWRT
                                    AND EPSTP = WA_RECORD-EPSTP
                                    AND EMATN = WA_RECORD-EMATN.
    * Validating the Contract Validity Start Date
                ELSEIF L_STARTDATE_C1 GT L_TODAY.             "#EC PORTABLE
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-004.
                  WA_RECORD-DEL_FLAG = C_TRUE.      "marking the record
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB.
    * Validating the Contract Validity End Date
                ELSEIF L_ENDDATE_C1 LE L_TODAY.               "#EC PORTABLE
    *             Inpfle err.ocrd
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-005.
                  WA_RECORD-DEL_FLAG = C_TRUE.    "marking the record
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE.
    * Checking for Material under the Plant for Agreement Type 'WK'
                ELSEIF WA_RECORD-EVART = C_WK.
                  READ TABLE I_MATNR INTO WA_MATNR
                                     WITH KEY MATNR = WA_RECORD-EMATN
                                     BINARY SEARCH.
                  IF SY-SUBRC NE 0.
                 V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES. "Inpfle err.ocrd
                    WA_RECORD-ERR_MSG = TEXT-006.
                    WA_RECORD-DEL_FLAG = C_TRUE.   "marking the record
                    MODIFY I_RECORD FROM WA_RECORD
                                    TRANSPORTING DEL_FLAG
                                                 ERR_MSG
                                    WHERE LIFNR = WA_RECORD-LIFNR
                                      AND EVART = WA_RECORD-EVART
                                      AND EKORG = WA_RECORD-EKORG
                                      AND EKGRP = WA_RECORD-EKGRP
                                      AND WERKS = WA_RECORD-WERKS
                                      AND LGORT = WA_RECORD-LGORT
                                      AND KDATB = WA_RECORD-KDATB
                                      AND KDATE = WA_RECORD-KDATE
                                      AND ZTERM = WA_RECORD-ZTERM
                                      AND KTWRT = WA_RECORD-KTWRT
                                      AND EPSTP = WA_RECORD-EPSTP
                                      AND EMATN = WA_RECORD-EMATN.
                  ENDIF.
                ENDIF.  " checking of deletion indicator
              ENDIF.   " checking for success of vendor cross reference
            ELSE.
              V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES. "Inpfle err.ocrd
              WA_RECORD-ERR_MSG = TEXT-041.
              WA_RECORD-DEL_FLAG = C_TRUE.   "marking the record
              MODIFY I_RECORD FROM WA_RECORD
                              TRANSPORTING DEL_FLAG
                                           ERR_MSG
                              WHERE WERKS = WA_RECORD-WERKS.
            ENDIF. " Plant checked to selection screen
          ENDIF.  " the records for which del_flag is initial
          CLEAR: WA_RECORD,
                 WA_T024E,
                 WA_ZMVXREF,
                 WA_LFA1,
                 WA_LOEKZ,
                 WA_MATNR,
                 L_TODAY,
                 L_STARTDATE_C,
                 L_ENDDATE_C,
                 L_STARTDATE,
                 L_ENDDATE.
        ENDLOOP.
        LOOP AT I_RECORD INTO WA_RECORD.
          IF WA_RECORD-DEL_FLAG = C_TRUE.
            APPEND WA_RECORD TO I_ERR_REC.
            CLEAR WA_RECORD.
          ENDIF.
        ENDLOOP.
      ELSE.
        MESSAGE E000 WITH TEXT-013.  " no records in the flat file
        STOP.
      ENDIF.
    ENDFORM.                    " validate_flatfile_data
    *&      Form  DOWNLOAD_ERROR_FILE
    *       Downloads all records along with the records encountering the
    *       input file validation error
    FORM DOWNLOAD_ERROR_FILE.
      DATA L_ISDIR TYPE C.
      IF V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
        V_FILENAME = P_IPERR.
    * Check for the existence of the file.
        IF RB_LOCAL EQ C_TRUE.
          CALL FUNCTION 'TMP_GUI_GET_FILE_EXIST'
               EXPORTING
                    FNAME          = P_IPERR
               IMPORTING
                    ISDIR          = L_ISDIR
               EXCEPTIONS
                    FILEINFO_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.
          IF L_ISDIR EQ C_TRUE.
            MESSAGE I000 WITH TEXT-088.
            STOP.
          ENDIF.
        ENDIF.
        IF RB_LOCAL EQ C_TRUE.
    * Download the Input Error File.
          CALL FUNCTION 'GUI_DOWNLOAD'
               EXPORTING
                    FILENAME                = V_FILENAME
                    FILETYPE                = 'ASC'
                    WRITE_FIELD_SEPARATOR   = '#'
               TABLES
                    DATA_TAB                = I_ERR_REC
               EXCEPTIONS
                    FILE_WRITE_ERROR        = 1
                    NO_BATCH                = 2
                    GUI_REFUSE_FILETRANSFER = 3
                    INVALID_TYPE            = 4
                    NO_AUTHORITY            = 5
                    UNKNOWN_ERROR           = 6
                    HEADER_NOT_ALLOWED      = 7
                    SEPARATOR_NOT_ALLOWED   = 8
                    FILESIZE_NOT_ALLOWED    = 9
                    HEADER_TOO_LONG         = 10
                    DP_ERROR_CREATE         = 11
                    DP_ERROR_SEND           = 12
                    DP_ERROR_WRITE          = 13
                    UNKNOWN_DP_ERROR        = 14
                    ACCESS_DENIED           = 15
                    DP_OUT_OF_MEMORY        = 16
                    DISK_FULL               = 17
                    DP_TIMEOUT              = 18
                    FILE_NOT_FOUND          = 19
                    DATAPROVIDER_EXCEPTION  = 20
                    CONTROL_FLUSH_ERROR     = 21
                    OTHERS                  = 22.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ELSEIF RB_SERVE EQ C_TRUE.
          OPEN DATASET P_IPERR1 FOR OUTPUT IN TEXT MODE.
          CHECK SY-SUBRC EQ 0.
          CLEAR WA_ERR_REC.
          LOOP AT I_ERR_REC INTO WA_ERR_REC.
            IF WA_ERR_REC-DEL_FLAG = C_TRUE.
              TRANSFER WA_ERR_REC TO P_IPERR1.
            ENDIF.
            CLEAR WA_ERR_REC.
          ENDLOOP.
          CLOSE DATASET P_IPERR1.
        ENDIF.
      ENDIF.
    ENDFORM.                    " DOWNLOAD_ERROR_FILE
    *&      Form  BUILD_BDC_DATA
    * Populates BDC for all the fields neccessary for Open Contract Creation
    FORM BUILD_BDC_DATA.
      DATA: L_MAT_INDEX TYPE I,
            L_CON_INDEX TYPE I,
            L_SCA_INDEX TYPE I.
      CLEAR   WA_BDCDATA.
      REFRESH: I_BDCDATA,
               I_MESSTAB.
    * Processing the bdc
      CLEAR: WA_RECORD,
             WA_RECORDPREV,
             VEN_FLAG,
             MAT_FLAG.
      LOOP AT I_RECORD INTO WA_RECORD.
    *    Checks for the del_flag of the record.
        IF     WA_RECORD-DEL_FLAG EQ C_TRUE
            OR WA_RECORD-DEL_FLAG EQ C_STRUE.
          CLEAR WA_RECORD.
          CONTINUE.
        ELSE.
          IF  WA_RECORDPREV-LIFNR NE WA_RECORD-LIFNR
           OR WA_RECORDPREV-EVART NE WA_RECORD-EVART
           OR WA_RECORDPREV-EKORG NE WA_RECORD-EKORG
           OR WA_RECORDPREV-EKGRP NE WA_RECORD-EKGRP
           OR WA_RECORDPREV-WERKS NE WA_RECORD-WERKS
           OR WA_RECORDPREV-LGORT NE WA_RECORD-LGORT
           OR WA_RECORDPREV-KDATB NE WA_RECORD-KDATB
           OR WA_RECORDPREV-KDATE NE WA_RECORD-KDATE
           OR WA_RECORDPREV-ZTERM NE WA_RECORD-ZTERM
           OR WA_RECORDPREV-KTWRT NE WA_RECORD-KTWRT.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0200'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'RM06E-LGORT'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '/00'.
    *   Cross-Reference check performed for the given Vendors
            CLEAR WA_T024E.
            READ TABLE I_T024E INTO WA_T024E
                               WITH KEY EKORG = WA_RECORD-EKORG
                               BINARY SEARCH.
            IF SY-SUBRC EQ 0.
              CLEAR WA_ZMVXREF.
              READ TABLE I_ZMVXREF INTO WA_ZMVXREF
                          WITH KEY D_ALTKN = WA_RECORD-LIFNR
                                   D_BUKRS = P_BUKRS
                          BINARY SEARCH.
              IF SY-SUBRC EQ 0.
                PERFORM BDC_FIELD   USING 'EKKO-LIFNR'
                                           WA_ZMVXREF-M_ALTKN.
              ENDIF.
              CLEAR WA_ZMVXREF.
            ENDIF.
            CLEAR WA_T024E.
            PERFORM BDC_FIELD       USING 'RM06E-EVART'
                                          WA_RECORD-EVART.
            PERFORM BDC_FIELD       USING 'EKKO-EKORG'
                                          WA_RECORD-EKORG.
            PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                          WA_RECORD-EKGRP.
            PERFORM BDC_FIELD       USING 'RM06E-WERKS'
                                          WA_RECORD-WERKS.
            PERFORM BDC_FIELD       USING 'RM06E-LGORT'
                                          WA_RECORD-LGORT.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0201'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKKO-KTWRT'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=AB'.
            PERFORM CONVERT_DATE USING WA_RECORD-KDATB V_CONV_DATE.
            PERFORM BDC_FIELD       USING 'EKKO-KDATB'
                                          V_CONV_DATE.
            PERFORM CONVERT_DATE USING WA_RECORD-KDATE V_CONV_DATE.
            PERFORM BDC_FIELD       USING 'EKKO-KDATE'
                                          V_CONV_DATE.
            PERFORM BDC_FIELD       USING 'EKKO-ZTERM'
                                          WA_RECORD-ZTERM.
            PERFORM BDC_FIELD       USING 'EKKO-KTWRT'
                                            WA_RECORD-KTWRT.
            VEN_FLAG = 1.
            L_MAT_INDEX = 1. "index for table-control of material
          ENDIF.
    *          "first check for itemline
          IF  WA_RECORDPREV-EPSTP NE WA_RECORD-EPSTP
           OR WA_RECORDPREV-EMATN NE WA_RECORD-EMATN
           OR WA_RECORDPREV-KTMNG NE WA_RECORD-KTMNG
           OR WA_RECORDPREV-NETPR NE WA_RECORD-NETPR
           OR WA_RECORDPREV-PEINH NE WA_RECORD-PEINH
           OR WA_RECORDPREV-BPRME NE WA_RECORD-BPRME
           OR WA_RECORDPREV-IDNLF NE WA_RECORD-IDNLF
           OR WA_RECORDPREV-WEBRE NE WA_RECORD-WEBRE
           OR WA_RECORDPREV-MEPRF NE WA_RECORD-MEPRF
           OR WA_RECORDPREV-LTEX1 NE WA_RECORD-LTEX1
           OR VEN_FLAG EQ 1.
            V_IND = L_MAT_INDEX.
            IF V_IND GT 1.
              V_IND = 2.
            ENDIF.
            CONCATENATE 'RM06E-EVRTP(' V_IND ')' INTO V_EVRTP1.
            CONCATENATE 'RM06E-EPSTP(' V_IND ')' INTO V_EPSTP1.
            CONCATENATE 'EKPO-EMATN(' V_IND ')' INTO V_EMATN1.
            CONCATENATE 'EKPO-KTMNG(' V_IND ')' INTO V_KTMNG1.
            CONCATENATE 'EKPO-NETPR(' V_IND ')' INTO V_NETPR1.
            CONCATENATE 'EKPO-PEINH(' V_IND ')' INTO V_PEINH1.
            CONCATENATE 'EKPO-BPRME(' V_IND ')' INTO V_BPRME1.
            CONCATENATE 'RM06E-TCSELFLAG(' V_IND ')' INTO V_TCSELFLAG1.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0220'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=NP'.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0220'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          V_EVRTP1.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=DETA'.
            PERFORM BDC_FIELD       USING V_EPSTP1
                                          WA_RECORD-EPSTP.
            PERFORM BDC_FIELD       USING V_EMATN1
                                          WA_RECORD-EMATN.
            PERFORM BDC_FIELD       USING V_KTMNG1
                                          WA_RECORD-KTMNG.
            PERFORM BDC_FIELD       USING V_NETPR1
                                          WA_RECORD-NETPR.
            PERFORM BDC_FIELD       USING V_PEINH1
                                          WA_RECORD-PEINH.
            PERFORM BDC_FIELD       USING V_BPRME1
                                          WA_RECORD-BPRME.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0211'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKPO-WEBRE'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=DETZ'.
            PERFORM BDC_FIELD       USING 'EKPO-IDNLF'
                                          WA_RECORD-IDNLF.
            TRANSLATE WA_RECORD-EVART TO UPPER CASE.
            IF WA_RECORD-EVART EQ C_WK.
              PERFORM BDC_FIELD       USING 'EKPO-WEBRE' 'X'.
            ENDIF.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0212'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKPO-MEPRF'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=TXP'.
            PERFORM BDC_FIELD       USING 'EKPO-MEPRF'
                                          WA_RECORD-MEPRF.
            IF NOT WA_RECORD-LTEX1 IS INITIAL. "NE space.
              PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0106'.
              PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                            'RM06E-SELKZ(02)'.
              PERFORM BDC_FIELD 

Maybe you are looking for

  • Keynote 6.0 not working with SMB servers

    Since upgrading to 6,0 when I try to open a Keynote file saved on our SMB server, it starts filling up the directory with temporary files, and actually destroys the original file so it can no longer be opened. It keeps popping up a little warning say

  • Best way to use Models

    Hello, What is the best practice when using models? Given a scenario like, 1 project has several components. Each component has its view, windows, etc, since the components are separated by functionality. Is it better to create a model, then add that

  • How to download sound files from txt on iphone?

    Someone sent me an .mp3 in a txt message.  How to I get it from the phone to my computer? Thx

  • SD card empty or missing

    Hi everyone, I have have a z3 compact and i'm having issues with the SD card. I put some media in there via file commander like music or videos and some time later the SD card appears to be empty or missing. It's a 64gb card class 10. I've been trans

  • External HDD Cannot be Read

    Ok. So the Install of Leopard went great, smooth as silk. However, I went to plug in my new 750GB external HDD, and Leopard says it cannot read it. So I go to the Disk Utility, but I cannot Repair, Verify, or Erase the disk. I get the following error