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

handing error in FM

Former Member
0 Likes
589

Hi,

i am using FM 'HU_CREATE_GOODS_MOVEMENT' in my program.I want ot store the error records in internal table while processing. FM has error data in EXPORT parameter. But when i pass data its popping up error message 'Matriel xxx not maintained in Plant xxx 'and terminating the program.

Please suggest how to store data in internal table.

Hi,

i am using FM 'HU_CREATE_GOODS_MOVEMENT' in my program.I want ot store the error records in internal table while processing. FM has error data in EXPORT parameter. But when i pass data its popping up error message 'Matriel xxx not maintained in Plant xxx 'and terminating the program.

Please suggest how to store data in internal table.

2 REPLIES 2
Read only

Former Member
0 Likes
512

Hi,

Try calling it like this.

CALL FUNCTION 'HU_CREATE_GOODS_MOVEMENT'
* EXPORTING
*   IF_EVENT             =
*   IF_SIMULATE          = ' '
*   IF_COMMIT            = ' '
*   IF_TCODE             = 'HUMO'
*   IS_IMKPF             =
*   IT_MOVE_TO           =
*   IT_INTERNAL_ID       =
*   IT_EXTERNAL_ID       =
* IMPORTING
*   EF_POSTED            =
*   ES_MESSAGE           =
*   ET_MESSAGES          =
*   ES_EMKPF             =
* CHANGING
*   CT_IMSEG             =
EXCEPTIONS
  error_message = 99.

Note the exceptions have been handled with error_message = 99.

Regards,

Ankur Parab

Read only

0 Likes
512

the error message which is getting triggered might be having type A or X. which you might be passing when you say

if sy-subrc <> 0.

message id sy-msgid type sy-msgty ... ... ..

removed this message line and write this message to internal table.