Write BAPI return messages into text

Dear experts,
              I want to write error messages into a text file. i tried in many ways like, using GUI_DOWNLOAD i converted messages to non sap but it creates only empty text file. Is there any other function module in sap?

Thanks Guys, here is my sample code...
tables:bapimathead,
        bapi_makt,
        bapi_mara,
        bapi_marax,
        bapi_marc,
        BAPI_MARCX.
data:begin of itab occurs 0,
       MATERIAL type BAPIMATHEAD-MATERIAL,
       IND_SECTOR TYPE BAPIMATHEAD-IND_SECTOR,
       MATL_TYPE type bapimathead-MATL_TYPE,
       PLANT type BAPI_MARC-PLANT,
       MATL_DESC TYPE BAPI_MAKT-MATL_DESC,
       BASE_UOM TYPE bapi_mara-BASE_UOM,
       MATL_GROUP type bapi_mara-MATL_GROUP,
*      OLD_MAT_NO TYPE BAPI_MARA-OLD_MAT_NO,
*      DIVISION TYPE BAPI_MARA-DIVISION,
*      UNIT_OF_WT TYPE BAPI_MARA-UNIT_OF_WT,
*      NET_WEIGHT TYPE BAPI_MARA-NET_WEIGHT,
*      DOCUMENT TYPE BAPI_MARA-DOCUMENT,
*      DOC_TYPE TYPE BAPI_MARA-DOC_TYPE,
       LANGU TYPE BAPI_MAKT-LANGU,
       PUR_GROUP TYPE BAPI_MARC-PUR_GROUP,
       MRP_TYPE TYPE BAPI_MARC-MRP_TYPE,
       MRP_CTRLER TYPE BAPI_MARC-MRP_CTRLER,
       LOTSIZEKEY TYPE BAPI_MARC-LOTSIZEKEY,
       PLND_DELRY TYPE BAPI_MARC-PLND_DELRY,
       SM_KEY TYPE BAPI_MARC-SM_KEY,
       end of itab.
DATA:    it_RETURN like bapiret2 OCCURS 0 WITH HEADER LINE,
          IT_BAPI LIKE BAPI_MAKT OCCURS 0 WITH HEADER LINE,
          IT_MSG LIKE TLINE OCCURS 0 WITH HEADER LINE.
parameters:p_file TYPE IBIPPARMS-PATH obligatory.
at selection-screen on value-request for p_file.
perform get_f4help.
start-of-selection.
perform upload_file_itab.
perform call_bapi.
*END-OF-SELECTION.
*PERFORM ERROR.
*&      Form  get_f4help
form get_f4help .
CALL FUNCTION 'F4_FILENAME'
  EXPORTING
    PROGRAM_NAME        = SYST-CPROG
    DYNPRO_NUMBER       = SYST-DYNNR
  IMPORTING
    FILE_NAME           = P_FILE  .
endform.                    " get_f4help
*&      Form  upload_file_itab
form upload_file_itab .
DATA:V_FILE TYPE STRING.
MOVE P_FILE TO V_FILE.
CALL FUNCTION 'GUI_UPLOAD'
   EXPORTING
    filename                      = V_FILE
    FILETYPE                      = 'ASC'
    HAS_FIELD_SEPARATOR           = 'X'
   TABLES
     data_tab                      = ITAB .
