2009 Mar 31 6:35 AM
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
2009 Mar 31 7:27 AM
2009 Mar 31 6:54 AM
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
2009 Mar 31 7:27 AM
2009 Mar 31 10:43 AM