Using method MB_DOCUMENT_UPDATE of MB_DOCUMENT_BADI

Hello dear friends!
I 'm trying to use the method MB_DOCUMENT_UPDATE for MB1B, but this method is not acessed when I'm using the transaction. I've tried to debug but it only pass in the code of the method MB_DOCUMENT_BEFORE_UPDATE.
I need to create a file with the number of Billing note, and this method don't have the documents numbers yet. Anyone can help me about the use  of MB_DOCUMENT_UPDATE? Anyone have used this method?
Thanks a lot,
Diogo.

Hi Diago,
   Did you implement the badi definition in SE19 transaction?
YOu must implement and activate the badi implementation in order that Badi gets triggered in the transaction.
Regards,
Ravi Kanth Talagana

Similar Messages

  • How to trap null return values from getters when using Method.invoke()?

    Hi,
    I am using Method.invoke() to access getters in an Object. I need to know which getters return a value and which return null. However, irrespective of the actual return value, I am always getting non-null return value when using Method.invoke().
    Unfortunately, the API documentation of Method.invoke() does not specify how it treats null return values.
    Can someone help?
    Thanks

    What do you get as a result?I think I know what the problem is.
    I tested this using following and it worked fine:
    public class TestMethodInvoke {
    public String getName() {
    return null;
    public static void main(String args[]) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
    Object o = new TestMethodInvoke();
    Class cls = o.getClass();
    Method m = cls.getMethod("getName", (Class[]) null);
    Object result = m.invoke(o, (Object[])null);
    if (result == null) {
    System.err.println("OK: Return value was null as expected");
    else {
    System.err.println("FAILED: Return value was NOT null as expected");
    However, when I use the same technique with an EJB 3.0 Entity class, the null return value is not returned. Instead, I get a String() object. Clearly, the problem is the the EJB 3.0 implementation (Glassfish/Toplink) which is manipulating the getters.
    Regards
    Dibyendu

  • How can I use methods of an object with private instantiation in my ABAP?

    Hello all,
    What is the work-around on using methods of an object marked as private instantiation? I tried to use concepts of <b>INHERITANCE</b> or <b>FRIENDS</b> of an object (<u>BCONTACT </u> in my case - a SAP standard object) but it did not work, or at least, I do not know how to properly code the statements in my ABAP program.
    Any code samples, other ideas?
    Your help is greatly appreciated.

    I am closing this question as there has been no answer.
    Message was edited by:
            Goharjou ardavan

  • Java.lang.NoSuchMethodException Using Method.invoke(...)

    I try to use Method.invoke() to invoke a method from a class. The method
    has parameters with type JTextArea and JMyFrame, but I got the error
    messages java.lang.NoSuchMethodException . Any ideas???
    If I remove parameter "JFrame mainFrame" in start() method and it is working fine. Not sure why JMyFrame will throw this exception, as JMyFrame is derived from JFrame class
    public class MyFrame extends JFrame
         try
    ClassLoader loader
    = new MyClassLoader(Integer.parseInt("3"));
    Class c = loader.loadClass("NewMenuPackage.NewMenu");
    Class[] params = { JTextArea.class, JMyFrame.class };
         Method m = c.getMethod("start", params);
         Object obj = c.newInstance();
    m.invoke(obj,
         new Object[] {
              textArea,
              JMyFrame.this
    catch (Throwable e)
    JOptionPane.showMessageDialog(this, e);
    package NewMenuPackage;
    import javax.swing.*;
    public class NewMenu
         private static JMenuItem menuItem = new JMenuItem("New Menu");
         public static JMenuItem getJMenuItem()
              return menuItem;
         public static void start(JTextArea textArea, JFrame mainFrame)
              System.out.println("NewMenu->start()...");
    }

    Your "params" Class array has to specify the exact classes of the method, not subclasses. The line that is causing the NoSuchObjectException to be thrown is "c.getMethod("start", params);".
    You have to write your own reflection utility methods to find a method that matches on parameter subclasses.

  • Error while attaching the document using Method add_attachment

    Hello Friends,
    We are getting an error while using the BCS Class Method for attaching the documents to the mail.
    We are using method:  add_attachment()
    For this I am passing the parameters:
    attachment_type: PDF
    attachment_subject: XXXXXXX
    att_content_hex: content_hex[]  "Internal table
    The system is throwing error message X_ERROR.
    Friends please help me in how to rectify the error message.
    Thanks and Regards
    Pradeep Goli

    Hi,
    Please code as below.
    data: binary_content type solix_tab.
    CALL METHOD Document->add_attachment EXPORTING i_attachment_type = u2018PDFu2019
    i_attachment_subject = u2018My attachmentu2019 i_att_content_hex =
    binary_content.
    Regards
    chitra

  • End of page in ALV using METHODS

    Hi Folks,
    I have to display End of Page in an list which is using
    CALL METHOD grid1->set_table_for_first_display for display.Is there any method in the same way so that I can totals at the end of page in that list.
    For you info I am not using any of the REUSE_ALV_...... function modules in the program.So kindly let me know how to get it using methods.
    Thanks,
    K.Kiran.

    Hello Pratuysh,
    Thanks for the answer
    I know that report,but that doesn't help me.
    Any other way
    Thanks
    Jai

  • Need help using method check_changed_data correctly

    I'm using method check_changed_data in my ALV program to update the grid with changes the user makes. The method works fine for this purpose. But I also want to know if any data actually changed. Can anyone give me an example?
    FORM update_vendor .
    do I need to call a different method before check_changed_data ?
      call method gridhead->check_changed_data.
    is there a parameter available here to see if anything actually
             changed?
      loop at gt_head into wa_head.
        clear wa_head-lifnam.
        select single name1 into wa_head-lifnam
          from LFA1 where lifnr eq wa_head-lifnr.
        if sy-subrc eq 0.
          modify gt_head from wa_head.
        endif.
      endloop.
    ENDFORM.                    " update_vendor

    Hello Beth
    If data have been changed then method <b>go_grid->CHECK_CHANGED_DATA</b> will raise event <b>DATA_CHANGED</b>. If you have an event handler method like HANDLE_DATA_CHANGED then you can, for example, validate the changes.
    If no data were changed event DATA_CHANGED will not be raised and your event handler method will not be called.
    Regards
      Uwe

  • How to use method POST to send XML using utl_http?

    Hi,
    I am trying to work out how to use the POST method to mimic submitting data from a HTML form, using utl_http.
    I cannot use SOAP for this as the people I am sending the data to are just expecting an XML document to be sent to a standard CGI script running on their web server.
    There is a lot of documentation on how to submit data using the POST method (using Utl_Http.Write_Text etc), but I cannot find anything that tells me how to submit form variables.
    The examples on OTN say this:
    "Alternatively use method => 'POST' and Utl_Http.Write_Text to
    build an arbitrarily long message"
    but don't tell me how to actually place the data into the required input parameters of the CGI program I am hitting.
    I need to hit a URL such as
    www.asite.com/cgiprogram
    and pass in a parameter, eg
    in_param="test+data"
    I am currently doing this as a GET, which works, but the XML document I am passing in could potentially be bigger than the GET method will allow.
    Any help would be greatly appreciated.
    Thanks,
    Leon.

    Please try the PL/SQl forum

  • Using methods from another Form C#

    Hello!
    I'm having some trouble using methods from one Form in another one. Here's the deal:
    This is a snippet from my 'main' form:
    public partial class PRINCIPAL : Form
    //some variables here
    Form2 Config = new Form2();
    Form3 Cadastro = new Form3();
    public PRINCIPAL()
    InitializeComponent();
    //code goes on and on
    //Here's the method I want to call on the other forms (Form2 and Form3)
    public void salva_banco()
    this.Validate();
    this.projetoBindingSource.EndEdit();
    this.modulosBindingSource.EndEdit();
    this.funcaoBindingSource.EndEdit();
    this.estadosBindingSource.EndEdit();
    this.tableAdapterManager.UpdateAll(this.database1DataSet);
    //And here is where I show Form3
    private void projetoDataGridView_CellDoubleClick_1(object sender, DataGridViewCellEventArgs e)
    Cadastro.ShowDialog();
    //And here is where I show Form2
    private void funcaoDataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
    Config.ShowDialog();
    }// And the code keeps on going}
    And this is a snippet from Form3:
    public partial class Form3 : Form
    public Form3()
    InitializeComponent();
    private void Form3_Load(object sender, EventArgs e)
    this.projetoTableAdapter.Fill(this.database1DataSet.Projeto);
    this.modulosTableAdapter.Fill(this.database1DataSet.Modulos);
    private void btnOK_Click(object sender, EventArgs e)
    if (projetoTextBox.Text == "")
    MessageBox.Show("some text here");
    else
    ////// HERE IS THE PLACE WHERE I WANT TO CALL THE METHOD! "salva_banco()"
    I've read lots of suggestions but none satisfied my condition.
    I appreciate any help.
    Thanks.

    You need to find the instance of the PRINCIPAL form to call the method on.  If you know there will always be exactly one open you can use:
    var principalForm = Application.OpenForms.OfType<PRINCIPAL>().Single();
    principalForm.salva_banco();
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Back button not working after navigation using method navigate_to_account

    Hi,
    I have the following scenario.
    1. From Account Search navigating to one Account (Page 1 to Page 2)
    2. From Account there is a hyperlink with opens another page (Page 2 to Page 3). For this navigation I am using method  cl_crm_uiu_bp_tools=>navigate_to_account
    3. Page is opening successfully but when I am clicking on the BACK button for the first, nothing is happening. On the second click in the BACK button its navigating back to the Search page. (Page 3 to Page 1).
    So the history is not triggering for Account page (Page 2)
    Please help me with this issue.

    Hi Tapas,
    You actually need to explicitly record it using the below statement.
    RAISE EVENT history_trigger .
    Use this starement before calling the outbound plug.
    Please let me know if you still have any issues.
    Regards,
    Jotsaroop Singh

  • ALV subtotals using methods

    Hi
    Please provide me sample code for subtotals using methods.
    The code is
    DATA: ls_sort TYPE lvc_s_sort.
    ls_sort-spos = '1' .
    ls_sort-fieldname = 'BWART'.
    ls_sort-up = 'X'.
    ls_sort-subtot = 'X'.
    *ls_sort-group = 'UL'.
    APPEND ls_sort TO p_gt_sort.
    endform
    but it is not working
    Please help me

    Hi,
    this is how you should do...
    CLASS lcl_event_handler DEFINITION DEFERRED.
    DATA: dg_events_receiver TYPE REF
                                TO lcl_event_handler.  "event receiver
    *       CLASS lcl_event_handler DEFINITION
    *       For Event handling                                             *
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
           subtotal_text        FOR EVENT subtotal_text
                             OF cl_gui_alv_grid
                             IMPORTING es_subtottxt_info
                                       ep_subtot_line
                                       e_event_data.
    ENDCLASS.                    "VERIFY_EVENT_HANDLER DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    *       Implementation of event handler method                        *
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD subtotal_text.
        PERFORM d0100_event_subtotal_text USING es_subtottxt_info
                                                ep_subtot_line
                                                e_event_data.
      ENDMETHOD.                    "subtotal_text
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    *--set event handler
      PERFORM set_event_handler.
      CALL METHOD dg_grid->set_table_for_first_display
        EXPORTING
          is_layout                     = ds_layout
        CHANGING
          it_outtab                     = <fs_f>
          it_fieldcatalog               = dt_alv_cat
          it_sort                       = dt_sort
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE i000 WITH
             'Error in calling SET_TABLE_FOR_FIRST_DISPLAY'(026).
      ENDIF.
    *&      Form  set_event_handler
    *       event handler
    *  -->  p1        text
    *  <--  p2        text
    FORM set_event_handler .
      CREATE OBJECT dg_events_receiver.
      SET HANDLER dg_events_receiver->subtotal_text
                  FOR dg_grid.
    ENDFORM.                    " set_event_handler
    *&      Form  d0100_event_subtotal_text
    *       To handle subtotal text event
    *      -->P_ES_SUBTOTTXT_INFO  text
    *      -->P_EP_SUBTOT_LINE  text
    *      -->P_E_EVENT_DATA  text
    FORM d0100_event_subtotal_text  USING
                            p_es_subtottxt_info TYPE lvc_s_stxt
                           p_ep_subtot_line TYPE REF TO data
                           p_e_event_data TYPE REF TO cl_alv_event_data .
      FIELD-SYMBOLS: <fs> TYPE ANY.
      ASSIGN p_e_event_data->m_data->* TO <fs>.
      <fs> = 'TOTAL'(027).
    ENDFORM.                    " d0100_event_subtotal_text
    Regards
    vijay

  • Finding maximum number using methods

    Hello, I am trying to calculate the maximum number given by the user using methods. Basically, i am learning the implementation of the methods.
    Unfortunately, this code got some errors. Could you please help me to identify this?
    import java.awt.*;
    import javax.swing.*;
    public class MaxNumber extends JApplet{
         public static Double main (String args[]){
              JTextArea outPutArea = new JTextArea ();
              String num1 = JOptionPane.showInputDialog("Enter the first number");
              String num2 = JOptionPane.showIputDialog("Enter the second number");
              String num3 = JOptionPane.showInputDialog("Enter the second number");
              double number1 = Double.parseDouble (num1);
              double number2 = Double.parseDouble (num2);
              double number3 = Double.parseDouble (num3);
              //varianle storing maximum number.
              double maxResult = maximum(number1, number2, number3);
              //Displaying output
              outPutArea.setText("First number is: "+number1+"Second number is: "+number2
                        +"Third number is: "+ number3+ "/n Maximum number: "+ maxResult);
              // Get the components GUI display area
              Container c = getContentPane();
              // Attach outputArea to container c
              c.add (outPutArea);
              //maximum class definition
              Double maximum(double x,double y,double z)
              return Math.maxResult( x,Math.maxResult( y, z ) );
    }Thank you,

    Do you have compilation errors or are you getting the wrong output? I could guess, but you need to learn to describe your problem better than "It's getting errors. What do I do?"
    Your maximum(...) method should return a primitive double, not a Double, but that's not your problem (autoboxing will occur, which you probably don't even realize).

  • Possible to have vertical scroll bar for a cell in ALV Grid (using methods)

    Hi All,
    I have a field with length 100 characters on a ALV Grid (using methods)..User doesn't want to scroll all the 100 characters horizontally to see the whole text rather he wants to have a vertical scroll bar for the cell so that he can scroll vertically.
    Is it possible to have split the cell text into lines and have a vertical scroll bar for a cell in ALV Grid?
    Regards
    Jaker.

    Thanks for the suggestion Balu.I tried this , but while scrolling,headers also getting scrolled.
    Becoz of this , if i scroll down to the last row,headers are getting hidden.
    Headers should always be static.only the data should scroll.
    Since h:datatable is being rendered as one table , i can div tag for this table alone.
    If i have seperate datatable for headers alone i can do this .But i should not use two datatables.

  • How to create search function (af:query) using method in java

    hi All..:)
    i got problem with search custom (af:query), how to create search function/ af:query using method in java class?
    anyone help me....
    thx
    agungdmt

    Hi,
    download the ADF Faces component demo sources from here: http://www.oracle.com/technetwork/testcontent/adf-faces-rc-demo-083799.html It also has an example for creating a custom af:query model
    Frank

  • Find the path of a string using methods

    Dear Gurus ,
    I have the path "
    filestltrv\sap\mauals\text.xls' and i want using Methods in ABAP  to find the path '"
    filestltrv\sap\mauals\'.
    I suppose using loops and with finding '\' i will do it .
    Is any other Way ????
    Thanks a lot !!!!

    Hello,
    The FM: SO_SPLIT_FILE_AND_PATH is what you are looking for.
    BR,
    Suhas

Maybe you are looking for