endform.                    " upload_file_itab
*&      Form  call_bapi
form call_bapi .
loop at itab.
BAPIMATHEAD-material = itab-MATERIAL.
bapimathead-IND_SECTOR = itab-IND_SECTOR.
BAPIMATHEAD-MATL_TYPE = itab-MATL_TYPE.
BAPIMATHEAD-BASIC_VIEW = 'X'.
BAPIMATHEAD-PURCHASE_VIEW = 'X'.
BAPIMATHEAD-MRP_VIEW = 'X'.
bapi_mara-MATL_GROUP = itab-MATL_GROUP.
bapi_mara-base_uom = itab-base_uom.
*BAPI_MARA-OLD_MAT_NO = ITAB-OLD_MAT_NO.
bapi_marax-MATL_GROUP = 'X'.
bapi_marax-BASE_UOM = 'X'.
*BAPI_MARA-DIVISION = ITAB-DIVISION.
*BAPI_MARA-UNIT_OF_WT = ITAB-UNIT_OF_WT.
*BAPI_MARA-NET_WEIGHT = ITAB-NET_WEIGHT.
*BAPI_MARA-DOCUMENT = ITAB-DOCUMENT.
*BAPI_MARA-DOC_TYPE = ITAB-DOC_TYPE.
IT_BAPI-LANGU = ITAB-LANGU.
IT_BAPI-LANGU_ISO = 'EN'.
IT_BAPI-MATL_DESC = ITAB-MATL_DESC.
BAPI_MARC-PLANT = ITAB-PLANT.
BAPI_MARC-PUR_GROUP = ITAB-PUR_GROUP.
BAPI_MARC-MRP_TYPE = ITAB-MRP_TYPE.
BAPI_MARC-MRP_CTRLER = ITAB-MRP_CTRLER.
BAPI_MARC-LOTSIZEKEY = ITAB-LOTSIZEKEY.
BAPI_MARC-PLND_DELRY = ITAB-PLND_DELRY.
BAPI_MARC-SM_KEY = ITAB-SM_KEY.
BAPI_MARCX-PLANT = 'X'.
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-MRP_TYPE = 'X'.
BAPI_MARCX-MRP_CTRLER = 'X'.
BAPI_MARCX-LOTSIZEKEY = 'X'.
BAPI_MARCX-PLND_DELRY = 'X'.
BAPI_MARCX-SM_KEY = 'X'.
APPEND IT_BAPI.
clear it_bapi.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
   EXPORTING
     headdata                  = BAPIMATHEAD
    CLIENTDATA                 = bapi_mara
    CLIENTDATAX                = bapi_marax
    PLANTDATA                  = BAPI_MARC
    PLANTDATAX                = BAPI_MARCX
    IMPORTING
    RETURN                     = it_RETURN
  TABLES
    MATERIALDESCRIPTION        = IT_BAPI .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'  .
LOOP AT IT_RETURN.
CALL FUNCTION 'RPY_MESSAGE_COMPOSE'
   EXPORTING
    LANGUAGE                = SY-LANGU
     MESSAGE_ID              = IT_RETURN-ID
     MESSAGE_NUMBER          = IT_RETURN-NUMBER
  IMPORTING
    MESSAGE_TEXT            = IT_RETURN-MESSAGE
  TABLES
    LONGTEXT                = IT_MSG
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
   EXPORTING
*   BIN_FILESIZE                    =
    FILENAME                        = 'D:/DEMO.TXT'
    FILETYPE                        = 'ASC'
*   APPEND                          = ' '
*   WRITE_FIELD_SEPARATOR           = ' '
* IMPORTING
*   FILELENGTH                      =
   TABLES
     DATA_TAB                        = IT_RETURN
*   FIELDNAMES                      =
  EXCEPTIONS
    FILE_WRITE_ERROR                = 1
    NO_BATCH                        = 2
    GUI_REFUSE_FILETRANSFER         = 3
    INVALID_TYPE                    = 4
    NO_AUTHORITY                    = 5
    UNKNOWN_ERROR                   = 6
    HEADER_NOT_ALLOWED              = 7
    SEPARATOR_NOT_ALLOWED           = 8
    FILESIZE_NOT_ALLOWED            = 9
    HEADER_TOO_LONG                 = 10
    DP_ERROR_CREATE                 = 11
    DP_ERROR_SEND                   = 12
    DP_ERROR_WRITE                  = 13
    UNKNOWN_DP_ERROR                = 14
    ACCESS_DENIED                   = 15
    DP_OUT_OF_MEMORY                = 16
    DISK_FULL                       = 17
    DP_TIMEOUT                      = 18
    FILE_NOT_FOUND                  = 19
    DATAPROVIDER_EXCEPTION          = 20
    CONTROL_FLUSH_ERROR             = 21
    OTHERS                          = 22
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE : /1 IT_RETURN-ID, 10 IT_RETURN-TYPE, 20 IT_RETURN-NUMBER, 25 IT_RETURN-MESSAGE.
ENDLOOP.
ENDFORM.
Text file generated and getting message like 0 bytes transferred.

