Can I use batches?

Hello everybody
I would like to hear sugestions about this scenario:
I have to update a table with a lot of records, if the record exists in the table I update it, else I insert it. I do this using prepared statements and it works, but it's slow. Now I want to improve the performance and wonder if I can use PreparedStatement.addBatch(). Does anyone have an idea about how (or if) can I do this?
TIA
Pablo

Using batch updates is a good idea, but it has it's own limitations. You can't say for sure that how many statements (updates) it will execute. For example if you add more than 1000 statements to a batch, there is very less possibility that it will execute all the 1000 stmts.
But, I don't understand why you are saying that PreparedStatement is slow. I have inserted 13K records in a very less time using PS in a loop. Most probably you might be using it incorrectly. Check your code again for PS usage and how you are deciding whether the row is existing or not.
Sudha

Similar Messages

  • Can we use batch management in repetitive manufacturing?

    Can we use batch management in repetitive manufacturing?
    If not, can we use classification or something else?
    or what else options we have.
    Thnx!

    why not?
    http://help.sap.com/saphelp_47x200/helpdata/en/25/283c594f7811d18a150000e816ae6e/frameset.htm

  • Can't Use Batch Rename "Rename In Same Folder" for some photos

    Have a strange problem: when using "Batch Rename…" under the "Tools" menu, "Rename In Same Folder" is unusable for some photos taken with some cameras, not for others. For one example, I shift-selected a range of photos taken at a recent vacation, some with my iPhone, some with my girlfriend's Canon PowerShot SD450. Bridge renamed the iPhone photos, but not Canon photos. For another example, if I select a single photo taken by her cell phone or Canon camera, "Rename In Same Folder" is grayed-out; if I select a single photo taken my by iPhone, not so. Does anyone understand this behavior, and is there a solution?

    Bridge Support Center in the help menu leads to a 404 error page.
    Sadly enough this is also on my system (Mac OSX 10.6.8) It should not be showing 404 but it is there...
    What Bridge help files and links, forums, communities, google searches do not do is tell you how to fix what happens with the problem
    In general restarting Bridge holding down option key (in your case alt key) to choose reset preferences solves most problems.
    Here is a page from Adobe Support about Troubleshooting (although this states you should combine option/alt with cmd/ctrl but that is not needed)
    http://kb2.adobe.com/cps/317/317912.html
    I want to use Bridge batch rename to change jpegs into Mac PC compatible jpegs.
    Although I have the option for compatibility with Unix and Windows checked in my customized presets I'm not really aware of the need for that. If you have a .JPG or .jpg extension as the extension a Mac reeds and opens the file without problems. I am aware that as a Mac user I had the need to take care of Windows files in the past. Before OSX a Mac did not need an extension to recognize and open a file. Since OSX is Unix based the need to use an extension is there and also you should only use one dot (.) in the filename and that is before the extension at the end of the filename. Using spaces, commas etc is possible but not prefered. In basic, keep it simple (and short) and the file will open on all systems without problems.
    When you select a preset, the rename and preview buttons grey out. So I start all over...clear cache, check file permissions, restart/shutdown, etc
    That should not happen, presets and batch rename should be always available, even if you have only one file selected. You should start with the refreshing of the preferences. Deleting caches and checking file permissions are not needed every time for clearing prefs (although it is wise to maintain your system on a regular basis, but that is good for the use of all apps).
    On a Mac the user defined Batch Rename settings are saved in the user library / application support / Adobe/ Bridge CS5 / Batch rename setting. (not a single clue how that translate to windows but I have no reason to believe that such a file should not be present on your system.)
    Enter the term "batch rename" in the windows Bridge forum search and I got....ZERO results.
    Well, again a disappointment, there will be many result available in both Windows and Mac forum but it sure is not easy to find them
    The forum search option is next to useless. I believe you should try to switch to the main forum page or something, I once had a result but after so many tries I forgot how I managed this (combined with getting angrier every try...)
    I could really use some help because there is no way I can convert the number of files I have to make them compatible in MACs
    As stated before, if the are .jpg they are already compatible
    it used to be in CS 3 and 4 but since I "upgraded" to Production Premium suite 5.5 none of the version work.
    If you keep having problems you might consider the clean tool option to clear PSCS 3 and 4. Check also this KB article:
    http://www.adobe.com/support/contact/cscleanertool.html
    It should be possible to use all CS versions on your system but you can have only one version of Bridge active at the time. Upgrading from a single CS to a Suite should also be possible without problems but sadly enough everything that should be possible without problems is often only happening in the ideal world...

  • WITH LSMW USING BATCH INPUT/DIRECT INPUT/BAPI/IDOCS

    IN WHAT SCENARIOS CAN WE USE BATCH INPUT/DIRECT INPUT/BAPI/IDOCS WITH LSMW.WHICH IS THE BEST ONE.PLEASE TELL ME THE SCENARIOS OF USAGE.

    It really depends on what you are doing.  There are a lot of "standard" LSMW objects for different business objects, for example, there is a std object for Creating Material Masters, in this case, it is a direct input program. So, the best choice here would be to use the standard program which has been provided, it just so happens that it is a direct input program.  Creating Bill of Materials is another one, but this one is a batch input program, so you have no choice but to go with that.  Of course if there is a BAPI for your business object that would be the next best thing, if a standard object does not exists.
    REgards,
    Rich Heilman

  • Using batch convert tool on my website

    Can anyone help me out with a few questions:
    1)  How can I use Batch Convert tool on my website where I will be able to process the files with an automated process?
    2)  How and from where can I get the API to embed on my website?
    3)  I want to automate the batch conversion process so that no human intervention is required. Can I do that?
    Appreciate the answers.

    amit.wadhwa wrote:
    Can anyone help me out with a few questions:
    1)  How can I use Batch Convert tool on my website where I will be able to process the files with an automated process?
    2)  How and from where can I get the API to embed on my website?
    3)  I want to automate the batch conversion process so that no human intervention is required. Can I do that?
    The batch processor in Audition is an internal tool, not an external one so no, you can't use it on your website because it's DAW, not a web development kit. There's no API available.

  • Use Batch Number for bin location

    Hi:
    if I not use WM module, can I use batch number for bin location instead.
    I will set naming convention for batch number to represent bin location.

    Hi,
       You can use it, but I wont suggest it. The batch specifies a group of materials produced with same recipe or with same characteristics.
       If you use BIN location as batch name, suppose you transfer post from one storage location to another storage location where the bin location change and the batch number remains the same. It will simply create confusion.
    Regards,
    AKPT

  • I have Adobe Photoshop 9.  I am a novice.  How can I resize photos in my files using batch resize?

    I have Adobe Photoshop 9.  I am a novice.  How can I resize photos in my files using batch resize?

    In the Editor, use File...Process Multiple Files.  See the Help for more info.
    Ken

  • Can someone explain me well when the infopackage use batch or dialog?

    Hi Gurus,
    can someone explain me well when the infopackage use batch or dialog?

    Hi ,
    first of of in Bi_btch job nothin comes in the log .. but if you use PSa and then into data target then it willl definatly create background jobs .. but i feel it doesnt relate to the concept you are taking about ..
    if you us e a sepeate update from PSA step the it will create backgroung jobs ..of  king bi_btch and if you push the packets maually then it will create jobs like bi_book .. thats the diff ..
    The initialization and execution of an InfoPackage is implemented as a process type in the process chain maintenance. The Start Later in Batch setting is hidden if the InfoPackage is used in a process chain. This is because the start of the request is determined by the process chain itself.
    If you do not use the InfoPackage in the process chain maintenance and you want to process the data request in the background, select the radio button Start Later in Batch and define the required start time. If start times already exist for this data request, this is indicated with a  next to the Scheduling Options pushbutton. You can change the start time using Settings Options. You can also enter an end date for the data request with a background job.
    If you schedule an InfoPackage in the batch later, the background request job runs until all data is updated in BW. This is displayed with a corresponding indicator in the Schedule tab page.  The load process remains active until the data is updated.
    For example, this gives external scheduling tools the option of monitoring the request job. The job then also runs with a request from an SAP source system as long as the source system has sent the data to the BW system and posted it or until the monitor sets the request to red. In the job log, a success or error message is displayed according to whether the request was posted successfully or not.
    regards,
    shikha

  • Can I use SetFld during GenPrint for banner page fields?

    I have a banner page form that has multiple variable fields on it to display information specific to the batch it's being included with (for out post-composition handling area). I currently set those fields' values by assigning variables of the same name (as the fields) within a DAL script called as my BachBannerBeginScript for that batch. The fields on the Banner page form/section have a rule of NOOPFUNC, so without that assign process happening during the DAL script, they inherently hold no value. This has worked fine so far.
    Now I have a new banner page for a different process/batch, and it's purpose will be to be a "summary report" of sorts, detailing on the banner page high-level information about each document within that batch. I take information from the batch file (bch), read in an additional external file and aggregate the data in GVMs (to form an array, basically) during the BatchBannerBeginScript. The problem I now have is that I have a variable-sized array (based on the document-count within my batch file), yet my understanding is that I can't use functions available to me in GenData, so I have to basically pre-define as many instances of the section (if I do a report line per section) or field (if I do one section with all instances of the field on it) as I think are possible (max-case scenario, basically).
    However, after I have my Section/Fields defined, I still need to use DAL scripting to populate those fields. I tried to use SetFld to populate them, but the values don't show up in my output, leading me to believe that function/rule doesn't work in GenPrint. Is there a better way to set all those fields than to explicitly assign each instance of a field? I'd rather have a short While loop that takes a GVM's instance and assigns it to a variable field name than have hundreds of assign statements where I explicitly assign each possible field.
    Thanks,
    Gregg

    Aha. So you have an existing script that is executing somewhere to assign some other field during print. Depending upon what and when this script runs, you may be trying to set your banner fields too late. You see, as a default the banner page is temporary. Generally it is created, printed, then destroyed all before the first real page of your transaction prints. If you are not using the TransBannerBeginScript INI option as mentioned earlier, you might try to use that method to run your script which should be while the banner page is still alive.
    There is another way that you could try to run your script on the given page using what is called a "print time" or "macro" field. This would involve creating one more field on your banner section and name it like this:
    ~DALRUN MyScript.DAL
    Yes, you can name your script something other than MyScript.DAL.  The key is the ~DALRUN at the start, which will be interpreted at print time to mean that you want to run the DAL script and return a value. Now, of course you don't need a real value for this field, but there's nothing to stop the script from assigning data into the other fields at that time.
    You do have to make sure that this field is the first in sequence on the section. Otherwise, some of your fields may print before it gets to the point to evaluate this "print time" request.
    To make sure this is the first field in sequence will differ depending upon whether you are using DMStudio or the older Image Editor. Since you mentioned 11.5,  you could use either. In DMStudio, simply click on the "Objects" tab when the section is open and then click on the field to highlight it in the tree. Then use the button bar just above there to move the field to the top of the list.

  • How to make Title same as File name using Batch?

    I will be having hundreds of PDFs each month that will need info in the Tile field in Document properties. We create our PDFs from Quark using Distiller. I have found an option in the Batch process in Acrobat for editing the Document properties. Is there something I can enter in the title field that would instruct it to pull the file name as the title? I compare this to using &File in Word when instructing it to include the file name in the header area. Anyone know of any way to do this? I have seen multiple posts to the Acrobat forum regarding similar issues, but none with any responses as to how to accomplish this. Any help would be greatly appreciated. Thanks!

    For this behaviour you're looking at a javascript ...
    For dumb population then use Batch Processing inside Acrobat ..
    Jon

  • How to send an updated list using batch job

    Hi All,
      The program displays data on the screen, if the data looks ok, then there is an option to update.
    When I run update, the program submits a batch job and the basic list gets updated, but my batch job is still sending the data on the screen. how can i send the updated list using batch job.
      Ex: output of the program
                    1         2
           there is an update button on the screen, when i press update button, my program submits in batch job, the above list becomes
                    1        2
                    3        4
    but when i check the spool, it shows the o/p as         1           2 ..it is not sending the updated list.
    Please suggest me how to send the updated data
    Thanks,
    Kumar

    Hi Krishna,
      I have added a button on the alv list. when i press update button, my program updates the list, then submits the batch job. I am attaching the sample test program i am trying with, please suggest me how can i get the updated list.
    *& Report  ZTESTSSSSS
    REPORT  ZTESTSSSSS.
    DATA: gt_fieldcat TYPE slis_fieldcat_alv,
          lt_fieldcat type slis_t_fieldcat_alv,
          gt_sort     TYPE slis_t_sortinfo_alv,
          g_repid     LIKE sy-repid,
          gt_layout   TYPE slis_layout_alv.
    start-of-selection.
      lt_return-type = 'S'.
      lt_return-message = 'test message'.
      append lt_return.
      CLEAR gt_fieldcat.
      gt_fieldcat-fieldname = 'TYPE'.
      gt_fieldcat-outputlen = '3'.
      gt_fieldcat-tabname   = 'LT_RETURN'.
      gt_fieldcat-seltext_l  =  'Type'.
      gt_fieldcat-seltext_m  =  'Type'.
      gt_fieldcat-seltext_s  =  'Type'.
      APPEND gt_fieldcat TO lt_fieldcat.
      CLEAR gt_fieldcat.
      gt_fieldcat-fieldname = 'MESSAGE'.
      gt_fieldcat-outputlen = '15'.
      gt_fieldcat-tabname   = 'LT_RETURN'.
      gt_fieldcat-seltext_l  =  'Message'.
      gt_fieldcat-seltext_m  =  'Message'.
      gt_fieldcat-seltext_s  =  'Message'.
      APPEND gt_fieldcat TO lt_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = sy-repid
          I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
          I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
          IT_FIELDCAT              = lt_fieldcat
        TABLES
          T_OUTTAB                 = lt_return
        EXCEPTIONS
          PROGRAM_ERROR            = 1
          OTHERS                   = 2.
    *&      Form  set_pf_status
          text
         -->RT_EXTAB   text
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'STANDARD'.
    ENDFORM. "Set_pf_status
    *&      Form  user_command
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    FORM user_command USING r_ucomm     LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      DATA: li_count TYPE I.
      IF r_ucomm EQ 'UPD'.
    Adding another message
        lt_return-type = 'S'.
        lt_return-message = 'Another test message'.
        APPEND lt_return.
        rs_selfield-refresh = 'X'.
        rs_selfield-col_stable = 'X'.
        rs_selfield-row_stable = 'X'.
        l_upd = 'X'.
       LOOP AT lt_return.
         WRITE: / lt_return-type, lt_return-message.
       ENDLOOP.
        IF sy-batch IS INITIAL.
          l_upd = 'X'.
    Open the Job
          CALL FUNCTION 'JOB_OPEN'
            EXPORTING
              jobname          = w_name
            IMPORTING
              jobcount         = w_number
            EXCEPTIONS
              cant_create_job  = 1
              invalid_job_data = 2
              jobname_missing  = 3
              OTHERS           = 4.
          IF sy-subrc = 0.
            SUBMIT ('ZTESTSSSSS') VIA JOB w_name NUMBER w_number
                    AND RETURN
                    WITH p_recnnr = p_recnnr.
            CALL FUNCTION 'JOB_CLOSE'
              EXPORTING
                jobcount             = w_number
                jobname              = w_name
                strtimmed            = 'X'
              EXCEPTIONS
                cant_start_immediate = 1
                invalid_startdate    = 2
                jobname_missing      = 3
                job_close_failed     = 4
                job_nosteps          = 5
                job_notex            = 6
                lock_failed          = 7
                OTHERS               = 8.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.  "User_command
    Thanks,
    Kumar

  • How can I use multiple row insert or update into DB in JSP?

    Hi all,
    pls help for my question.
    "How can I use multiple rows insert or update into DB in JSP?"
    I mean I will insert or update the multiple records like grid component. All the data I enter will go into the DB.
    With thanks,

    That isn't true. Different SQL databases have
    different capabilities and use different syntax, That's true - every database has its own quirks and extensions. No disagreement there. But they all follow ANSI SQL for CRUD operations. Since the OP said they wanted to do INSERTs and UPDATEs in batches, I assumed that ANSI SQL was sufficient.
    I'd argue that it's best to use ANSI SQL as much as possible, especially if you want your JDBC code to be portable between databases.
    and there are also a lot of different ways of talking to
    SQL databases that are possible in JSP, from using
    plain old java.sql.* in scriptlets to using the
    jstlsql taglib. I've done maintenance on both, and
    they are as different as night and day.Right, because you don't maintain JSP and Java classes the same way. No news there. Both java.sql and JSTL sql taglib are both based on SQL and JDBC. Same difference, except that one uses tags and the other doesn't. Both are Java JDBC code in the end.
    Well, sure. As long as you only want to update rows
    with the same value in column 2. I had the impression
    he wanted to update a whole table. If he only meant
    update all rows with the same value in a given column
    with the same value, that's trivial. All updates do
    that. But as far as I know there's know way to update
    more than one row where the values are different.I used this as an example to demonstrate that it's possible to UPDATE more than one row at a time. If I have 1,000 rows, and each one is a separate UPDATE statement that's unique from all the others, I guess I'd have to write 1,000 UPDATE statements. It's possible to have them all either succeed or fail as a single unit of work. I'm pointing out transaction, because they weren't coming up in the discussion.
    Unless you're using MySQL, for instance. I only have
    experience with MySQL and M$ SQL Server, so I don't
    know what PostgreSQL, Oracle, Sybase, DB2 and all the
    rest are capable of, but I know for sure that MySQL
    can insert multiple rows while SQL Server can't (or at
    least I've never seen the syntax for doing it if it
    does).Right, but this syntax seems to be specific to MySQL The moment you use it, you're locked into MySQL. There are other ways to accomplish the same thing with ANSI SQL.
    Don't assume that all SQL databases are the same.
    They're not, and it can really screw you up badly if
    you assume you can deploy a project you've developed
    with one database in an environment where you have to
    use a different one. Even different versions of the
    same database can have huge differences. I recommend
    you get a copy of the O'Reilly book, SQL in a
    Nutshell. It covers the most common DBMSes and does a
    good job of pointing out the differences.Yes, I understand that.
    It's funny that you're telling me not to assume that all SQL databases are the same. You're the one who's proposing that the OP use a MySQL-specific extension.
    I haven't looked at the MySQL docs to find out how the syntax you're suggesting works. What if one value set INSERT succeeds and the next one fails? Does MySQL roll back the successful INSERT? Is the unit of work under the JDBC driver's control with autoCommit?
    The OP is free to follow your suggestion. I'm pointing out that there are transactions for units of work and ANSI SQL ways to accomplish the same thing.

  • How to add or remove silence at the beging and at end of each audio file using batch process

    Hi all,
    I am new to this forum. I have been using Audition 3 for the last couple of years and these days I have to coop with an extra difficult situation, which is; I have more than 2000 files that start and finish with a random length of silence, it varies 0 to 7 sec. My question is, how can I set the silent duration at the beginning and end of each file to a constant amount of 2 sec by using batch process?
    Kind regards,
    Pavlos

    >it's relatively easy to select an absolute time at the beginning of a file (we discovered how to do this a while back), the same technique simply doesn't work at all at the end of it
    Indeed! I had a few trials last couple of days and noticed it.
    Definitely we need help on Audition's scripting language from the people in Adobe. Why don't they produce a scripting language documentation?!   

  • BDC programming using Batch input Session.

    Hello Experts.
    I'm an ABAP beginner. I've benn practicing BDC programming using Batch input Session
    at the moment.
    This is the program that upload Local file which has plural records, and put the records into a Session.
    These are the records.
    413459,KIM EI HWAN121                ,19810607,MIADONG1234
    423459,KIM EI HWAN122                ,19810607,MIADONG1235
    433459,KIM EI HWAN123                ,19810607,MIADONG1236
    443459,KIM EI HWAN124                ,19810607,MIADONG1237
    453459,KIM EI HWAN125                ,19810607,MIADONG1238
    463459,KIM EI HWAN126                ,19810607,MIADONG1239
    I succeeded making Session.
    However, for some reaseon, every record in the Session has got the same, value which is the first record.
    Why is this happening? And How can I correct the code below?
    REPORT ZBCUSER002_BATCH NO STANDARD PAGE HEADING
                            LINE-SIZE 255
                            MESSAGE-ID ZBATCH.
    = Types definition ===================================================
    TYPES: BEGIN OF TYP_LOCAL,               "For Local file upload
             RECORD(200) TYPE C,
           END   OF TYP_LOCAL.
    = Internal table definition ==============================================
    DATA: BEGIN OF BDC_TAB OCCURS 0.        "BDCDATA itab
            INCLUDE STRUCTURE BDCDATA.
    DATA: END   OF BDC_TAB.
    DATA: BEGIN OF MESSAGE_BDC OCCURS 0.    "Message itab
            INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END   OF MESSAGE_BDC.
    DATA: TBL_LOCAL TYPE STANDARD TABLE OF TYP_LOCAL,  "Local file itab
          F_TBL     TYPE FILETABLE.                    "FILETABLE fot local
    = Structure table definition =========================================
    DATA: STR_F_TBL LIKE LINE OF F_TBL,                "FILETABLE structure
          STR_LOCAL TYPE TYP_LOCAL.                    "Local file structure
    = Variable definition ================================================
    DATA: LV_RC     TYPE I,                            "Method parameter
          ENUMBER   TYPE ZT601-ENUMBER,                "Employee number
          NAME      TYPE ZT601-NAME,                   "Employee name
          BIRTH     TYPE ZT601-BIRTH,                           "Birthday
          HOMETOWN  TYPE ZT601-HOMETOWN,                        "Hometown
          SYSVAL    TYPE SY-SUBRC.                     "System valuible
    = Constants definition ===============================================
    CONSTANTS: TBL_NAME(10) TYPE C VALUE 'ZT601'.      "Table name ZT601
    = Parameters definition ==============================================
    PARAMETERS: F_NAME      TYPE RLGRAP-FILENAME OBLIGATORY,    "File path
                EXECMODE(1) TYPE C.                    "Execute mode
    INITIALIZATION
    *----- Initialize all valuables, structures and internal tables
    CLEAR: LV_RC,
           STR_F_TBL,
           STR_LOCAL,
           ENUMBER,
           NAME,
           BIRTH,
           HOMETOWN.
    REFRESH: F_TBL,
             TBL_LOCAL.
    AT SELECTION-SCREEN
    *----- When the button next to Parameter 'F_NAME',
    *----- File dialog open.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR F_NAME.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
        EXPORTING
          WINDOW_TITLE            = 'SELECT FILE'
          DEFAULT_FILENAME        = '*.TXT'
       CHANGING
         FILE_TABLE               = F_TBL
         RC                       = LV_RC
        EXCEPTIONS
          FILE_OPEN_DIALOG_FAILED = 1
          CNTL_ERROR              = 2
          OTHERS                  = 3
    *----- system valiable check.
    *----- If done properly,
    *----- Put the path into the File path parameter
      IF SY-SUBRC = 0.
        READ TABLE F_TBL INTO STR_F_TBL INDEX 1.
        F_NAME = STR_F_TBL.
    *----- If not done properly, show message
    *----- An error occured while getting file path then end program
      ELSE.
        MESSAGE E000.
      ENDIF.
    *----- Execute code can only be A or N.
    AT SELECTION-SCREEN ON EXECMODE.
      IF EXECMODE <> 'A' AND EXECMODE <> 'N'.
        MESSAGE E001.
      ENDIF.
    START-OF-SELECTION
    START-OF-SELECTION.
    *----- Upload Local file of file path parameter.
      CALL FUNCTION 'GUI_UPLOAD'
           EXPORTING
                FILENAME                = F_NAME
                FILETYPE                = 'ASC'
           TABLES
                DATA_TAB                = TBL_LOCAL
           EXCEPTIONS
                FILE_OPEN_ERROR         = 1
                FILE_READ_ERROR         = 2
                NO_BATCH                = 3
                GUI_REFUSE_FILETRANSFER = 4
                INVALID_TYPE            = 5
                OTHERS                  = 6.
    *----- System valiable check.
    *----- If not done properly, show an error message
    *----- An error occured while uploading local file then end program
      IF SY-SUBRC <> 0.
        MESSAGE E002.
      ENDIF.
      PERFORM BDC_OPEN.
    *----- Loop Internal table
      LOOP AT TBL_LOCAL INTO STR_LOCAL.
    *----- Spilt the file record and put them into each valiable.
        SPLIT STR_LOCAL AT ',' INTO  ENUMBER
                                     NAME
                                     BIRTH
                                     HOMETOWN.
    *----- Data check Function module
        CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
             EXPORTING
                  DATE                      = BIRTH
             EXCEPTIONS
                  PLAUSIBILITY_CHECK_FAILED = 1
                  OTHERS                    = 2.
    *----- When error occurs while checking date, show an error message.
    *----- (&1) is not date
        IF SY-SUBRC <> 0.
          MESSAGE E003 WITH BIRTH.
        ENDIF.
    *-- The first screen of SE11
    *----- Screen number 0102 of program id SAPMSRD0
        PERFORM BDC_DYNPRO      USING 'SAPMSRD0' '0102'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RSRD1-TBMA_VAL'. "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=SHOW'.          "Display button
        PERFORM BDC_FIELD       USING 'RSRD1-TBMA'
                                      'X'.
        PERFORM BDC_FIELD       USING 'RSRD1-TBMA_VAL'
                                       TBL_NAME.                "ZT601
    *-- Table definition screen
    *----- Screen number 2000 of program id SAPLSD02
        PERFORM BDC_DYNPRO      USING 'SAPLSD02' '2000'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'DD02D-TABCLTEXT'.  "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=TDED'.            "Create entry
        PERFORM BDC_FIELD       USING 'BDC_SUBSCR'
                                      'SAPLSD02'.
        PERFORM BDC_FIELD       USING 'BDC_SUBSCR'
                                      'SAPLSED5'.
    *-- Data input screen
    *----- Screen number 0101 of program /1BCDWB/DBZT601
        PERFORM BDC_DYNPRO      USING '/1BCDWB/DBZT601' '0101'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'ZT601-CRUSER'.    "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=SAVE'.                  "Save
        PERFORM BDC_FIELD       USING 'ZT601-MANDT'
                                      SY-MANDT.                 "Client
        PERFORM BDC_FIELD       USING 'ZT601-ENUMBER'
                                      ENUMBER.           "Employee number
        PERFORM BDC_FIELD       USING 'ZT601-NAME'
                                      NAME.              "Employee name
        PERFORM BDC_FIELD       USING 'ZT601-BIRTH'
                                      BIRTH.                    "Birthday
        PERFORM BDC_FIELD       USING 'ZT601-HOMETOWN'
                                      HOMETOWN.                 "Hometown
        PERFORM BDC_FIELD       USING 'ZT601-CRDATE'
                                      SY-DATUM.          "System date
        PERFORM BDC_FIELD       USING 'ZT601-CRTIME'
                                      SY-UZEIT.          "System time
        PERFORM BDC_FIELD       USING 'ZT601-CRUSER'
                                      SY-UNAME.          "System user
    *-- Data input screen (After input)
    *----- Screen number 0101 of program /1BCDWB/DBZT601
        PERFORM BDC_DYNPRO      USING '/1BCDWB/DBZT601' '0101'.
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '/EBACK'.                 "Back
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'ZT601-CRUSER'.    "Field on Cursor
    *-- Table definition screen]
    *----- Screen number 2000 of program SAPLSD02
        PERFORM BDC_DYNPRO      USING 'SAPLSD02' '2000'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'DD02D-TABCLTEXT'.  "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=WB_BACK'.               "Back
    *-- The first screen of SE11
    *----- Screen number 0102 of program SAPMSRD0
        PERFORM BDC_DYNPRO      USING 'SAPMSRD0' '0102'.
        PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                      'RSRD1-TBMA_VAL'.   "Field on Cursor
        PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                      '=BACK'.
        PERFORM BDC_FIELD       USING 'RSRD1-TBMA'
                                      'X'.
        PERFORM BDC_FIELD       USING 'RSRD1-TBMA_VAL'
                                      TBL_NAME.
        PERFORM BDC_INSERT.
      ENDLOOP.
      PERFORM BDC_CLOSE.
          FORM BDC_DYNPRO                                               *
          Put Program-Id, Dynpro screen number, Start point
          into DBCDATA
    -->  PROGRAM                                                       *
    -->  DYNPRO                                                        *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDC_TAB.
      BDC_TAB-PROGRAM  = PROGRAM.
      BDC_TAB-DYNPRO   = DYNPRO.
      BDC_TAB-DYNBEGIN = 'X'.
      APPEND BDC_TAB.
    ENDFORM.
          FORM BDC_FIELD                                                *
          Put Field Name and Value into BDCDATA
    -->  FNAM                                                          *
    -->  FVAL                                                          *
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR BDC_TAB.
      BDC_TAB-FNAM = FNAM.
      BDC_TAB-FVAL = FVAL.
      APPEND BDC_TAB.
    ENDFORM.
          FORM bdc_process                                              *
    FORM BDC_OPEN.
      CALL FUNCTION 'BDC_OPEN_GROUP'
           EXPORTING
                CLIENT = SY-MANDT
                GROUP  = 'Testsession'
                KEEP   = 'X'
                USER   = SY-UNAME.
      IF SY-SUBRC <> 0.
        MESSAGE E006 WITH SY-SUBRC.
      ENDIF.
    ENDFORM.
          FORM bdc_insert                                               *
    FORM BDC_INSERT.
      CALL FUNCTION 'BDC_INSERT'
           EXPORTING
                TCODE            = 'SE11'
           TABLES
                DYNPROTAB        = BDC_TAB
           EXCEPTIONS
                INTERNAL_ERROR   = 1
                NOT_OPEN         = 2
                QUEUE_ERROR      = 3
                TCODE_INVALID    = 4
                PRINTING_INVALID = 5
                POSTING_INVALID  = 6
                OTHERS           = 7.
      IF SY-SUBRC <> 0.
        MESSAGE E007 WITH SY-SUBRC.
      ENDIF.
      CLEAR: BDC_TAB.
    ENDFORM.
          FORM bdc_close                                                *
    FORM BDC_CLOSE.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
           EXCEPTIONS
                NOT_OPEN    = 1
                QUEUE_ERROR = 2
                OTHERS      = 3.
      IF SY-SUBRC <> 0.
        MESSAGE E008 WITH SY-SUBRC.
      ENDIF.
    ENDFORM.

    God I forgot to refresh Internal table after putting record into Session.
    Now I'm done.
    You guys be careful too.

  • How to get registry key lastwritetime using batch/powershell

    Hello,
    I want to get a registry key's LastWriteTime using batch/powershell.  These are what i have tried..
    1. Launch regedit and manually export the key using the UI, this gives me the lastwritetime, but I need a commandline version of this.  regedit /e only exports the key and value data.
    2. dir HKLM:\software\mykey
    nothing returned
    3. Get-ChildItem HKLM:\software\mykey |  Select-Object *
    nothing returned
    4. Get-ItemProperty HKLM:\software\mykey | Select-Object *
    LastWriteTime not returned; other values are returned
    5. (Get-Item HKLM:\software\mykey).LastWriteTime
    Nothing is returned
    Is the only way to do this by using pinvoke with RegQueryInfoKey? 
    Thanks in advance
    ss883r

    The
    .zip on the repository will still work for version 2. Basically, you'll get a definition for a function called 'Add-RegKeyMember'. You can dot source the provided script, or you can copy the function definition into your own script. You would use it like
    this:
    # Using Get-Item:
    PS> Get-Item HKLM:\SOFTWARE | Add-RegKeyMember | select Name, LastWriteTime, ClassName  
    # Using Get-ChildItem:
    PS> Get-ChildItem HKLM:\SOFTWARE | Add-RegKeyMember | select Name, LastWriteTime, ClassName  
    # Passing a path:
    PS> Add-RegKeyMember HKLM:\SOFTWARE | select Name, LastWriteTime, ClassName
    There's also a proxy function for Get-ChildItem that will automatically add the property anytime you use Get-ChildItem (dir, ls, gci) on a registry path. The PSv3 only method I was talking about simply updates the type data to automatically call the function
    on any RegistryKey object. You can actually set version 2 up to do that, but it requires an XML file.

