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

Error BM 312 after commit of Process Order confirmation

Former Member
0 Likes
3,049

Hey Experts,

Some vexation power asserted me to ask this question in the forum, for I am now stuck!

I am doing Process Order confirmation (final confirmation) using the following BAPIs in my custom inbound IDOC: -

BAPI_PROCORDCONF_GET_HDR_PROP : Proposes data for final order confirmation

BAPI_PROCORDCONF_CREATE_HDR: Does the final order confirmation

but when I am committing the confirmation, I am getting an error message - BM 312

*** Commit the confirmation
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
         EXPORTING
           wait = 'X'.

IF sy-msgty EQ 'E' OR
        sy-msgty EQ 'A'.

ENDIF.

Strange enough, this error BM 312 is coming sometimes only.

A pattern noticed: Mostly it occurs only after first execution of IDOC to confirm the process order. After this error if i reprocess, status is OK.

So what did I try ?

1) I tried putting sufficient WAIT

2) Debugged the V2 updates

3) Searched for SAP notes

4) Put an extra commit too (stupid though, i understand).

5) Checked in T006 table and tcode CUNI for measurement units. Believe me, everything is just fine

All attempts in vain !!!

Somewhere in some SAP note, I read that if the confirmation is not properly saved then it does happen. But in my case, I am doing the simple Final Order Confirmation without doing the the automatic Goods Movements.

I have doing goods movement separately for other reasons and while doing so removing extra entries from COGI as well.

What bewilders me is: - What is going wrong and how do I check it ? (Ironically, when I debug, mostly it is working fine ).

If someone has had this weird error before, please suggest some way.

Thanks so much in advance!

Best Regards,

Shreya


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,269

Hey All,

So finally.. I figured it out!

It is not actually an error , but a mistake from SAP (I suppose).

Actually, the confirmation is correctly saved and committed.

SAP throws this unintended error sometimes when there are any left Good movements for the confirmations. If you do the goods movement this message disappears.

For my case, the materials in the BOM are batch managed and I am dealing with their goods movement separately through BAPI_GOODSMVT_CREATE.

So when I save the Final confirmation there are underlying materials in BOM with goods movement not done. In foreground, I do get an error message for Goods movement but that does not hamper my saved Final confirmation. We can always do goods movement separately.

So in background processing also I tried doing the same but since this message was popped up sometimes, processing stops.

I did a very crude job : - changing the msgty of 'E' to 'S' for my further processing and everything worked fine.

The confirmation was successful --> Goods movement was successful --> Process message created successfully.

It was just an illusion. Shove it off and things will work back again .

Cheers,

Shreya

Hey Experts,

Some vexation power asserted me to ask this question in the forum, for I am now stuck!

I am doing Process Order confirmation (final confirmation) using the following BAPIs in my custom inbound IDOC: -

BAPI_PROCORDCONF_GET_HDR_PROP : Proposes data for final order confirmation

BAPI_PROCORDCONF_CREATE_HDR: Does the final order confirmation

but when I am committing the confirmation, I am getting an error message - BM 312

*** Commit the confirmation
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
         EXPORTING
           wait = 'X'.

IF sy-msgty EQ 'E' OR
        sy-msgty EQ 'A'.

ENDIF.

Strange enough, this error BM 312 is coming sometimes only.

A pattern noticed: Mostly it occurs only after first execution of IDOC to confirm the process order. After this error if i reprocess, status is OK.

So what did I try ?

1) I tried putting sufficient WAIT

2) Debugged the V2 updates

3) Searched for SAP notes

4) Put an extra commit too (stupid though, i understand).

5) Checked in T006 table and tcode CUNI for measurement units. Believe me, everything is just fine

All attempts in vain !!!

Somewhere in some SAP note, I read that if the confirmation is not properly saved then it does happen. But in my case, I am doing the simple Final Order Confirmation without doing the the automatic Goods Movements.

I have doing goods movement separately for other reasons and while doing so removing extra entries from COGI as well.

What bewilders me is: - What is going wrong and how do I check it ? (Ironically, when I debug, mostly it is working fine ).

If someone has had this weird error before, please suggest some way.

Thanks so much in advance!

Best Regards,

Shreya


3 REPLIES 3
Read only

Former Member
0 Likes
2,270

Hey All,

So finally.. I figured it out!

It is not actually an error , but a mistake from SAP (I suppose).

Actually, the confirmation is correctly saved and committed.

SAP throws this unintended error sometimes when there are any left Good movements for the confirmations. If you do the goods movement this message disappears.

For my case, the materials in the BOM are batch managed and I am dealing with their goods movement separately through BAPI_GOODSMVT_CREATE.

So when I save the Final confirmation there are underlying materials in BOM with goods movement not done. In foreground, I do get an error message for Goods movement but that does not hamper my saved Final confirmation. We can always do goods movement separately.

So in background processing also I tried doing the same but since this message was popped up sometimes, processing stops.

I did a very crude job : - changing the msgty of 'E' to 'S' for my further processing and everything worked fine.

The confirmation was successful --> Goods movement was successful --> Process message created successfully.

It was just an illusion. Shove it off and things will work back again .

Cheers,

Shreya

Read only

0 Likes
2,269

Hello Shreya,

We are facing the same issue ... actually when a Process Message for consumptions (like PI_CONS)is arriving with unit 'PC' when we try to process it it is triggering  the error related with the unit of measure :


when you edit the message, delete the unit and put again the same value in the unit then all is working fine,also if you create manually the message all goes fine. Also the cusomizing, material master data ....  and everything is fine.

I guess the issue we are facing is similar the on you report, coul dyou provide any advice about how to solve it?

Really your feedback is more than appreciated.

Thanks in advance,

Silvia

Read only

0 Likes
2,269

Hi Silvia,

Sorry, I saw your message today, Probably, by now you must have already solved it.

Actually, I could not understand this strange behavior of BAPI so I just changed the E message to S (because I have checked thoroughly in the system that all is well), and moved ahead (as I have already mentioned in my second reply). It did work fine for me.

Hope this helps.

Best Regards,

Shreya