Similar Messages

  • How to display BAPI return message as a pop up

    Hi,
    I am able to get BAPI return message but my requirement is to display these BAPI return messages as pop up's like alerts in javascript.
    I am using abstract portal component.
    any suggestions.
    Regards
    Praveen

    Hi,
    Place a hidden field in your abstract portal component like this:
    <input type ="hidden" name ="returnedmessage" value=<i>the variable returned from JCO</i>>
    In addition to this:
    <script language = "javascript">
    if (document.<i>formname</i>.returnedmessage.value != null || document.<i>formname</i>.returnedmessage.value != "")
    alert(document.<i>formname</i>.returnedmessage.value);
    </script>
    If you are transferring your code to a JSP it would less cumbersome else you would have to enclose all this in response.write(); statements.
    Regards,
    Prem

  • Popup BAPI return messages

    Hello experts,
    I would like a way to quickly handle the BAPI return table (TYPE TABLE OF bapiret2).  I would like to pass the table into a function module or helper method to popup all the messages at once.  This is the same way MIGO (and many other programs) do a popup of messages with little red, yellow, and green icons to the left.  Currently I am using a series of calls to function module BAL_LOG_... and I feel there has to be a better way.
    I tried searching for the answer to this question, but if the answer exists, it is buried within the noise of a million people saying use 'POPUP_TO_CONFIRM' and other function modules.  To clarify: I do not want buttons to confirm.  I want a popup of a list of messages with red, yellow, and green icons on the left.
    Whoever answers my question correctly will henceforth be referred to by me as "the Magnificent."

    My 2 cents ...
    IF_RECA_MESSAGE_LIST is the most convenient message handler i have used so far So i would use it in this way -
    Get the instance using the factory class CF_RECA_MESSAGE_LIST=>CREATE( ).
    Add the BAPI messages using the method ADD_FROM_BAPI( ).
    Get the handle via GET_HANDLE( ) & display using function BAL_DSP_LOG_DISPLAY.
    DATA(o_msg_list) = cf_reca_message_list=>create( ).
    o_msg_list->add_from_bapi(
      EXPORTING
        it_bapiret = VALUE #( id = 'BC_IBF'
                            ( type = 'I'  number = '008' )
                              type = 'E' ( number = '050' message_v1 = 'AA')
                                         ( number = '051' message_v1 = 'BB')
                                         ( number = '055' message_v1 = 'CC')
    DATA st_log_disp_prof TYPE bal_s_prof.
    CALL FUNCTION 'BAL_DSP_PROFILE_POPUP_GET'
      IMPORTING
        e_s_display_profile = st_log_disp_prof.
    st_log_disp_prof-use_grid   = abap_true.
    st_log_disp_prof-disvariant
      = VALUE #( handle = o_msg_list->get_handle( )
                 report = sy-repid
    CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
      EXPORTING
        i_s_display_profile  = st_log_disp_prof
      EXCEPTIONS
        profile_inconsistent = 1
        internal_error       = 2
        no_data_available    = 3
        no_authority         = 4
        OTHERS               = 5.
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.
    BR,
    Suhas

  • BAPI return message problem

    Hi All,
    I created BAPI for Sale order the order created successfully but the return message S -success  is not coming- but the error message the sale order is already exist. How to solve this. I used the returnmessage for BAPI - BAPIRETURN1.
    Thanks,
    Suresh Maniarasu
    Edited by: suresh maniarasu on May 23, 2009 12:20 PM

    Well S  is not coming because there is no Success. Its giving error that Order already exists in system. Seems like straightforward condition.

  • How to handle BAPI RETURN message?

    Hi ,
    I developed a bapi ,it is calling from java  application . i don't konw how to send the return message to java application .Pl any one help out this problem.
    Thanks&Regards,
    Pratap

    bapi's normally have a return parameter of type BAPIRETURN (structure) or BAPIRET (internal table) that contain the result messages from a bapi. So if you develop your own bapi you should add this kind of export parameter.
    regards,
    Hans

  • BAPI return message

    Hi,
    I am trying to use 'BAPI_INQUIRY_CREATEFROMDATA2' to create Inquiries. It is creating successfully. But if there any pricing errors like 'Pricing error: Mandatory condition SRP5 is missing', it is not giving this return message but instead giving generic return message saying 'The sales document is not yet complete: Edit data'.
    If we use BDC to create the Inquiry, if the same problem happens, it does gives the specific return message ('Pricing error: Mandatory condition SRP5 is missing').
    Is there a way to get this specific return message from the BAPI as well?
    Thanks..
    Swetha.

    Hi Swetha ,
    BAPI is a kind of direct table update and BDC is creation of data thro' screen validation. So SAP take cares of all the validation when you run the BDC, but in case of BAPI, you will always get these kinds of message which are hard to interpreter. Also there is no way to manipulate these messages.
    Thanks,
    Mandar

  • How to write a return in a text file.

    Hi, i am trying to write diferent lines into a text file, i write strings ending with \r\n but it doesn't work, how could i write in diferent lines?
    Thanks.

    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("myfile.txt")));
    out.println("This is the first line");
    out.println("This is the second line");
    out.flush();
    out.close();Jesper

  • BAPI return messages.

    Hi,
    When we create a sale order manually using VA01 tcode, we will be getting messages like 'material entered is critical part' or when the customer is on credit hold we will be getting 'Credit check maximum document value exceed'.
    My problem is i am not getting these messages in my return table when i create a sale order using 'SD_SALESDOCUMENT_CREATE'. Whether there is any value we need to pass in the import to get all the messages type S, I, W in our return table.
    Please let me know the solution.
    It's very urgent.
    Thanks,
    Srinath S.

    after my bapi call.
    i gave append <my_ret_table>.
    eg:
      CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
        EXPORTING
          sales_header_in     = header
        IMPORTING
          salesdocument_ex    = sales_doc
          sales_header_out    = header_out
          sales_header_status = header_status
        TABLES
          return              = bapireturn
          sales_items_in      = sditm
          sales_items_inx     = sditmx
          sales_partners      = parnr
          sales_schedules_in  = sch
          items_ex            = item
          schedule_ex         = schedule
          business_ex         = business.
    APPEND bapireturn..
    but the last message is appended again.

  • How to write messages into system log(sm21) using c_write_syslog_entry

    Hi,
    May i know how to write my application messages into system log(sm21)
    using "c_write_syslog_entry". Any explanation regarding the Type. ID, Data
    will be useful with examples. Incase of any other FM's or C functions does
    the same Please let me know.
    Thanks
    Prasath

    Hello Prasanth
    I agree with Kareem that you should prefer the application log. If interface IF_RECA_MESSAGE_LIST is available on your SAP system this is the first choice for collecting messages AND storing them as application log.
    For an example you may have a look at my Wiki posting [Message Handling - Finding the Needle in the Haystack|https://wiki.sdn.sap.com/wiki/display/profile/2007/07/09/MessageHandling-FindingtheNeedleintheHaystack]
    Not shown in this example is the storage of the application log. However, if you look at method CF_RECA_MESSAGE_LIST=>CREATE you see that you can add the application log references here.
    Regards
      Uwe

  • Regarding BAPI Return Parameter.

    Hi All,
              I want to create Bapi Return Message with Variable values like : ' Sales Order 1876738267 is not created, please try again.' and want to create a log of this after BAPI calling in Calling FM. How can I do this. Please guide me.
    Thanks in Advance.

    Hi,
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
      EXPORTING
        ORDER_HEADER_IN           = sd_header
      WITHOUT_COMMIT            = ' '
      CONVERT_PARVW_AUART       = ' '
    IMPORTING
       SALESDOCUMENT             = sd_doc_num
      SOLD_TO_PARTY             =
      SHIP_TO_PARTY             =
      BILLING_PARTY             =
       RETURN                    = return_it
      TABLES
        ORDER_ITEMS_IN            = itemin_it
        ORDER_PARTNERS            = partnr_it
      ORDER_ITEMS_OUT           =
      ORDER_CFGS_REF            =
      ORDER_CFGS_INST           =
      ORDER_CFGS_PART_OF        =
      ORDER_CFGS_VALUE          =
      ORDER_CCARD               =
      ORDER_CFGS_BLOB           =
      ORDER_SCHEDULE_EX         =
    WRITE : / 'sy-subrc = ' , SY-SUBRC.
    IF NOT SD_DOC_Num IS INITIAL.
    WRITE : / 'Sales Order ' , SD_DOC_Num, 'Created'.
    ELSE.
    WRITE : / 'incorrect'.
    WRITE : / RETURN_it-TYPE , RETURN_it-MESSAGE.
    WRITE : / RETURN_it-LOG_NO, RETURN_it-LOG_MSG_NO,
              RETURN_it-MESSAGE_V1.
    ENDIF.
    Hope this helps you.
    Thanks,
    Ruthra

  • Passing BAPI  Error Messages to BDC  Session.

    Hi,
    Can any one drive the idea how to convert rather passing BAPI error messages into BDC session.
    regards.

    Naveen,
    I am sure you already have the logic of "If the call transaction is errored out you create a BDC session for the same data".
    Now, when your BAPI fails, irrespective of the error, you need to build the BDCDATA table and pass the data to the session. So, I don't you really need to know the errors and pass them to the BDC Session.
    Check the RETURN table of the BAPI, if it has got E / A / X error types then you can build the BDCDATA table and create the session.
    Regards.
    Ravi
    Note : Please mark the helpful answers and close the thread if the issue is resolved.

  • Native SQL: insert data into oracle database, no return message.

    hi,
    the statement : insert into <TableName> values (Source)
    how can I know if the data have already insert to the database table?
    now I have a program have this problem: the data has already exist, but there's no error message return when insert the same data again.
    data: dbs like dbcon-con_name value 'HRGK',
                       dbtype type dbcon_dbms.
    data: sqlerr_ref type ref to cx_sql_exception,
             exc_ref    type ref to cx_sy_native_sql_error,
             error_text type string.
    data: cnt type i,
            i(2) type c.
    set locale language 'E'.
    EXEC SQL.
      CONNECT TO :DBS
    ENDEXEC.
    EXEC SQL.
      SET CONNECTION :DBS
    ENDEXEC.
    EXEC SQL.
      SELECT COUNT(*) from org_unit into :cnt
    ENDEXEC.
    write: / cnt.
    *do.
    i = 'A'.               
    try.
        EXEC SQL.
          BEGIN
           insert into ORG_UNIT ( ORGAN_ID, UNIT_NO, UNIT_NAME, PARENT_ID)
                         values ( 'A', '123412', 'SDFSG', 'DDS');                     " ORGAN_ID is primary key
    " If the data 'A' has already exist in database ORG_UNIT, it will show error message
    " But if I use :I instead 'A', it will not show error message.
            IF SQL%FOUND THEN
               COMMIT;
            END IF;
          END;
        endexec.
        EXEC SQL.
          SELECT COUNT(*) from ORG_UNIT into :cnt
        ENDEXEC.
        write: / cnt.
    catch cx_sy_native_sql_error into exc_ref.
        error_text = exc_ref->get_text( ).
        write: / error_text.
      catch cx_sql_exception into sqlerr_ref.
        perform handle_sql_exception using sqlerr_ref.
    endtry.
    EXEC SQL.
      disconnect :DBS
    ENDEXEC.
    *enddo.
    *&      Form  handle_sql_exception
    form handle_sql_exception
      using p_sqlerr_ref type ref to cx_sql_exception.
      format color col_negative.
      if p_sqlerr_ref->db_error = 'X'.
        write: / 'SQL error occured:', p_sqlerr_ref->sql_code,
               / p_sqlerr_ref->sql_message.                     "#EC NOTEXT
      else.
        write:
          / 'Error from DBI (details in dev-trace):',
            p_sqlerr_ref->internal_error.                       "#EC NOTEXT
      endif.
    endform.                    "handle_sql_exception
    please help to see the words:
    *" If the data 'A' has already exist in database ORG_UNIT, it will show error message*
    *" But if I use :I instead 'A', it will not show error message.*
    in the program.
    Thanks a lot!

    resumption and jer,
    Sorry I cannot format the code for easy reading!
    The page is submitting to itself. See action = \"$uri\". I used the same logic to enter SELECT querries into the database. It pulls and displays data back on the webpage. The code I used for this is below. Compare it with the one above for inserting data into the table.
    <?php
    // connect to oracle
    $username = "xxxxx";
         $paswd = "yyyyy";
         $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
              "(HOST=patriot.gmu.edu)(PORT=1521))".
              "(CONNECT_DATA=(SID=COSC)))";
         $db_conn = ocilogon($username, $paswd, $dbstring);
    // username and password will be unset if they weren't passed,
    // or if they were wrong
    if( !isset($query)) {
    // just print form asking for account details
    echo "<form action=\"$uri\" method=post>\n";
    echo "<p>Enter Query: ";
    echo "<input type=text size=100 maxlength=200 name=query value=\"$query\">\n";
    echo "<br><input type=submit name=submit value=Submit>\n";
    echo "</form>\n";
    exit;
    // remove unwanted slashes from the query
    $query = stripslashes($query);
    // run the query
    $stmt = OCIParse($db_conn, $query);
    OCIExecute($stmt, OCI_DEFAULT);
    // Open the HTML table.
    print '<table border="1" cellspacing="0" cellpadding="3">';
    // Read fetched headers.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="e">'.ocicolumnname($stmt,$i).'</td>';
    print '</tr>';
    // Read fetched data.
    while (ocifetch($stmt))
    // Print open and close HTML row tags and columns data.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="v">'.ociresult($stmt,$i).'</td>';
    print '</tr>';
    // Close the HTML table.
    print '</table>';
    OCIFreeStatement($stmt);
    OCILogoff($db_conn);
    ?>

  • Writing an excel into message long text of se91

    does somebody know where i can write via abap fm into message long text? and where those texts are stored?

    got problems with parameters:
    My Message class  in se91 is called "Z_MAL"
    Message Number "999"
    Name of short text: "TMP Long TEXT for MAL"
    Self explanaty not marked.
    The fm wants to have more informations?
    REPORT  z_tmp_write.
    DATA: ls_line TYPE tline.
    DATA: lt_line LIKE TABLE OF ls_line.
    BREAK-POINT.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
    *     CLIENT                        = SY-MANDT
          id                                 = '999'
          language                      = 'EN'
          name                           = 'Z_MAL'
          object                           = 'Z_MAL'
    *     ARCHIVE_HANDLE      = 0
    *     LOCAL_CAT                 = ' '
    *   IMPORTING
    *     HEADER                        =
        TABLES
          lines                         = lt_line
    *   EXCEPTIONS
    *     ID                            = 1
    *     LANGUAGE                      = 2
    *     NAME                          = 3
    *     NOT_FOUND                     = 4
    *     OBJECT                        = 5
    *     REFERENCE_CHECK               = 6
    *     WRONG_ACCESS_TO_ARCHIVE       = 7
    *     OTHERS                        = 8
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      BREAK-POINT.
    Code Formatted by: Alvaro Tejada Galindo on Jan 31, 2008 11:58 AM

  • Return Messages for a BAPI run in Background

    Hi all,
    I am running a BAPI( BAPI_SALESORDER_CHANGE ) in Background task, It works fine and updates the Sales order but i dont get any return messages.But based on the return messages i need to show up on the report which orders got updated and which are not.....
    Can anyone help me how can i get the return messages when i run a BAPI in background task......

    Thanks for the quick response....I think you got me wrong...I am not running the program as a background job....I am running only the bapi in background task as below.....
                CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
                   IN BACKGROUND TASK AS SEPARATE UNIT
                     EXPORTING
                          salesdocument    = v_vbeln
                          order_header_in  = it_bapisdh1
                          order_header_inx = it_bapisdh1x
                     TABLES
                          return           = it_return
                          partnerchanges   = it_bapiparnrc.
    When the bapi runs as a background task i dont get any return messages in it_return but the sales order gets updated....
    But i will have to capture the return messages as well....How can i achieve that ?

  • How do I convert a very long text message into a multimedia message

    How do I convert a very long text message into a multimedia message

    Well, you didn't mention Mac, but to my knowledge, TouchCopy works on both platforms. And, my understanding of the OP was to send each one individually, whereas WiseJD was referring to selecting them all so you could copy them all and send, rather than emailing each individual piece.
    It wasn't that I thought it was rude, but that it was a complaint about something that someone said a year ago. You did not come here to ask a question, or indicate at all that you were looking for a solution to a similar question. It was just that you came on, slammed a response and left it at that. Those of us that take the time to answer people's questions as volunteers and users just like you. If you spend a great deal of time here, you will see a lot of different types of questions/comments that can get on your nerves. Here is a link for TouchCopy and it does work on both platforms. http://www.wideanglesoftware.com/touchcopy/

Maybe you are looking for

  • Follow Up to Scanner Input from File

    Alright, I have another problem. My code is this: for (int j = 0; j < username.length; j++) {      String line = input.nextLine();          // Create a temporary String that will store each line      // Check if the temporary line isn't empty      if

  • Table Creation of new rows in editable mode

    Hello, I'm using Jdev11g. I create a JSF page with a table, I add a button connected to CreateInsert bindings. Everything works fine but I want that when a new row is created on the table, the new row must be in editable mode. Thank's

  • QUICK ANSWER.Apple iPod touch 2nd gen. Digitizer and LCD replacement help.

    Hi, I bought a digitizer from amazon and a LCD from there. And I got them today. When I installed my LCD I got a white screen, but restored ( I didn't have my digitizer on) so I tried to touch my LCD when it said slide to unlock, but nothing unrespon

  • Brand new 5G 30 GB stutters on various different 320 Kbps mp3's  2G not

    I just got a new 5G ipod, I also have a 2G 10 Gb ipod. I love the device but noticed that, while playing 320 Kbit files the ipod stutters and jumps a fractions pf a seconds at random mp3's But it allways does this in the same place. So plaing the tra

  • Unknown Error strikes again

    I am having issues with the classic "Error compiling movie. Unknown error." bug when trying to render Quicktime H.264 720p and I was wondering if anyone has found a fix yet. The sequence I am having issues with is a combination of MXF and TIFF files,