Application Development 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: 

how can I catch the return messages of the FM?

former_member185875
Contributor
0 Kudos
538

Hi abap gurus...

i have a problem with standard function module SD_ORDER_CREDIT_RELEASE.

i am using this function module to release salesorders.

it's working fine.

but i need the return messages in tables or export parameters.

for that i did:

1. i create a z function module and inside that i call the SD_ORDER_CREDIT_RELEASE.

2. i debugged it ( to find out from where the return messages came). i didnt find out that.

could you please help me

lakshman

1 ACCEPTED SOLUTION

Former Member
0 Kudos
141

Hi,

Use the FM: FORMAT_MESSAGE.

Regards,

Deepak Raj

3 REPLIES 3

Former Member
0 Kudos
141

Hi,

Try this

DATA: BEGIN OF NEWS OCCURS 10,

VBELN LIKE VBKRED-VBELN,

TEXT(90),

MSGTY LIKE SY-MSGTY,

MSGID LIKE SY-MSGID,

MSGNO LIKE SY-MSGNO.

DATA: END OF NEWS.

CALL FUNCTION 'SD_ORDER_CREDIT_RELEASE'

EXPORTING

vbeln = fpostab-vbeln

EXCEPTIONS

error_message = 4.

IF sy-subrc NE 0.

CALL FUNCTION 'MESSAGE_TEXT_BUILD'

EXPORTING

msgid = sy-msgid

msgnr = sy-msgno

msgv1 = sy-msgv1

msgv2 = sy-msgv2

IMPORTING

message_text_output = news-text.

news-vbeln = fpostab-vbeln.

news-msgty = sy-msgty.

news-msgid = sy-msgid.

news-msgno = sy-msgno.

APPEND news.

endif.

Edited by: ShaliniSinha on Mar 31, 2009 8:02 AM

Former Member
0 Kudos
142

Hi,

Use the FM: FORMAT_MESSAGE.

Regards,

Deepak Raj

0 Kudos
141

my problem is solved..

very very tanks to both....

lakshman