CALL Transaction 'MIRO' return error messages in MESSTAB

Dear All,
We have created a test function module to call transaction 'MIRO', the function works fine on one server but the same give error messages on other server.
The messages returned by call transaction is as follows
======================================================
Messages retunrned by 'CALL Transaction MIRO' as on server I (success)
======================================================
1 MIRO SAPLMR1M 6000 I E F5 096 1,002,010.00 INR Advance to Vendors CTU
2 MIRO SAPLMR1M 6000 S E F5A 034 BusA CTU
3 MIRO SAPLMR1M 6000 S E M8 060 5200000423 CTU
======================================================
Messages retunrned by 'CALL Transaction MIRO' as on server II (error)
======================================================
1 MIRO SAPLMR1M 6000 S E F5 480 RE Doc. Header Text CTU
2 MIRO SAPLMR1M 6000 I E M8 584 CTU
3 MIRO SAPLMR1M 6000 S E F5 480 RE Doc. Header Text CTU
4 MIRO SAPLMR1M 6000 S E 7Q 333 1008473 CTU
5 MIRO SAPLMR1M 6000 E E F5 480 RE Doc. Header Text CTU
In fact, when the MIRO screen is displayed to user and user enter the data in MIRO and simulate, there is no error.
But when we post the transaction the screen is exited without displaying the invoice document number.
Where as if we call MIRO directly, it works fine without any error.
Kindly help.
Regards
Ruhi Hira

The sample code is
FUNCTION Z_TEST_MIRO.
""Local Interface:
*"  EXPORTING
*"     REFERENCE(ERRCODE) TYPE  N
*"     REFERENCE(INVOICENUMBER) TYPE  C
*"     REFERENCE(OLDINVOICENUMBER) TYPE  C
    DATA: BEGIN OF tran_opts,
        dismode   TYPE ctu_params-dismode VALUE 'A',
        updmode   TYPE ctu_params-updmode VALUE 'S',
        cattmode  TYPE ctu_params-cattmode,
        defsize   TYPE ctu_params-defsize ,
        racommit  TYPE ctu_params-racommit,
        nobinpt   TYPE ctu_params-nobinpt VALUE 'X',
        nobiend   TYPE ctu_params-nobiend,
    END OF tran_opts.
    DATA: BEGIN OF MESSTAB OCCURS 10.
        INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF MESSTAB.
    ERRCODE = 0.
    GET PARAMETER ID 'RBN' FIELD OldInvoiceNumber.
    DATA BEGIN OF BDCDATA OCCURS 1.
        INCLUDE STRUCTURE BDCDATA.
    DATA END OF BDCDATA.
    CALL TRANSACTION 'MIRO' USING BDCDATA OPTIONS FROM tran_opts MESSAGES INTO MESSTAB.
    LOOP AT MESSTAB.
        WRITE: / MESSTAB-TCODE,
        MESSTAB-DYNAME,
        MESSTAB-DYNUMB,
        MESSTAB-MSGTYP,
        MESSTAB-MSGSPRA,
        MESSTAB-MSGID,
        MESSTAB-MSGNR,
        MESSTAB-msgv1,
        MESSTAB-msgv2,
        MESSTAB-msgv3,
        MESSTAB-msgv4.
        IF MESSTAB-MSGTYP = 'S' AND MESSTAB-msgid = 'M8' AND MESSTAB-msgnr = '060'.
            invoicenumber = messtab-msgv1.
        ENDIF.
    ENDLOOP.
    IF OldInvoiceNumber = InvoiceNumber OR InvoiceNumber IS INITIAL.
        ERRCODE = 1.
    ELSE.
        ERRCODE = 0.
    ENDIF.
    REFRESH BDCDATA.
ENDFUNCTION.

