on 2012 Jun 26 11:52 PM
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
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Hi everyone,
thanks for you help
Regards, Victor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Hello,
Now i can confirm a production order by SAP MII
Regards, Victor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.