How to use commit work in class cl_bls

Hi,
When i have used commit work after email sent,
it goes into dump.
Here is the code segment:
  try.
    -------- create persistent send request ------------------------
      send_request = cl_bcs=>create_persistent( ).
    -------- create and set document -------------------------------
      pdf_content = cl_document_bcs=>xstring_to_solix( pdf_tab ).
      document = cl_document_bcs=>create_document(
            i_type    = 'PDF'
            i_hex     = pdf_content
            i_length  = bytecount
            i_subject = sub ).  "#EC NOTEXT
    add document object to send request
      send_request->set_document( document ).
    --------- add recipient (e-mail address) -----------------------
    create recipient object
      recipient = cl_cam_address_bcs=>create_internet_address( recip-recip ).
    add recipient object to send request
      send_request->add_recipient( recipient ).
    ---------- send document ---------------------------------------
      sent_to_all = send_request->send( i_with_error_screen = 'X' ).
     commit work.
      if sent_to_all is initial.
        message i500(sbcoms) with recip.
      else.
        message s022(so).
      endif.
  ------------ exception handling ----------------------------------
  replace this rudimentary exception handling with your own one !!!
    catch cx_bcs into bcs_exception.
      message i865(so) with bcs_exception->error_type.
  endtry.
What could be the reason?
Is there any way to use commit work in class while sending email as in SO_NEW_DOCUMENT_ATT_SEND_API1 fm?
Thanks.

Hi,
I have used
submit program.....
but in update task i have used it.
"Z_SD_ORDER_UPDATE".    program is a print driver program.
However error says:
There is probably an error in the program
"Z_SD_ORDER_UPDATE".  
This program is triggered in the update task. There, the
following ABAP/4 statements are not allowed:
-  CALL SCREEN
-  CALL DIALOG
-  CALL TRANSACTION
-  SUBMIT
I used submit as:
  WAIT UP TO 2 SECONDS.
  SUBMIT rsconn01 WITH mode = 'INT'
                  WITH output = ' '
                AND RETURN.
Instead of submit i want to use commit work but i also get a dump after commit work too.
How can i use commit work in above code?
Thanks.

