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

BAPI ERROR RECORDS

sumanth_naidu
Participant
0 Likes
636

Hi Gurus,

In Bapi i am able to get the error document number in debugging(background) but i could not able show the same in the out put message.

Scenario:

when uploading excel file related to goods movememnt from functional module goods_movemvt_ create i am able to post all the documents. if i have any errors in the same excel i could not able to post the entire excel, and also i wanted to show the error record in the mesage. Please help me in finding the solution.

5 REPLIES 5
Read only

Former Member
0 Likes
582

Hi

In return table of BAPI you would get all the messages ( success as well as error ). Read this table where error type is 'E' and display those records in output.

Read only

0 Likes
582

Hi Sachin,

i have done the same .. Please suggest

in first case read table lt_ret index 1.

write 'error records',lt_ret-row.

second case read table lt ret into lsret with key type = 'E'

with this iam able to get while debugging but could not able to bring to the display message.

Thanks,

nandu

Read only

0 Likes
582

Hi

What is the difficulty in displaying these messages ? If records exist then simple write WRITE statement.

Read only

0 Likes
582

CALL FUNCTION 'BAPI_ACC_GL_POSTING_POST'

EXPORTING

DOCUMENTHEADER = doc_header

IMPORTING

OBJ_TYPE = g_objtyp

OBJ_KEY = g_objkey

OBJ_SYS = g_objsys

TABLES

ACCOUNTGL = doc_line

CURRENCYAMOUNT = doc_curr

RETURN = return_log.

if sy-subrc = 0.

loop at return_log.

write:/ return_log-id, return_log-number, return_log-message.

endloop.

else.

write:/ 'File check failed', sy-subrc.

endif.

why don' t to show some thing like this

Read only

sumanth_naidu
Participant
0 Likes
582

useful thoughts...