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: 

BAPI_GOODSMVT_CREATE error messages

former_member1326872
Participant
0 Kudos

Hi,

I'm using BAPI_GOODSMVT_CREATE for Goods issue. I'm trying to find out the possible error conditions when using this BAPI. But I'm not able to get te list of error return messages given by this BAPI. My program is calling this BAPI. To prepare an unit testing plan for my program I need a list of errors given my this BAPI.

In the BAPI documentation the following is mentioned: "Messages are returned in the Return parameter. The parameter documentation shows the return codes and their meanings"

But I'm not able to get or locate the return codes and their meanings. Can I get some help on how to get this list of return codes and their meanings?

Thank you...

Priya.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Do you mean while using the BAPI in your program and testing, you never got a return error message in the return table?? Congrats!!

There is no standard list of error messages that the BAPI throws, depends on the error condition. e.g. try posting for a posting period which is not open, you will get e return error message (the same you will get in MIGO). Or simply try to post with quantity greater than PO quantity, you will get error.

8 REPLIES 8

Former Member
0 Kudos

BAPI will give you all kinds of error messages, which you will get by executing the Transaction to post documents.

I am not sure about the list of all the error messages.

But you can debugg the BAPI and put break point on MESSAGE and check all the messages.

Regards

Aman

Former Member
0 Kudos

Do you mean while using the BAPI in your program and testing, you never got a return error message in the return table?? Congrats!!

There is no standard list of error messages that the BAPI throws, depends on the error condition. e.g. try posting for a posting period which is not open, you will get e return error message (the same you will get in MIGO). Or simply try to post with quantity greater than PO quantity, you will get error.

Former Member
0 Kudos

Hi !

It can give you back all error messges that are possible during an MM tansaction as MB11 ...

What you can do to see some of them is to go to the SE16 and there to the table T100.

Fill the field ARBGB with 'MM' and execute. Then you'll get a list of all MM Messages.

There may be other messages when you refer to objects i.e. used by SD.

Regards

Rainer

Some points would be nice if that helped a bit.

Former Member
0 Kudos

just let me know the values of the return table ? if u are not getting the any messgaes from the BAPI , so there is no probs with ur coding.

check the sample Code


* Post Document
  call function 'BAPI_GOODSMVT_CREATE'
       exporting
            goodsmvt_header       = l_gheader
            goodsmvt_code         = '05'
       importing
            goodsmvt_headret      = l_goodsmvt_headret
            materialdocument      = l_materialdocument
            matdocumentyear       = l_matdocumentyear
       tables
            goodsmvt_item         = i_gitem
            return                = i_return.
 if i_return[] is initial.
 commit work and wait.
 call function 'DEQUEUE_ALL'.
 if sy-subrc = 0.
 write: l_materialdocument.
 endif.
 clear i_gitem[].
 else.
 format color col_negative .
 write: 'Input File Contains Following Errors'.
 format reset.
 loop at i_return.
 write:/'Row No ', i_return-row , i_return-message .
 endloop.
 endif.

0 Kudos

Thanks to all for the help so far!

Can anyone tell me what are the possible error conditions under which the transaction MIGO or MB1A (while creating a Goods Issue) will give errors without creating the material document number?

Thanks,

Priya.

0 Kudos

Hi Prabhu,

Just to know, why put you a DEQUEUE_ALL function after COMMIT ?

Thanks

Dominique

Former Member
0 Kudos

Hi,

the possible list of error messages can be endless, it can start with basic things like if the material passed in your bapi is wrong then the message could be 'Material is invalid'.

But in order to find out the error messages returned by bapi read the table parameter RETURN if there are any erro messages . Just check out records of with field TYPE = 'E', all of these are error messages

Former Member
0 Kudos

Hi Priya,

Depending on the data situations, there could be either a system message or user specific (Exceptions from the user exits, BADI's etc). To have an overview of the system messages in inventory management, refer to transaction OMCQ.

Manoj