Similar Messages

  • How to use commit work as per the requirement?

    Hi all,
           Here i have a requirement about database table updation. I have to update a database table, at the time of doing commit work it has to check the following condition .
    The data should be split up in different groups or records of no more than 2000 after which a commit to the database is executed.
    So can anybody help me in this regard with a piece of code? and i want to know during updation how to lock the data base table and how to unlock? Is there any standard function modules to call regarding this locking and unlocking?
    Thanks & Regards
    Naidu

    which table is that? and do you have any code so far?
    Logically you need to loop thru your records, lock the table for that record, update the table , unlock the tabel record, count the entires so far, andi f it is 2000 issue commit work.

  • How to Use JavaScript in Controller Class...

    Hi All,
    Can any one tell me how to use JavaScript in Controller Class.
    Requirement is:
    I have
    Radio Group(RG1),
    Two Radio Buttons(RB1,RB2),
    Two messageTextInput(MTI1,MTI2),
    if i click RB1 i should Prompt to the end user to "Enter value for MTI1" or
    If i click RB2 i should prompt "Enter value for MTI2" while submitting page.
    Please let me know the steps to use JavaScript and the above client validation...
    Regards
    Alem...

    Using javascript is against the standard. I can tell you a workaround instead of you setting the javascript, check if that would be acceptable.
    You can use PPR and set the required property on the messageTextInput on clicking of the radio button. By doing this you will let UIX generate the javascript for you to handle the client side validation. But the validation will happen only on click of the submit button. The visual indicator is good enough to tell that the value has to be entered to the item.

  • How to use commit and rollback transaction if my i am using MS Access as a

    as per my knowledge the transactions commit and rollback is not work if my data base is MS Access then plz give me the logic how i used these transaction with MS Access.
    waiting for response
    plz mail ur respose if possible at [email protected]

    Same as every other relational database you can connect to with JDBC.
    try
        connection.setAutoCommit(false);
         // Perform your unit of work here
         connection.commit();
    catch (SQLException e)
        connection.rollback();
         e.printStackTrace();
    finally
        try { if (connection != null) connection.close(); } catch (SQLException ignore) {}
    }%

  • How to use COMMIT and ROLLBACK in BAPIs

    Hi experts,
        Can we use COMMIT or ROLLBACK in the BAPI just like how we implement it in the ABAP programming ?? If it is yes,
        Where can we exactly use normal COMMIT and where we use BAPI_TRANSACTION_COMMIT when we are implementing BAPIs ?
    Please clarify this. Any reply is really appreciated !!
    Thank you in advance.

    Hi
    see commit is the thing which saves the changes you made to the
    database otherwise imean if u have not done the commit work what
    happens is the changes will be killed once the your program life has
    been killed i think you got why we will do commit work
    BAPI's are the methods through which we can input the data i mean it
    is an interface technique it is a direct input method.
    for example you have inserted some data into one table by using this
    BAPI technique but you not done the Commit BAPI then wht happens is
    the changes u made to the database cannot been seen in the table these
    will get effective once u have Done the Commit BAPI
    i think i am clear to u
    Rollback
    see by taking the above example only we can know wht is Rollback it is nothing but UNDO option in ms office se untill saving if we want one step back we will do it by undo option am i right similalry untill commit ing i.e. nothing until saving the changes made u can delete the modified change i.e. u can go to the stage how it was previously ok
    i think u got me
    plzz reward if i am clear to u.......
    see once u have done commit u cant rollback
    same as once  u saved one document u cant undo the document changes i think u got me
    Thanks and regards
    plzz dont forget to reward if i am useful....
    u can contact me as my details are in my business card if u want any further clarification....

  • How to Use Pattern and Matcher class.

    HI Guys,
    I am just trying to use Pattern and Matcher classes for my requirement.
    My requirement is :- It should allow the numbers from 1-7 followed by a comma(,) again followed by the numbers from
    1-7. For example:- 1,2,3,4,5 or 3,6,1 or 7,1,3 something like that.
    But it should not allow 0,8 and 9. And also it should not allow any Alphabets and special characters except comma(,).
    I have written some thing like..
    Pattern p = Pattern.compile("([1-7])+([\\,])?([1-7])?");
    Is there any problem with this pattern ??
    Please help out..
    I am new to pattern matching concept..
    Thanks and regards
    Sudheer

    ok guys, this is how my code looks like..
    class  PatternTest
         public static void main(String[] args)
              System.out.println("Hello World!");
              String input = args[0];
              Pattern p = Pattern.compile("([1-7]{1},?)+");
              Matcher m = p.matcher(input);
              if(m.find()) {
                   System.out.println("Pattern Found");
              } else {
                   System.out.println("Invalid pattern");
    }if I enter 8,1,3 its accepting and saying Pattern Found..
    Please correct me if I am wrong.
    Actually this is the test code I am presenting here.. I original requirement is..I will be uploading an excel sheets containg 10 columns and n rows.
    In one of my column, I need to test whether the data in that column is between 1-7 or not..If I get a value consisting of numbers other than 1-7..Then I should
    display him the msg..
    Thanks and regards
    Sudheer

  • Automatic commit work after class method?

    Hi guys,
    after calling a class method, is there an automatic commit work? Or do I have to insert a commit work into the class method?
    At which points, a commit work is automatically called?
    Regards,
    Basti

    Hi,
    there is so much confusion about commit, commit work and rollback:
    1. At the end of LUW and at every interruption (screen display including message issued, RFC calls,...)  an implicit database commit occurs.
    2. COMMIT WORK will trigger all update task processes that have been registered before (call function in update task, perform on commit). Most BAPI functions use perform on commit. An implicit database commit ist not a COMMIT WORK.
    3. Rollback work will delete all pending update tasks inclusing all database updates not yet commited.
    4. Only the 'Master'of any process should rule the COMMIT WORK because COMMIT WORK means that ALL pending update tasks are executed. So only the caller on top of the hierarchy should issue the COMMIT WORK because a later ROLLBACK is not possible - ROLLBACK only works if not y<et committed.
    These rules work independent of programming feature used - nothing different in oo.
    Regards
    Clemens

  • I just want to go back to how it /used/ to work

    Itunes 7 has been a total bust.
    I've lost tv shows that I downloaded when the machine locked up on the 'processing file' stage (that took emails to allow me to enable again). It's taking forever to download 30min shows that used to download quicker than it'd take to watch the previous show (Daily Show and Colbert report) I've got crackly sound, jerky video, all on a machine that used to play the downloads fine.
    I use Itunes for the TVshows moreso than the music, but until they get this truly terrible version of Itunes working, I'll e investigating if I can stop the purchase of season passes until it works.
    I bought them knowing I can download and play them fine. Mid-season pass, the video's are doubled in size and causeing me problems to the level that I don't think it's worth me using this anymore.
    If there was an option on the size of download, then that might be viable. If I could restrict the amount of downloads at one time, that perhaps could help. If it just worked the same way that it used to, then I'd be perfectly happy (as the new front end looks pretty enough, it's the back end of actually PLAYING the content that's broken).
    But as it is, I'm having a VERY BAD experience with this Itunes7.
    How defeat could be snatched from the jaws of victory like this is beyond belief.
    For the reference, there's nothing else running on the machine, it's uptodate with drivers/patches/antivirus disabled. Maybe it's the processor being 1.5Ghz, but my point is that all the downloads USED to work perfectly fine, but now I have no choice and they've broken something that worked. I didn't ask for doubling of sizes and more hardware requirements. (though trying it on another, much faster machine (duo2 2ghz, 2gb ram, still exhibits troublesome behaviour.
    So, I've read that there IS a workaround to get back to the old version, but I'm aghast that we need to do fairly techy things just to make our content play. What happened to Apple? Just works? Not even close.
    /rant off
    (yes, I'm very, very annoyed by this whole incident)

    I think my confusion was seeing multiple Old Firefox Data folders within the same folder. You could try this:
    Open your ''current'' Firefox profile folder using
    Help > Troubleshooting Information > "Show Folder" button
    In the address bar of that window, click '''Profiles''' to move up a level to its parent folder. You should see your current profile folder there, and possibly others.
    Leaving that window open, switch back to Firefox and Exit
    Copy your ''old'' profile folder from your Old Firefox Data folder (possibly the one that ends with .default?) into the normal Profiles folder alongside your current profile.
    Click in the address bar of the window showing your Profiles folder, and copy the path.
    Start up Firefox's Profile Manager using Start > search box (or Run):
    firefox.exe -P
    (Any time you want to switch profiles, exit Firefox and return to this dialog. )
    Click the Create Profile button, then when you get the option to choose a folder, open that up, paste the Profiles folder location, and select the folder you copied in. After finishing creating your "new" profile, start Firefox in that profile.
    Is your old profile restored as you remember it?
    Sometimes all this moving around of files can create issues, and if you were having problems before due to your reset, they will be back, but I think this is the fastest way to return to what you had before.

  • How to use these method of class CL_GUI_PDFVIEWER

    how to use these methods in the class CL_GUI_PDFVIEWER
    1) CREATE_ANNOTATION
    2) GET_ANNOTATION_INFO
    3) SET_ANNOTATION_SETTINGS

    Hi,
       Refer
    https://forums.sdn.sap.com/click.jspa?searchID=10926572&messageID=1803295
    Regards
    Kiran

  • How to use the opportunity stub classes to retrieve the opportunity objects

    Hello ,
    I have downloaded WSDL file for opportunity and i have created the stub classes by using axis as WSDL to java. Can any body suggest me , how can i use those created stub classes to retrieve the opportunity objects ?.
    Thanks,
    --bdr_09
    Edited by: bdr on Feb 3, 2009 1:54 AM

    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Tools8.html#63055

  • How too use the string tokeniser class to format date strings

    Using the code below I want to write a method which takes a string as a parameter and process it as follows:
    Input: 21/07/62
    Output: 21st July 62
    I wish to do this using the string tokenizer class. Can anyone help??
    import java.io.*;
    public class Input
    public static void main(String args[]) throws IOException
    String theString;
    BufferedReader stdin = new BufferedReader(
    new InputStreamReader(System.in));
    System.out.println("Enter your string now please");
    theString = stdin.readLine(); // throws IOException
    System.out.println("You entered ***" + theString + "***");
    }

    You can certainly use a StringTokenizer to parse your date into three numbers but I think you should use SimpleDateFormat, which will even help you generate your desired format: http://java.sun.com/j2se/1.4/docs/api/java/text/SimpleDateFormat.html

  • How to use a Work Repository when type is set to 'Execution' ?

    Hi All,
    I was just trying my hand at importing and exporting work repositories , I need to know how we can use a certain work repository when its type is set to 'Execution'
    I want to import some packages (which are in some other Work repository ) into that Work repository but I am missing something somewhere.
    Can somebody tell me what are the exact steps to import packages or Entire Work Repository into this newly created 'Execution' type Repository ??
    Regards.

    Hi,
    An work repository which is of EXECUTION type cant be used to import packages/interfaces etc.
    You can able to import only SCENARIOS in Operator component (from scenarios tab) and "just" execute it. As the term execution repository stands, u can able to execute objects created in Development repository.
    Moreover, u cant access designer itself if its a EXECUTION repository.
    Thanks,
    Guru

  • How to use user defined exception class

    Hi all
    I just need som help with creating a user defined exception class.
    Im writing a small/simple text editor.
    My exception class looks like this:
    public class myExcp extends Throwable
         private String message;
         public myExcep(String message)
              this.message = message;
         public void display()
              System.out.println(message);
    I would like to use it when a user tries to open a exe-file instead of a txt file.
    Here is some code from the editor:
    if (e.getSource() == open)
    saveOld();
    if (fc.showOpenDialog(null)== JFileChooser.APPROVE_OPTION)
    readFile(fc.getSelectedFile().getAbsolutePath());           
    saveas.setEnabled(true);                
    So, should I use exception here or at the readFile method?
    readfile:
    private void readFile(String fileName)
    try
    String tmp = fileName.substring(fileName.length() -4, fileName.length());
    if (!tmp.equals(".exe"))
    FileReader r = new FileReader(fileName);
    textarea.read(r, null);
    r.close();
    currentFile = fileName;
    label.setText(currentFile);
    changed = false;
    catch (IOException e)
    JOptionPane.showMessageDialog (this, "Cannot find the file " + fileName);
    Where and how do I use my exception class.
    Do I need to create an instance? Where?
    Should the exception class extend Exception instead?
    Thank you in advance /

    Extend Exception, not Throwable. It's a checked exception that way.
    Follow the Sun coding standards and make that exception class name start with a capital letter.
    When you extend Exception, override all four ctors.
    What's that display method you added? Isn't getMessage() good enough?
    You need to create a new instance just before you throw the exception, of course.
    Sounds like a terrible design, by the way. Exceptions shouldn't be used like "go to" for app logic. They should signal unrecoverable conditions. You can easily recover from the situation you've described simply by displaying a pop-up that tells the user to open only text-readable file types. I think that's a better solution.
    %

  • How to use constructer for javafx class

    hi
    when i create an instance of javafx class i do like this :
    var instance = ClassName{
    attribute1 : value1
    attribute2 : value2
    so i have to put all attributes as public ...wich is not respect the OOP rules !!
    how can i avoid this ?
    thx

    to preserve encapsulation you can use the public-init modifier like so
    public-init var foo;This allows initialization from public and read from public but write only from within the same script (file).
    All of the access modifiers are explained here: [http://java.sun.com/javafx/1/tutorials/core/modifiers/|http://java.sun.com/javafx/1/tutorials/core/modifiers/]

  • How to use Common Structure in class!!

    Hi,
    I have 3 different structures being used in the 3 different methods containing one select query and populate the  internal table and exported now i want to use single method and pass the internal table depending on the structure which is receives
    Plz help me how i can achieve.
    Thanks...

    In the class this is how i have declared
    DATA_PACKAGE_STRUCTURE     Instance Attribute     Public     Type     /BIC/CS8E_HNOD     
    Method parameters       SELECT_METHOD                          
    Methods      Exception                                      
    Parameter               Type  Pas       Opt     Typing M     Associated Type
    DATA_PACKAGE            Import                Type          ANY                
    IT_AGRS                          Export               Type          ZTY_AGR_USERS      
    IT_AUTHMAP                   Export               Type          ZTY_ZAGR_AUTH      
    ABORT                             Export               Type         SY-SUBRC           
    i have declared DATA_PACKAGE with type ANY as per ur post let me know how will i create dynamic internal table and
    in attribute declare different structure such as /BIC/CS8E_HNDEL.
    Thanks...

Maybe you are looking for

  • Adding a delay timer in a frame - need help

    in flash cs3 using actinscript 3.0 i have a frame that i loaded text into, i want to freeze that frame so the text stays in the window for lets say 10 seconds, then it exits and loops again...is there a snippet of code like sleep(1000); that will all

  • Batch doesn't seem to work with Save for Web

    Using Photoshop CS3 on Leopard. This should be simple: I want to create thumbnail images of a folder full of PDFs. I create an action that opens the PDF, opens the first page at a width of 200 pixels, flattens it, Save for Web at 60% quality, and clo

  • Playlists with iPod touch

    Hi, I have a 1st gen iPod touch and an iPhone 3G. When I got my iPhone (Pay and Go), iTunes asked me if I wanted to configure it in the same way as my touch. I said no, but opted to sync my Purchased on +iPod touch name+ playlist to keep all my iTune

  • Kind Attn:OTN Customer Team PLEASE HELP FOR LOGIN

    I have seen lot of members are facing login problem with old username/password. I am facing the same.I am unable to login with old username/password "dmewani/*******" .Please reset my account. even after coping "username/password" from email received

  • I NEED A PROFESSIONAL TO HELP ME!!!

    please help me because i have just taken back my iPod nano and got it replaced. About two weeks ago i got it back and now this one has a problem, IT WILL NOT TURN ON NO MATTER WHAT, i tried everything, ressetting it and all troubleshooting PLEASE HEL