Validating the save process

Hello,
I have a question, I wanted to prompt to save a document or an application only when the JTextPane value has changed, I am currently doing like this
if(JTextPane1().getText().length() > 0)
// doing the required stuff here
// call the method exitA() method
and when I close the JFrame I am calling this method
public void windowClosing(WindowEvent e)
                    if(e.getSource() == Test1.this)
                         exitA();
This results me to prompt for exitA() method when I close the application, but before I prompt this, I need to check whether the application has changed or not, if not changed the simply exit the application, if changed then only show him the exitA() method.
Thanks for any help.
James

This will tell you if your textpane is empty or not and if the value has changed.
this program only checks the values(apply it to your application on windowclosing). the methods you may need is checkValue() and checkCValue()
You can improve this
import javax.swing.*;
import java.awt.event.*;
public class TestAll extends JFrame implements ActionListener
     private JPanel panel = new JPanel();
     private JTextPane jtpane = new JTextPane();
     private JTextPane jtpaneorig = new JTextPane();
     private JButton jb = new JButton("Verify");
TestAll()
     super();
     panel.add(jtpane);
     panel.add(jb);
     jb.addActionListener(this);
     panel.setVisible(true);
     jtpane.setText("It has Value");
     jtpaneorig.setText(jtpane.getText());
     this.getContentPane().add(panel);
     setSize(200,200);
public void actionPerformed(ActionEvent ae)
     if (checkValue(jtpane))
          // save it
          System.out.println(jtpane.getText());
     else
          // exit
          System.out.println("No Value");
     if (checkCValue())
          //save
          System.out.println("Values has changed");
     else
          //dont save
          System.out.println("Value has not changed");
// check if textpane as value or not
public boolean checkValue(JTextPane jtp)
     // get the text as string the removes all the white space & checks the length
     if(((jtp.getText()).trim()).length() > 0)
       return true;
     else
          return false;
//check if the value has changed
public boolean checkCValue()
     if(((jtpane.getText()).trim()).equals((jtpaneorig.getText()).trim()))
       return false;
     else
          return true;
public static void main(String[] args)
  TestAll ta = new TestAll();
  ta.setVisible(true);
}

