Generating and transferring purchase requisition IDoc

In ECC 6.0 there exists ALE_PR_CREATE which gave us all the required fields for generating the IDoc that we needed to transfer to our JCo program. Once the IDoc was generated using this program, it's status was set to '30' automatically.
The next step in order to send this generated IDoc to the designated port was to make use of the standard program RSEOUT00 passing the message type so that it sends all IDocs, of that particular message type (PREQCR and PREQDL in our case) and having a status of 30, to the port, changing the status to 12 once this operation is completed.
Since it was a standard program , I used the same logic in 4.6C. Unfortunately, the function module ALE_PR_CREATE does not exist in 4.6C.
The alternative was to use ALE_REQUISITION_CREATE and ALE_REQUISITION_DELETE.
Why 2 Function modules? Here's why...
The first function module gave us all the required fields except one - the deletion indicator.
Keep in mind that this field was also provided by ALE_PR_CREATE in ECC 6.0 system thus eliminating the need to look elsewhere.
So, to satisfy our requirement of getting the deletion indicator for deleted items of a particular Purchase requisition, we found the second mentioned function module - ALE_REQUISITION_DELETE.
This threw another problem in front of us...
This function module gave us only the purchase requisition number, item number and deletion indicator. All the other data fields that we required for our java app to process the IDoc were missing.
In order to solve this issue, we have designed our program to generate 2 IDocs one after the other. First using ALE_REQUISTION_CREATE and next using ALE_REQUISITION_DELETE in sequence.
This gives us all the fields.
The next problem was that the generated IDocs were having the status 03 (Data passed to port. OK.) but the Java application never seemed to receive the generated IDocs.
A search on SDN led me to check the IDoc queue in SMQ1, a case of stuck IDocs in SM58 and also changing IDoc status in BD75 all in vain.
Finally, on debugging the RSEOUT00 program, found out that it is checking for the status '30' (IDoc ready to be sent to port) which is hard coded in the program.
On doing further research on SDN, find some resources that suggested various function modules.
Tried out all of them one after the other.
By trial and error, finally stumbled upon the Function Module 'DEQUEUE_ES_EDIDOCS' that acted as a replacement to using the RSEOUT00 program.
After the IDoc is generated, just passing the IDoc number to this Function module sends it to the port and this was successfully received by our Java app.
Posting this on SDN for the general benefit.
Has anyone faced any similar issues? Let us know.

Hi,
Im using the non-enjoy  BAPI and BAdI for PR and for deletion the outbound IDoc gets send out all the way but for create outbound IDoc it gets stuck in status 30. I did try the FM that you suggested but doesnt have any effect.
FMs that is being used inside my BAdI:
ALE_REQUISITION_CREATE
ALE_REQUISITION_DELETE
Thanks,
Arash

