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

Exceptions

Former Member
0 Likes
380

HI

Iam using BAPI function module and after i want to raise exceptions for it .

i have wt_return table..

Now iam doing like this

Read table t_return in to s_return with key type = 'e'.

if sy-subrc = 0.

write : s_return-message.

endif.

I want to avoin write and want to use Raise..

Iam using another way

if t-return ca 'ea'

message id msg-id

message type msg-type

message number ...

its giving dump saying message type should e a,e,w,i,s..

Thanks in advance

2 REPLIES 2
Read only

Former Member
0 Likes
355

Hi

If you have defined exceptions in the BAPI function module

based on sy-subrc value you can raise exceptionslike

Case sy-subrc.

when 1.

rasie < exception name1>.

when 2.

rasie < exception name2>.

when 3.

rasie < exception name3>.

when 4.

rasie < exception name4>.

....

endcase.

Reward points if useful

Regards

Anji

Read only

0 Likes
355

Hi

Iam calling the standard BAPI Fm

iam using bapi_material_savedata,bapi_document_change etc

and have return tables .

Thanks