Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Read messages from BAPI

Former Member
0 Likes
560

Hi....

How to read the messages from BAPI returned table.

Regards,

SP

2 REPLIES 2
Read only

Former Member
0 Likes
451

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

Read only

Former Member
0 Likes
451

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