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

Handelling function module

Former Member
0 Likes
585

Hi Experts..

I am working in scripts.

I want to read HEADER TEXT of delivery, by using the function module READ_TEXT.

But in this case I want to handle the exception.

ie. if driver program doesn't find any ID for function module, it should not give the error.

now it is giving error as 'delivery 0080011752 id 0001 not found'.

Can anybody tell me "how to handle this exception?"

Thanks

3 REPLIES 3
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
527

You can check sy-subrc after function call and do whatever you want to do here .

Case sy-subrc.

when 4.

==> write logic fo rwhat you want here.

Endcase.

Read only

Former Member
0 Likes
527

Hi,

This exception will occur, when Sy-SUBRC is '1' after excuting the FM...so u can write the case on sy-subrc and Raise ur Customized message..

Eg:

case sy-subrc.

when '1'.

raise 'message'.

Hope its clear!!

Rgds,

Pavan

Read only

Former Member
0 Likes
527

Hi,

You can solve ur prob my making z function module of read_text.

Thanks