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

System Error Messages while doing Change Production Order using BDC

Former Member
0 Likes
1,967

Hi,

My SAP Version is 4.6c I was doing BDC through CALL TRANSACTION method to change a production order status from TECO to CLSD. I found that If a particular Production Order is faulty because of undone final settlements or incomplete inspection lot, then the 'CALL TRANSACTION' code for BDC is unable to catch the system error messages in the messages internal table(t_messtab in the example below) attached with the 'CALL TRANSACTION' command.

For eg:

CALL TRANSACTION 'CO02' using t_bdcdata

MODE 'N'

UPDATE 'A'

MESSAGES t_messtab.

I find this happening only with transaction 'CO02'. Unfortunately, I couldnot find a suitable BAPI in 4.6C.

And the spec requires me to populate the errors generated while changing any production Order. Does any one have a solution for the above problem??

Thanks

1 ACCEPTED SOLUTION
Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,615

the t_messtab should of type BDCMSGCOLL.

Hi,

My SAP Version is 4.6c I was doing BDC through CALL TRANSACTION method to change a production order status from TECO to CLSD. I found that If a particular Production Order is faulty because of undone final settlements or incomplete inspection lot, then the 'CALL TRANSACTION' code for BDC is unable to catch the system error messages in the messages internal table(t_messtab in the example below) attached with the 'CALL TRANSACTION' command.

For eg:

CALL TRANSACTION 'CO02' using t_bdcdata

MODE 'N'

UPDATE 'A'

MESSAGES t_messtab.

I find this happening only with transaction 'CO02'. Unfortunately, I couldnot find a suitable BAPI in 4.6C.

And the spec requires me to populate the errors generated while changing any production Order. Does any one have a solution for the above problem??

Thanks

14 REPLIES 14
Read only

Former Member
0 Likes
1,615

That should be:

CALL TRANSACTION 'CO02' using t_bdcdata
MODE 'N'
UPDATE 'A'
MESSAGES <b>into</b> t_messtab.

Rob

Read only

Former Member
0 Likes
1,615

Hi Rob,

I am sorry. I did it the way that you defined with the 'into', even then I am unable to get the error messages.

Thanks.

Read only

0 Likes
1,615

While recording did you follow the menu to set it to closed ? If "YES" . It should work. When you`re running it in foreground what`s error your getting ?

Thx

Saquib

Read only

Manohar2u
Active Contributor
0 Likes
1,615

Sometimes we might get success type of messages whose behaviour is of kind ERROR.

So specially we need to handle such mesgno and mesgty.

Just I remember from back of head..sometime back..

I might be wrong. Better check what exactly the messages description is?

Regds

Manohar

Read only

Former Member
0 Likes
1,615

Hi Manohar,

Even if the Production Order has errors or no errors, I always get the SUCCESS message 'the document xxxxx is saved'.

Thanks

Read only

0 Likes
1,615

Are any user exits are activated? Any checks exit?

Regds

Manohar

Read only

Former Member
0 Likes
1,615

Is it just one message that is not being captured? Are there other messages in MESSTAB when this happens?

Rob

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,616

the t_messtab should of type BDCMSGCOLL.

Read only

Former Member
0 Likes
1,615

Hi All,

Thanks for good responses. I have done everything correctly with regard to BDC Code and commands. So, there is no problem in that. But the problem is that even though I get different 'I' type messages in the internal table, I am not able to collect the ERROR messages. For better understanding, if you can find a Production Order, in your system, which cannot be CLOSED(CLSD status) because of some error, then try doing the BDC recording on it (using transaction SHDB) and look at the messages that SAP gives out.

Read only

0 Likes
1,615

Hi Mohan,

When you get the messages after calling the transaction.

Use <b>BAPI_MESSAGE_GETDETAIL</b> to get the detailed error messages. This will give description of error technically as well. Then you can take corrective steps.

For the input parameters refer to table <b>T100</b>.

Regards,

Arun Sambargi.

Read only

0 Likes
1,615

Are you sure these are in fact "error" messages? What are the message id and message number? I'm thinking that these may be messages going into a separate popup screen (not an information message - a screen of the program).

Rob

Read only

Former Member
0 Likes
1,615

Hi Arun,

Thanks for your response. The SAP system is NOT getting the ERROR messages into the internal table although it is getting all other type such as 'I'(information) type messages. So, with out the error messages of any kind, I cannot use the BAPI mentioned by you.

Thanks

Read only

Former Member
0 Likes
1,615

hey Rob,

you are right. The SAP is showing the error messages as separate POP-UP screen in the foreground but while I do the same in Background, I don't get the same error messages.

Thanks.

Read only

0 Likes
1,615

I've seen this sort of behavior before in budgeting modules. We were never able to pick the messages up because you don't have access to the program flow while the BDC is running.

If your question is answered, then please close this thread.

Rob