Maybe you are looking for

  • What does 'Start up disk no more space' error message mean?

    I use a pre 2009 2 x 3 GHz Quad-Core Intel Xeon with 3 GB 667 MHz DDR2 FB-DIMM Mac OS X.6.3 Error message pops up whenever I shut down as follows: "Start Up Disk has no more space available for application memory." I have more than 265 GB on my start

  • Best way to set up annual accounts spreadsheet

    I just bought iWork 09. What's the best way to set up a spreadsheet in numbers for annual accounts that list weekly totals? Would it be best to create a sheet for each week or one sheet with 52 tables? I need to summarise all 52 weeks' totals onto on

  • Analyze job very slow in RAC environment

    Hi, I have an anlyze job which runs for 3 hrs in RAC environment (9.2.0.6). Earlier in NON-RAC environment it used to complete in 1 hrs. Need help in solving this issue. Ajoy Kumar Thapa

  • How to adjust "activation" underline position on Menu?

    I created a Chapter index and the underlining button Highlight when the chapter is activated is arbitrarely off to one side and not centered. I can offset the text and have it look somewhat purposeful, but better yet how can i simply adjust the under

  • Problem with in type ComboBoxCollum in grid

    Hi, I try to load one collum type ComboBoxCollum in my grid and received this message: Unable to cast COM object of type 'SAPbouiCOM.GridColumnClass' to interface type 'SAPbouiCOM.ComboBoxColumn'. This operation failed because the QueryInterface call