Similar Messages

  • Idoc to File scenerion : How to trigger Purchase requisition idoc

    Hello ,
    I am working on outbound interface for purchase requisition , which uses Idoc as sender adapeter and the Idoc type being used is PRWQCR03.
    can any one tell be how trigger the idoc purchase requisition idoc .
    Cheers
    Chan

    Hi,
    Go to WE19(testing tool) in the Application System(R/3).
    Then give the necessary parameters like Sender Port/Reciever Port , Message Type and then fill the data.
    Refer this thread-
    IDOC to Suppliers
    Regards,
    Moorthy
    Message was edited by: Krishna Moorthy P

  • How do I enter Document Type for Purchase requisition IDOC

    Hello,
    File - IDOC (PREQCR.PREQCR02)
    The file is getting picked up and shows up a checkered flag in Moni..
    but in WE05, on R3 side, i see an error message
    "Enter Document Type"
    How do I enter document type for Purchase requisition IDOC?
    will that solve this issue?
    thanks and regards
    Nikhil.

    Hi,
    For error 51, you need to set the default document type in the inbound processing FM of the IDOC
    Standard type - NB
    Subcontrator type
    Blank PO
    Service PO
    Stock transport PO.
    Document types is used for below things,
    1. It controls the no. range of the document i.e. the doc no.
    2. It controls whether doc no. is auto assigned or manually entered
    3. It controls the field status of the doc header fields i.e. whether input is mandatory or optional
    4. It controls the physical doc filing
    Thanks
    Swarup

  • A problem while assign and process purchase requisitions using Me57

    Hello everybody:
           Today I used me57 to assign and process purchase requisition of 0010000732, but there is only one vendor when assign automatically , however two vendors were assigned with me01 when maintained source list,  what's the possible reason of the problem,  Thank you everyone in advance, cheers.

    hi,
    Check in source list ie ME04 whether fixed vendor is ticked.
    Thanks
    suresh

  • How to link Idoc generated with the Purchase requisition?

    Hi All,
    I have created a program wherein idocs are generated. Its gives rise to Purchase requisition.
    Can you please tell me how to show the PR created against the idocs that are generated in the spool list?
    Please note the function module creating the idocs does not return the PR no. generated.
    Any alternate solution to this is welcome.
    Thanks,
    Abhhishek

    Triple-post = Triple-lock.
    Please read the forum rules before posting any further.

  • Run MRP and Collective Purchase Requisition

    Hi all, I have a question for all. Very be kindly when receive your answer.
    When I run MRP, the system will be generate one Purchase Requisition for one item in BOM (10 items in BOM). So, I want to collect all requirement in BOM to only one Purchase Requisition. Does the system can support for this scenario???
    Thanks all

    >
    Hoai Vu wrote:
    > Thank all,
    > Your answer is helpfull for me, but not satisfy for my company. I have two maintenance order (MO):
    > MO 1 from DIEN department have:
    > Component A: 2
    > Component B: 3
    > MO 2 from CO department have:
    > Component C: 4
    > Component B: 5
    > When I run MRP, the system generate 3 PR
    > PR 1 for component A: 2 (from MO 1)
    > PR 2 for component B: 8 (from MO 1 and MO 2)
    > PR 3 for component C: 4 (from MO 2)
    >
    > So when the other department have a requiment for component B from CO department with quantity is 8, and the warehouse keeper will give 8 components B for CO department because they have a PR 2. So the stock of B is zero and we don't have material B for MO 1. I don't know why SAP does't have keep B and good issue only 4 for CO department. I wonder that why MRP generate one PR for component B instead of two PR.
    > And the second question is how to configure sytem. Becaus when I create a PO from PR, the system does not assign PR number into account assignment
    >
    > Thanks all
    >
    Hoai Vu wrote:
    > Dear all,
    > I would like to update my question and hope that everybody support me to solve this problem.
    > Thanks all
    Dear Hoai,
    What is the strategy maintained for header materials, i guess it is MTO ( make to order )
    If the strategy is MTO then go to MRP - 4 view for all components and make it as 1
    Then check the result
    Regards
    Madhu

  • Purchase requisition idoc

    hello gurus,
    i know there are idoc types for purchase requisition create / change. But I am not able to understand how do i trigger that idoc from sap. I dont see any output / message types in purchase requisition ME51. Is it not from message control ? Is it stand alone or ale... i am confused. please help me. i would appreciate if you tell me a quick process to do this

    Hi,
    I belief that REQOTE is an RFQ (Quotation) not Purchase Requisition. There is no output determination for PR in Sap
    I guess you will have to :
    - create a transaction/report that read the EBAN table or use BAPI_REQUISITION_GETDETAIL and creates a Z-IDOC.
    - create Z-idoc (message and idoc types)
    You need to program the filling of the IDOC and maintain the distribution model and partnerfunctions. Use MASTER_IDOC_DISTRIBUTE function model to send your idoc .
    Hope it helps,
    JG

  • Generating alerts in Purchase Requisition = 3*Lot size of material

    Hi Experts,
    We want to create alerts in SNP.
    Below is the condition.
    Heuristics for multiple product-location will run in background.
    After the Purchase Requisitions are created, we want to compare the quantity of created purchase requisition at each time bucket with lot size maintained for that product-location.
    Alert should get generated if the PR qty is >= 3*lot size of that product-location.
    is there any user exist or function module avaialble to call the tabel which contains rounding profile/lot size details in APO?
    Thanks for looking at it,,
    Rgds/
    Jay

    Jayprakash,
    You can extract the Lot Size values using the macro function MATLOC()
    MATLOC( 'FIELD_NAME' ; <'product'> ;  <'location'> ; <'version'> ) returns the content of a numerical field in the location/product master record of the specified product and location. The arguments for product, location, and version are optional. If you do not specify an argument for the product and/or location, the system uses the current product/location. However, it is better for performance reasons to use the functions ACT_LOCATION and ACT_PRODUCT. For example, MATLOC( 'BSTMA' ; ACT_PRODUCT ;  ACT_LOCATION ) returns the maximum lot size for this location product.
    In your case you can use:
    MATLOC( 'BSTFE' ; ACT_PRODUCT ;  ACT_LOCATION ), assuming you are using Fixed LOT Size. You can store this value in a layout variable 'V' and raise alerts based on condition:
    IF ( KF for PREQ > 3 * Layout Variable V) RAISE Alert
    Hope this helps
    Cheers!
    Abhi

  • Workflow and released purchase requisition

    Hi,
    when user relesead a position of purchase requisition I start a workflow from exit.
    It's possible stop the user to reset release when workflow is active?
    In other words I want that the user don't change the purchase requisition and don't reset the released when the workflow is active.
    Regards
    Angela

    Hi
    Through release indicator you can set this setiing.
    1     Cannot be changed
    2     Changeable, no new determination of strategy
    3     Changeable, new release in case of new strategy
    4     Changeable, new release in case of new strat. or val. change
    5     Changeable, new release if new strategy/outputted
    6     Changeable, new rel. if new strat. or value change/outputted
         Changeable, new release in case of new strategy
    thanks
    Nagaraj K

  • ITunes 12 are not updating apps and transfering purchases

    I really don't know why it is happening. I lost my old iTunes library on a Hard Drive crash. So, I created a new one. I connected my iPad, iPod and iPhone, transfered purchased on the first time, backup, sync... all things that we have to do. Then, I saw something strange. On iTunes 12.1.2.27, mine iTunes, I download new updates but they don't update the apps on my device. And if I download the updates on the devices, the iTunes is not transfering new updates and new apps too. Really don't know why that. Every update I have to do manually. Why that guys? Yosemite here too.

    Here is a screenshot of the phenomenon/problem... NBC Nightly News is not updated, even both the computer and iTunes are running constanly. Once I click update podcast, the podcast updates, so there is an update available.

  • Different iTunes Accounts and Transferring Purchases from Apple TV

    I'm having difficulty transferring purchases made on the Apple TV to the Synced iTunes. Here are the details:
    - This is the case with Purchased TV Shows and Purchased Movies.
    - Purchases made on Apple TV, with iTunes Account #1 (Mine) DO NOT transfer to the Synced iTunes on the iMac.
    - Purchases made on Apple TV, with iTunes Account #2 (Wife) DO transfer to Synced iTunes on the iMac automatically.
    - I have tried all combinations of Authorizing and De-authorizing Account #1 and Account #2 on the Synced iMac, both individually and combined.
    - Music, Movies, and TV Shows authorized to Account #1 (Mine) DO transfer from Synced iTunes to the Apple TV when Account #1 is Authorized on the Synced iTunes.
    - Both Accounts were Authorized on the iMac iTunes when the initial sync happened.
    Any thoughts or experiences about why only one set of purchases transfers back to the Synced iTunes from the Apple TV? My next action will likely be to Re-Sync the Apple TV to another computer (MacBook Pro or G5) with both accounts authorized on the different machine to see what happens. I'll take suggestions before spending the time syncing.
    Thanks!
    Erik

    Ian:
    A good thought, however It didn't work with either Account #1, Account #2, or No Accounts logged into the store.
    I think the next step will be total re-connect of the Apple TV and the iMac. Items purchased on Account #2 that did sync to transfer back to the iMac should be safe as we have the files in the iTunes Library. Hopefully we'll get the rest of the items purchased on Account #1.
    Thanks
    Erik

  • Syncing and transferring Purchases from iTouch 4G Freezes iTunes

    I recently purchased an app at the iTunes App Store (101 GamesUtilities)and when I connected my iTouch to my PC, the sync began. iTunes indicated that "Transferring Purchases from iTouch4 Step 3 of 4 Copying GameUtilities". Usually it takes a short time to complete this process so I clicked in a vacate area of iTunes and discovered that iTunes stopped responding and was frozen. I had to use control-alt-delete to close the iTunes app and disconnected the iTouch from the computer. I repeated the process of connecting my device to the PC and the iTunes repeatedly froze.
    I then rebooted my computer, downloaded iTunes 10.1 and intended to install but got 2 options for action which was repair or uninstall. So I chose repair. This did not resolve the problem. I did not get any error message during this process when it finally froze. Can someone help? I also went to GameUtilities website to report the problem in event that the situation directly connected to that software.

    If you use the search function on the right and search the iPod Touch forum for:
    itunes AND freeze
    you will see previous discussions on your problem. However, I looked at some of them and se no solution.
    I would try uninstalling iTunes and then reinstall it vice just installing it over the existing one.

  • Generate and Send WMTOID02 (WMTORD) Idoc to MII

    Hi
    Like we have POIT transaction in SAP ERP to genereate and Send Idocs Process or production orders ( LOIPRO01) to a RFC listner, is there a similar transaction to generate and send Idocs for WMTORD (WMTOID2) idocs?
    I understand that the authomatic way is to have a change pointer progame but i want to test the idoc before we write a changepointer ABAP program.
    Regards
    Suraj

    Hi Mike,
    THanks for your responce , below are my answers to your questions....
    If I understand you correctly, you are looking for the ECC t-code for generating the WMTORD IDoc, right?
    Right
    And you probably don't care whether it needs to be processed by either a RFC Listener or an IDoc Listener when it gets to MII?
    I would receive it in an IDoc listner and then process using BLS transaction attached to a Processing rule in the message services.
    In general, you send IDocs to an IDoc listener MII, but you may also do something along the lines of sending a control recipe (t-code CO53) to an RFC Listener in MII.
    I would want to send IDocs to an IDoc listener MII. Similar to the LOIPRO01 example  (http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a02bc7[[PDF] How to Send an IDoc from SAP ECC to the SAP MII IDoc Listener|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a02bc706-15f2-2c10-1aab-a1927ada11f0?quicklink=index&overridelayout=true] for production orders
    Do you have a t-code or codes you can provide for related activity? Also is this for WM or for EWM?
    LT01 and LT10 are the Tcode to create the Transfer orders. This is for WM.
    Regards,
    Suraj

  • Purchase requisitions idoc issue

    Hi,
    We have found a new interesting thing happening in ECC.
    IDOCs does not get processed due to PurReq is being processed.
    Then the IDOC goes into status 51 and can no longer be processed by the batch jobs that is running for status 64.        
    1) Is it possible to keep the status as 64 for these types of errors?
    2) If not is it possible to reset these IDOCs from 51 to 64 in a batch job
    3) or is it possible to get the batch job to run for IDOCs with status 51?
    Regards,
    RSK

    Hi,
    new !
    that's just the normal behaviour since... almost the beginning of IDoc history.
    1. yes. program RC1_IDOC_SET_STATUS.
    2. yes, but that's not recommanded, as your idoc has been already processed, and it said to you "I cannot update this object  because someone or something is currently treating this same object".
    if it's a permanent error like (this customer does not exist), that means with a background process (with a too short frequency) you will overload your system for nothing with a treatment like:
    "idoc 64 -> 51" + "background change: 51-> 64" + "reprocess: 64 -> 51", etc...
    when it's one idoc, it's ok, but if a day you a complete source files with several idocs which are in error.... you will reprocess them several time to say to you the same thing "cannot update because customer does not exist" (for instance).
    3. yes. RBDMANIN in background, or tx BD87 in foreground.
    According to me, it's better to use BD87 as it's a human you can analyze and decide to retreat the data.
    Use background program only if you are sure that the data (in error) was sent a 2nd time after. In your case of purch req. i did not recommanded that.
    Have a look a that:
    Idoc1: role = change value with A on pruch req 123. This idoc is in error (like in your exm: already processing by another...)
    Idoc2: role  =change value with B on purch req 123. This idoc arrives 5 min after idoc1. but this times the other processing is finished, and so ecc can integrate this idoc2. So in your systm you have value "B".
    And you with your background process which runs (every hour, for instance), one hour after your Idoc2, you will retreat idoc1, and so now for your purch req, the value is "A"... and no more "B" which was the last value sent by your source system. => Problem !
    4. So why not use it, but be clever/smart before to use such a background retreatment. Estimate the pro/cons.
    regards.
    Mickael
    P.S : it's because we can, that we have to do it.

  • Applications not syncing and transferring purchases.

    I just plugged my iPod Touch into my computer and iTunes took all the apps I had off my iPod and now it won't let me drag them back onto the iPod in iTunes. Also, when I hit transfer purchases (since I bought some music on the iTunes app) it finds the songs but won't copy them saying it failed to copy and an unknown error occurred. Can anyone please tell me how to fix these two problems?

    If you use the search function on the right and search the iPod Touch forum for:
    itunes AND freeze
    you will see previous discussions on your problem. However, I looked at some of them and se no solution.
    I would try uninstalling iTunes and then reinstall it vice just installing it over the existing one.

Maybe you are looking for