Skip to Content
avatar image
Former Member

Read messages from BAPI

Hi....

How to read the messages from BAPI returned table.

Regards,

SP

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 15, 2008 at 10:31 AM

    Hi,

    data: it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

    CALL FUNCTION 'BAPI_PO_CREATE1'

    EXPORTING

    POHEADER = HEADER

    POHEADERX = HEADERX

    • POADDRVENDOR =

    • TESTRUN =

    • IMPORTING

    • EXPPURCHASEORDER =

    • EXPHEADER =

    • EXPPOEXPIMPHEADER =

    TABLES

    RETURN = IT_RETURN

    POITEM = ITEM

    POITEMX = ITEMX.

    &----


    *Output the messages returned from BAPI call

    &----


    LOOP AT it_return.

    WRITE:/ it_return-type, it_return-id, it_return-number,

    it_return-message.

    ENDLOOP

    thanx.

    Edited by: Dhanashri Pawar on Oct 15, 2008 12:31 PM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 15, 2008 at 10:32 AM

    Hi

    create a internal table type BAPIRET2

    and pass the value returned by RETURN parameter of BAPI to this .

    hence u will get data in ITAB .

    Regards

    Sachin

    Add comment
    10|10000 characters needed characters exceeded