Similar Messages

  • Hi guys please give me sample code for call transaction that handles error

    hi guys, please give me sample code for call transaction that handles error,
    please send me the sample code in which there should be all decleration part and everything, based on the sample code i will develop my code.
    please do help me as it is urgent.
    thanks and regards.
    prasadnn.

    Hi Prasad,
    Check this code.
    Source Code for BDC using Call Transaction
    *Code used to create BDC
    *& Report  ZBDC_EXAMPLE                                                *
    *& Example BDC program, which updates net price of item 00010 of a     *
    *& particular Purchase order(EBELN).                                   *
    REPORT  ZBDC_EXAMPLE  NO STANDARD PAGE HEADING
                          LINE-SIZE 132.
    Data declaration
    TABLES: ekko, ekpo.
    TYPES: BEGIN OF t_ekko,
        ebeln TYPE ekko-ebeln,
        waers TYPE ekko-waers,
        netpr TYPE ekpo-netpr,
        err_msg(73) TYPE c,
    END OF t_ekko.
    DATA: it_ekko  TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko  TYPE t_ekko,
          it_error TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_error TYPE t_ekko,
          it_success TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_success TYPE t_ekko.
    DATA: w_textout            LIKE t100-text.
    DATA: gd_update TYPE i,
          gd_lines TYPE i.
    *Used to store BDC data
    DATA: BEGIN OF bdc_tab OCCURS 0.
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.
    *Used to stores error information from CALL TRANSACTION Function Module
    DATA: BEGIN OF messtab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll.
    DATA: END OF messtab.
    *Screen declaration
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
                                        TITLE text-001. "Purchase order Num
    SELECT-OPTIONS: so_ebeln FOR ekko-ebeln OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME
                                        TITLE text-002. "New NETPR value
    PARAMETERS:  p_newpr(14)   TYPE c obligatory.  "LIKE ekpo-netpr.
    SELECTION-SCREEN END OF BLOCK block2.
    *START-OF-SELECTION
    START-OF-SELECTION.
    Retrieve data from Purchase order table(EKKO)
      SELECT ekkoebeln ekkowaers ekpo~netpr
        INTO TABLE it_ekko
        FROM ekko AS ekko INNER JOIN ekpo AS ekpo
          ON ekpoebeln EQ ekkoebeln
       WHERE ekko~ebeln IN so_ebeln AND
             ekpo~ebelp EQ '10'.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Check data has been retrieved ready for processing
      DESCRIBE TABLE it_ekko LINES gd_lines.
      IF gd_lines LE 0.
      Display message if no data has been retrieved
        MESSAGE i003(zp) WITH 'No Records Found'(001).
        LEAVE TO SCREEN 0.
      ELSE.
      Update Customer master data (instalment text)
        LOOP AT it_ekko INTO wa_ekko.
          PERFORM bdc_update.
        ENDLOOP.
      Display message confirming number of records updated
        IF gd_update GT 1.
          MESSAGE i003(zp) WITH gd_update 'Records updated'(002).
        ELSE.
          MESSAGE i003(zp) WITH gd_update 'Record updated'(003).
        ENDIF.
    Display Success Report
      Check Success table
        DESCRIBE TABLE it_success LINES gd_lines.
        IF gd_lines GT 0.
        Display result report column headings
          PERFORM display_column_headings.
        Display result report
          PERFORM display_report.
        ENDIF.
    Display Error Report
      Check errors table
        DESCRIBE TABLE it_error LINES gd_lines.
      If errors exist then display errors report
        IF gd_lines GT 0.
        Display errors report
          PERFORM display_error_headings.
          PERFORM display_error_report.
        ENDIF.
      ENDIF.
    *&      Form  DISPLAY_COLUMN_HEADINGS
          Display column headings
    FORM display_column_headings.
      WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
      SKIP.
      WRITE:2 'The following records updated successfully:'(013).
      WRITE:/ sy-uline(42).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'Purchase Order'(004), sy-vline,
              (11) 'Old Netpr'(005), sy-vline,
              (11) 'New Netpr'(006), sy-vline.
      WRITE:/ sy-uline(42).
    ENDFORM.                    " DISPLAY_COLUMN_HEADINGS
    *&      Form  BDC_UPDATE
          Populate BDC table and call transaction ME22
    FORM bdc_update.
      PERFORM dynpro USING:
          'X'   'SAPMM06E'        '0105',
          ' '   'BDC_CURSOR'      'RM06E-BSTNR',
          ' '   'RM06E-BSTNR'     wa_ekko-ebeln,
          ' '   'BDC_OKCODE'      '/00',                      "OK code
          'X'   'SAPMM06E'        '0120',
          ' '   'BDC_CURSOR'      'EKPO-NETPR(01)',
          ' '   'EKPO-NETPR(01)'  p_newpr,
          ' '   'BDC_OKCODE'      '=BU'.                      "OK code
    Call transaction to update customer instalment text
      CALL TRANSACTION 'ME22' USING bdc_tab MODE 'N' UPDATE 'S'
             MESSAGES INTO messtab.
    Check if update was succesful
      IF sy-subrc EQ 0.
        ADD 1 TO gd_update.
        APPEND wa_ekko TO it_success.
      ELSE.
      Retrieve error messages displayed during BDC update
        LOOP AT messtab WHERE msgtyp = 'E'.
        Builds actual message based on info returned from Call transaction
          CALL FUNCTION 'MESSAGE_TEXT_BUILD'
               EXPORTING
                    msgid               = messtab-msgid
                    msgnr               = messtab-msgnr
                    msgv1               = messtab-msgv1
                    msgv2               = messtab-msgv2
                    msgv3               = messtab-msgv3
                    msgv4               = messtab-msgv4
               IMPORTING
                    message_text_output = w_textout.
        ENDLOOP.
      Build error table ready for output
        wa_error = wa_ekko.
        wa_error-err_msg = w_textout.
        APPEND wa_error TO it_error.
        CLEAR: wa_error.
      ENDIF.
    Clear bdc date table
      CLEAR: bdc_tab.
      REFRESH: bdc_tab.
    ENDFORM.                    " BDC_UPDATE
          FORM DYNPRO                                                   *
          stores values to bdc table                                    *
    -->  DYNBEGIN                                                      *
    -->  NAME                                                          *
    -->  VALUE                                                         *
    FORM dynpro USING    dynbegin name value.
      IF dynbegin = 'X'.
        CLEAR bdc_tab.
        MOVE:  name TO bdc_tab-program,
               value TO bdc_tab-dynpro,
               'X'  TO bdc_tab-dynbegin.
        APPEND bdc_tab.
      ELSE.
        CLEAR bdc_tab.
        MOVE:  name TO bdc_tab-fnam,
               value TO bdc_tab-fval.
        APPEND bdc_tab.
      ENDIF.
    ENDFORM.                               " DYNPRO
    *&      Form  DISPLAY_REPORT
          Display Report
    FORM display_report.
      FORMAT COLOR COL_NORMAL.
    Loop at data table
      LOOP AT it_success INTO wa_success.
        WRITE:/      sy-vline,
                (10) wa_success-ebeln, sy-vline,
                (11) wa_success-netpr CURRENCY wa_success-waers, sy-vline,
                (11) p_newpr, sy-vline.
        CLEAR: wa_success.
      ENDLOOP.
      WRITE:/ sy-uline(42).
      REFRESH: it_success.
      FORMAT COLOR COL_BACKGROUND.
    ENDFORM.                    " DISPLAY_REPORT
    *&      Form  DISPLAY_ERROR_REPORT
          Display error report data
    FORM display_error_report.
      LOOP AT it_error INTO wa_error.
        WRITE:/      sy-vline,
                (10) wa_error-ebeln, sy-vline,
                (11) wa_error-netpr CURRENCY wa_error-waers, sy-vline,
                (73) wa_error-err_msg, sy-vline.
      ENDLOOP.
      WRITE:/ sy-uline(104).
      REFRESH: it_error.
    ENDFORM.                    " DISPLAY_ERROR_REPORT
    *&      Form  DISPLAY_ERROR_HEADINGS
          Display error report headings
    FORM display_error_headings.
      SKIP.
      WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
      SKIP.
      WRITE:2 'The following records failed during update:'(008).
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'Purchase Order'(009), sy-vline,
              (11) 'Netpr'(010), sy-vline,
              (73) 'Error Message'(012), sy-vline.
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_NORMAL.
    ENDFORM.                    " DISPLAY_ERROR_HEADINGS
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • After upgrading to Lion the bookmarks in Preview returns error message.

    After upgrading to Lion the bookmarks in Preview returns error message : The File "****" couldn't be opened because you don't have permission to view it. To change the perimssion, select the item in finder and Choose File info.  I have bookmarked plenty of files in Preview.  How to overcome this error message???

    Doesn't work Steve. I think it is an issue with Preview being sandboxed (check the sandbox column in Activity Monitor: Preview = Yes). Sandboxed apps restrict file access to those the user has explicitly selected. My theory is that this causes the unfortunate side effect of bookmarked or linked PDFs not working. A simple test: open a file with bookmarks, manually open the bookmarked file and then select the bookmark in the first file - it should open with no complaints about permissions (which leads to a weak workaround: open all the PDFs you intend to work with!).

  • Error message from the source system, Caller 09 contains an error message.

    Hi,
        Guru's, i got an error massage when my process chain is running(Daily) in BIW 7.0, the error got in Data Loading from source to PSA or data targets. The errors having the below details
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.   "
    Can any body help me out of this situation what to do and how to resolv ethe problem.
    Thanks and Regards,.
    Taps....

    Caller 09 is a very common issue - please search the forums before posting....
    Arun

  • "Caller 09 contains an error message "in Process chain

    Hi
    Most of my process chains have failed today.All are showing the same error i.e
    Error message from the source system
    Diagnosis
    An error occurred in the source system.
    System Response
    Caller 09 contains an error message.
    Further analysis:
    The error occurred in Extractor .
    Refer to the error message.
    Procedure
    How you remove the error depends on the error message.
    Note
    If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.
    If I am repeating the process it is showing the same error again
    Please help

    Hi,
    Even I got the same problem. All you need to do is:
    1) Go to Infopackage
    2) Update Tab:
        Choose: Initialize Delta process
            under that choose: Initialization with Data Transfer
    3) Save
    4) Go to Schedule Tab:
    5) Start the Load
    6) Refresh the page: /nRSA1
    7) Once it is done, then again go to the Update tab of the Infopackage
    8) Select Delta Update
    9) Save
    And now run the Process Chain.
    You should be able to run it smoothly.
    Thanks & Regards
    Hemendra Sharma

  • AuditActivityReport  returned error message

    Hi!
    i'd like to get Audit Activity Report, but return error message "An error has occurred during report processing. (rsProcessingAborted)
    Query execution failed for data set 'ActivityData'. (rsErrorExecutingCommand)
    For more information about this error navigate to the report server on the local server machine, or enable remote errors "
    this problem in BPC 5.1 MS, SQL 2003
    thanks
    Arai

    thanks
    i solved this problem. mistake was in string connection for OsoftDataAudit

  • Why cant i complete iTunes transactions without receiving error messages etc.?

    Why cant i complete iTunes transactions without receiving error messages etc.?

    We are fellow users here on these forums, we won't know unless you tell us what the error messages etc are.
    If you are getting a message to contact iTunes Support then you can do so via this link and ask them why the message is appearing (we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If it's a different error message ... ?

  • CALL TRANSACTION MIRO

    Hi All,
    I need code of the CALL TRANSACTION of MIRO.
    Does any one have a recording of teh MIRO with the TABLE CONTROL looping.
    regards,
    Avi

    Hi Avinash,
                   According to SAP, BDC is not possible for Enjoy transactions. BDC is based on screen technology where as Enjoy transactions are based on control technology and are not compatible for BDC....So better try to use bapi( BAPI_INCOMINGINVOICE_CREATE).
    Eg. Code.
    BAPI to upload a file and post an invoice using MIRO
    report z_bapi_mrhr no standard page heading.
    data: t_headerdata like BAPI_INCINV_CREATE_HEADER occurs 0
                                                     with header line,
         t_itemdata   type BAPI_INCINV_CREATE_ITEM occurs 0
                                                   with header line,
         t_return     type bapiret2 occurs 0.
    data: nrdoc  like BAPI_INCINV_FLD-INV_DOC_NO,
         anodoc like BAPI_INCINV_FLD-FISC_YEAR.
    perform preenche_tabelas.
    perform criar_factura.
    form preenche_tabelas.
    t_headerdata-invoice_ind  = 'X'.          " Factura
    t_headerdata-doc_type     = 'KR'.         " Tipo Doc.
    t_headerdata-doc_date     = sy-datum.     " Data Doc.
    t_headerdata-pstng_date   = sy-datum.     " Data Lançamento
    t_headerdata-ref_doc_no   = 'Teste BAPI'. " Referência
    t_headerdata-comp_code    = '1000'.       " Empresa
    t_headerdata-currency     = 'EUR'.        " Moeda
    t_headerdata-gross_amount = '187.98'.     " Montante
    t_headerdata-calc_tax_ind = 'X'.          " Calcular IVA
    t_headerdata-bus_area     = '1001'.       " Divisão
    append t_headerdata.
    t_itemdata-invoice_doc_item = '000001'.     " Item
    t_itemdata-po_number        = '4000010090'. " Pedido
    t_itemdata-po_item          = '0020'.       " Item Pedido
    t_itemdata-tax_code         = 'CG'.         " Taxa IVA
    t_itemdata-item_amount      = '132.31'.     " Montante
    t_itemdata-quantity         = '1.000'.      " Quantidade
    t_itemdata-po_unit          = 'UN'.         " Unidade
    t_itemdata-item_text        = 'VAN-C21740'. " Texto
    append t_itemdata.
    t_itemdata-invoice_doc_item = '000002'.     " Item
    t_itemdata-po_number        = '4000010090'. " Pedido
    t_itemdata-po_item          = '0030'.       " Item Pedido
    t_itemdata-tax_code         = 'CG'.         " Taxa IVA
    t_itemdata-item_amount      = '25.66'.      " Montante
    t_itemdata-quantity         = '1.000'.      " Quantidade
    t_itemdata-po_unit          = 'UN'.         " Unidade
    t_itemdata-item_text        = 'VAN-C10690'. " Texto
    append t_itemdata.
    endform.                    " preenche_tabelas
    form criar_factura.
    call function 'BAPI_INCOMINGINVOICE_CREATE'
       exporting
         headerdata                = t_headerdata
       IMPORTING
         INVOICEDOCNUMBER          = nrdoc
         FISCALYEAR                = anodoc
       tables
         itemdata                  = t_itemdata
         return                    = t_return.
    if not t_return[] is initial.
       rollback work.
    else.
       commit work.
    endif.
    endform.                    " criar_factura
    Hope it Helps.
    Kindly reward point if it helps by clicking star on the
    star on the left hand side of the screen.
    Regards,
    Maheswaran.B
    Message was edited by: Maheswaran B

  • OfficeJet Pro 8600 plus will not install , msg Call to DriverPackageInstall returns error 5

    I get message "Call to Driver Package Install returned error 5 for package -c\Program Files\HP\HP OfficeJet Pro 8600\Drivers Store\Pipeline\hpup\03.inf-Call to Driver Package Install must be a member of th eadministrator group to install a driver package. Laptop is HP, Core 5, running Win 8.1
    No security messages arose during very slow install.
    Tried several times, tried to download installation package as suggested btroubleshooter but aborted 4 times (4 hours), other downloads had no problem. Tried changing startup as indicated also, did not correct the problem.

    Hi Liam,
    The installation CD that came with your 8600 will definitely not work with Windows 8.1 and is not same as the latest online download which you will need to install on Win8.1.
    Are you running Win8.1 Pro 32 or 64 bit?
    Also make sure you select the right model of your Officejet. There are 3 different models.
    HP Officejet Pro 8600 Plus e-All-in-One Printer series - N911
     HP Officejet Pro 8600 Plus e-All-in-One Printer - N911g
    HP Officejet Pro 8600 e-All-in-One Printer series - N911
     HP Officejet Pro 8600 e-All-in-One Printer - N911a
    HP Officejet Pro 8600 Premium e-All-in-One Printer series - N911
     HP Officejet Pro 8600 Premium e-All-in-One - N911n
    Try uninstalling printer from the control panel and reinstall using the Win8.1 download from the link above.
    Thanks

  • Ping iTunes server returns error message

    Help!! I have tried to ping the server following the instructions on the Tech Specs page (http://www.apple.com/itunes/podcasts/techspecs.html), but whenever I put the URL w/podcast id into my browser, I simply get an error message back from Apple and the XML file is not updated immediately.
    Here's the URL I used:
    https://phobos.apple.com/WebObjects/MZFinance.woa/wa/pingPodcast?id=108627247 where the id is my podcast (Harpeth Hall LIbrary). Am I missing something?
    Here's the error message:
    The XML page cannot be displayed
    Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
    An invalid character was found in text content. Error processing resource 'https://phobos.apple.com/WebObjects/MZFinance.wo...

    scoutwert
    The call was intended to be basically a one-way notification. No real return value per se other than the http 200 success header if your message is received. Having said that, it's certainly pretty gross looking if you ping in a browser. A bug has been filed against this behavior so that in the future you can get a more friendly assurance in a web browser that your ping went through. In the meantime you might consider just pinging on the command line like this:
    curl -I https://phobos.apple.com/WebObjects/MZFinance.woa/wa/pingPodcast?id=108627247
    If it was received by the iTMS server, you'll see:
    HTTP/1.1 200 OK
    in the output. That 200 means the ping was received not that it has run yet.
    d

  • CNTL_ERROR call transaction miro

    In a project I developed a z fm   that integrate a idoc that  execute a  call transaction in miro. If I execute (in we19 in background mode) the fm does not give me ningun mistake, but if the entry is by external idoc i get the  following dump "CNTL_ERROR".
    I have been looking the sap not  311440 and my question is..
    I understand that when a extrenal idoc is  integrated in R3 the FM is executed s in background ??  because if i execute the same  code in a program in background mode i get the same error.
    why if  execute it via we19 in background mode it does not give me ningun mistake?
    Can you be that the user RFC who integrates the idoc does not have permissions?
    Or that directly as says the note 311440 cannot I execute call transaction to enjoy transactions an i have to use bapi ?
    Thanks

    Hi Gonzalez,
    You must not use a call transaction in any case if you have a BAPI as a working alternative. I suggest you check functions BAPI_INCOMINGINVOICE_*. This is more true for enjoy transactions.
    There are severall reasons for it, I guess in your case the system is trying to create an unexpected foreground screen object. I don't know why it would work in WE19 in background. There might be some differences in user parameters, for instance, some default user data might not be set (like company code, that would be typical).
    If you have to continue using call transaction, I suggest you set interface user for dialog and use it at least once to access MIRO directly to see if you can make all steps in your code.
    regards,
    Edgar

  • Getting a "Return" error message when compiling

    I have the following code below that works when I don't use any methods.
    When I insert the side method(), I always get an error message "missing return statement".
    I can't figure out what I am doing wrong.
    It runs fine as it is but I am trying to modify it by using separate methods (just to learn how to use and call methods).
    I am trying to replace what I have in the main method in separate method called "side".
    Here is the code
    import javax.swing.*;
    public class Round
    private String output = "";
        //message error occurs when this method is added;   
       public String side()
             for (int row  = 1; row <=5 ; row ++)
               if (row == 1 || row == 5)
                return output += "      * *  \n"; 
        public static void main(String args[])
            String output = "";
      //the for loop (before the else) is copied into the side method. 
             for (int row  = 1; row <=5 ; row ++)
               if (row == 1 || row == 5)
                 output += "      * *  \n"; 
               else
                 if (row == 2 || row ==4)
                 output += " *           * \n"; 
               else                     
                 output += "*              *\n";
            JOptionPane.showMessageDialog(null,output); 
            System.exit(0);
    }Thanks for your help.

    I did as you suggested and still get the same results.
    I also tried using on one return statement after the for loop but still got an error message.
    Do you know how I can fix this?
    thanks
         public String side()
             for (int row  = 1; row <=5 ; row ++)
               if (row == 1 || row == 5)
                return output += "      * *  \n"; 
               else
                 if (row == 2 || row ==4)
                 return output += " *           * \n"; 
               else                     
                return output += "*              *\n";
    [\code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • V8.16 returns error message upon opening database.

    When opening a database using V8.16 support files and drivers the following error message is returned. "ODBC - Tunnel Error ORA-01456: may not perform insert/delete/update operation inside a READ ONLY transaction.
    This error does not occur using V8.15.
    What is the cause of this problem?

    You don't by any chance have the 'connect in read-only mode' option checked on your DSN do you?
    Justin Cave

  • How to return error message using macro or others ways

    Hi !
    I need your help to find a technical solution.
    We have an alv object with 2 parameters (a checkbox and a writable field which is for address mail.) When you push the button B1, the function module SX_INTERNET_ADDRESS_TO_NORMAL is called to verify the email address.
    If I use the classic way to show the exceptions returned by the function module, the user can read the message but when he does an action on the program this dump. (The program has been killed.)
    I am looking for a way to show the error message and the possibility to change the email address. I think that using a popup information would work but I do not find this way very nice. Can I use macro to have the message on the status? In positive case, could you explain me how to use it?
    Thanks!

    check the context in which the message statement is running, [here in sap library - message processing|http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaae335c111d1829f0000e829fbfe/frameset.htm], you will get the answer why!

  • Hi all, BDC call transaction METHOD, trapping ERRORS

    hi
    i have developed BDC (recording via call transaction method) for VB01. 
    could u please tell me how to display records having errors after running recording or to give index of records having errors.
    and is it possible to give transaction code for recording since my bdc is executable program.
    plase answer both the questions.
    thanx

    Here is the flow that Raja is explaining to you.
    DATA: v_index LIKE sy-tabix.
    LOOP AT itab.
      v_index = sy-tabix.
    *-- prepare the BDC data
      CALL TRANSACTION 'VB01' USING bdcdata
                               MODE 'N'
                              MESSAGES INTO bdcmsgcoll.
      READ TABLE bdcmsgcoll WITH KEY msgtyp = 'E'.
      IF sy-subrc = 0.
    *-- Error occured for the record with index <b>v_index</b>
      ELSE.
    *-- unless there is a success message with this number,
    *   it is not succesfull because 'No data for screen xxx'
    *   will not show up as an error message type, but will be
    *  a success message type
        READ TABLE bdcmsgcoll WITH KEY msgnr = '312'.
        IF sy-subrc = 0.
    *-- success
        ELSE.
    *-- error with index <b>v_index</b>
        ENDIF.
      ENDIF.
    ENDLOOP.
    As you can see, now you have the index of the record where the error occured. Now this will become complicated if you are combining several records into one transaction call. In that case you need to find how you can know all the records that you just accumulated.
    As an example, let us say you have an internal table with external number, customer, material, quantity and at every new external number, you want to create a sales order. Until you get a new external number, you will not do the call transaction because until then it will be items of the same sales order. So in this case, after the call transaction, you will have get all the records that belong to making this sales order by using the external number and then prepare your messages.
    I hope this is clear.
    Srinivas
    Message was edited by: Srinivas Adavi

Maybe you are looking for

  • Can i connect powermac G4 to LCD tv?

    Is it possible to connect my Power Mac G4 (Quicksilver 2002) to a samsung LCD tv? will the DVI to Video adaptor work? if this connector is only for the G5, is there any other way to do it? i would like to use my G4 for presentations, dvd playback etc

  • HP Mini 110 Display Hinge Problem

    Okay so i had a little accident today my HP Mini left hinge broke the computer screen was working fine after it broke. Then the display went out then started to flash random colors can someone please tell me how i can fix this? and maybe tell me wher

  • Baffled by a strange bug - please help!!!

    Hi all, I am baffled by a bug in a program I am working on that I just can't understand. Here is the code that causes a SIGSEGV crash: 268      int k = wfall_pixbuf.rowstride; 269      pix[0] = pix[ -k ]; 270      pix[0] = pix[ -wfall_pixbuf.rowstrid

  • ITunes 7.1 Blurry

    After update to iTunes 7.1 the control bar is blurry. It is blurry untill I redimension the windows of iTunes. I try to unistall and reinstall iTunes, but the problem remains.

  • Screen Black

    When working with my 27-inch iMac with Mac OS X installed, quite often I have black screen. In examining the Console logs, I found these lines: 01/11/13 22:34:09,000 kernel[0]: IOPMrootDomain: idle revert, state 21 01/11/13 22:34:09,353 SystemUIServe