cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Confirm production order in MII12.2

Former Member
0 Kudos
1,045

HI, I am trying to confirm a production order by MII, the way that I'm doing is running a BAPI, when I do it in the ERP alone I put three fields and those are ORDERID, POSTG_DATE, YIELD. These are the values ​​I'm passing it on MII and is not working. Anyone know how to confirm an order for production by MII?

Regards,

Victor

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I use the BAPI 'BAPI_PRODORDCONF_CREATE_TT' and fill in

TABLES/TIMETICKETS/item/ORDERID with production order

TABLES/TIMETICKETS/item/OPERATION with operation number

TABLES/TIMETICKETS/item/YIELD with 1

TABLES/TIMETICKETS/item/FIN_CONF with 'X'

I also use the start session and end session instead of the jco interface so I have to do a commit/rollback.

The message 'TRANSACTION EXECUTED OK' only pertains to the MII transaction executing without errors NOT the BAPI.

After BAPI execution check 'TABLES/DETAIL_RETURN/item/TYPE' for the character 'E' and the error message from SAP will be in 'TABLES/DETAIL_RETURN/item/MESSAGE'. Pipe that message field into a terminate transaction action block with the error flag set and you will start getting the confirmation error messages.

Former Member
0 Kudos

Hi Jasper,

I did the transaction almost like you siad because i do not know how to do commi/rollback so i did an autocommit.

The error message that tells me is that no such order of production but this orden exist.

Former Member
0 Kudos

Try zero padding the production order to 12 characters and zero padding the operation to 4 characters. I know some BAPIs are weird like that.

Eg:

Order 000001001234

Operation 0100

Former Member
0 Kudos

What do you mean operation numbre? 

I did not define operation number because i do not know what is the number

The message is:

There have been notifications for order header 60003606

But the quantity to confirm has not been afected.

Former Member
0 Kudos

The operation number refers to the routing number on the production order.

I'm guessing but the SAP transaction CO12 might confirm all operations if you don't specify one.

Go to CO03 in SAP and hit F5 (Alternatively the button beside the hat at the top), that will show you all the operations for the production order.

I'm not a PP expert and I don't know how your system is configured so you may need to get help from your resident PP expert on how your production orders are configured.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi everyone,

thanks for you help

Regards, Victor

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hello,

How can i make a User interface in order to confirm a production orders?, how can i send the value of my form to my MII transaction?

Regards,

Victor

Former Member
0 Kudos

There are a couple ways you can do this.

The easiest way is through the iCommand applet.

1) Create an XACUTE query for your transaction, linking all the input parameters and output paramter.

2) Create an iCommand applet on your irpt page.

<APPLET NAME="giveMeaningfulName" CODEBASE="/XMII/Classes" CODE="iCommand" ARCHIVE="illum8.zip" WIDTH="0" HEIGHT="0" MAYSCRIPT>

        <PARAM NAME = "QueryTemplate" VALUE="Path to XACUTE query you created. MII workbench allows drag and drop.">

</APPLET>

3) Setup and exacute the command through javascript on a button click or some other event.

//Make sure in the following example to change giveMeaningfulName to the name you gave your applet.

function buttonClicked()

{

    var queryObject = document.giveMeaningfulName.getQueryObject();

    queryObject.setParam(1, param1);
    queryObject.setParam(2, param2);

    .

    .

    .

    queryObject.setParam(n, paramN);

    var result = document.giveMeaningfulName.executeCommand();

    if(result == false)

          alert("Confirmation failed. Error message: " + document.giveMeaningfulName.getLastError());

}

Alternatively a more complex way is to use AJAX. This is a far better method since is runs asyncronously and doesn't lock the user's browser like java applets do.

try resarching how the XMLHTTPREQUEST object works in javascript and the url you want to call is.

http:\\miiserver:port\XMII\Runner?Transaction=Path to transaction&Param Name=Parameter Value&OutputParameter=Parameter Name

Transaction path starts at your project name and maps down to the transaction name without the .trx

Param Name is the actual name you gave your transaction parameters. Separate them by &.

This will return any output parameter that is non xml in the standard MII XML format of /Rowsets/Rowset/Row. If the output parameter is of type XML it will just return the XML.

Former Member
0 Kudos

Hello,

Now i can confirm a production order by SAP MII

Regards, Victor

Former Member
0 Kudos

Hi Victor,

Did you try to call BAPI from MII with the same credentials(login/pass) that you used in bapi test call from SAPGUI? Maybe permissions are not sufficient.

Regards,

Petr

Former Member
0 Kudos

Hi Petr,

yes, i tryed to call It with the same credentials.

Former Member
0 Kudos

Regards, Victor

Former Member
0 Kudos

Victor,

Sometimes when I compare result of calling bapi from GUI and external call, I find that some default fields values (like 'X' or ' ' in some fialed) are procecced correctly from GUI but not from MII, so I have to define them manualy in MII.

In your case maybe its FIN_CONF field. Try to put ' ', 'X' or '1' there.

Regards,

Petr

Former Member
0 Kudos

Hi Petr,

I defined the value as you said and still does not work. Any other option?

Regards, Victor

Former Member
0 Kudos

Hi Petr,

The error that tells me is that no such order of production but the order exist.

Regards, Victor

HariCS23
Contributor
0 Kudos

Are you getting any error while you executing it through BLS?

These are below few tips to make sure your data from MII to SAP is getting passed correctly:

- Use external debugging to see whether your data is getting passed properly

- check table bapireturn after execution..to see any error

- Make sure you check commit work check box in BLS action properties 

- Make sure your date format is right when you pass it from MII

Good luck.

Thanks

Hari

Former Member
0 Kudos

Hi Hari, i am not getting any error, the message that i recive is "TRANSACTION EXECUTED OK". In my BLS transaction i only have one action, in this action i have a JCO interface. I declare a true boolean transaction characteristic and mapped with AutoCommit. My date formate is declare as a DateTime type.

Former Member
0 Kudos

Regards,

Victor

agentry_src
Active Contributor
0 Kudos

Hi Victor,

The Production Order Confirmation BAPI does not actually execute sychronously.  It is simply accepted after a few format and content checks are done, then it is queued up for asynchronous completion.  If you are looking to see the results immediately, you need to force completion on the ECC side (and sorry, it has been a long time since I did this and I don't remember the t-code).  If you wait a little while (anywhere from a few seconds to over 10 minutes depending on your system and its load), you should see the results show up.

Regards, Mike

Former Member
0 Kudos

Hi Michael,

I do not have any change yet

Regards

agentry_src
Active Contributor
0 Kudos

Hi Victor,

You should be able to look up the confirmation by the number of the Production Order or (I can't remember this) by the Confirmation number if it was supplied in the response xml.  If you can't see it or it is still incomplete, let me know and I will get a PP/PPPS expert to visit here.

Regards, Mike

Former Member
0 Kudos

Hi Michael, when i make a partial confirmation from SAP GUI i do not get the confirmation number but  i can see that the confirmation was correct because the amount still to be confirmed was change

Regards,

Victor