Process Orders, send idoc (LOIPRO) while creation/modification(COR1+BADI)
Hi all,
I'm just trying to send standard LOIPRO idoc when a process order is saved on COR1 / COR2 transactions. First of all I've decided to do it via user-exit but I've seen that the order number (AUFNR) is not determinated yet, so finally I'm doing it with the BADI WORKORDER_UPDATE (method BEFORE_SAVE) where there is all the data ok.
Until this point all goes fine. To send the standard idoc there is the program RCCLORD but as the order is not saved on the system tables I cannot do a submit, so I'm doing a call to the function where the idoc is send of the program ( CLOI_MASTERIDOC_CREATE_LOIPRO ). All seems to be ok, but finally it goes allways to a short dump because at the end of the function there is a commit instruction ( and it seems it is not possible into a BADI ).
There is a easy way to do it or am I on the correct way?
I'm trying a lot of possibilities ( and it doesn't work for distinct causes ) but allways the start point is the avobe process.
Many thanks in advance.
Legoles_
Ok, I believe I have this solved...
CORn
--> Create or change a PP order, release and save
BADI WORKORDER_UPDATE~BEFORE_UPDATE
--> Do your checks and call a custom function module (ZZ_SEND_IDOC) sending the aufnr, matnr, and werks. Cal this FM starting new task destination 'none'.
ZZ_SEND_IDOC (RFC-enabled)
--> wait up to 60 seconds (so update finishes)
--> add code to see if the record is no longer locked
--> Fill parameter table rsparams with aufnr, matnr, werks, logical system, and mess type
--> submit RCCLORD and return
parallel processing rules say you should not use a submit in the FM but it is working for me.
With this I can avoid using batch jobs to send these out. Yay.
Similar Messages
-
Process Orders, send idoc (LOIPRO) while creation/modification cor1
Hello,
I need to send standard LOIPRO idoc when a process order is saved on COR1 / COR2 transactions. I want to do it using user-exit but I've seen that the order number (AUFNR) does not have a value.
Is there any way to know the number? is it stored in another field ? How can I find the first user exit where the AUFNR field is already populated?
I saw a post in the same subject but there was no suggestion how to do it.
Thanks in advance,
saraHi Sara,
did you find a solution by now?
We have the same Problem.
I tried to call the function "CLOI_MASTERIDOC_CREATE_LOIPRO" from a BADi (IF_EX_WORKORDER_UPDATE~BEFORE_UPDATE" but since there is a commit inside it does not work.
Thank you! -
Process Orders, send idoc (LOIPRO) when its released and saved.
Hi ,
Here is my requirement.
For process Orders, send idoc (LOIPRO) when its released and saved. (COR2).
Here are the options I have tried.
- Create an enhancement spot after the commit statement, and submit RCCLORD
For some strange reason Submit to RCCLORD isn't working. Even I have tried to execute it independently, It isn't working properly. It is working fine from POIT, but not independently...
- Call CLOI_MASTERIDOC_CREATE_LOIPRO function module, but for this I have to get all the related data into proper tables, and I am not sure if it works either.
I have searched here in SDN to for some help, the closest thread talks about creating a ZFM for IDOC creation, but I dont have much of the details of that.
Re: Process Orders, send idoc (LOIPRO) while creation/modification(COR1+BADI)
Need some help on this.
Thanks & Regards,
Kalyan Venigalla.Hi!
not sure, but maybe it will help you:
RCCLORD have code with check already sent orders
Try add this code before submit RCCLORD
* -> free global table for collecting order numbers
free memory id 'LOIAUFNRTAB'. " -
IDOC: Process order: Message type LOIPRO
Hi
I would like to know here no other way to download LOIPRO idocs as soon as the process order or production order are created/changed.
Currently i'm using program rcclord and rccltran to create idocs. The problem I see here is that during every execution ALL orders, disregarding of the status (i.e. closed orders as well), will be exported.
G.
Message was edited by: Giovanni BaumannHi Baumann,
You can use the BADI WORKORDER_UPDATE
I am using this for releasing Process Orders. I hope this will help you..
*Appending the Selection Screen fields.
*Process Order
s_rspar-selname = c_selnam1.
s_rspar-kind = c_kind.
s_rspar-sign = c_sign.
s_rspar-option = c_option.
s_rspar-low = im_ord_header-aufnr.
APPEND s_rspar TO t_rspar_tab.
*Material Number
s_rspar-selname = c_selnam2.
s_rspar-kind = c_kind.
s_rspar-sign = c_sign.
s_rspar-option = c_option.
s_rspar-low = im_ord_header-matnr.
APPEND s_rspar TO t_rspar_tab.
*Planning plant
s_rspar-selname = c_selnam3.
s_rspar-kind = c_kind.
s_rspar-sign = c_sign.
s_rspar-option = c_option.
s_rspar-low = im_ord_header-werks.
APPEND s_rspar TO t_rspar_tab.
*Order category
s_rspar-selname = c_selnam4.
s_rspar-kind = c_kindp.
s_rspar-low = im_ord_header-autyp.
APPEND s_rspar TO t_rspar_tab.
*MRP controller
s_rspar-selname = c_selnam5.
s_rspar-kind = c_kind.
s_rspar-sign = c_sign.
s_rspar-option = c_option.
s_rspar-low = im_ord_header-dispo.
APPEND s_rspar TO t_rspar_tab.
*Logical System
SELECT SINGLE rcvprn INTO v_opt_sys FROM edp13 "#EC *
WHERE rcvprt = c_rcvtype AND mestyp = c_messageid.
s_rspar-selname = c_selnam6.
s_rspar-kind = c_kindp.
s_rspar-low = v_opt_sys.
APPEND s_rspar TO t_rspar_tab.
*Message Type
s_rspar-selname = c_selnam7.
s_rspar-kind = c_kindp.
s_rspar-low = c_mesageid.
APPEND s_rspar TO t_rspar_tab.
*This statement will submit the programme RCCLORD using the table RSPARMS
*which holds the fields to be filled in the selection screen for RCCLORD and return
SUBMIT rcclord USING SELECTION-SCREEN 1000
WITH SELECTION-TABLE t_rspar_tab
AND RETURN.
Cheers
Prasad -
IDOC fialed while creation of sales oredr
Hi Experts
We are creating sales order through IDOC and for creating SO we are using BAPI_SALESORDER_CREATEFROMDAT2 but idoc is getting failed with error
' Internal error: 10 , 000010 , NOT_ALL_INPUT_DATA_PROCESSED '
Not able to understand when this error comes. Please letme know what is the issue?
Thanks,
AmitHi,
See this [Thread|Salesorder creation through BAPI;
Also.
[Link|http://searchsap.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid21_gci1027244,00.html]
Rhea. -
Process order date changes automatically while saving the order
Hi All,
While creating a process order in COR1, system proposes the scheduled start date and finish date as current date (today's date), but while saving the order, the dates automatically changes to previous day's date (one day before). Can any one help in what config change needs to stop this auatomatic date change..? Thanks in advance.
Regards,
DS.Dear,
I would suggest you to carrout Master reciepe scheduling and update the Inhouse production time to the material master, this would enable the basic start dates and sheduled start dates to be same.
If you dont want to carrout scheduling of order, then in OPUZ transaction for the plant/order type combination deactivate the check box for automatic scheduling.
Regards,
Prasobh -
How to restrict the Number of sales orders in theTCode:VL10A whil creation
I'm creating the Delivery by using the batch job with program: RVV50R10C Here I need to restrict the number of sales orders numbers while creating deliveries for sales orders
Like system should pick the sales orders (sales documents) from 1 to 100 OR 100 to 200
Please advise me how to do it and what changes I need to do itHi,
Aslo, you can see Note 198137 - VL10: Customer-specific enhancements / user exits. As is for SO, check subroutine LV50R_VIEWG03. If cf_subrc = 1 thin this SO isn't seen in list.
***INCLUDE LV50R_VIEWG03 .
*& Form POSTAB_VEPVG_FILL_USER
FORM POSTAB_VEPVG_FILL_USER
USING IX_LIST_PROFIL TYPE SHP_VL10_LIST_PROFIL
IX_PARAMETERS TYPE SHP_VL10_PARAMETERS
IX_SELECT_OPTIONS TYPE SHP_VL10_SELECT_OPTIONS
IT_ENQUEUE TYPE SHP_VL10_PACKAGE_T
IX_SD_ORDER TYPE SHP_VL10_SD_ORDER
IS_VEPVG TYPE VEPVG
CHANGING CS_POSTAB TYPE SHP_VL10_ITEM
CF_SUBRC TYPE SYSUBRC.
CF_SUBRC = 0.
* cs_postab-zzfield = ...... "add new field to List
* if xxxxxxx = yyyyyyy.
* cf_subrc = 1. "Exclude this index from List
* endif.
ENDFORM. " POSTAB_VEPVG_FILL_USER
I hope this helps you
Regards
Eduardo -
Hi Gurus,
What is the message type and Idoc type for the process order? I found the message type LOIPRO for the production order, but didn't found for process order.
My requirement is to send the process order details to a logical system when the process order is created / released or changed.
Thanks
nagarajanHi Nagarajan Ramudu
Program: RCCLORD-Generate Production Order IDocs
Fm: CLOI_MASTERIDOC_CREATE_LOIPRO
Message Type LOIPRO (Production Order)
Process code ABI_AIDN_IN (inbound)
check below useful link:
Re: Process Orders, send idoc (LOIPRO) while creation/modification(COR1+BADI)
With above info you can resolve the your issue
Thanks
Ramesh -
Process Order Creation/Modification BADI
Hi all,
I'm just trying to send standard LOIPRO idoc when a process order is saved on COR1 / COR2 transactions. First of all I've decided to do it via user-exit but I've seen that the order number (AUFNR) is not determinated yet, so finally I'm doing it with the BADI WORKORDER_UPDATE (method BEFORE_SAVE) where there is all the data ok.
Until this point all goes fine. To send the standard idoc there is the program RCCLORD but as the order is not saved on the system tables I cannot do a submit, so I'm doing a call to the function where the idoc is send of the program ( CLOI_MASTERIDOC_CREATE_LOIPRO ). All seems to be ok, but finally it goes allways to a short dump because at the end of the function there is a commit instruction ( and it seems it is not possible into a BADI (sy-oncom = P) ).
There is a easy way to do it or am I on the correct way?
I'm trying a lot of possibilities ( and it doesn't work for distinct causes ) but allways the start point is the avobe process.
Many thanks in advance.
Legoles_Yes, it is just it, the customer wants the process order sended inmediatly to a external system, and I your solution has been evaluated and they don't want it. I've just solved it yesterday last hour with a "similar" bad solution but it was approved. We have coppied the standard function CLOI_MASTERIDOC_CREATE_LOIPRO and all the commits has been removed. It works perfect and we assume the danger of standard code copy.
Many thanks!
I will not close the post waiting if there is a better solution. -
IDOC: LOIPRO, inbound Process Code?
Hello everyone,
I'm trying to create a Production Order using IDOC: LOIPRO. I'm in the process of configuring the Partner Profile and I need to define the inbound Process Code for message type: LOIPRO. Does anyone know which Process Code to use for that message type?
Warm regards,
GlennHi Glenn,
Message Type: LOIPRO
Receiver Port: The one created in step u201CDefining a Logical Portu201D
Basic Type: LOIPRO01
if want to more about it pls do chk this link
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/201769e0-3174-2910-e287-baa58d198246
if found wort pls do te req
Thanx
Sampath -
Interface triggering while releasing the process order
Hi, please guide me that when i release the process order, standard idoc LOIRPRO02 triggers. How to set to trgigger this idoc and how to verify the same. i want to give one try in IDES, please advise.
Edited by: raju garu on Nov 28, 2010 3:21 PMClosed as no response received.
-
Issues during Component Batch Determination for Process Orders
Hi,
I am encountering a strange issue during component batch determination of process order.
1. During creation of process order, when I execute batch determination, systems does determination based on strategies we have set and when I click on Copy it gives an error
"Log cannot be saved: Object/subobject not specified"
Message no. BL201
*Diagnosis
Log save cancelled because at least one log contains no object or subobject.
Object and subobject are needed to classify application logs because there are several log types. Only a few logs are managed in main memory at runtime, so this classification is not needed.
If the logs are to be saved in the database, object/subobject must be specified for later retrieval.
Procedure for System Administration
Object/sub object can be passed when a log is created (function module BAL_LOG_CREATE) and changed with BAL_LOG_CHANGE.
The possible values for object and sub object must be configured in transaction SLG0.*
If I save the order with CRTD status and come back again in change mode and do determination, It works fine.
Again when the order is in REL status and do the determination, It gives the same error.
This happens only for a specific plant, In other plants batch determination works in all scenarios.
I checked for all plant related Config for batch determination and coudn't find any discrepancies.
Please advise how to resolve this issue. Thanks in advance for your help
Regards,
AheeshThere Is no direct solution for your requirement just try this work around.
While defining the batch determination search strategy for process order in COB1, there is one column Quantity proposal where you can attach the Routines (This is written in ABAB code ) make use of this, define New Routines with ABAB help to fulfill your requirement. Try this if found useful award full points.
Regards,
Ajay Nikte -
Dynamically setting Processing order in SSAS using AMO script
Hi,
I am looking for a AMO script to set the processing order (sequential or parallel) while processing the cube.We have the AMO script to process the cube with all options.This is a additional feature,which I am trying to add.
I am not finding any method ,which is used for processing order from below name space.please advise.
microsoft.analysisservices
ThanksHi,
Not sure if this will help. I think that XMLA can be used to control the processing Order.
Sample code for processing an XMLA file below:
using
System;
using
System.Collections;
using
System.Linq;
using
System.Text;
using
Microsoft.AnalysisServices.Xmla;
using
System.IO;
using
System.Xml;
using
System.Net;
namespace
XMLA
class
Program
static
string mShowMsg =
"N";
static
void Main(string[]
args)
int intExitCode = 0;
//0-success
string strServer =
"", strXmlaFileName =
"", strDbName =
"", strParamUrl =
"", strEmailTo =
"", strEmailFromId =
for (int
i = 0; i < args.Length; ++i)
if (args[i].StartsWith("-S"))
strServer = args[i+1];
if (args[i].StartsWith("-i"))
strXmlaFileName = args[i+1];
if (args[i].StartsWith("-d"))
strDbName = args[i + 1];
if (args[i].StartsWith("-u"))
strParamUrl = args[i + 1];
if (args[i].StartsWith("-v"))
mShowMsg = args[i + 1];
if (args[i].StartsWith("-e"))
strEmailTo = args[i + 1];
if (args[i].StartsWith("-f"))
strEmailFromId = args[i + 1];
if (strServer ==
Console.WriteLine("Please
specify command line parameters. -S servername -i xmlafilename -d databaseid override ");
intExitCode = 1;
if (strXmlaFileName ==
Console.WriteLine("Please
specify command line parameters. -S servername -i xmlafilename ");
intExitCode = 1;
if (intExitCode == 0)
XmlaClient clnt =
new
XmlaClient();
string strOut =
"", strMsg="";
string strXmla =
File.ReadAllText(strXmlaFileName);
if (strDbName !=
strXmla = ReplaceTag(strXmla,
"<DatabaseID>",
"</DatabaseID>", strDbName);
Console.WriteLine(strXmla);
clnt.Connect(strServer);
clnt.Execute(strXmla,
out strOut,
false,
true);
clnt.Disconnect();
//check status
//Create the XmlDocument.
XmlDocument doc =
new
XmlDocument();
doc.LoadXml(strOut);
//display Error
XmlNodeList elemList = doc.GetElementsByTagName("Error");
for (int
i = 0; i < elemList.Count; i++)
Console.WriteLine(elemList[i].Attributes["Description"].Value);
strMsg += elemList[i].Attributes[
"Description"].Value +
"\r\n" ;
++intExitCode;
//display warnings
elemList = doc.GetElementsByTagName(
"Warning");
for (int
i = 0; i < elemList.Count; i++)
Console.WriteLine("Warning:"
+ elemList[i].Attributes["Description"].Value);
strMsg += elemList[i].Attributes[
"Description"].Value +
"\r\n" ;
if (intExitCode == 0)
Console.WriteLine("XMLA
Cmd Execute Successfully.");
if (strMsg !=
"" && strEmailTo !="")
if (intExitCode == 0)
SendMail(strEmailTo, strEmailFromId,
"Xmla Command Successful with messages", strMsg);
else
SendMail(strEmailTo, strEmailFromId,
"Xmla Command Errors", strMsg);
#if
DEBUG
Console.Read();
#endif
Environment.Exit(intExitCode);
static
string ReplaceTag(string
strInput, string strBegTag,
string strEndTag,
string strValue)
int nStart = strInput.IndexOf(strBegTag);
int nEnd = strInput.IndexOf(strEndTag);
if (nEnd > nStart && nStart > 0)
string strFullTag = strInput.Substring(nStart, (nEnd - nStart) + strEndTag.Length);
string strFullTagNew = strBegTag + strValue + strEndTag ;
strInput = strInput.Replace(strFullTag, strFullTagNew);
return strInput;
if (mShowMsg ==
"Y") -
Function module for Process order status
Hi techies,
I want to know the function module for process order status , idoc type is liopro01 and message type is liopro, my requirement is that based on the different status received in IDoc SAP should update the process order status, separate user status will be defined as "MO START" and "MO end" using status profile.also it has change the process order status to "TECO" also it should check the user status for "MO Abort".
Thanks in AdvanceHi ross,
Try this function module.
STATUS_CHECK_MULTI
May be helpful.
Lincon -
Automated TR creation while release the Process Order
I have to split the quantity into smaller units based on the ‘LE quantity’ before TR creation. In transaction LB03, there should be additional line items after the quantity split.
I am using the EXIT ‘EXIT_SAPLLCPP_001’. It is triggering during the transaction run. But it doesn’t serve the purpose.
Can anyone help me to achieve this functionality?Hi,
In Process Order Header Screen Go to ---> Log ---> On Release.Here you will find the detail error behind this problem.Go though it .Resolve it and then try to release the Process Order, and if required get back to us.
Suppose reason may be,
- Missing part
- Missing Capacity
- Batch Determination is required to perform.
- Any User Exit (Other then std. SAP)
Regards,
Dhaval
Maybe you are looking for
-
I use apps like photoshop, illustrator, quark for a lot of design work. I need a display that is going to give me a true representation of colour. Will the iMac G5 give me the display and colour performance of my 17" apple display. On spec the iMac t
-
Losing signal and web when on 3G
Hello, I have started experiencing this new problem recently, maybe after getting the new update, but not sure. What happens is when I have my 3G enabled, I keep losing service from Rogers (Canada) and the 3G sign goes away too. I can see in the top-
-
Using Photoshop CC with Legacy CS4 software
So if I just purchase a $9.99/mo Photoshop CC for Photographers plan (with Lightroom), can I still use my installed versions of oter CS4 products (Illustrator CS4, InDesign CS4, Dreamweaver CS4)? Generally, how well does CC play with locally install
-
Add colors to the value area in a XY chart
Hi, I want to present values in an XY Chart with Xcelsius Std 4.5. The chart is divided in 4 equal zones, so the values fall in one zone (red: critical, green: good, etc) Does somebody know how can I add different colors to the area of the chart? Whe
-
pse 12 installed, and regestered. Launched 12, problem with Sign-in. internet on line, clock agrees with local time. cannot get past sign-in.