Similar Messages

  • Add a function in the save process of a bid quotation

    Dear Experts,
    I like to add a function module into the save process of the quotation (bid_quot)
    I found the html template, but not the place where I can add my function. I also found the java comand where the save function is called.
    I'm really new to this, so I', not that familiar with these processes.
    What I would like to do is to create a change document when a user creates a quotation. Is there another solution?
    Best regards
    Christian

    Hi,
    I did a research on your error message and it seems this problem was introduced with MAX 4.6. This version switched to a new error reporting mechanism and reports even errors that are which are not critical to your task.
    These errors typically show up as "unexpected" and if your error falls into this category have a look to this KB for further assistance.
    If it doesn't fall into this category, your could try to go back to the MAX 4.5 or 4.4.. Of course you would need to reinstall some components and might not be able to use newer drivers at all.
    Let me know.
    DirkW

  • There was an error during the save process

    Hi All,
    When I try to save the data in a form, I got the following error but data was saved. Remaing forms are saving the data without any error.
    There was an error during the save process
    I found the log
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 acquired connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 releasing connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 released connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 acquired connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 releasing connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 released connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 acquired connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 releasing connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 released connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 acquired connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 releasing connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:17 PM]: Thread TP-Processor8 released connection com.hyperion.planning.olap.HspEssConnection@11d2066
    [Jul 4, 2009 4:24:30 PM]: Rebind at: Sat Jul 04 16:24:30 GMT+03:00 2009
    [Jul 4, 2009 4:25:30 PM]: Rebind at: Sat Jul 04 16:25:30 GMT+03:00 2009
    [Jul 4, 2009 4:26:30 PM]: Rebind at: Sat Jul 04 16:26:30 GMT+03:00 2009
    [Jul 4, 2009 4:27:30 PM]: Rebind at: Sat Jul 04 16:27:30 GMT+03:00 2009
    Thanks & regards,
    Sravan Kumar.

    Hi John,
    I customized the standerd Transfer BR according to my requirement. And I am using the customized form.
    I tried to change the Action in (Action is smart list) in the form, it is getting saved but with the error There was an error during the save process.
    My requirement is Action updated through BR only. But it is not updating. Previously the same BR worked fine.
    Is there any relationship between the error and the Action was not updating?
    Thanks & Regards,
    Sravan Kumar.
    Edited by: Kumar1899 on Jul 6, 2009 6:29 AM

  • Error during the save process with Planning data form

    Hi,
    When in Planning web-client, I am trying to make changes to data on a data form. The cells are level-0 members (Yellow and writeable in a bottom-up Working version). When I save, it takes a while to process the request, then gives me the following error message: "There was an error during the save process."
    The data form is fairly large, could this be causing the problem? I am a able to save data on other forms that correspond to the exact same set of members and dimensions with no problem. What are possible causes of this error? I have tried stopping and starting planning and the entire EPM system. Thank you.

    Hi,
    I believe you are using V11, I would stop planning, clear out log \Hyperion\logs\services\HyS9Planning-sysout.log, start planning, replicate the error and then going in look if the log has any more detailed information.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Crashes during the save process

    Okay, so now that we’ve determined that I DO have the PrE 8.0.1 update/patch… I need to figure out why I am unable to save the video I’ve spent days working on.
    As I stated in the last discussion concerning the update, I am in possession of a fairly high-speed computer that should be able to handle this kind of work.
    I believe I’ve seen some other folks having problems because of the type of video they are using or importing… What kind of video should I convert to if PrE 8.0.1 doesn’t like what I am using? Oh and I have gotten the message to “Save often because you are running low on system memory” WHICH IS UNBELIEVABLE!!!
    So here we go. The video that I am trying to save is approx. 10 minutes in length and is made up of still .jpg photos and videos taken from a Canon SX210 IS. I sure hope that is helpful. I looked at the file types and they are .mov files.
    One other thing that may be helpful in identifying the problem… and is quite interesting… after the program crashes during the saving process, I can always go to the save location and find the entire PLAYABLE video saved in the format that I wanted (which was MP4). The only thing is that there are three separate files. 1) Complete clear audio 2) Complete clear video and 3) A third unknown file type that I can’t open. Quite strange. Oh and if you’re wondering if I tried to add open those two (Audio and Video) files in PrE and save them together yes, I did… And it crashed again.
    Bob

    Bob,
    Here is SOMETHING to think about, regarding the Memory/Resources error messages.
    This ARTICLE might be helpful at finding clues as to what could be causing the problem.
    The links in this ARTICLE will help provide you with some very useful tools for checking programs and Processes, like Process Explorer.
    As for the inability to Save, I would try a Save_As, and see if that helps, and does the trick. If not, try Save_As_a_Copy.
    When you do Save, do you get any error messages, or does the program just not Save the Project file (.PREL)?
    In case it's a system issue, can you tell us about your system in detail? Aspects like the I/O sub-system, i.e. the HDD's, their size, speed, free space, controller type(s) and how they are allocated, will be very useful.
    If you are working with SD material, converting to DV-AVI Type II w/ 48KHz 16-bit PCM/WAV Audio, will be as good as it gets.
    Good luck,
    Hunt

  • Acrobat 9 Pro - PDF Optimizer fails when selecting overwrite file during save process

    Hello Everyone,
    I am wondering if Acrobat 9 Pro has changed in the way it handles PDF Optimizing functioning when trying to overwrite the file you are attempting to optimize. In Acrobat 8 Professional, it overwrites the file just fine when it gets to the save process. It does work when you modify the name during the save process, however, it would be nice to know if this is "the way it works" or the "program has an issue".
    Thoughts?
    Message received when trying to overwrite the file,
    COnversion Warnings> "An error was encountered while saving the document."
    Logically, it seems as though the application cannot save over an "opened" file thus dumping that message on me.
    Regards. D.

    > When using Save As to save a PDF, is it possible to have Commenting and Analysis enabled for that saved PDF by default?
    No.

  • When I click on "Save Image As" the "Save AS Type" line is blank and I can't save a downloaded image.

    On Fox, when I right click on an image I get the option "Save Image As" then on the next window the "save as Type" line is blank, and the image can't be saved.
    I copy the www. address and paste it on internet Explorer, and the save process goes routinely.

    Hey cor-el, that was the next in the list
    1-14-22 3PM JAG to Firefox
    The next step in the "Unable to download or save files" section of help states:
    Reset download actions for all file types
    To reset how all file types are handled by Firefox back to default:
    1. Open your profile folder:
    1. At the top of the Firefox window, click on the Firefox button, go over to the Help menu (on Windows XP, click on the Help menu) and select Troubleshooting Information. The Troubleshooting Information tab will open.
    2. Under the Application Basics section, click on Open Containing Folder. A window with your profile files will open.
    Note: If you are unable to open or use Firefox, follow the instructions in Finding your profile without opening Firefox.
    2. At the top of the Firefox window, click on the Firefox button (File menu in Windows XP) and then click Exit.
    3. Rename the mimeTypes.rdf file to mimeTypes.rdf.old .
    4. Restart Firefox.
    Steps 2+3 are in reverse order
    I did this and now there are 2 files. The old one has a “date modified” of 12-27-11 a couple weeks before the problem, and the new one modified today.
    No change in the problem.

  • How to interrupt/cancel save process

    Hello,
    Here is the situation : A user is working on an InDesign document with the plugin I develop. He clicks on the save button. At this moment, I would like to "catch" the save action to display a OK/Cancel dialog box. A click on OK will effectively save, while a Cancel click cancels the save action.
    I have seen the signal system, but it only allows to be informed when a save is being to be processed. I did not see anything about canceling the save process. Is it possible ?
    Thanks a lot.

    Dirk Becker wrote:
    Btw, I hope I did not cause too much irritation with my choice of the word "install" in the previous posts. It was just meant to describe the step of reading and storing those class IDs in order to adopt a document.
    Don't worry about it. You helped me enough. I understood the "install" word when I saw other similar threads
    For people needing it, here is the corrected solution :
    In your FactoryList, put REGISTER_PMINTERFACE(MyDocFileHandler,                kMyDocFileHandlerImpl)
    In your ID.h, put
    DECLARE_PMID(kInterfaceIDSpace,          IID_MYDOCFILEHANDLER,               ...)   // IID_MYDOCFILEHANDLER is  the kDefaultIID of your doc file handler
    DECLARE_PMID(kImplementationIDSpace,    kMyDocFileHandlerImpl,               ....)
    In your Ext.fr, put :
    Class
            kDocHandlerBoss,
            kInvalidClass,
                IID_IDOCFILEHANDLER, kMyDocFileHandlerImpl,
    AddIn
            kDocBoss,
            kInvalidClass,
                IID_IORIGINDOCFILEHANDLER, kDocFileHandlerImpl,
    This is the shadowing technique.
    Then implement your DocFileHandler. To call the shadowed doc file handler, try this :
    InterfacePtr<IDocFileHandler> originFileHandler (<UIDRef of the document>, IID_IORIGINDOCFILEHANDLER);
    originFileHandler->AMethod();

  • Sending an email as part of the process when clicking on the 'Save' Button.

    Would like to learn how to do this:
    Do you have a purchase card () Yes () No
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    If the user selects 'Yes', I want to send an email as part of the process when the user clicks 'Save'.
    But I also have an item, P2_EmailSent that I would like to flag as being sent, along with the date it was sent, P2_DateEmailSent.
    Then, after a week (check P2_DateEmailSent) from date it was sent, send it again.
    Please let me know if you need more details?

    hi Zahid Khan,
    as said i tried the same.
    i have created a button "send" action :submit.
    and also have created a process"send mail" with the folloing code
    DECLARE
    l_body CLOB;
    BEGIN
    l_body := 'Thank you for your interest in the APEX_MAIL package.'||utl_tcp.crlf||utl_tcp.crlf;
    l_body := l_body ||' Sincerely,'||utl_tcp.crlf;
    l_body := l_body ||' The APEX Dev Team'||utl_tcp.crlf;
    apex_mail.send(
    p_to => '[email protected]',
    p_from => '[email protected]',
    p_body => l_body,
    p_subj => 'APEX_MAIL Package - Plain Text message');
    APEX_MAIL.push_queue;
    END;
    and , Process Success Message as "done" and When Button Pressed (Process After Submit When this Button is Pressed): "SEND" WITH Process Point : "ON SUBMIT AFTER COMPUTATIONS AND VALIDATION"
    The process is running.., getting the """success message""" but unable to""" get the mail""".(tried different combinations of mail ids)
    any help !!!

  • Hide the Save As dialog in the digital signature process

    Hi!
    I'm searching for a way to hide the Save As dialog when digitally signing a pdf document (embedded in a website) and instead transmit the signed document back to the website without saving it locally.
    (The reason for doing this is, that I can not be sure whether the user is capable of storing the signed document locally, recover it and send it back to the server.)
    In the "Adobe Acrobat SDK - Developing Plug-ins and Application" documentation under "Digital signature extended API", "Understanding the process" is stated that the digital signature plug-in displays the Save As dialog box. But it's not clear to me whether there is a way to suppress it and instead call some custom code to send the document to a webservice or something like that. (btw: I'm new to the acrobat sdk api)
    Could someone be a bit more specific about this?
    Are there other ways to achieve my aims?
    (To use submit buttons inside the document is not an option.)
    Thanks and kind regards
    Marcel

    Hi Leonard
    I'll try to explain in more detail what I'd like to do. :)
    Preconditions:
    - I have no controle over the forms.
    - I need to build a website hosting PDF documents for clients.
    - The client needs to be able to access these docs and digitally sign them.
    - When the client signs them, they should be stored on the website (overwrite the unsigned ones).
    Problem:
    The whole process should be as simple as possible for the client. Therefore he should not have to manually download the docs, sign them and manually upload them to the website.
    Possible solution:
    The client selects a document to sign which is then opened inside the website (aspx / custom control) by the Adobe Reader browser plug-in.
    Now, when the client signs the document I would like to catch the "Save as" dialog and instead call some custom routine to send the signed document back to the website (webservice).
    As I see it:
    We would have to write a Reader plug-in that would be started when the browser-plugin is called and could be passed the address of the webservice (to send the signed PDF). Maybe the address passing could be done by javascript, but the handling of the "Save as" dialog would probably have to be handled by a custom plug-in.
    My question:
    Is there any way to accomplish the above (if yes, how?), or are these things that are just not possible (why? ;)?
    I hope this helps to clear up things a little...
    Thanks for any help!
    Marcel

  • Batch processing: save processed file with same name to different location without moving the original

    Hi, I would like to denoise Voice Over files with help of Auditions Batch Process. However, I have to save the files with the same name as the original, so that I can simply relink them in Premiere. Since I do want to keep the originals, I would like to save the processed files to a different location.
    Unfortunately, Batch Processor adds " Copy" to the processed files and moves the originals along with the processed files to the new folder (causing Premiere to loose the original files).
    Can I achieve my goal with Batch Processor, and how would I have to configure it?
    Kind regards,
    Andreas

    Which version of Audition are you using? The latest ones allow you to specify where the batched files are saved and also if any Prefix or Postfix are added to the file name. These are all under Export Settings in the Batch Process pane. However you must have the Export box ticked to give you access to the settings.

  • Running validation before the 'save as' script

    Hi
    I'm looking for a steer on how to run form validation before implementing the 'Save as' script - is this even possible??
    Basically I want the save as script to run in the click event of my newly formed save button only if the validation script returns a positive value i.e. all mandatory fields are completed, I've used the script below:
    if 
    (form1.execValidate()== "false"){
    app.execMenuItem("SaveAs");
    Any chance someone could point me in the right direction or am I barking up the wrong tree?
    Thanks

    got it to work: my script was wrong, it now looks like this:
    if 
    (form1.execValidate()== true){
    app.execMenuItem("SaveAs");

  • Can't save BISM file pointing to excel sheet (data source). ErrMsg: "There were errors found while validating the page: Cannot connect to the server or database."

    Hi,
    Me and a collegue is administrering our new enterprise BI portal in SharePoint 2013 (On Premise) and have a problem with using a specific Excel file including general ledger data as data source through a BISM file.
    This particular BISM file can't be saved without getting the error message "There were errors found while validating the page: Cannot connect to the server or database."
    BISM files against other Excel sheets and sources (for example SSAS tabular databases) works well.
    Can anyone help us pinpointing whats wrong here, this is a really important stakeholder in our organization requesting this reporting?
    Cheers!

    Hi E.SWARD ,
    My self created a Power pivot excel then i want to use this excel to create BI file . Still i am getting the same error . Pls help me to resolve this issue
    Cannot connect to the server or database.
    I am getting the similar error , if i use Tabular analysis server instance .
    Subhash

  • What is causing the two step save process in Acrobat XI?

    Acrobat Reader XI will not save a pdf back to the same file name on the first try.  It changes the name to A9R9FF*.tmp (the * being a wildcard) and gives the error message can not save rename file.  When I then choose the original file it saves it over the original.  Adds an extra step to the save function.  What is causing this.  It did not occur in previous versions of Acrobat Reader.

    Hey mwhessel,
    Please clarify whether you are using Adobe Reader or Acrobat.
    Does this happen with every PDF you try to save or any specific one?
    Try saving the file to another privileged location and check if you face the same issue.
    Please let me know.
    Regards,
    Anubha

  • What are the major process to transfer the data from legacy to sap system.

    What are the major process to transfer the data from legacy to sap system using BDC at Real Time only?

    hi,
    BATCH DATA COMMUNICATION
    main methods are:
    1. SESSION METHOD
    2. CALL TRANSACTION
    3. DIRECT INPUT
    Advantages offered by BATCH INPUT method:
    1. Can process large data volumes in batch.
    2. Can be planned and submitted in the background.
    3. No manual interaction is required when data is transferred.
    4. Data integrity is maintained as whatever data is transferred to the table is through transaction. Hence batch input data is submitted to all the checks and validations.
    To implement one of the supported data transfers, you must often write the program that exports the data from your non-SAP system. This program, known as a “data transfer” program must map the data from the external system into the data structure required by the SAP batch input program.
    The batch input program must build all of the input to execute the SAP transaction.
    Two main steps are required:
    • To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.
    • To pass the table to SAP for processing.
    Prerequisite for Data Transfer Program
    Writing a Data Transfer Program involves following prerequisites:
    Analyzing data from local file
    Analyzing transaction
    Analyzing transaction involves following steps:
    • The transaction code, if you do not already know it.
    • Which fields require input i.e., mandatory.
    • Which fields can you allow to default to standard values.
    • The names, types, and lengths of the fields that are used by a transaction.
    • Screen number and Name of module pool program behind a particular transaction.
    To analyze a transaction::
    • Start the transaction by menu or by entering the transaction code in the command box.
    (You can determine the transaction name by choosing System – Status.)
    • Step through the transaction, entering the data will be required for processing your batch input data.
    • On each screen, note the program name and screen (dynpro) number.
    (dynpro = dyn + pro. Dyn = screen, pro = number)
    • Display these by choosing System – Status. The relevant fields are Program (dynpro) and Dynpro number. If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.
    The technical info pop-up shows not only the field information but also the program and screen.
    • For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.
    Note the following information:
    - The field name for batch input, which you’ll find in its own box.
    - The length and data type of the field. You can display this information by double clicking on the Data Element field.
    • Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).
    Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.
    In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.
    You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.
    Once you have program name, screen number, field name (screen field name), you can start writing.
    DATA TRANSFER program.
    Declaring internal table
    First Integral Table similar to structure like local file.
    Declaring internal table like BDCDATA
    The data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for batch input structure.
    The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.
    This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:
    • Create a BDCDATA structure
    • Write the structure out to a session or process it with CALL TRANSACTION USING; and then
    • Create a BDCDATA structure for the next transaction that is to be processed.
    Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.
    The screen identifier record is followed by a separate BDCDATA record for each value, to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:
    • Data that is entered into screen fields.
    • Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.
    The BDCDATA structure contains the following fields:
    • PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.
    • DYNPRO: Screen Number. Set this field only in the first record for the screen.
    • DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to ‘ ‘ (blank) for all other records.)
    • FNAM: Field Name. The FNAM field is not case-sensitive.
    • FVAL: Value for the field named in FNAM. The FVAL field is case-sensitive. Values assigned to this field are always padded on the right, if they are less than 132 characters. Values must be in character format.
    Transferring data from local file to internal table
    Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.
    Population of BDCDATA
    For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.
    All these five initial steps are necessary for any type of BDC interface.
    DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION. The initial steps for both the methods are same.
    First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.
    SESSION METHOD
    About Session method
    In this method you transfer data from internal table to database table through sessions.
    In this method, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers data to database table.
    Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
    When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session or have the session run in the background processing system.
    Unless session is processed, the data is not transferred to database table.
    BDC_OPEN_GROUP
    You create the session through program by BDC_OPEN_GROUP function.
    Parameters to this function are:
    • User Name: User name
    • Group: Name of the session
    • Lock Date: The date on which you want to process the session.
    • Keep: This parameter is passed as ‘X’ when you want to retain session after
    processing it or ‘ ‘ to delete it after processing.
    BDC_INSERT
    This function creates the session & data is transferred to Session.
    Parameters to this function are:
    • Tcode: Transaction Name
    • Dynprotab: BDC Data
    BDC_CLOSE_GROUP
    This function closes the BDC Group. No Parameters.
    Some additional information for session processing
    When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.
    However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue. Log is not removed for that session.
    If the batch-input session is terminated with errors, then it appears in the list of INCORRECT session and it can be processed again. To correct incorrect session, you can analyze the session. The Analysis function allows to determine which screen and value has produced the error. If you find small errors in data, you can correct them interactively, otherwise you need to modify batch input program, which has generated the session or many times even the data file.
    CALL TRANSACTION
    About CALL TRANSACTION
    A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by
    Call transaction <tcode> using <BDCTAB>
    Mode <A/N/E>
    Update <S/A>
    Messages into <MSGTAB>.
    Parameter – 1 is transaction code.
    Parameter – 2 is name of BDCTAB table.
    Parameter – 3 here you are specifying mode in which you execute transaction
    A is all screen mode. All the screen of transaction are displayed.
    N is no screen mode. No screen is displayed when you execute the transaction.
    E is error screen. Only those screens are displayed wherein you have error record.
    Parameter – 4 here you are specifying update type by which database table is updated.
    S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.
    A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).
    Parameter – 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:
    1. Tcode: Transaction code
    2. Dyname: Batch point module name
    3. Dynumb: Batch input Dyn number
    4. Msgtyp: Batch input message type (A/E/W/I/S)
    5. Msgspra: Batch input Lang, id of message
    6. Msgid: Message id
    7. MsgvN: Message variables (N = 1 - 4)
    For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).
    Steps for CALL TRANSACTION method
    1. Internal table for the data (structure similar to your local file)
    2. BDCTAB like BDCDATA
    3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)
    4. Loop at itab.
    Populate BDCTAB table.
    Call transaction <tcode> using <BDCTAB>
    Mode <A/N/E>
    Update <S/A>.
    Refresh BDCTAB.
    Endloop.
    (To populate BDCTAB, You need to transfer each and every field)
    The major differences between Session method and Call transaction are as follows:
    SESSION METHOD CALL TRANSACTION
    1. Data is not updated in database table unless Session is processed. Immediate updation in database table.
    2. No sy-subrc is returned. Sy-subrc is returned.
    3. Error log is created for error records. Errors need to be handled explicitly
    4. Updation in database table is always synchronous Updation in database table can be synchronous Or Asynchronous.
    Error Handling in CALL TRANSACTION
    When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:
    Steps for the error handling in CALL TRANSACTION
    1. Internal table for the data (structure similar to your local file)
    2. BDCTAB like BDCDATA
    3. Internal table BDCMSG like BDCMSGCOLL
    4. Internal table similar to Ist internal table
    (Third and fourth steps are for error handling)
    5. UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)
    6. Loop at itab.
    Populate BDCTAB table.
    Call transaction <tr.code> using <Bdctab>
    Mode <A/N/E>
    Update <S/A>
    Messages <BDCMSG>.
    Perform check.
    Refresh BDCTAB.
    Endloop.
    7 Form check.
    IF sy-subrc <> 0. (Call transaction returns the sy-subrc if updating is not successful).
    Call function Format_message.
    (This function is called to store the message given by system and to display it along with record)
    Append itab2.
    Display the record and message.
    DIRECT INPUT
    About Direct Input
    In contrast to batch input, this technique does not create sessions, but stores the data directly. It does not simulate the online transaction. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to be able to activate the restart mechanism, direct input programs must be executed in the background only. Direct input checks the data thoroughly and then updates the database directly.
    You can start a Direct Input program in two ways;
    Start the program directly
    This is the quickest way to see if the program works with your flat file. This option is possible with all direct input programs. If the program ends abnormally, you will not have any logs telling you what has or has not been posted. To minimize the chance of this happening, always use the check file option for the first run with your flat file. This allows you to detect format errors before transfer.
    Starting the program via the DI administration transaction
    This transaction restarts the processing, if the data transfer program aborts. Since DI document are immediately posted into the SAP D/B, the restart option prevents the duplicate document posting that occurs during a program restart (i.e., without adjusting your flat file).
    Direct input is usually done for standard data like material master, FI accounting document, SD sales order and Classification for which SAP has provided standard programs.
    First time you work with the Direct Input administration program, you will need to do some preparation before you can transfer data:
    - Create variant
    - Define job
    - Start job
    - Restart job
    Common batch input errors
    - The batch input BDCDATA structure tries to assign values to fields which do not exist in the current transaction screen.
    - The screen in the BDCDATA structure does not match the right sequence, or an intermediate screen is missing.
    - On exceptional occasions, the logic flow of batch input session does not exactly match that of manual online processing. Testing the sessions online can discover by this.
    - The BDCDATA structure contains fields, which are longer than the actual definition.
    - Authorization problems.
    RECORDING A BATCH INPUT
    A B recording allows you to record a R/3 transaction and generate a program that contains all screens and field information in the required BDC-DATA format.
    You can either use SHDB transaction for recording or
    SYSTEM ? SERVICES ? BATCH INPUT ? EDIT
    And from here click recording.
    Enter name for the recording.
    (Dates are optional)
    Click recording.
    Enter transaction code.
    Enter.
    Click Save button.
    You finally come to a screen where, you have all the information for each screen including BDC_OKCODE.
    • Click Get Transaction.
    • Return to BI.
    • Click overview.
    • Position the cursor on the just recorded entry and click generate program.
    • Enter program name.
    • Click enter
    The program is generated for the particular transaction.
    BACKGROUND PROCESSING
    Need for Background processing
    When a large volume of data is involved, usually all batch inputs are done in background.
    The R/3 system includes functions that allow users to work non-interactively or offline. The background processing systems handle these functions.
    Non-interactively means that instead of executing the ABAP/4 programs and waiting for an answer, user can submit those programs for execution at a more convenient planned time.
    There are several reasons to submit programs for background execution.
    • The maximum time allowed for online execution should not exceed 300 seconds. User gets TIMEOUT error and an aborted transaction, if time for execution exceeds 300 seconds. To avoid these types of error, you can submit jobs for background processing.
    • You can use the system while your program is executing.
    This does not mean that interactive or online work is not useful. Both type of processing have their own purposes. Online work is the most common one entering business data, displaying information, printing small reports, managing the system and so on. Background jobs are mainly used for the following tasks; to process large amount of data, to execute periodic jobs without human intervention, to run program at a more convenient, planned time other than during normal working hours i.e., Nights or weekends.
    The transaction for background processing is SM36.
    Or
    Tools ? Administration ? Jobs ? Define jobs
    Or
    System ? services ? Jobs
    Components of the background jobs
    A job in Background processing is a series of steps that can be scheduled and step is a program for background processing.
    • Job name. Define the name of assigned to the job. It identifies the job. You can specify up to 32 characters for the name.
    • Job class. Indicates the type of background processing priority assigned to the job.
    The job class determines the priority of a job. The background system admits three types of job classes: A B & C, which correspond to job priority.
    • Job steps. Parameters to be passed for this screen are as follows:
    Program name.
    Variant if it is report program
    Start criteria for the job: Option available for this are as follows:
    Immediate - allows you to start a job immediately.
    Date/Time - allows you to start a job at a specific name.
    After job - you can start a job after a particular job.
    After event - allows you to start a job after a particular event.
    At operation mode - allows you to start a job when the system switches to a particular operation mode.
    Defining Background jobs
    It is two step process: Firstly, you define the job and then release it.
    When users define a job and save it, they are actually scheduling the report i.e., specifying the job components, the steps, the start time.
    When users schedule program for background processing, they are instructing the system to execute an ABAP/4 report or an external program in the background. Scheduled jobs are not executed until they are released. When jobs are released, they are sent for execution to the background processing system at the specified start time. Both scheduling and releasing of jobs require authorizations.
    HANDLING OF POP UP SCREEN IN BDC
    Many times in transaction pop up screen appears and for this screen you don’t pass any record but some indication to system telling it to proceed further. For example: The following screen
    To handle such screen, system has provided a variable called BDC_CURSOR. You pass this variable to BDCDATA and process the screen.
    Usually such screen appears in many transactions, in this case you are just passing information, that YES you want to save the information, that means YES should be clicked. So you are transferring this information to BDCDATA i.e., field name of YES which is usually SPOT_OPTION. Instead of BDC_OKCODE, you are passing BDC_CURSOR.
    BDC_CURSOR is also used to place cursor on particular field.
    A simple transaction where you are entering customer number on first screen and on next screen data is displayed for the particular customer number. Field, which we are changing here, are name and city. When you click on save, the changed record gets saved.
    Prerequisite to write this BDC interface as indicated earlier is:
    1. To find screen number
    2. To find screen field names, type of the field and length of the field.
    3. To find BDC_OKCODE for each screen
    4. Create flat file.
    generally  Batch Input usually are used to transfer large amount of data. For example you are implementing a new SAP project, and of course you will need some data transfer from legacy system to SAP system.
    CALL TRANSACTION is used especially for integration actions between two SAP systems or between different modules. Users sometimes wish to do something like that click a button or an item then SAP would inserts or changes data automatically. Here CALL TRANSACTION should be considered.
    2. Transfer data for multiple transactions usually the Batch Input method is used.
    check these sites for step by step process:
    For BDC:
    http://myweb.dal.ca/hchinni/sap/bdc_home.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/bdc&
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/69/c250684ba111d189750000e8322d00/frameset.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/BDC_tutorial.html
    Check these link:
    http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm
    http://www.sap-img.com/abap/question-about-bdc-program.htm
    http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
    http://www.planetsap.com/bdc_main_page.htm
    call Transaction or session method ?
    null

Maybe you are looking for

  • GRC 10 - General Setting - Workflow - Customization

    Hello Experts , I am confused with the one of the option provided in BPX Post installation pdf . According to this document we need to Activate Common workflow inside SPRO - GRC  -General setting -Workflow  - Perform Automatic Workflow Customizing .

  • Keyboard imac pro

    Hello everyone ,   So today i've done the Yosemite update on my mac , and i had a little problem with the keyboard . The problem is that my function keys like for brightness and etc weren't working anymore . When i looked at the system preferences i

  • How to control Inspeciton generation from Process/ Production Order

    Hi SAP Gurus, In our business place earlier we used to have Process order.The specific Process order type wouldn't generate any Lot.But once we switch to production order , we are getting inspection lot for New Production Order type. The need is that

  • Ports for Firewall rules

    Hi, can anybody point out which ports are to be opened on firewalls ? Im am using a SunMC 4.0 server/console/agent on a v240 and need to monitor systems located behind firewalls. Also NATing is involved. I would like to know which ports I have to ope

  • Integration Repository Template. How to Work??

    Hi, How can I work with the integration repository template using: Query, add-item, update and remove-item tags? I read the manual of the oracle, but could not apply. Tks