Scrapping via Usage Decision in QM Mvt type 553

Hi All,
I am trying to post a scrap in QM via Usage decision using mvt type 553.  When I do the Usage Decision to scrap, instead of processing the movement, I get the Goods Issue initial scree.  I expect that the stock posting should go into scrap with mvt type 553. Anyone had a smilar issue in the past.
Thanks for any inputs.

I can't say I've seen this behavior before in the system.
My guess is that someone has enabled a user exit somewhere in your system that is causing this behavior and it has little to nothing to do with the QM UD.  The user exit may not have been written to take into account when a particular positng is done by the UD process in the background and is forcing behavior to run MB1A with a specific movement type.
I would run this in debug mode with a programmer to try and identify where and how the movement type is being modified.
FF

Similar Messages

  • Quantity Of Sample Not Scrapped Afetr Usage Decision  (Urgent !!)

    Hello Guru's,
    We have many samples wich are not automatically scrapped during usage decision quantity still stays in sample area 046(Storage Type).
    I don't understand why the samples are not scrapped.
    Can I have your suggestions pls..or any user exits to handle this requirement or how I need to approach this problem to get the solution.
    Points will be rewarded.
    Regards
    Ravi Ganji

    Hi all
    When I am testing the tast thru SWUD its working fine.I have to provide inspection lot no. and workitem go to my workplace.there i can make usage decision and the task is over.I am using task no TS 00008331
    Thanks in advance.
    Ashwani

  • How to recover scrap in usage decision in QA32

    Hi friends,
    I have done tra QA32 , and in usage decision i enter the unrestricted qty and scrap qty. but in scrap qty i havent specify the sto location. so can i recover my scrap qty.
    and how.
    thanks in advance,
    solomon Macwan

    Hi,
    In your scenario,When the material is rejected transfer the material to blocked stock.When u need for production then u can make a transfer posting to unrestricted from blocked stock.
    When you are transfering the material to scrap with cost center then that material cannot be restored.So you should be aware before putting the material to scrap.
    Hope this helps...
    Manoj.N

  • Follow-up actions via Usage Decision

    Hi,
    While I'm trying to use the follow-up action "MAIL3" in the usage decision screen, I recieve a mail from my user to my user.
    Is it possible to send the mail via follow-up action "MAIL3" to other users?
    Where can I enter those user's names?
    Thanks & Regards,
    Begü

    Hi Begum,
    Yes as Gajesh as referd the function module is "QFOA_UD_LONGTEXT_SENDING". That belongs to Mail:3.
    Mail3 is STD SAP follow up action and will have following information:
    Material document number
    Material
    Total lot quantity
    Sample quantity
    Completed number and description of stock postings
    Usage decision code
    Lot valuation
    Quality score
    Name of person who made the usage decision
    Long text (if applicable)
    [http://help.sap.com/saphelp_45b/helpdata/en/18/438976449011d189420000e829fbbd/frameset.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/24/77643c07437c7fe10000000a114084/content.htm]
    Regards,
    Shyamal

  • Auto Quality Notification and Return Delivery Via Usage Decision

    Hello Gurus
    Need help !
    I am using the Quality inspection with Material Specification.
    Just an overview of my current system settings -
    Inspection Type 101 for Purchased parts , My Inspection characteristics and Batch Charracteristics are linked .Batch classification is updated as a result of Usage Deceision
    My Requirement -
    If the Inspection lot is getting rejected , system should trigger the Quality notification and return delievery automatically .
    Can someone pl help me with detailed steps for acheiving this...
    Reqward points will be given immediatly for sharing thoughts
    BR

    Hi
    Thanks for reply.
    I think I missed some thing in my question
    I understand that this is Standard Sap when you post the stock into Return Deilivery stock , it 'll do the movement type 122 and create the material docuement.
    However My requiremnet is to get the Delivery Document number with the reference of which i can do the PGI .
    I gone thru the SAP help and learnt that we can trigger the Quality notification automatically if we reject the inspection lot...But not confident "how" as never done before..that the reason i posted my query if someone has done this before..
    OR
    Any option to create Delivery  Document when rejecting one Inspection Lot is UD..W/o Notification also will work for me..
    So I am aiming to get Delivery Document not material document as our materials are WM managed...
    Could some one put some light on this...
    BR

  • What is the Object type for Usage Decision

    I am creating a status profile for UD, that is, If no result recording the no Usage Decision. Which object type should I assign against this newly created status profile?
    Unless I assign a Object type, I cannot assign business transactions.
    Vineeth Varghese

    Hi Vineeth,
    The required object types are insp. lot w/o plan or char, insp. lot with plan and char, insp. lot with plan w/o char.
    I can suggest you to go through the following link, its beautifully explained step by step with screenshots.
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20fbc091-ea3a-2b10-f0a3-877ffbf36436?quicklink=index&overridelayout=true]
    Hope this solves your issue.

  • WM - QM usage decision scrap - automatic TO creation

    How can I realize an automatic transfer order processing for the following scenario:
    MIGO Goods receipt posting with reference to PO into quality
    QA11 Usage decision Scrap
    Transfer requirement (WM mtype 551 / IM mtype 553) is being created but although the correct storage type (902 GR area external rcpts) is being determined the system cannot process the transfer order in background since the respective storage bin (dynamic  IM-material document) cannot be determined => error message u201CSystem cannot find source storage binu201D.
    I am able to process the transfer order in foreground successfully. Via u201Cstock figuresu201D (F7) the system is able to determine the respective storage bin (including stock search with inspection lot) correctly so I wonder why this is not being done in the background processing.

    Hi,
    Bin can be determined automatically only based on the strategy (for your case, it's removal strategy) assigned to the storage type in question. For 902, it's a interim storage type without strategy assigned.
    I am afraid you can only manually process the TR in foreground for your scenario. Otherwise, you may consider putting away QI stock from 902 into a normal storage type. You should then be able to process the TR of scrap in background.
    Hope it helps.

  • Usage decision for movment type 323

    Hello
    Can anyone tell me how I can post movment type 323 through QA11 with a usage decision?
    I can see in config Quality Management>Quality Inspection>Inspection Lot Completion>Define Inventory Postings that there is a posting UD TRANSFER02 that uses 323 but I cannot see how this is posted through transaction QA11! 
    Thanks
    Sue

    hello,
    Can you do this. in the config path Quality Management>Quality Inspection>Inspection Lot Completion>Define Inventory Postings , create a new entry with 08 suffix. Assign mvt type 323 to it.
    In my system it comes with a description "other qty posting". Save it. now this new entry will show up in qa 11 in the inspection lot stock tab where you could post the quantity with this entry to trigger 323 mvt type.
    Now go OMJJ and check for mvt 323 whether QA11 is in the allowed transactions , if not add it there/. ( Caution: 323 isnt meant to work with QA11)
    now run qa11, it works fine.
    But my question is if you arent accepting , rejecting or doing a sample, or other functions described for QA 11 UD , then you can just do a MB1B 323 and this should serve your purpose, why do this though QA11.
    Hope this helps
    Thanks,

  • Reversal of Usage Decision for insp type 10 lot

    Dear Friends,
    I am using the inspection type 10 for the inspection during despatch.
    Please explain the process of reversing the usage decision specifically for a lot of insp type 10.
    Regards,
    Avinash

    If the UD was already made, why do you have to cancel the UD?
    You can change  a UD via QA12.
    You can cancel the delivery document.
    Since inspection type 10's don't control stock, (they can block the PGI on the delivery), I wouldn't see any need to actually cancel the inspection lot once a UD was made.
    Craig

  • Inbound Idoc type for Usage Decision QA11

    Dear SAP Gurus,
    Would like to find out if there is any inbound idoc type to perform Usage Decision (transaction QA11).
    Will reward points for any kind of help. Thank you.
    regards,
    Ju Lee

    Hi,
    There is no standard Inbound Idoc for UD. But there is BAPI available for same "BAPI_INSPLOT_SETUSAGEDECISION".

  • Mvt type 313 Q via delivery not allowed

    Hi,
    We have a scenario in our priject where the material (project stock) has to be moved from a srorage location to the customer site which again has been defined as a storage location. For this we have enabled the stoarge location to storage location transfer stock transport order functionality. Now when I create a new STO (sloc to sloc transfer) document type UB a new delivery type XYZ to which mvt type 313 has been assigned gets determined properly. Then I create an o/b dely using Txn VL10B.
    The problem starts here. When I try to do the GI I get the following error:
    Update control of movement type is incorrect (entry 313 X X Q L _ P)
    Message no. M7226
    Diagnosis
    The system could not find entry 313 X X Q L _ P in any of the movement type control tables.
    Procedure
    Cancel current processing.
    Contact your system administrator.
    Action to be taken by the system administrator
    Check in Customizing for Inventory Management under Copy, Change Movement Types whether the entry is contained in the Update control view for the movement type.
    If the entry is missing, proceed as follows:
    For standard movement types, this means that the given process is not supported using the present data combination. Do not create any entries without prior arrangement with your SAP consultant. Otherwise, incorrect postings may result.
    For customer-defined movement types (beginning with 9, X, Y, or Z), this may mean that they have not been fully defined. Delete the movement type and re-create it by copying a standard movement type.
    This error is because of the mvt indicator L determined for which we do not have entry in update control in OMJJ. If I do this mvt 313Q and 315Q without a dely document it is allowed.
    Is there any other way to work this out?  Is there a way to add entry 313 X X Q L - P to OMJJ update control?
    We need to have the delivery document as the material is crossing country borders when it moves from one sloc to the other.
    Regards,
    V S

    313 is a  manual movmement which does not even allow a Q special stock.
    deliveries operate with automatic movements starting with a 6
    641 Goods issue for a stock transport order (Shipping)
    The quantity is transferred using a delivery in Shipping from unrestricted-use stock of the issuing plant to stock in transit of the receiving plant.
    The goods receipt for the stock transport order takes place using movement type 101 and can, if required, refer to the purchase order or to the delivery. If a purchase order item is flagged as a returns item in the stock transport order, you can post the goods receipt of the returns in the issuing plant with movment type 671.
    Possible special stock indicators:
    E, Q
    For the special stock indicators E and Q and for purchase orders assigned to an account, you must ensure that the quantity is not posted to the stock in transit of the receiving plant.

  • Abt MVt Types

    <b></b> Hi Sapiens.
    Hi ,
    Can I get the documents that list of Movement Types .
    Can u brief about when we wil do new mvt types , what are functional like when and where wil use it.
    Explain me some busineess scenarios .
    In Mvt , Is there Mvt not having rev. step.
    Important things to study and do the Mvt Types in real time...
    Regards
    Skuamr

    Hi
    U can get the list from SPRO only using perform assistance..nyways here is the list i have copied from there.
    second part to your query is answered few days back only in this forum..normally whenever we want some specific account to be hit against a movement type , we can create a new movement type.for better answer search this forum (key word new movement type).
    Description of Movement Types
    Below you will find a short description of the standard movement types. The reversal movement type is the movement type + 1 (reversal of 101 = 102).
    101 Goods receipt for purchase order or order
    If the purchase order or order has not been assigned to an account, a stock type (unrestricted-use stock, stock in quality inspection, blocked stock) can be entered during goods receipt.
    If the purchase order or order has been assigned to an account, the goods receipt is not posted to the warehouse, but to consumption.
    In the case of non-valuated materials, the goods receipt is posted to the warehouse, although the purchase order has not been assigned to an account.
    Possible special stock indicators:
    •     K Goods receipt for purchase order to consignment stock
    •     O Goods receipt for purchase order to stock of material provided to vendor
    •     E GR for purchase order or order to sales order stock
    •     Q GR for purchase order or order to project stock.
    Goods receipt for
    subcontract order: at goods receipt, the consumption of the components is posted at the same time (see movement type 543)
    Goods receipt for
    stock transport order: at goods receipt the transported quantity is posted in the receiving plant from stock in transit into unrestricted-use stock (stock in quality inspection or blocked stock).
    103 Goods receipt for purchase order into GR blocked stock
    You cannot receive goods into goods receipt blocked stock for stock transport orders.
    Possible special stock indicators:
    K, O, E, Q
    105 Release from GR blocked stock for purchase order
    Movement type 105 has the same effects as 101.
    Possible special stock indicators:
    K, O, E, Q
    121 Subsequent adjustment for subcontracting
    This movement type cannot be entered manually.
    With a subsequent adjustment for a subcontract order it is possible to correct the consumption of components. In this case, the material produced by the supplier is credited with the excess consumption / under-consumption. For this reason, if there is a subsequent adjustment, an item is generated for the produced material using movement movement type 121.
    Movement type 121 does not have a reversal movement type.
    Possible special stock indicators:
    O, E, Q
    122 Return delivery to supplier or to production
    Using movement type 122, you can distinguish real return deliveries for a purchase order or order from cancellations (102).
    In the standard version, you must enter a reason for the return delivery if you are using movement type 122. This enables you to carry out evaluations for return deliveries.
    The effects of movement type 122 correspond to a cancellation of movement type 101.
    Possible special stock indicators:
    K, O, E, Q
    123 Reversal of return delivery
    If you returned a goods receipt using movement type 122, you can reverse the return delivery using movement type 123. This movement type has the same effects as movement type 101.
    Possible special stock indicators:
    K, O, E, Q
    124 Return delivery to vendor from GR blocked stock
    Using movement type 124, you can return a goods receipt to GR blocked stock ( 103).
    Movement type 124 has the same effects as movement type 104.
    Possible special stock indicators:
    K, O, E, Q
    125 Return delivery from GR blocked stock - reversal
    If you returned a goods receipt to GR blocked stock using movement type 124 , you can reverse the return delivery using movement type 125.
    Movement type 125 has the same effects as movement type 103.
    Possible special stock indicators:
    K, O, E, Q
    131 Goods receipt for run schedule header
    This movement type cannot be entered manually. It is generated automatically at notification of goods receipt for a run schedule header.
    Possible special stock indicators:
    E, Q
    141 Goods receipt for subsequent adjustment for active ingredient
    This movement type cannot be entered manually. It is generated automatically upon subsequent adjustment for a proportion/product unit . Subsequent adjustment is necessary if the system finds that there has been excess consumption or under-consumption after a goods receipt posting.
    Possible special stock indicators:
    K, O, E, Q
    161 Return for purchase order
    If a purchase order item is marked as a returns item, the returns to vendor are posted using movement type 161 when the goods receipt for purchase order ( 101) is posted.
    Movement type 161 has the same effects as movement type 122.
    Possible special stock indicators:
    K, O, E, Q
    201 Goods issue for a cost center
    The goods can only be withdrawn from unrestricted-use stock.
    Possible special stock indicators:
    •     K: Goods withdrawal from consignment stock
    •     P: Goods withdrawal from the pipeline
    If you have withdrawals from consignment stock and from pipeline, payables to suppliers ensue.
    221 Goods issue for a project
    The goods can only be withdrawn from unrestricted-use stock.
    Possible special stock indicators:
    K, Q
    231 Goods issue for a customer order (without Shipping)
    You use this movement type if you want to process the delivery without Shipping.
    The goods can only be withdrawn from unrestricted-use stock.
    Possible special stock indicators:
    E, K, Q
    241 Goods issue for an asset
    The goods can only be withdrawn from unrestricted-use stock.
    Possible special stock indicators:
    K
    251 Goods issue for sales (without customer order)
    Use this movement type if you have not entered a customer order in SD. In the standard system, the movement is assigned to a cost center.
    The goods can only be withdrawn from unrestricted-use stock.
    Possible special stock indicators:
    K
    261 Goods issue for an order
    This refers to all withdrawals for orders (for example, DS:GLOS.3526C388AFAB52B9E10000009B38F974>production orders, maintenance orders), with the exception of customer orders.
    Possible special stock indicators:
    E, K, P, Q, W
    The goods issue can be posted manually in Inventory Management or automatically when an order is confirmed or via a delivery in Shipping.
    281 Goods issue for a
    network
    The goods can only be withdrawn from unrestricted-use stock.
    The goods issue can also be posted via a delivery in Shipping.
    Possible special stock indicators:
    E, K, P, Q
    291 Goods issue for any arbitrary account assignment
    With this movement type, all account assignment fields are ready for input. You can assign the movement to any arbitrary account assignment object.
    The goods can only be withdrawn from unrestricted-use stock.
    Possible special stock indicators:
    E, K, P, Q
    301 Transfer posting plant to plant in one step
    The quantity is transferred from unrestricted-use stock in the issuing plant to unrestricted-use stock in the receiving plant.
    Possible special stock indicators:
    E, O, Q, V, W
    303 Transfer posting plant to plant in two steps - removal from storage
    The quantity is transferred from unrestricted-use stock of the issuing plant tostock in transfer in the receiving plant.
    For technical reasons, you cannot carry out transfer postings from plant to plant in two steps for split valuation materials.
    Removal from storage can be posted with movement type 603 via Shipping.
    Possible special stock indicators:
    None
    305 Transfer posting plant to plant in two steps - placement in storage
    The quantity is posted from stock in transfer to unrestricted-use stock in the receiving plant. The movement is not valuated.
    You can use movement type 605 in Shipping to post the goods receipt with reference to the delivery.
    Possible special stock indicators:
    None
    309 Transfer posting material to material
    The quantity is posted from unrestricted-use stock of the issuing material into unrestricted-use stock in the receiving material.
    Prerequisite: both materials have the same stockkeeping unit.
    Possible special stock indicators:
    E, O, Q, V, W
    311 Transfer posting storage location to storage location in one step
    The quantity is transferred from unrestricted-use stock of the issuing storage location to unrestricted use in the receiving storage location.
    Possible special stock indicators:
    E, K, M, Q
    See also 321, 343, 349, and 455 for other stock types
    313 Stock transfer storage location to storage location in two steps - removal from storage
    The quantity is transferred from unrestricted-use stock of the issuing storage location to stock in transfer in the receiving storage location.
    Possible special stock indicators:
    None
    315 Transfer posting storage location to storage location in two steps - placement in storage
    In the receiving storage location, the quantity is transferred from the stock in transfer to the unrestricted-use stock.
    Possible special stock indicators:
    None
    317 Creation of a structured material from constituent components (Retail)
    A material split into its components using movement type 319 can be rejoined using movement type 317.
    Movement type 317 has the same effect as a cancellation of movement type 319.
    Possible special stock indicators:
    None
    319 Split structured material into components (Retail)
    You can enter the splitting of a structured material manually using movement type 319.
    You can configure Customizing so that a structured material (for example, aset, prepack, or display is automatically split into its components at goods receipt. The system posts the split using movement type 319. In this process, the BOM header material is posted and each of the component stocks are increased. You can also use this function if you use the Warehouse Management System (LE-WM).
    Possible special stock indicators:
    None
    Example:
    A box of the structured material S contains 3 pieces of the component K1 and 4 pieces of the component K2. The following material document items result after the material is split at goods receipt:
         Qty     Unit     Material     Movement type
         1     box     S     101 +
         1     box     S     319 -
         4     piece     K1     319 +
         5     piece     K2     319 +
    321 Transfer posting stock in quality inspection - unrestricted-use stock
    The quantity is transferred from stock in quality inspection into unrestricted-use stock. Here you can post the quantity to another storage location.
    You cannot use this movement type for QM-managed materials since transfer posting for these materials takes place via the usage decision.
    Possible special stock indicators:
    E, K, O, Q, V, W
    323 Transfer posting storage location to storage location - stock in quality inspection
    The quantity is transferred from stock in quality inspection in the issuing storage location into stock in quality inspection in the receiving storage location.
    Possible special stock indicators:
    E, K, Q
    325 Transfer posting storage location to storage location - blocked stock
    The quantity is transferred from blocked stock in the issuing storage location into blocked stock in the receiving storage location.
    Possible special stock indicators:
    E, K, Q
    331 Withdrawal of sample from stock in quality inspection
    The sample is destructive, that is, the withdrawal has the same effects asscrapping.
    Possible special stock indicators:
    E, K, Q, V, W
    333 Withdrawal of sample from unrestricted-use stock
    The sample is destructive, that is, the withdrawal has the same effects asscrapping.
    Possible special stock indicators:
    E, K, Q, V, W
    335 Withdrawal of sample from blocked stock
    The sample is destructive, that is, the withdrawal has the same effects asscrapping.
    Possible special stock indicators:
    E, K, Q
    340 Revaluation of batch
    Using this movement type, you can change a batch's valuation type. The system automatically calls up this movement type when you want to revaluate a batch by choosing Logistics -> Central Functions -> Batch Management -> Batch -> Change (transaction code MSC2N). There is no reversal movement type.
    Possible special stock indicators:
    E, Q
    341 Change in status of a batch (available to unavailable)
    This goods movement is automatically created when there is a change in thestatus of a batch and it is also used to transfer the unrestricted-use stock into restricted-use stock.
    Possible special stock indicators:
    E, K, M, O, Q, V, W
    343 Transfer posting blocked stock - unrestricted-use stock
    The quantity is transferred from blocked stock to unrestricted-use stock. You can also post the quantity to another storage location.
    Possible special stock indicators:
    E, K, Q
    349 Transfer posting from blocked stock to stock in quality inspection
    The quantity is transferred from blocked stock to stock in quality inspection. Here you can transfer the quantity to another storage location.
    Possible special stock indicators:
    E, K, Q
    351 Goods issue for a stock transport order (without Shipping)
    The quantity is transferred from unrestricted-use stock in the issuing plant tostock in transit in the receiving plant.
    Movement type 351 is only used if the goods issue is posted without a delivery in Shipping. A goods issue for a stock transport order with delivery in Shipping is posted using movement types 641, 643, 645, or 647.
    The transfer posting is also possible for materials with split valuation.
    The goods issue for a stock transport order takes place using movement type 101.
    Possible special stock indicators:
    E, Q
    For special stock indicators E and Q and for purchase orders assigned to an account, ensure that the quantity is not posted to the stock in transit in the receiving plant.
    411 Transfer posting of special stocks E, K, and Q to company's own stock
    The quantity is transferred from unrestricted-use special stock E (sales order stock), unrestricted-use stock K ( consignment stock) and unrestricted-use special stock Q (project stock) to unrestricted-use storage location stock. The corresponding special stock indicator is required for this movement.
    If you do not use the special stock indicator, the system uses this movement type and movement type 311.
    For sales order stock, you can change the material number for this movement if you manage the material in your company's own stock under a different material number (for example, for configurable materials).
    Consignment stock is transferred to valuated stock, thus resulting in a vendor liability.
    413 Transfer posting to sales order stock
    You can use this movement type to carry out a transfer posting from your own unrestricted-use stock, other sales order stock, consignment stock, and project stock to a sales order stock.
    Possible special stock indicators:
    E, K, Q
    415 Transfer posting to project stock
    You can use this movement type to carry out a transfer posting from your own unrestricted-use stock, consignment stock, and other project stock to a project stock.
    Possible special stock indicators:
    E, K, Q
    441 Transfer posting non-tied to tied empties
    Part of the stock of an "empties" material assigned to a full product is managed in the stock type "tied empties".
    Empties stock not assigned to a full product forms part of the stock type "unrestricted-use".
    Using movement type 441, you can make a transfer posting for an empties material from the stock type "unrestricted-use" to the stock type "tied empties". Movement type 442 reverses this transaction.
    Example:
    The full product "beer" has a stock of 15 cases. Part of the empties components "bottle" and "case" is tied empties stock.
         Material     unrestricted-use     tied empties
         Beer     15     
         Bottle     240     360
         case     10     15
    451 Returns from customer (without Shipping)
    Using movement type 451, you post customer returns without a returns delivery in Shipping into blocked stock returns.
    Possible special stock indicators:
    None
    See also: 453, 651, 653
    453 Transfer posting blocked stock returns to unrestricted-use stock
    The quantity is transferred from blocked stock returns to unrestricted-use stock and thereby transferred to valuated stock.
    With this movement you can transfer the quantity to another storage location at the same time.
    Possible special stock indicators:
    None
    455 Transfer posting storage location to storage location - blocked stock returns
    The quantity is transferred from blocked stock returns of the issuing storage location to blocked stock returns of the receiving storage location.
    Possible special stock indicators:
    None
    457 Transfer posting blocked stock returns to quality inspection stock
    The quantity is transferred from blocked stock returns to quality inspection stock and thereby transferred to valuated stock.
    With this movement you can transfer the quantity to another storage location at the same time.
    Possible special stock indicators:
    None
    459 Transfer posting blocked stock returns to blocked stock
    The quantity is transferred from blocked stock returns to blocked stock and thereby transferred to valuated stock.
    With this movement you can transfer the quantity to another storage location at the same time.
    Possible special stock indicators:
    None
    501 Goods receipt without purchase order - unrestricted-use stock
    This movement type is used for deliveries from vendors that are not based on a purchase order. Invoice verification is not possible for these goods receipts.
    For a goods receipt for purchase order (
    101), the receipt of returnable transport packaging can be entered using movement type 501 and special stock indicator M.
    Possible special stock indicators:
    E, K, M, Q
    503 Goods receipt without purchase order - stock in quality inspection
    This movement type is used for deliveries from vendors that are not based on a purchase order. Invoice verification is not possible for these goods receipts.
    Possible special stock indicators:
    E, K, Q
    505 Goods receipt without purchase order - blocked stock
    This movement type is used for deliveries from vendors that are not based on a purchase order. Invoice verification is not possible for these goods receipts.
    Possible special stock indicators:
    E, K, Q
    511 Free-of-charge delivery from vendor
    The quantity is posted to unrestricted-use stock. If there is a material with moving average price, the moving average price is reduced accordingly.
    Possible special stock indicators:
    None
    521 Goods receipt without order - unrestricted-use stock
    This movement type is used for deliveries from production that are not based on an order.
    Possible special stock indicators:
    E, Q
    523 Goods receipt without order - stock in quality inspection
    This movement type is used for deliveries from production that are not based on an order.
    Possible special stock indicators:
    E, Q
    525 Goods receipt without order - blocked stock
    This movement type is used for deliveries from production that are not based on an order.
    Possible special stock indicators:
    E, Q
    531 Goods receipt from by-product from the order
    The goods receipt of a by-product usually refers to an order, but it can be entered without a reference.
    If a component is entered with a negative quantity in the order, a reservation item is created with 531 (instead of 261 ). The receipt of a by-product can be entered when the component for the order is withdrawn from stock or it can be entered as an 'other goods receipt'.
    Possible special stock indicators:
    E, Q
    See also: 545 and 581
    541 Transfer posting unrestricted-use stock - stock of material provided to vendor
    With this movement type you provide the subcontractor with the components required for subcontract orders. The quantity is posted into unrestricted-use stock of material provided to vendor.
    If there is a goods receipt for a subcontract order ( 101 ) consumption of components is posted from this stock.
    The transfer posting can be posted via a delivery in Shipping.
    Possible special stock indicators:
    None
    543 Consumption from stock of material provided to vendor
    This movement cannot be entered manually.
    The consumption of components for a subcontract order is posted using goods receipt for purchase order ( 101). It can be corrected by means of a subsequent adjustment.
    For special stock indicators E and Q, you must ensure that the quantity is not posted to the stock of material provided to vendor, but to the unrestricted-use sales order or project stock.
    Possible special stock indicators:
    E, O, Q
    545 Goods receipt from by-product from subcontracting
    If a component is entered with a negative quantity for the subcontract order, the receipt of the by-product is posted to stock provided to vendor during goods receipt for purchase order or during the subsequent adjustment.
    For special stock indicators E and Q, you must ensure that the quantity is not posted to the stock of material provided to vendor, but to the unrestricted-use sales order or project stock.
    Possible special stock indicators:
    E, O, Q
    551 Scrapping from unrestricted-use stock
    Possible special stock indicators:
    E, K, O, Q, V, W
    553 Scrapping from stock in quality inspection
    Possible special stock indicators:
    E, K, O, Q, V, W
    555 Scrapping from blocked stock
    Possible special stock indicators:
    E, K, Q
    561 Initial entry of stock - unrestricted-use stock
    During
    initial entry of stock balances, when the R/3 system is active, you enter the physical warehouse stock figures or the book inventory from your old system into the R/3 Materials Management component. This data entry usually takes place by means of batch input.
    Possible special stock indicators:
    E, K, M, O, Q, V, W
    563 Initial entry of stock - quality inspection
    During
    initial entry of stock balances, when the R/3 system is active, you enter the physical warehouse stock figures or the book inventory from your old system into the R/3 Materials Management component. This data entry usually takes place by means of batch input.
    Possible special stock indicators:
    E, K, O, Q, V, W
    565 Initial entry of stock - blocked stock
    During
    initial entry of stock balances, when the R/3 system is active, you enter the physical warehouse stock figures or the book inventory from your old system into the R/3 Materials Management component. This data entry usually takes place by means of batch input.
    Possible special stock indicators:
    E, K, Q
    571 Goods receipt for assembly order to unrestricted-use
    This movement cannot be entered in Inventory Management. It can only be entered in repetitive manufacturing using the Goods receipt for sales order function.
    Possible special stock indicators:
    E, Q
    573 Goods receipt for assembly order to quality inspection
    This movement cannot be entered in Inventory Management. It can only be entered in repetitive manufacturing using the Goods receipt for sales order function.
    Possible special stock indicators:
    E, Q
    575 Goods receipt for assembly order to blocked stock
    This movement cannot be entered in Inventory Management. It can only be entered in repetitive manufacturing using the Goods receipt for sales order function.
    Possible special stock indicators:
    E, Q
    581 Goods receipt of a by-product from the network
    The goods receipt of a by-product usually refers to anetwork, but can be entered without reference.
    If a component is entered with a negative quantity in the network, a reservation is created with 581 (instead of 281 ). The receipt of a by-product can be entered during the withdrawal for the network or as an 'other goods receipt'.
    Possible special stock indicators:
    E, Q
    601 Goods issue for delivery (Shipping)
    In Shipping, this movement type is created automatically with the Goods issue for delivery function.
    The quantity is taken from unrestricted-use stock.
    Possible special stock indicators:
    E, K, Q
    603 Goods issue for stock transport order (Shipping) with additional
    item
    If you issue goods for a stock transport order in Shipping using movement type 641, you can use this movement type to assign an extra item to the order.
    The ordered material is transferred to the stock in transit of the receiving plant. The material for the additional item is transferred from unrestricted-use stock in the issuing plant to stock in transfer in the receiving plant.
    You can also use this movement type without referencing a purchase order.
    Possible special stock indicators:
    None
    See also: 303, 641
    605 Goods receipt for a stock transport order (Shipping) with
    additional item
    You can use this movement type to transfer into unrestricted-use stock the material you posted into stock in transfer in the receiving plant using movement type 603. You post the goods movement with reference to the purchase order (if available) or the delivery.
    Possible special stock indicators:
    None
    See also: 305 and 641
    621 Transfer posting unrestricted-use - returnable packaging (Shipping)
    The quantity is transferred from unrestricted-use stock to the returnable packaging stock at customer.
    Possible special stock indicators:
    none
    623 Goods issue from returnable packaging stock at customer (Shipping)
    This quantity is withdrawn from unrestricted-use returnable packaging stock at the customer.
    Possible special stock indicators:
    V
    631 Transfer posting unrestricted use - customer consignment stock (Shipping)
    The quantity is transferred from unrestricted-use stock to consignment stock at customer.
    Possible special stock indicators:
    E, Q
    633 Goods issue from customer consignment (Shipping)
    The quantity is withdrawn from unrestricted-use consignment stock at the customer.
    Possible special stock indicators:
    W
    641 Goods issue for a stock transport order (Shipping)
    The quantity is transferred using a delivery in Shipping from unrestricted-use stock of the issuing plant to stock in transit of the receiving plant.
    The goods receipt for the stock transport order takes place using movement type 101 and can, if required, refer to the purchase order or to the delivery. If a purchase order item is flagged as a returns item in the stock transport order, you can post the goods receipt of the returns in the issuing plant with movment type 671.
    Possible special stock indicators:
    E, Q
    For the special stock indicators E and Q and for purchase orders assigned to an account, you must ensure that the quantity is not posted to the stock in transit of the receiving plant.
    See also: 351, 643, 671
    643 Goods issue for a cross-company
    stock transport order (Shipping)
    It is used only for cross-company stock transport orders with SD billing and invoice. The quantity is withdrawn from the unrestricted-use stock of the issuing plant. No stock in transit is created here. In the second step, the goods receipt must be entered in the receiving plant. If a purchase order item is flagged as a returns item in the stock transport order, you can post the goods receipt of the returns in the issuing plant with movment type 673.
    Possible special stock indicators:
    E
    See also: 351, 641, 673
    645 Goods issue for a cross-company
    stock transport order in one step (Shipping)
    Unlike movement type 643 when a goods issue is posted using movement type 645, a goods receipt line is generated automatically 101). If a purchase order item is flagged as a returns item in the stock transport order, you can post the goods receipt of the returns in the issuing plant with movment type 675.
    Possible special stock indicators:
    E
    See also: 675
    647 Goods issue for a stock transport order in one step
    (Shipping)
    Unlike movement type 641 when a goods issue is posted using movement type 647, a goods receipt line (movement type 101) is generated automatically in the receiving plant. If a purchase order item is flagged as a returns item in the stock transport order, you can post the goods receipt of the returns in the issuing plant with movement type 677.
    Possible special stock indicators:
    E, Q
    See also: 677
    651 Returns from customer (Shipping)
    Using movement type 651, you post returns from a customer with a return delivery in Shipping to blocked stock returns.
    Possible special stock indicators:
    None
    See also: 451, 453, 653
    653 Returns from customer (Shipping) to unrestricted-use stock
    With this movement type you post returns from the customer with returns delivery via Shipping directly to the valuated stock.
    Possible special stock indicators:
    E
    See also: 451, 453, 651
    655 Returns from customer (Shipping) to stock in quality inspection
    With this movement type you post returns from the customer with returns delivery via Shipping directly to the valuated stock.
    Possible special stock indicators:
    E
    See also: 451, 453, 651
    657 Returns from customer (Shipping) to blocked stock
    With this movement type you post returns from the customer with returns delivery via Shipping directly to the valuated stock.
    Possible special stock indicators:
    E
    See also: 451, 453, 651
    661 Returns to vendor via Shipping
    As with movement type 502, a return delivery to the vendor is entered without reference to the purchase order, but the goods issue is posted via a delivery in Shipping.
    Possible special stock indicators:
    E
    671 Returns for stock transport order via Shipping
    If a purchase order item is marked as a returns item in a stock transport order using movement type 641 when a goods receipt for a stock transport order ( 101) is posted, the return is posted to stock in transit using movement type 161. When the return arrives, the issuing plant posts the goods receipt for the return using movement type 671. Movement type 671 (like movement types 352 and 642) reduces the receiving plant's stock in transit and increases the issuing plant's unrestricted-use stock.
    Possible special stock indicators:
    E, Q
    673 Returns for cross-company stock transport order
    (Shipping)
    If you post a goods issue for a cross-company stock transport order with returns items using movement type 643 via Shipping, the returns are transferred to unrestricted-use stock in the issuing plant in a second step using movement type 673.
    Possible special stock indicators:
    None
    See also: 643
    675 Returns for cross-company stock transport order
    (Shipping) in one step
    If you use movement type 645 to post a goods issue for a cross-company stock transport order with returns items in one step, the returns are transferred to unrestricted-use stock in the issuing plant using movement type 161 in the receiving plant and movement type 675 in the issuing plant.
    Possible special stock indicators:
    None
    See also: 645
    677 Returns for stock transport order in one step (Shipping)
    If you use movement type 647 to post a goods issue for a stock transport order with returns items in one step, the returns are transferred to unrestricted-use stock in the issuing plant using movement type 161 in the receiving plant and movement type 677 in the issuing plant.
    Possible special stock indicators:
    E, Q
    See also: 647
    701 Inventory differences in unrestricted-use stock (MM-IM)
    This movement is generated automatically during inventory difference posting in Inventory Management.
    Possible special stock indicators:
    E, K, M, O, Q, V, W
    703 Inventory differences in quality inspection stock (MM-IM)
    This movement is generated automatically during inventory difference posting in Inventory Management.
    Possible special stock indicators:
    E, K, M, O, Q, V, W
    707 Inventory differences in blocked stock (MM-IM)
    This movement is generated automatically during inventory difference posting in Inventory Management.
    Possible special stock indicators:
    E, K, M, Q
    711 Inventory differences in unrestricted-use stock (LE-WM)
    This movement is generated automatically when you post inventory differences in the Warehouse Management System.
    Possible special stock indicators:
    E, K, M, Q
    713 Inventory differences in quality inspection stock (LE-WM)
    This movement is generated automatically when you post inventory differences in the Warehouse Management System.
    Possible special stock indicators:
    E, K, M, Q
    715 Inventory differences in blocked stock returns (LE-WM)
    This movement is generated automatically when you post inventory differences in the Warehouse Management System.
    Possible special stock indicators:
    None
    717 Inventory differences in blocked stock (LE-WM)
    This movement is generated automatically when you post inventory differences in the Warehouse Management System.
    Possible special stock indicators:
    E, K, M, Q
    721 - Sales value receipt - not affecting margins (Retail)
    The movement is generated automatically when the sales price of a value-only material is changed (total sales price revaluation on the posting date).
    Possible special stock indicators:
    None
    731 - Sales value receipt - affecting margins (Retail)
    The movement is generated automatically when the sales price of a value-only material is changed (partial sales price revaluation on the posting date).
    Possible special stock indicators:
    None
    regards
    Yogesh

  • Reversal of 553 mvt type document

    Dear Gurus,
    During making of Usage Decision, user posted rejected stock in scrap which has no storage location, and it goes to cosumption, by 553 mvt,
    now we have to reverse that document.
    I know that after making usage decision posting is not possible, but now client want to revover that stock in system, how to reverse those documents.
    Or how to recover that amount.

    dear guru,
    *I tried in MBST it shows error :
    Material document cannot be processed
    Message no. M7130
    Diagnosis
    This material document was generated through the posting of a physical inventory document, a delivery via Shipping, or some other automatic movement (such as an order confirmation in PP or a usage decision in QM) and cannot be processed with this function.
    System Response
    In this transaction, the system can only cancel a material document if the latter was created using an Inventory Management transaction.
    Procedure
    Cancel the material document in the component that created the document.
    You can only reverse the goods movement created through the posting of a physical inventory document by carrying out a new physical inventory for the relevant material. You can reverse a delivery effected via Shipping using transaction VL09.

  • No Automatic Transfer order creation upon usage decision for 553 mtype

    Scenario: We have quality and warehouse management active. Goods receipt is done against a purchase order. Stock comes into 902 storage type under stock category u201CQu201D. From 902 storage type, Goods issue to scrapping under quality( using IM movement type 553 ) is done using QA11. Normally, once GI to scrap under quality is done at IM level, WM movement type 551 gets triggered automatically in the background which creates a transfer order to move stock from 902 to 999 storage type under u201CQu201D stock category.
    Problem: System unable to find storage bin for storage type 902 Q.
    In our system, automatic TO creation from TR isnu2019t happening once the usage decision for 553 movement type happens. The TO creation process couldnu2019t recognize the stock which is available as u201CQu201D. It throws an error message u201Csource storage bin could not be foundu201D at the time of TO creation from TR. Putaway strategy for the physical storage types is FIXED BIN, MIXED STOCK ALLOWED and ADDITION TO EXISTING STOCK. 902 storage type has ADDITION TO EXISITNG STOCK and MIXED STOCK as a putaway strategy.
    We have already activated auto TO creation settings at WM-IM reference movement types interface configuration.
    Is there any setting missing at QM-WM interface?
    Can someone please tell us a methodology to activate this transfer order creation process (WM mtype 551) for 553 IM mtype ?
    Thanks in advance. Please reply.
    Regards
    Preetinder Singh
    Phone: 404-468-8422

    Hello,
    I do not understand your scenario , u are saying are posting inspection lot to non WM storage location and again saying system can not find bin automatically.
    "A transfer requirement (movement type 311 / destination u201C921 Transferu201D) is created after the inspection lot posting (QA11) but the auto-creation functionality is not possible since the u201CSystem cannot find source storage binu201D.
    How can this auto-creation of a transfer order be realized since it is possible to create the transfer order manually via LB11 (entering source u201C902u201D / storage bin u201CPurchase Order no.u201D)?
    The system cannot find the storage bin automatically.
    Thank you in advance!"
    Please let me know are u using quality interim storage area. If you clear material from quality and want material to go to bin then it should be warehouse managed storage location. 
    Regards,
    Prashant

  • PP - QM: Reversal of the usage decision

    Hi Gurus,
    We have completed Result Recording using QE51N transaction and Usage decision using QA11. It has posted a stock from QI to Unrestricted use. Now I want to take it back from Unrestricted use to QI. This needs reversal of usage decision (What I think).
    Can you suggest me the proper way of performing the said transaction?
    I will really appreciate your concern.
    Thanks
    Shiv

    R/3 note no.   175842                        14.12.2001           Page 1
         Number              0175842
         Version             0021 from 29.11.2001
         Status              Released for customer
         Set by              SAP AG on 03.12.2001
         Language            EN
         Short text          Inspection lot: Reversal of goods movements from UD
         Administrator       SAP AG
         Component           QM-IM-UD Inspection Lot Completion
         Long text
         Symptom
         Goods movements, which were created from the transactions of the usage
         decision, can no longer be reversed.
         Additional key words
         QA11, QA12, QA14, MBST, MF41
         Inspection lot, usage decision, goods movements, reversal, material
         document
         Cause and preconditions
         Presently, the function is not provided in the standard system.
         Solution
         The function is not provided in the standard system up to and including
         Release 4.6C.
         When you do this bear the following in mind:
         1. Using the attached program corrections, stock transfer postings can
            be reset for the usage decision.If it is possible to post this
            document in the stock management, the inspection lot is also
            corrected and the Quality Management Information System is if
            necessary updated.After the reset has been successfully carried out,
            the inspection lot, related to the stocks, has the status before the
            first stock credit entry.The usage decision is not reset.If, after
            the usage decision, further transfer postings are carried out in the
            stock management which lead to the usage decision transfer postings
            not being able to be reset due to missing availability, these
            postings must be reversed first.
         2. The goods movement is carried out in each case with the reversal
            movement type (document neutral reversal).The original documents are
            not reversed related to the document.This may lead to deviations in
            the accounting caused by valuation.
         3. Resetting postings for materials requiring serial numbers is not
            supported.
         4. With this correction program, you cannot reverse goods movements for
            inpection lots for handling units (HU).
         5. Batch status changes which have possibly been carried out are not
            cancelled.
         6. Batches which have been created in the usage decision during a
            transfer posting are not deleted.The classification of these batches
            is not changed either.
                                                                           Page 2
         7. Within the adjustment posting, in Release 4.x, the reference records
            are also adjusted between the material document and inspection
            lot.This can possibly lead to an incorrect description of the
            reference type when displaying material documents for the inspection
            lot.In Release 3.x, the reference records are deleted in order to
            make sure that individual documents cannot be cancelled several
            times.
         8. The program does not contain any own authorization checks and should
            be used with utmost care and ONLY after a successful test. The
            program should ONLY be applied in exceptions and should not be part
            of the standard procedure.
         9. The logic implemented in the program for the generation of material
            documents or for the update of inspection lot quantities and
            inspection lot status should under no circumstances be be changed as
            this might lead to inconsistent data. Since this is a program that is
            not contained in the standard system, problems that are created as a
            result of the program application can be dealt with as problems that
            have arisen as a result of a customer modification.
         To implement the program, proceed as follows:
         1. Create an executable program and copy the attached source code.Then
            maintain the text for selection parameter PRUEFLOS by transferring
            the Dictionary text.
         2. If you a use a Release < 4.6, you must create the function group
            ZQMB. In this function group, you must create function module
            'ZQMB_QAMB_CANCEL'. Flag the function module as an update function
            module (Start immediately) and include table interface parameter
            'I_QAMB_TAB' (type specification LIKE, reference structure QAMB).
            Afterwards you must include exception 'ERROR_DURING_UPDATE' and
            implement the attached source code.
         3. Use Transaction OMJJ to enter further entries in level 'Allowed
            transactions' (table T158B) for transaction code 'QA11' (Record Usage
            Decision).The movement types for which these entries must be created
            are derived from the system settings for the goods movements for the
            usage decision (table TQ07M):The reversal movement type must be
            determined for every movement type that is entered in table TQ07M
            with the key VMENGE01 - VMENGE09 and the corresponding entry must be
            included in the above-mentioned table.You can use table T156N for
            determining the reversal movement type:You can determine the reversal
            movement type by entering the movement type (BWART) and function code
            (FCODE) ST (BWART_NEXT).For missing entries, the system generates
            error M7096 'Goods movement not possible with mvmt type &'.
         Source code corrections
                                                                           Page 3
         Valid releases
         R/3 Standard        46C - 46D
                             46A - 46B
                             45A - 45B
                             40A - 40B
                             30F - 31I
         Other components
         QM-IM               Quality Inspection
         Reference to related notes
         Number    Short text
         0033924   Cancelling usage decisions
         0048815   Checking possible inconsistencies between MM and QM
                                                                           Page 4
         Assigned correction instructions
    $$----
    $$
    $ Correction Instr.        : 0120024545 0000111772                   $
    $ Software Component       : SAP_APPL   SAP Application              $
    *$----
    $*
    $ Validity    : 40A          SAPKH40A01 - SAPKH40A25                 $
    $             : 40B          All Patches                             $
    $             : 45A          All Patches                             $
    $             : 45B          All Patches                             $
    *$----
    $*
    $ Changes/Objects Not Contained in Standard SAP System               $
    $$----
    $$
         *& Object          FUNC ZQMB_QAMB_CANCEL
         *& Object Header   FUGR ZQMB
         *& FUNCTION ZQMB_QAMB_CANCEL
         *>>>> START OF INSERTION <<<<
           UPDATE QAMB FROM TABLE I_QAMB_TAB.
           IF NOT SY-SUBRC IS INITIAL.
             RAISE ERROR_DURING_UPDATE.
           ENDIF.
         *>>>> END OF INSERTION <<<<<<
         *& Object          REPS RQEVAC50
         *& Object Header   PROG RQEVAC50
         *& REPORT RQEVAC50
         *>>>> START OF INSERTION <<<<
         REPORT RQEVAC50 MESSAGE-ID QA.
         TYPES:
           T_QAMB_TAB  LIKE QAMB  OCCURS 0,
           T_MKPF_TAB  LIKE MKPF  OCCURS 0,
           T_MSEG_TAB  LIKE MSEG  OCCURS 0.
         PARAMETERS:
           PRUEFLOS LIKE QALS-PRUEFLOS OBLIGATORY MEMORY ID QLS.
         DATA:
           G_MSGV1       LIKE SY-MSGV1,
           G_QALS        LIKE QALS,
           G_QALS_LEISTE LIKE QALS,
           G_QAMB_TAB    TYPE T_QAMB_TAB,
           G_QAMB_VB_TAB TYPE T_QAMB_TAB,
           G_MKPF_TAB    TYPE T_MKPF_TAB,
           G_MSEG_TAB    TYPE T_MSEG_TAB,
           G_SUBRC       LIKE SY-SUBRC.
         START-OF-SELECTION.
                                                                           Page 5
           PERFORM ENQUEUE_QALS USING PRUEFLOS
                                      G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
             MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
           PERFORM READ_QALS USING PRUEFLOS
                                   G_QALS
                                   G_QALS_LEISTE
                                   G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
             MESSAGE ID 'QA' TYPE 'S' NUMBER '102'
                     WITH PRUEFLOS.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
           PERFORM CHECK_LOT USING G_QALS
                                   G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
             CASE G_SUBRC.
               WHEN 128.
                 G_MSGV1 = 'Material & is serialized'.
                 REPLACE '&' WITH G_QALS-MATNR INTO G_MSGV1.
               WHEN  64.
                 G_MSGV1 = 'Lot & is not stock relevant'.
               WHEN  32.
                 G_MSGV1 = 'Lot &: No stock transferred'.
               WHEN  16.
                 G_MSGV1 = 'Lot & is cancelled'.
               WHEN   8.
                 G_MSGV1 = 'Lot & is archived'.
               WHEN   4.
                 G_MSGV1 = 'Lot & is blocked'.
               WHEN   2.
                 G_MSGV1 = 'Lot & is HU managed'.
             ENDCASE.
             REPLACE '&' WITH PRUEFLOS INTO G_MSGV1.
             MESSAGE ID '00' TYPE 'S' NUMBER '208'
                     WITH G_MSGV1.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
           PERFORM READ_QAMB USING G_QALS
                                   G_QAMB_TAB
                                   G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
             MESSAGE ID 'QA' TYPE 'S' NUMBER '068'
                     WITH PRUEFLOS.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
           PERFORM READ_MKPF USING G_QAMB_TAB
                                   G_MKPF_TAB
                                   G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
                                                                           Page 6
             MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
           PERFORM CHECK_MKPF USING G_MKPF_TAB
                                    G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
             MESSAGE ID 'QA' TYPE 'S' NUMBER '068'
                     WITH PRUEFLOS.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
           PERFORM READ_MSEG USING G_MKPF_TAB
                                   G_MSEG_TAB
                                   G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
             MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
           PERFORM CHECK_MSEG USING G_MSEG_TAB
                                    G_QAMB_TAB
                                    G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
             MESSAGE ID 'QA' TYPE 'S' NUMBER '068'
                     WITH PRUEFLOS.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
           PERFORM CREATE_GOODS_MOVEMENT USING G_QALS
                                               G_MSEG_TAB
                                               G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
             MESSAGE ID 'QA' TYPE 'S' NUMBER '068'
                     WITH PRUEFLOS.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
           PERFORM POST_GOODS_MOVEMENT.
           PERFORM POST_DATA USING G_QALS
                                   G_QALS_LEISTE
                                   G_QAMB_TAB
                                   G_QAMB_VB_TAB
                                   G_SUBRC.
           IF NOT G_SUBRC IS INITIAL.
             MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ELSE.
             COMMIT WORK AND WAIT.
             G_MSGV1 = 'inspection lot &'.
             REPLACE '&' WITH PRUEFLOS INTO G_MSGV1.
             MESSAGE ID '00' TYPE 'S' NUMBER '368'
                                                                           Page 7
                     WITH 'Stock posting reversed for ' G_MSGV1.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
          Form  ENQUEUE_QALS                                             *
          Los sperren                                                    *
         FORM ENQUEUE_QALS USING P_PRUEFLOS LIKE QALS-PRUEFLOS
                                 P_SUBRC    LIKE SY-SUBRC.
           CLEAR: P_SUBRC.
           CALL FUNCTION 'ENQUEUE_EQQALS1'
                EXPORTING
                     PRUEFLOS       = P_PRUEFLOS
                EXCEPTIONS
                     FOREIGN_LOCK   = 1
                     SYSTEM_FAILURE = 2
                     OTHERS         = 3.
           P_SUBRC = SY-SUBRC.
         ENDFORM.                               " ENQUEUE_QALS
          Form  READ_QALS                                                *
          Prüflos lesen                                                  *
         FORM READ_QALS USING P_PRUEFLOS    LIKE QALS-PRUEFLOS
                              P_QALS        LIKE QALS
                              P_QALS_LEISTE LIKE QALS
                              P_SUBRC       LIKE SY-SUBRC.
           CLEAR: P_SUBRC.
           CALL FUNCTION 'QPSE_LOT_READ'
                EXPORTING
                     I_PRUEFLOS  = P_PRUEFLOS
                     I_RESET_LOT = 'X'
                IMPORTING
                     E_QALS      = P_QALS
                EXCEPTIONS
                     NO_LOT      = 1.
           P_SUBRC = SY-SUBRC.
           IF P_SUBRC IS INITIAL.
             P_QALS_LEISTE = P_QALS.
           ELSE.
             CLEAR: P_QALS,
                    P_QALS_LEISTE.
           ENDIF.
         ENDFORM.                               " READ_QALS
          Form  CHECK_LOT                                                *
                                                                           Page 8
          Prüflos prüfen                                                 *
         FORM CHECK_LOT USING P_QALS  LIKE QALS
                              P_SUBRC LIKE SY-SUBRC.
           DATA:
             L_STAT      LIKE JSTAT,
             L_STAT_TAB  LIKE JSTAT OCCURS 0 WITH HEADER LINE.
           P_SUBRC = 128.
         */Serialized Material
           IF NOT P_QALS-SERNP IS INITIAL.
             EXIT.
           ELSE.
             P_SUBRC = 64.
           ENDIF.
         */BERF
           CALL FUNCTION 'STATUS_CHECK'
                EXPORTING
                     OBJNR             = P_QALS-OBJNR
                     STATUS            = 'I0203'
                EXCEPTIONS
                     STATUS_NOT_ACTIVE = 2.
           IF NOT SY-SUBRC IS INITIAL.
             EXIT.
           ELSE.
             P_SUBRC = 32.
           ENDIF.
         */BTEI & BEND
           CLEAR L_STAT. CLEAR L_STAT_TAB. REFRESH L_STAT_TAB.
           L_STAT-STAT = 'I0219'. APPEND L_STAT TO L_STAT_TAB. "BTEI
           L_STAT-STAT = 'I0220'. APPEND L_STAT TO L_STAT_TAB. "BEND
           CALL FUNCTION 'STATUS_OBJECT_CHECK_MULTI'
                EXPORTING
                     OBJNR        = P_QALS-OBJNR
                TABLES
                     STATUS_CHECK = L_STAT_TAB.
           IF L_STAT_TAB[] IS INITIAL.
             EXIT.
           ELSE.
             P_SUBRC = 16.
           ENDIF.
         */LSTO & LSTV
           CLEAR L_STAT. CLEAR L_STAT_TAB. REFRESH L_STAT_TAB.
           L_STAT-STAT = 'I0224'. APPEND L_STAT TO L_STAT_TAB. "LSTO
           L_STAT-STAT = 'I0232'. APPEND L_STAT TO L_STAT_TAB. "LSTV
           CALL FUNCTION 'STATUS_OBJECT_CHECK_MULTI'
                EXPORTING
                                                                           Page 9
                     OBJNR        = P_QALS-OBJNR
                TABLES
                     STATUS_CHECK = L_STAT_TAB.
           IF NOT L_STAT_TAB[] IS INITIAL.
             EXIT.
           ELSE.
             P_SUBRC = 8.
           ENDIF.
         */ARSP & ARCH & REO1 & REO2 & REO3
           CLEAR L_STAT. CLEAR L_STAT_TAB. REFRESH L_STAT_TAB.
           L_STAT-STAT = 'I0225'. APPEND L_STAT TO L_STAT_TAB. "ARSP
           L_STAT-STAT = 'I0226'. APPEND L_STAT TO L_STAT_TAB. "ARCH
           L_STAT-STAT = 'I0227'. APPEND L_STAT TO L_STAT_TAB. "REO3
           L_STAT-STAT = 'I0228'. APPEND L_STAT TO L_STAT_TAB. "REO2
           L_STAT-STAT = 'I0229'. APPEND L_STAT TO L_STAT_TAB. "REO1
           CALL FUNCTION 'STATUS_OBJECT_CHECK_MULTI'
                EXPORTING
                     OBJNR        = P_QALS-OBJNR
                TABLES
                     STATUS_CHECK = L_STAT_TAB.
           IF NOT L_STAT_TAB[] IS INITIAL.
             EXIT.
           ELSE.
             P_SUBRC = 4.
           ENDIF.
         */SPER
           CALL FUNCTION 'STATUS_CHECK'
                EXPORTING
                     OBJNR             = P_QALS-OBJNR
                     STATUS            = 'I0043'
                EXCEPTIONS
                     STATUS_NOT_ACTIVE = 2.
           IF SY-SUBRC IS INITIAL.
             EXIT.
           ELSE.
             P_SUBRC = 2.
           ENDIF.
         */HUM
           CALL FUNCTION 'STATUS_CHECK'
                EXPORTING
                     OBJNR             = P_QALS-OBJNR
                     STATUS            = 'I0443'
                EXCEPTIONS
                     STATUS_NOT_ACTIVE = 2.
           IF SY-SUBRC IS INITIAL.
             EXIT.
           ELSE.
             P_SUBRC = 0.
           ENDIF.
                                                                          Page 10
         ENDFORM.                               " CHECK_LOT
          Form  READ_QAMB                                                *
          QAMBs lesen                                                    *
         FORM READ_QAMB USING P_QALS     LIKE QALS
                              P_QAMB_TAB TYPE T_QAMB_TAB
                              P_SUBRC    LIKE SY-SUBRC.
           CLEAR: P_SUBRC.
           SELECT * FROM QAMB INTO TABLE P_QAMB_TAB
             WHERE PRUEFLOS =  P_QALS-PRUEFLOS
               AND TYP   = '3'.
           P_SUBRC = SY-SUBRC.
         ENDFORM.                               " READ_QAMB
          Form  READ_MKPF                                                *
          Read material document header                                  *
         FORM READ_MKPF USING P_QAMB_TAB TYPE T_QAMB_TAB
                              P_MKPF_TAB TYPE T_MKPF_TAB
                              P_SUBRC    LIKE SY-SUBRC.
           DATA:
             BEGIN OF L_MKPF_KEY_TAB OCCURS 0,
               MBLNR LIKE MKPF-MBLNR,
               MJAHR LIKE MKPF-MJAHR,
             END   OF L_MKPF_KEY_TAB.
           DATA:
             L_QAMB   LIKE QAMB,
             L_MKPF   LIKE MKPF,
             L_TRTYP  LIKE T158-TRTYP VALUE 'A',
             L_VGART  LIKE T158-VGART VALUE 'WQ',
             L_XEXIT  LIKE QM00-QKZ.
           P_SUBRC = 4.
           LOOP AT P_QAMB_TAB INTO L_QAMB.
             L_MKPF_KEY_TAB-MBLNR = L_QAMB-MBLNR.
             L_MKPF_KEY_TAB-MJAHR = L_QAMB-MJAHR.
             COLLECT L_MKPF_KEY_TAB.
           ENDLOOP.
           LOOP AT L_MKPF_KEY_TAB.
             CALL FUNCTION 'ENQUEUE_EMMKPF'
                  EXPORTING
                       MBLNR          = L_MKPF_KEY_TAB-MBLNR
                       MJAHR          = L_MKPF_KEY_TAB-MJAHR
                  EXCEPTIONS
                       FOREIGN_LOCK   = 1
                                                                          Page 11
                       SYSTEM_FAILURE = 2
                       OTHERS         = 3.
             IF NOT SY-SUBRC IS INITIAL.
               L_XEXIT = 'X'.
               EXIT.
             ENDIF.
             CLEAR: L_MKPF.
             CALL FUNCTION 'MB_READ_MATERIAL_HEADER'
                  EXPORTING
                       MBLNR         = L_MKPF_KEY_TAB-MBLNR
                       MJAHR         = L_MKPF_KEY_TAB-MJAHR
                       TRTYP         = L_TRTYP
                       VGART         = L_VGART
                  IMPORTING
                       KOPF          = L_MKPF
                  EXCEPTIONS
                       ERROR_MESSAGE = 1.
             IF NOT SY-SUBRC IS INITIAL.
               L_XEXIT = 'X'.
               EXIT.
             ELSE.
               APPEND L_MKPF TO P_MKPF_TAB.
             ENDIF.
           ENDLOOP.
           IF NOT L_XEXIT IS INITIAL.
             EXIT.
           ELSE.
             P_SUBRC = 0.
           ENDIF.
         ENDFORM.                               " READ_MKPF
          Form  READ_MSEG                                                *
          MSEGs lesen                                                    *
         FORM READ_MSEG USING P_MKPF_TAB TYPE T_MKPF_TAB
                              P_MSEG_TAB TYPE T_MSEG_TAB
                              P_SUBRC    LIKE SY-SUBRC.
           DATA:
             L_MKPF     LIKE MKPF,
             L_MSEG_TAB LIKE MSEG OCCURS 0 WITH HEADER LINE,
             L_TRTYP    LIKE T158-TRTYP VALUE 'A',
             L_XEXIT    LIKE QM00-QKZ.
           P_SUBRC = 4.
           LOOP AT P_MKPF_TAB INTO L_MKPF.
             CLEAR: L_MSEG_TAB. REFRESH: L_MSEG_TAB.
             CALL FUNCTION 'MB_READ_MATERIAL_POSITION'
                  EXPORTING
                                                                          Page 12
                       MBLNR  = L_MKPF-MBLNR
                       MJAHR  = L_MKPF-MJAHR
                       TRTYP  = L_TRTYP
         */            ZEILB  = P_ZEILE
         */            ZEILE  = P_ZEILE
                  TABLES
                     SEQTAB = L_MSEG_TAB
                EXCEPTIONS
                     ERROR_MESSAGE = 1.
             IF NOT SY-SUBRC IS INITIAL.
               L_XEXIT = 'X'.
               EXIT.
             ELSE.
               APPEND LINES OF L_MSEG_TAB TO P_MSEG_TAB.
             ENDIF.
           ENDLOOP.
           IF NOT L_XEXIT IS INITIAL.
             EXIT.
           ELSE.
         */  XAuto-Zeilen und Chargenzustandsänderung werden gelöscht
             DELETE P_MSEG_TAB WHERE XAUTO NE SPACE
                                  OR BWART EQ '341'
                                  OR BWART EQ '342'.
             P_SUBRC = 0.
           ENDIF.
         ENDFORM.                               " READ_MSEG
          Form  CREATE_GOODS_MOVEMENT                                    *
          Warenbewegung anlegen                                          *
         FORM CREATE_GOODS_MOVEMENT USING P_QALS     LIKE QALS
                                          P_MSEG_TAB TYPE T_MSEG_TAB
                                          P_SUBRC    LIKE SY-SUBRC.
           DATA:
             L_LMENGEZUB LIKE QALS-LMENGEZUB,
             L_LMENGEGEB LIKE QALS-LMENGEZUB,
             L_MBQSS     LIKE MBQSS,
             L_IMKPF     LIKE IMKPF,
             L_IMSEG     LIKE IMSEG,
             L_IMSEG_TAB LIKE IMSEG OCCURS 1,
             L_EMKPF     LIKE EMKPF,
             L_EMSEG     LIKE EMSEG,
             L_EMSEG_TAB LIKE EMSEG OCCURS 1,
             L_MSEG      LIKE MSEG,
             L_MSEG_TAB  LIKE MSEG  OCCURS 1,
             L_TCODE     LIKE SY-TCODE VALUE 'QA11',
             L_TABIX     LIKE SY-TABIX VALUE 1,
             L_XSTBW     LIKE T156-XSTBW.
           CLEAR: P_SUBRC.
                                                                          Page 13
         */QAMB initialisieren
           CALL FUNCTION 'QAMB_REFRESH_DATA'.
         */Kopf füllen
           L_IMKPF-BLDAT = SY-DATLO.
           L_IMKPF-BUDAT = SY-DATLO.
           L_IMKPF-BKTXT = 'Cancellation of QM UD postings'.
         */Ursprüngliche zu buchende Menge merken + inkrementieren
           L_LMENGEZUB = P_QALS-LMENGEZUB.
           L_LMENGEGEB =   P_QALS-LMENGE01
                         + P_QALS-LMENGE02
                         + P_QALS-LMENGE03
                         + P_QALS-LMENGE04
                         + P_QALS-LMENGE05
                         + P_QALS-LMENGE06
                         + P_QALS-LMENGE07
                         + P_QALS-LMENGE08
                         + P_QALS-LMENGE09.
         */Zeilen aufbauen
           L_MSEG_TAB[] = P_MSEG_TAB[].
           LOOP AT L_MSEG_TAB INTO L_MSEG.
             MOVE-CORRESPONDING L_MSEG  TO L_MBQSS.
             MOVE-CORRESPONDING L_MBQSS TO L_IMSEG.
         */  Referenzbeleg übergeben, falls Bestellnummer gefüllt
             IF NOT L_MSEG-EBELN IS INITIAL.
               MOVE: L_MSEG-LFBNR TO L_IMSEG-LFBNR,
                     L_MSEG-LFBJA TO L_IMSEG-LFBJA,
                     L_MSEG-LFPOS TO L_IMSEG-LFPOS.
             ENDIF.
             MOVE L_MSEG-KDAUF          TO L_IMSEG-KDAUF.
             MOVE L_MSEG-KDPOS          TO L_IMSEG-KDPOS.
             MOVE L_MSEG-PS_PSP_PNR     TO L_IMSEG-PS_PSP_PNR.
         */  Umlagerungsfelder setzen
             MOVE:
                 L_MSEG-UMMAT  TO L_IMSEG-UMMAT,
                 L_MSEG-UMWRK  TO L_IMSEG-UMWRK,
                 L_MSEG-UMLGO  TO L_IMSEG-UMLGO,
                 L_MSEG-UMCHA  TO L_IMSEG-UMCHA.
         */  Storno-Beleg setzen
             MOVE: L_MSEG-MJAHR  TO L_IMSEG-SJAHR,
                   L_MSEG-MBLNR  TO L_IMSEG-SMBLN,
                   L_MSEG-ZEILE  TO L_IMSEG-SMBLP.
         */  Falsch gefüllte Felder initialisieren
             CLEAR: L_IMSEG-MBLNR,
                    L_IMSEG-MENGE,
                    L_IMSEG-MEINS.
         */  Bewegungsart lesen
             SELECT SINGLE XSTBW FROM T156 INTO L_XSTBW
               WHERE BWART = L_IMSEG-BWART.
                                                                          Page 14
             IF NOT SY-SUBRC IS INITIAL.
               P_SUBRC = 4.
               EXIT.
             ENDIF.
         */  Werk/Lagerort füllen
             IF P_QALS-STAT11 IS INITIAL.
               IF L_XSTBW IS INITIAL.
                 MOVE P_QALS-LAGORTVORG TO L_IMSEG-LGORT.
               ELSE.
                 MOVE P_QALS-LAGORTVORG TO L_IMSEG-UMLGO.
               ENDIF.
             ENDIF.
             IF L_XSTBW IS INITIAL.
               MOVE P_QALS-WERKVORG TO L_IMSEG-WERKS.
             ELSE.
               MOVE P_QALS-WERKVORG TO L_IMSEG-UMWRK.
             ENDIF.
         */  Zusätzliche Felder
             MOVE P_QALS-MENGENEINH TO L_IMSEG-ERFME.
             "MOVE P_GRUND           TO L_IMSEG-GRUND.
             "MOVE P_ELIKZ           TO L_IMSEG-ELIKZ.
         */  Kennzeichen Storno-Buchung setzen
             MOVE 'X'               TO L_IMSEG-XSTOB.
             MOVE P_QALS-PRUEFLOS   TO L_IMSEG-QPLOS.
             APPEND L_IMSEG TO L_IMSEG_TAB.
             IF P_QALS-STAT11 IS INITIAL.
               ADD      L_IMSEG-ERFMG TO   L_LMENGEZUB.
               SUBTRACT L_IMSEG-ERFMG FROM L_LMENGEGEB.
             ELSE.
               IF     L_IMSEG-KZBEW EQ SPACE
                  AND L_IMSEG-WERKS NE SPACE
                  AND L_IMSEG-LGORT NE SPACE
                  AND L_IMSEG-UMWRK NE SPACE
                  AND L_IMSEG-UMLGO NE SPACE
                  AND L_IMSEG-WERKS EQ L_IMSEG-UMWRK
                  AND L_IMSEG-UMLGO EQ L_IMSEG-UMLGO.
         */      Dummy Buchung bei WE-Sperrbestand & Stichprobe
               ELSE.
                 ADD      L_IMSEG-ERFMG TO   L_LMENGEZUB.
                 SUBTRACT L_IMSEG-ERFMG FROM L_LMENGEGEB.
               ENDIF.
             ENDIF.
           ENDLOOP.
           IF NOT P_QALS-STAT11 IS INITIAL.
         */  Bei WE-Sperrbestand und Stichprobenbuchung Zeilen tauschen
             DO.
               READ TABLE L_IMSEG_TAB INDEX SY-INDEX INTO L_IMSEG.
               IF     SY-SUBRC      IS INITIAL
                  AND L_IMSEG-KZBEW EQ SPACE
                  AND L_IMSEG-WERKS NE SPACE
                  AND L_IMSEG-LGORT NE SPACE
                  AND L_IMSEG-UMWRK NE SPACE
                  AND L_IMSEG-UMLGO NE SPACE
                                                                          Page 15
                  AND L_IMSEG-WERKS EQ L_IMSEG-UMWRK
                  AND L_IMSEG-UMLGO EQ L_IMSEG-UMLGO.
                 IF SY-TABIX NE L_TABIX.
                   DELETE L_IMSEG_TAB INDEX SY-TABIX.
                   INSERT L_IMSEG     INTO  L_IMSEG_TAB INDEX L_TABIX.
                   L_TABIX = L_TABIX + 1.
                 ELSE.
                   L_TABIX = L_TABIX + 1.
                   CONTINUE.
                 ENDIF.
               ELSEIF SY-SUBRC IS INITIAL.
                 CONTINUE.
               ELSE.
                 EXIT.                          "from do
               ENDIF.
             ENDDO.
           ENDIF.
         */QM deaktivieren
           CALL FUNCTION 'QAAT_QM_ACTIVE_INACTIVE'
                EXPORTING
                     AKTIV = SPACE.
         */Buchen
           CALL FUNCTION 'MB_CREATE_GOODS_MOVEMENT'
                EXPORTING
                     IMKPF = L_IMKPF
                     XALLP = 'X'
                     XALLR = 'X'
                     CTCOD = L_TCODE
                     XQMCL = ' '
                IMPORTING
                     EMKPF = L_EMKPF
                TABLES
                     IMSEG = L_IMSEG_TAB
                     EMSEG = L_EMSEG_TAB.
         */QM wieder aktivieren
           CALL FUNCTION 'QAAT_QM_ACTIVE_INACTIVE'
                EXPORTING
                     AKTIV = 'X'.
         */Buchung auswerten
           IF L_EMKPF-SUBRC GT 1.
             IF L_EMKPF-MSGID NE SPACE.
         */    Fehler auf Kopfebene
               MESSAGE ID L_EMKPF-MSGID TYPE 'S'
                       NUMBER L_EMKPF-MSGNO
                       WITH L_EMKPF-MSGV1 L_EMKPF-MSGV2
                            L_EMKPF-MSGV3 L_EMKPF-MSGV4.
               SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
             ELSE.
         */    Fehler auf Zeilenebene (Ausgabe des ersten Fehlers)
               LOOP AT L_EMSEG_TAB INTO L_EMSEG.
                 IF L_EMSEG-MSGID NE SPACE.
                   MESSAGE ID L_EMSEG-MSGID TYPE 'S'
                         NUMBER L_EMSEG-MSGNO
                         WITH L_EMSEG-MSGV1 L_EMSEG-MSGV2
                              L_EMSEG-MSGV3 L_EMSEG-MSGV4.
                                                                          Page 16
                   SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
                 ENDIF.
               ENDLOOP.
             ENDIF.
           ENDIF.
           LOOP AT L_EMSEG_TAB INTO L_EMSEG.
             CALL FUNCTION 'QAMB_COLLECT_RECORD'
                  EXPORTING
                       LOTNUMBER   = P_QALS-PRUEFLOS
                       DOCYEAR     = L_EMKPF-MJAHR
                       DOCNUMBER   = L_EMKPF-MBLNR
                       DOCPOSITION = L_EMSEG-MBLPO
                       TYPE        = '7'.
           ENDLOOP.
         */Sonderkorrektur für Frei-An-Frei & WE-Sperr-An-We-Sperr
           IF NOT P_QALS-STAT11 IS INITIAL.
             IF P_QALS-LMENGE04 EQ L_LMENGEGEB.
               ADD      P_QALS-LMENGE04 TO   L_LMENGEZUB.
               SUBTRACT P_QALS-LMENGE04 FROM L_LMENGEGEB.
             ENDIF.
           ELSEIF P_QALS-INSMK IS INITIAL.
             IF         P_QALS-LMENGE01 GE L_LMENGEGEB
                AND NOT P_QALS-LMENGE01 IS INITIAL.
               ADD      L_LMENGEGEB     TO   L_LMENGEZUB.
               SUBTRACT L_LMENGEGEB     FROM L_LMENGEGEB.
             ENDIF.
           ENDIF.
           CLEAR: P_QALS-STAT34,
                  P_QALS-MATNRNEU,
                  P_QALS-CHARGNEU,
                  P_QALS-LMENGE01,
                  P_QALS-LMENGE02,
                  P_QALS-LMENGE03,
                  P_QALS-LMENGE04,
                  P_QALS-LMENGE05,
                  P_QALS-LMENGE06,
                  P_QALS-LMENGE07,
                  P_QALS-LMENGE08,
                  P_QALS-LMENGE09.
           P_QALS-LMENGEZUB = L_LMENGEZUB.
           IF NOT L_LMENGEGEB IS INITIAL.
             P_SUBRC = 4.
           ENDIF.
         ENDFORM.                               " CREATE_GOODS_MOVEMENT
          Form  POST_GOODS_MOVEMENT                                      *
          Warenbewegung buchen                                           *
         FORM POST_GOODS_MOVEMENT.
           CALL FUNCTION 'MB_POST_GOODS_MOVEMENT'.
                                                                          Page 17
         ENDFORM.                               " POST_GOODS_MOVEMENT
          Form  POST_DATA                                                *
          QM-Daten verbuchen                                             *
         FORM POST_DATA USING P_QALS        LIKE QALS
                              P_QALS_LEISTE LIKE QALS
                              P_QAMB_TAB    TYPE T_QAMB_TAB
                              P_QAMB_VB_TAB TYPE T_QAMB_TAB
                              P_SUBRC       LIKE SY-SUBRC.
           DATA:
             L_STAT        LIKE JSTAT,
             L_STAT_TAB    LIKE JSTAT OCCURS 0,
             L_QAMB        LIKE QAMB,
             L_UPDKZ       LIKE QALSVB-UPSL VALUE 'U'.
         */QAMBs umsetzen (7 = VE-Buchung storniert)
           LOOP AT P_QAMB_TAB INTO L_QAMB.
             L_QAMB-TYP = '7'.
             APPEND L_QAMB TO P_QAMB_VB_TAB.
           ENDLOOP.
         */BERF & BTEI zurücknehmen
           CLEAR L_STAT. CLEAR L_STAT_TAB.
           L_STAT-INACT = 'X'.
           L_STAT-STAT = 'I0219'. APPEND L_STAT TO L_STAT_TAB. "BTEI
           L_STAT-STAT = 'I0220'. APPEND L_STAT TO L_STAT_TAB. "BEND
           CALL FUNCTION 'STATUS_CHANGE_INTERN'
                EXPORTING
                     OBJNR         = P_QALS-OBJNR
                TABLES
                     STATUS        = L_STAT_TAB
                EXCEPTIONS
                     ERROR_MESSAGE = 1.
           IF SY-SUBRC <> 0.
             MESSAGE ID SY-MSGID TYPE 'S' NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
             SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
           ENDIF.
         */Prüflos aktualisieren
           CALL FUNCTION 'QPL1_UPDATE_MEMORY'
                EXPORTING
                     I_QALS  = P_QALS
                     I_UPDKZ = L_UPDKZ.
           CALL FUNCTION 'QPL1_INSPECTION_LOTS_POSTING'.
           CALL FUNCTION 'STATUS_UPDATE_ON_COMMIT'.
         */QAMB initialisieren
           CALL FUNCTION 'QAMB_REFRESH_DATA'.
                                                                          Page 18
           PERFORM UPDATE_QAMB ON COMMIT.
           P_SUBRC = 0.
         ENDFORM.                               " POST_DATA
          Form  UPDATE_QAMB                                              *

Maybe you are looking for

  • Thunderbird can't send email to addresses in Address Book because of formatting error

    My Thunderbird can't send email to an address picked from the Address Book. It gives the following error: "An error occurred while sending mail. The mail server responded: 5.1.1 <"name@telconame"@telco.com> Unknown recipient. Please check the message

  • How to highlight text in OA page

    I am adding some javascript logic in my OAF page and would like to be able to highlight words in the oamessagetextinput bean. Is this possible?

  • Create PDF document from Word with hyperlink index entries

    Hello, I'm having a MS Word 2010 document with a content and index directory, both directories were created with the official Word functions and their page numbers are updated automatically. If I convert this document to a PDF file with Acrobat 9 Pro

  • Exception when use getAppletContext().showDocument(url);

    I want to open a page using getAppletContext().showDocument(yourURL), but it troughs the following exception: java.lang.NullPointerException java.applet.Applet.getAppletContext(Unkonow Source) This happen when i put the getappletcontext() in a method

  • Update installation Fail

    The following message received when trying to update: Adobe Illustrator CS5 15.0.2 Update There was an error downloading this update. Please quit and try again later. Error Code: U43M1U49 Adobe Extension Manager CS5 5.0 Update There was an error down