CATS IDoc inbound problem - Transaction lock, LR002

Customer is posting CATS records via interface from externa system to IDoc for CATS processing. Either the create BAPI (BAPI_...) is used or if there is a change to an already existing posting (BAPI_...). For his i have slightly modified the SAP standard existing FM for CATS inbound processing (IDOC_) to handle both scenarios, create and change. I basically examine CATS data from external system and if it is already existing then I call the change BAPI and if not found the I call the create BAPI.
We have no problem posting with these BAPIs when there postings are imported one by one. But, when several CATS postings arrive at the same second then not all postings are handled correctly. We receive error message "Transaction locked by user XXX" (error message e002(lr)) and XXX is the background communication user. No luck using "Where used" for error 002 in message class LR either. Also tried tracing with trans SE30 but no luck there either.  Data is always different but can be for the same personell number. User is correct and not locked - it is the transaction (like CAT2) thats SAP standard reports as locked. Some postings go through alright but then after a few corrrect posting this problem pops up. Very frustating.
Code is correct as it seems only to be a "overflow" problem. Config and data is also correct. Customer was also facing the very same error using the same BAPIs called via RFC and not via IDoc.
Reason to change to IDoc was of course to set the posting as synchronous thus avoiding this "overflow" problem. In standard SAP is IDocs processed in parallell which is fine in many circumstances but not here. Or it might be OK as long as this error don't occur but have found no way so far. Customer is in production and this must be solved. We also tried this in a band new upgraded ECC 6.0 EhP5 system as customer is in the process of upgrading. Same error.
I have found very few hints when searching through Google, SAPNet, SDN etc. This is one of the very few links I found: [Locking problem with FM EDI_DATA_INCOMING;
So I checked this in trans WE46 but as customer is running ECC 6.0 EhP3 we have no such option. Then tried trans nOYEAn setting the parameter "Synchronous processing" but I do not understand how this is supposed to work. Problem stills remains. The values are stored in table EDICONFIG and here parameter INBSYNC is used for the synchrounous setting as of my understanding but we only have this for a user called EDIADMIN and that is certainly not our background user. I don't understand how to set this parameter correctly I guess. SAP help doen't give more insight either - at least not for me.
Does anyone have a suggestion how to solve this problem? Anyone solved this before and willing to share a solution?
<< Moderator message - Please do not promise points >>
I maybe beed to send this to SAP OSS but trying this option first.
To me this is puzzling. Find very few references which normally means few have encountered this. Strange. CATS BAPI interfacing must be used by a lot of companies.
BR, Johan
Edited by: Rob Burbank on Nov 7, 2011 2:36 PM

Hi Johan,
These kind of problems arise when there is a very little time gap between two successive postings. So put a 'WAIT UP TO 2 SECONDS' between each of the postings. This will give time for the previous posting to perform the updates even before the next posting hits the same transaction. This will solve your problem.

Similar Messages

  • Idoc inbound problem

    Hi Friends,
    I am facing a problem in IDOC inbound processing.
    My scenario in SALES PER RECEIPT - POS like this: I have to read XML (From PC) file and i have to post it.
    I am using Idoc - WPUBON01. After reading XML file i used Function module to distribute - MASTER_IDOC_DSTRIBUTE.
    In we02 i checked Idoc is generating but status showing 29.
    So run the report RSEOUT00. But i am getting message like 'No idoc is selected for processing'.
    Plz help me what i have to do. I created port also.
    Regards,
    P. Kumar.

    hi kumar,
               if u get status 29-error in ale service- check partner profile first.if it exists check ur logic where u modify control record,else create partner profile and restart again.
    Reward if usful.
    Thanks,
    Srikanth.A

  • IDOC Inbound processing and Locks

    Hi there,
    we are trying to process an incoming idoc. But all the time we get an error: Immediately processing not possible: EDI: IDOC "XYZ" is currently locked.
    There is an lock entry for this IDOC in table EDIDC. We get this error while calling the FM IDOC_STATUS_WRITE_TO_DATABASE with status 52 (application doucument not fully posted).
    What can we do?

    Exactly why are you trying to write the IDoc status to the database? 
    It sounds like you have written a custom IDoc.  If this is so, you would pass the IDoc status back in table IDOC_STATUS, and it will get updated automatically by SAP. 
    When SAP extracts the IDoc data, it places an Enqueue lock on the IDOC.  That is why you are getting the error message.
    HTH,
    John

  • The IDOC INBOUND function is locking an object

    Hi ,
           I have created a wrapper bapi around IDOC_INPUT_SHPMNT , this is because i need to change the shipment using a BDC. No the problem is that once the control comes out of IDOC_INPUT_SHPMNT the locks are still maintained on the shipment.Now is this beacuse i am using WE19 to test the program or will i have manually realease the lock from this. Any pointers with function modules will be helpful.

    IDOC_INPUT_SHPMNT  will be locking the shipment. The lock will not be released until the IDoc has finished processing.
    You could remove the lock yourself.
    Can you not use a user exit in IDOC_INPUT_SHPMNT to provide your solution instead of running a BDC yourself. If your BDC fails how will this error be reported back to the IDoc. You would then not be able to re-process the IDoc either.

  • IDOC Inbound Problems

    Hi there experts,
    I've been through a lot of blogs, websites, google, SCN and others, but I can't find a solution for my problem.
    We need to create an interface ECC > PI using IDOC.
    All config were done to make it happen.
    When the IDOC is sent to PI (I've used WE19 for tests), it goes to PI and when I check BD87 I always have those errors:
    Error 56 : External segment name E2FIKPF007 cannot be interpreted
    Error 60 : Basic type FIDCCP02 does not exist
    So, as you can see, we are using IDOC FIDCCP02. It's basic data was configured on PI IDX2 and it is loaded just fine:
    What could be possibly wrong?
    Thank's!
    Flavio

    Hi Ramkumar, thank's for the fast response.
    When we go to IDX2, select the IDOC and choose to show the details, we have an option to show all segment versions. And there is E2FIKPF007.

  • IDoc Inbound Processing for CREMDM & DEBMDM

    Hi experts,
    I'd like to gather some feedback from you regarding the topic ERP IDoc Inbound Processing for CREMDM & DEBMDM. As you all know, there's currently no option to directly process CREMDM/DEBMDM IDocs in ERP. Currently you have to use PI for splitting the CREMDM/DEBMDM message into its related ADRMAS and CREMAS/DEBMAS IDocs.
    My areas of interest are:
    1) How satisfied are you with the current situation? Does the split work? Are there issues or problems in the current message handling? What are the Pro's and Con's from your point of view?
    2) What would be the requirements for a CREMDM/DEBMDM handler? What would you expect? Maybe you have implemented  something similar on project basis and could post some feedback?
    One painpoint I'd see with a CREMDM/DEBMDM inbound is that you'll lose the IDoc Monitoring capabilities. The message split allows a single record tracing in the IDoc Monitor (as there is a 1:1 relation between IDocs and records). This changes for the mass processing. The monitor would display only the status of the IDoc and you'd need some other monitoring capabilities to check the results on record level. What are your thoughts about that? Is the monitoring important? Would the application log be a feasible solution for that challenge?
    Additional comments are welcome, of course.
    Best regards
    Michael
    PS: @ Matt, please contact me by mail. thanks.

    Hello ,
    Here are some other pain areas regarding the message split :
    1. Complicated monitoring proess & reprocessing error idocs : We have to monitor ADRMAS & CREMAS or ADRMAS & DEBMAS during inbound processing. Also we could not find any best practices to reprocess error idocs. E.g. If ADRMAS fails & CREMAS succeeds what is the impact . Also the impact if it is reveresed. We know for sure that if CREMAS fails , vendor will not be created / updated. But we could not find specific pointers for ADRMAS failures.
    2. It is a tedious process to link CREMAS with corresponding ADRMAS idoc specially when SAP maintains internal number range for vendors.
    3 . The process is complicated if you are managing customer or vendor contact information with contact address . We could succesfully implement the integration but it took us a while to reach end-point.
    4. Splitting really does not seem to support if ERP maintains internal number range.
    5. Another major issue we observed is , if ADRMAS is under process & corresponding DEBMAS or CREMAS is posted , it fails raising the message that Account is locked. Default serialization does work in ERP system . But overlap of few microseconds also cause this error.
    Hope this helps !!
    Please let me know if you need any other specific details since we have used MDM - ECC integration using PI to its maximum extent .
    Regards
    Yogesh

  • IDOC performance problem

    Hi All,
            Currently I come across a idoc performance problem,in we20,the idoc inbound process code invoke BDC manner.
    the detail as follows:
    (1)Seebeyond send the idoc to SAP side.
    (2) Idoc added(Status 50)
    (3)IDoc ready to be passed to application(64)  11:06:27
    (4)IDoc passed to application(62)                   11:21:22
    My question is why the process time spend so much when idoc status from 64 to 62,what is the affect factor.whether the process time include BDC execution time.Thanks.

    Hi,
    I think it has taken much time to get the status 62 from 64 status.
    In the partner profile WE20 transaction for this interface you have used Collect IDOC's option. If that is the case till your background runs it will get into 62 status.
    If you use trigger immediately option in WE20 transaction then as soon as the IDOC is in 64 status it will be processed that is it will 62 status immediately.
    I hope I have answered your question.
    Thanks,
    Mahesh.

  • Urgent: Automate IDOC Inbound/ Outbound

    Hi all,
    I need to automate the whole IDOC process, inbound and outbound.
    For inbound, I need to run or schedule a program that will read all files in a given directory as separate idocs. Note that the filename is not constant, whatever file is in the given directory should be consumed. I don't know if I can use we16 for this still. If I could do this, I just need to schedule RWPOS_PARA_ENQUEUE and I' finished.
    For outbound, what do I do for the system to automatically generate IDOCs? I thought if I activate change pointers, IDOCs will automatically be generated if a change is detected. I am using SAP Retail, one of the idocs is similar to matmas but I cant use BD10 for this. The other two idocs are still problems for me.
    In short, what do I do to automate eveything?
    Thanks so much,
    Kenny

    Hi Kenny Martinez ,
    For Inbound Automation
    First attach your idoc to a process code.
    In the process code you can tell the system that the specified program should be triggered whenever an idoc of that type comes to the system.
    Then you want to have a Z-function module for your idoc processing, if I understand correctly.The steps should be:
    1. Create a z function module for idoc inbound posting (copy from a function module idoc_input_*).
    2. Set Function Modules as Inbound: - Transaction BD51
    3. Assign Function Modules to Logical Messages and Idoc types:- Transaction WE57
    4. Create process codes : Transaction WE42, and link the z-function module.
    5. Create partner profile: transaction WE20 and attach the message type and process code.
    6. In the Z- function module, extract data from the idoc segments, do whatever processing you want to do, and then call BAPI_CREATE_SALES_ORDER_FROMDAT2.
    Good Luck and Reward me for the same.
    Thanks
    Ashok.N

  • Transaction Locking during multiple Webservice - persistent webs sessions

    Hi All,<br>
    <br>
    Yesterday evening we had a discussion concerning ESA architecture. We want to create (web)services for accessing the SAP business objects (using XI) and use these (web)services via visual composer, webdynpro or custom java development.<br>
    <br>
    It does not seem a big problem to perform creations and reads of transaction, but when we want to change objects, we saw some problems concerning locking/commiting and rollbacks.<br>
    <br>
    From our GUI we would like to be able to go in edit mode and from that moment on, the transaction should be locked. We then want to change certain parameters and commit only when we push the save button.<br>
    <br>
    We can invoke a webservice wich tries to lock the transaction, but at the moment the XI scenario is completed (=the lock is created), the program at SAP side (=proxy in our case) is also finished and the lock is automaticly removed. How can we do locking, when using webservices via XI?<br>
    <br>
    The problem of the rollback and commit we can partially solve by putting more logic in the GUI, but we don't want to do that. How can we do a change of a business object and remember this change without doing a commit on the SAP system.... . Same problem for the rollback.<br>
    <br>
    Is there a away to keep a session "alive" during multiple webservice calls or to simulate it? Every webservice invokation happens in a different context...isn't it?<br>
    <br>
    <br>
    <b>Just to make it a bit more clear.</b><br>
    <br>
    Suppose we create 6 service related to the business object bupa (business partner).<br>
    - read<br>
    - change<br>
    - commit<br>
    - rollback<br>
    - lock<br>
    - unlock.<br>
    <br>
    We create a GUI which uses these services.<br>
    <br>
    <b>Step1:</b> we want to see bupa in detail, so the read webservice is called and the retrieved details are shown in the GUI<br>
    <b>Step2:</b> we want to go in edit mode, so the lock webservice is called to lock the bupa. The bupa should stay locked, untill the unlock is called. Here occurs the problem. The webservice lock is called, XI will trigger the proxy on the SAP system. This proxy will lock the bupa. As soon as the proxy-program is completed, the bupa lock will automaticly be removed ... . We want to keep this lock!<br>
    <b>Step3:</b> we change the bupa using the change webservice. Only the user who locked the bupa should be able to change it.<br>
    Problem concerning the locking occurs: standard we don't know who locked the bupa (this is done by the generic RFC user, configured in sm59). Should we pass some kind of GUID towards the proxy and build some additional logic to know which end-user in fact locked it... . Using the userid isn't sufficient, because a user could logon multiple time simultanously.<br>
    <br>
    Another problem is that we want to change the bupa, without having to do a commit yet.De commit should be called only when pushing the save button. When the proxy is ended and we did not do a commit, the changes are lost normally ... .<br>
    <br>
    What we in fact want to do is Simulate the bsp behaviour.<br>
    <b>Step4:</b>We want to perform a save of the things we changed or a reset. This means the commit or rollback webservice is called.<br>
    <b>Step5:</b> We want to unlock the bupa by calling the unlock webservice.<br>
    <br>
    <br>
    Please give me your comments.<br>
    <br>
    Kind regards<br>
    Joris<br>
    <br>
    Note: Transaction Locking during multiple Webservice "sessions".
    Message was edited by:
            Joris Verberckmoes

    There are multiple strategies how to resolve this. They require that the last change time is available in the changed object, and also that the client keeps the value of the change time when it read the data.
    1. First one wins
    Immediately before posting the changes, the current change time is read from the server. In case it is different from the client buffer, then the client changes are discarted.
    Example:
    1. Client A reads data
    2. Client B reads data
    3. Client B changes its buffer
    4. Client B checks if server change time has changed (result is no)
    5. Client B writes his changes to the server
    6. Client A changes its buffer
    7. Client A checks if server change time has changed (result is yes)
    8. Client A discarts its changes
    2. Last one wins
    Easy. Client just writes his changes to the server, overwriting any changes that might have occured since it read the data.
    Example:
    1. Client A reads data
    2. Client B reads data
    3. Client B changes its buffer
    4. Client B writes his changes to the server
    5. Client A changes its buffer
    6. Client A writes its changes to the server -> changes from client B are lost
    3. Everybody wins
    Most complicated. In case of concurrent changes, the client is responsible for merging his changes with the changes from other clients and to resolve any conflicts.
    Example:
    1. Client A reads data
    2. Client B reads data
    3. Client B changes its buffer
    4. Client B checks if server change time has changed (result is no)
    5. Client B writes his changes to the server
    6. Client A changes its buffer
    7. Client A checks if server change time has changed (result is yes)
    8. Client A merges its changes with changes from client B
    9. Client A writes his changes to the server
    "Last one wins" is definitely not water-proof. But even with the other strategies, data can potentially get lost in the short timeframe when the change time is checked and the actual update.
    To make it more secure, server support is required. E.g. the client could pass the change time from its read access to the server. The server can then reliably reject the update if the change data has been updated in beetween by another client.

  • Error : Pre Settings for IDoc inbound processing are missing error

    Hi Experts,
    There is a CRM job which executes LSMW and I am facing a strange problem during the IDOC posting the error "Pre Settings for IDoc inbound processing are missing error". Can anyone please tell me how to correct this error?
    Thanks in advance.
    Madhurima.

    I'd start with the following document, with one modification. At step 12 after typing GEARAspiWDM press the Enter/Return key once prior to clicking OK. (Pressing Return adds a carriage return in the field and is important.)
    [iTunes for Windows: "Registry settings" warning when opening iTunes|http://support.apple.com/kb/TS3299]

  • Need help for IDOC inbound function module !

    Hi guys please help me to create a IDOC inbound function module.
    What are the parameters and tables.
    How to write the code.
    What it does.
    Please send me one inbound func module code if possuble
                                                                                  Thanks

    Hi,
    You need to create an inbound function module. Then define the process code in transaction we42 and attach the function module to this process code.
    In the function module you create you need to define tables of types EDIDC (Control record (IDoc)), EDIDD (Data record (IDoc)) and BDIDOCSTAT (ALE IDoc status (subset of all IDoc status fields)).
    Regards,
    Soumya.

  • LSMW idoc Inbound Processing settings

    Hi,
    We have done LSMW with BAPI method to create Bank master.
    In Idoc Inbound Processing settings -
    We created partner type as 'B' i.e, for BANK
    While creating Partner Number it is not allowing to create Partner Number. The error is  "Enter a permissible partner number"
    Please let me know what would be the problem.
    Regards,
    Hari
    Edited by: Bhatlapenumarthy Hari Krishna on Sep 12, 2008 9:31 AM

    Hi,
    Use patner type as US only and LSMW as Patner number.
    this will surely solve your problem .
    plz do this way :
    The first requirement is a file port for the file transfer. If required, create a port of the file type via Maintain ports. To do this, position the cursor on "File" and press Create. You should be in change mode. SAP recommends:
    Port: LSMW
    Name: Legacy System Migration Workbench
    Version: 3 (IDoc record types SAP Release 4.x)
    Outbound file Please enter a (dummy) physical directory and a file name, i.e. u2018filelsmwu2019 ·
    As an addition, you can specify a tRFC port. This port is required, if you do not want to create a file during data conversion but submit the data in packages directly to function module IDoc_Inbound_Asynchronous.
    SAP recommends:
    Port: assigned by the system
    Version: 3 (IDoc record types SAP Release 4.x)
    RFC destination: Name of R/3 System
    Name of port: Legacy System Migration Workbench.
    Then the partner type should be defined or selected. SAP recommends:
    Partner type: "US" (User)
    As of release 4.5A, this partner type is available in the standard system. Up to release 4.0B inclusive, this partner type is not available in the standard program and should be added. SAP recommends:
    Partner type: Create US
    Report name: /SAPDMC/SAP_LSMW_PARTNERTYPES
    Form routine: READ_USER
    Short description: any.
    Finally a partner number should be defined or selected. SAP recommends:
    Partner number: LSMW
    Partner type: US
    Partner status: A (active)
    Type: US
    Language: DE or EN
    Person in charge: Your user ID.
    Activate IDoc inbound processing
    reference : help.sap
    thanx.
    Edited by: Dhanashri Pawar on Sep 12, 2008 7:10 AM

  • IDOC inbound .

    Hi Gurus ,
    i am working on IDOC Inbound process , actually it has to update picking net weight and total weight , in am using stadard message type 'SHPCON' , internally this uses the function module 'WS_DELIVERY_UPDATE_2' , but after IDOC has been posted when i search in the delivery these changes are not found.
    PLease help me on this ASAP.
    Thanks ,
    Rajeshwar.

    Hi,
    Is the issue fixed ?
    Iam also facing the same problem
    if fixed , please inform
    Thanks in advance ,
    Sarath P

  • RE:idoc inbound scenario "mapping issue"

    Hi experts,
    we r facing the problem in idoc inbound scenario, while to generate multiple idoc's.
    we need to generate the idoc's based on two fields, Location_code and Date. If any of the field is changing we need to generate the new idoc.
    below is the sender  payload :
    <row>
          <Date>20100111</Date>
          <Sign>+</Sign>
          <Tender_Code>ZSHT</Tender_Code>
          <Tender_Amount>1890.30</Tender_Amount> 
          <Location_Code>0000001000</Location_Code>
       </row>
       <row>
          <Date>20100112</Date>
          <Sign>+</Sign>
          <Tender_Code>ZSHT</Tender_Code>
          <Tender_Amount>1890.30</Tender_Amount>
          <Location_Code>0000001000</Location_Code>
       </row>
       <row>
          <Date>20100112</Date>
          <Sign>+</Sign>
          <Tender_Code>ZSHT</Tender_Code>
          <Tender_Amount>1890.30</Tender_Amount>
          <Location_Code>0000001001</Location_Code>
       </row>
       <row>
          <Date>20100112</Date>
          <Sign>+</Sign>
          <Tender_Code>ZSHT</Tender_Code>
          <Tender_Amount>4532.32</Tender_Amount>
          <Location_Code>0000001001</Location_Code>
       </row>
    for the above payload ,we need 3 idocs as below
    idoc1:
    Location_code>1000    Date->20100111
    idoc2:
    Location_code>1000    Date->20100112
    idoc3:
    Location_code>1001    Date->20100112
    under the third idoc fourth row should get repeated.
    at present we have the following mapping which is generating multiple idocs bsased on only location code, it's like
    Location_code-->removecontext-->sort-->splitbyvalue(valuechange)-->collapsecontext--->idoc
    rgds
    selvam

    Hi,
    Thanks Suraj , logic has worked but there is a simple issue , LOCATION_Code is mapped with SNDRPRN and RCVPRN of the EDI_DC40 segment when i m execuiting the payload it throws error for the second idoc generated , when the LOCATION_CODE changes this should also get updated to that field. Mapping for SDNPRN has been done like this.
    LOCATION_CODE --->removecontext-->|
                                         formatbyexample--->SNDRPRN
    idoc mapping logic---------------->|
    pl suggest...
    rgds
    selvam

  • IDOC Inbound Generation from File

    Hi All,
    I'm done with all the testing and config of partner profiles and ports.
    How do I automate the whole IDOC inbound process?
    Thanks.
    Kenny
    Message was edited by: Kenny  Martinez

    Hi Kenny
    I have also faced a similar issue in the past: To automate the process of file reading and triggering the inbound process whenever partner system (legacy system) copies a text file (containing data to be posted) to the SAP application server.
    To automate file reading for inbound process, you have to use SAP events. You can define these events using transaction SM62.
    This event will be used to execute the IDOC create program in a job based on this event.
    Every time the partner system copies the extract file to the SAP application server, this event will be  triggered which then runs the job for processing the data file.
    For more information on using SAP events, click the following link and look into topics under heading ‘Using events to trigger job starts’:
    http://help.sap.com/saphelp_erp2005/helpdata/en/fa/096e44543b11d1898e0000e8322d00/frameset.htm
    the topic, ‘Triggering events from external programs’ is quite interesting.
    Cheers
    Ashish Jain
    [email protected]

Maybe you are looking for

  • Installing Photoshop CS6 and Lightroom 4

    I currently have Photoshop CS6 and Lightroom 4 on my MacBook Pro. However I am considering a purchase of an iMac Can I install a second copy of CS6 and Lightroom on to the iMac (Same License Key), and run both at the same time Thank You

  • ADF dependent dropdown not working for me

    I used the following example [http://ranajitsahoo.blogspot.com/2008/05/how-to-implement-dependent-drop-down.html] I can not get the dependent employee list to populate. I tested my emplist object from the app module tester and the values were retriev

  • Currency conversion does OBIEE do it by default

    Hi, Newbie in this area. We are trying to build a report/analysis using OBIEE and want to have a column which displays let us say price in different currencies. The user changes the currency and the value changes. Now after reading a bit noticed that

  • Graph pagination error

    Hi, jdev 11.1.1.5 I am using dvt:BarGraph component to display some information. I want to have pagination and I do 1. Drag the bar graph onto a page 2. On the PageDef file, change the RangeSize property to 5 (in your case) 3. From the DataControl pa

  • How do I make my AE unseen by others?

    I just did a hard reset of my AE wireless and had to rename and reconfigure its settings. Now I'm wondering how I can make sure that my wireless signal is undetectable by other computers?