Sample procurement

Hi
  According to the business scenario,need to procure sample material in free of cost and also need to maintain the material as non-valuated in the inventory.In this scenario the business is using Standard price for all materials (not MAP).Kindly help.
-Prabu

Hello Prabu,
As it was said you can order goods FOC using the free of charge indicator on your PO.
If you don't want this sample material to be valuated (or valuated on an other price):
1. Isn't a solution for you to consume it with MVT 201 for a cost center / or use 'K' account assignment category on your PO (to receive the goods against a cost center)
2. You can use split valuation, please check:
http://help.sap.com/saphelp_46c/helpdata/en/47/61017149f011d1894c0000e829fbbd/frameset.htm
BR
Csaba

Similar Messages

  • Procedure for inwarding imports free sample

    Dear all
    We are getting free samples from our import vendors.No cost involved in this samples.
    We want to keep it in valuated stock.
    Is there any special movement is available for inwarding these free samples.
    Please help us.
    Regards
    Mahalingam Sarathi

    Hi,
    There is no Sperate Movement type for free sample procurement.
    You have maintain Info Record as Free smaple. while creating PO the item will not cover any value.
    During GR you can make against 101.
    SAM

  • Sample inspection during first time procurement.

    Hi,
    I have a scenario when ever I start procuring from a new vendor, Plant will be asking for sample say 10 pieces. And when vendor supplies the same, the quantity will go for quality inspection. Once all the parameters are met order will be posted to the vendor with a PO for more quantity.
    I understand that I need to have following master data, Like Vendor, Quality info record, Inspection plan for the material, MIC's associated with them, Inspection type assigned to the Material master. (Which type of inspection type can I use here)
    And What type of movt types will be used.
    Kindly help me out how to go about this process.
    Regards,
    N.Nagaraju

    If you are looking for simple process , try this.
    1. Assign 01 inspection type in material master
    2. SAP will create inspection lot at the time of GR.
    3. Process inspection lots as usual.
    4. Once you are satisfied with vendor quality- Create Q info  record for vendor / material.
           In the tab 'Inspection control ' set inspection control to 'No Inspection'.
    5. All subsequent receipts would not create inspection lot.
    In this process, You have to manually set the Q info record to no-inspection.
    To automate the process use  'status profile' in the Qinfo record.
    Marwadi.

  • Procure to Pay Sample Resumes

    Hello All,
    This Srikanth M working under Procure to Pay --Procurement(creation of Purchase Order). Can any advise me in creating Fresh Resume for the above.
    Thanks & Regards
    Srikanth

    Sure - do your job for a while then put your experiences in your resume.
    Locked.
    Rob

  • Issue with DataApp Sample in JavaFX.

    Okay so I downloaded the Samples pack here http://jdk8.java.net/download.html or here http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html at the bottom.
    Inside is one called DataApp which requires setting up an SQL DB, and connecting to it.
    In Netbeans8 I get an error about not having RestLib api inside the DataAppClient which according to the setup DataAppClient - The JavaFX 2.0 client application. inside there you can see a package with packages that wont import such as
    import com.sun.jersey.api.client.Client;
    import com.sun.jersey.api.client.UniformInterfaceException;
    import com.sun.jersey.api.client.WebResource;
    import com.sun.jersey.api.json.JSONConfiguration;
    So why am I in a Java 8 samples pack needing FX 2? Though I'm not sure if it's FX8 yet, I just didn't think the 2.0 client would work.
    So I tried Netbeans 7.3 to see if it would work. At first the DataAppClient was fine, but I see the DataAppPreloader will not run because it uses Package javafx.something which apparently is new in Java 8.....
    So now I'm stuck, wondering why Restlib doesn't exist... I looked it up, and it says it's used for Web services, but I don't have it, nor does it say to install it in the readme.
    not existing, which I guess has to do with the RestLib?
    Anyone have any ideas?
    EDIT: So I just downloaded the version for FX2, and I am still getting the same error when I run it, though nothing shows "errors" in the packages. Maybe I just needed to run it correctly for it to work, so not what is this error tellingme
    Creating "dataapp" user and "APP" database...
    Executing commands
    Failed to execute:  INSERT INTO user VALUES ('localhost','dataapp','*B974A83D18BB105D0C9186756F485406E6E6039B','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',NULL)
    C:\Users\Konrad\Downloads\javafx_samples-2_2_7-windows\javafx-samples-2.2.7\src\DataApp\DataAppLoader\build.xml:84:
    java.sql.SQLException: Column count doesn't match value count at row 1
         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2618)
         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568)
         at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:842)
         at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:681)
         at org.apache.tools.ant.taskdefs.SQLExec.execSQL(SQLExec.java:775)
         at org.apache.tools.ant.taskdefs.SQLExec.runStatements(SQLExec.java:745)
         at org.apache.tools.ant.taskdefs.SQLExec$Transaction.runTransaction(SQLExec.java:1043)
         at org.apache.tools.ant.taskdefs.SQLExec$Transaction.access$000(SQLExec.java:985)
         at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:653)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
         at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:601)
         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
         at org.apache.tools.ant.Task.perform(Task.java:348)
         at org.apache.tools.ant.Target.execute(Target.java:392)
         at org.apache.tools.ant.Target.performTasks(Target.java:413)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
         at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
         at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
         at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
    BUILD FAILED (total time: 6 seconds)I have put the 1.18 derby file into glassfish, download and set up MySQL using a netbeans reference,I had set my root password and such as well.
    The only thing I haven't done is created a DB, but I don't think I need one, and the instructions don't say anything.
    I have Netbenans 7.3, 8, and Java vers 7_15 and 8 build 82.
    GlassFish 3.1.2 as well as 4.0 build 76 which I haven't installed.
    I hav e MySQL 5.6
    Java FX 2.0 and 8 build 82.
    The instructions are
    DataApp Installation Guide
    Table of Contents
    Prerequisites
    Setting Up the DataApp Sample
    Running the Sample
    NetBeans Projects for the Sample
    Licensing
    Prerequisites
    You must have the following software installed to run the DataApp sample:
    Java SDK 1.6.0_24 or later
    Available at http://www.oracle.com/technetwork/java/javase/downloads/index.html.
    JavaFX 2.0 SDK or later
    Available at http://javafx.com/downloads/all.jsp.
    MySQL 5.5 or later
    Available at http://dev.mysql.com/downloads/.
    You need to know the root password for your installation.
    Netbeans 7.1 with Java EE and GlassFish 3.1.1 or later
    Available at http://netbeans.org/downloads/.
    Run the NetBeans installer to install NetBeans and GlassFish to the default locations.
    Setting Up the DataApp Sample
    Install the MySQL drivers into GlassFish.
    Manually copy the mysql-connector-java-5.1.13-bin.jar file from the netbeans-install-dir\ide\modules\ext\ to the glassfish-install-dir/glassfish/lib directory, where netbeans-install-dir and glassfish-install-dir are the directories into which the products were installed. For example, on Windows the install directory for products is typically in the C:\Program Files\ or C:\Program Files (x86)\ directories.
    Open the following DataApp projects in NetBeans by selecting File ->Open Project and navigating to the location of the DataApp sample:
    DataAppClient
    DataAppLibrary
    DataAppLoader
    DataAppPreloader
    DataAppServer
    Configure and create the database (only needs to be done once):
    In NetBeans, right-click the DataAppLoader project.
    Select Run.
    Enter your MySQL root password when prompted.
    Wait until you see the message that the build has successfully finished, which takes approximately 5 to 15 minutes.
    Running the Sample
    Start the server:
    In NetBeans, right-click the DataAppServer project.
    Select Run.
    Wait until a browser window opens that says: YOU ARE DONE!
    (Optional) Start the standalone client:
    In NetBeans, right-click the DataAppClient project.
    Select Run.
    NetBeans Projects for the Sample
    DataAppLibrary - Contains the following data:
    Database tables
    ORM model to database tables
    DataAppLoader - Application that is run once to perform the following tasks:
    Creates the database.
    Loads all of the static data for the data app.
    Creates some historical data.
    DataAppServer - Web server that performs the following tasks:
    Simulates auto sales and persists them to the database.
    Provides access to the database through web services.
    DataAppClient - The JavaFX 2.0 client application.
    Licensing
    The license for the DataAppLoader/zip_code_inserts.sql file is the Creative Commons Attribution-ShareAlike license, which is available at http://creativecommons.org/licenses/by-sa/2.0/.
    The license for all other files is the BSD style license:
    * Copyright (c) 2008, 2011 Oracle and/or its affiliates.
    * All rights reserved. Use is subject to license terms.
    * This file is available and licensed under the following license:
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * - Redistributions of source code must retain the above copyright
    * notice, this list of conditions and the following disclaimer.
    * - Redistributions in binary form must reproduce the above copyright
    * notice, this list of conditions and the following disclaimer in
    * the documentation and/or other materials provided with the distribution.
    * - Neither the name of Oracle Corporation nor the names of its
    * contributors may be used to endorse or promote products derived
    * from this software without specific prior written permission.
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    Copyright © 2011, Oracle and/or its affiliates. All rights reservedEdited by: KonradZuse on Mar 27, 2013 9:39 AM
    Edited by: KonradZuse on Mar 27, 2013 9:51 AM
    Edited by: KonradZuse on Mar 27, 2013 9:58 AM

    I found the same issue but resolved it by myself. The user table of the MySQL changed, my guess. You need to add another 'Y' or 'N' to the end of this statement in the build.xml of DataAppLoader:
    INSERT INTO user VALUES ('localhost','dataapp','*B974A83D18BB105D0C9186756F485406E6E6039B','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',NULL,'N');
    The original one is like this:
    INSERT INTO user VALUES ('localhost','dataapp','*B974A83D18BB105D0C9186756F485406E6E6039B','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'',NULL);
    The new column added is password_expired. Y or N to indicate the password is good or not.

  • Sample materials(FG) receive from Vendor

    Hi all,
    We need you advise on the below requirment?
    Scenario: Company receive the sample materials  (Finished goods) form the Vendor. After receiving this into the Company the Marketing department send this to our company customers for advertizing. Sofar they are doing this activity  in out off SAP.
    From now onwords they want enter this goods in SAP suystem.
    So now the business busienss is looking for solution ( just kind of report in SAP) which should show the current availble stock when we run this report.
    How much qty received from the vendor, How much qty taken out by Marketing dept and currently what is the availble stock( sampels).
    Please note : The stock will be counted on number base.  not on value base.
    Plese adivse how to achieve this ?
    thanks,

    surya,
    To get a report with stock, available stock etc. in some way the information has to be inputted in SAP. How are you planning to do that?
    One option is to create documents in SAP and then use these for inbound and outbound movements.
    - for receiving these goods from vendor
    - for sending sample goods to customers
    I am not sure about Procuring part (inbound). For outbound part, please see below:
    For the sample sale process:
    Use FD document type - This is provided by SAP to deliver free of charge sample goods to customers.
    In FD process, there is no billing document. Only sales order > delivery
    Read about standard FD process in the internet.
    TW

  • How to create User Defined Variables in Procurement Contract 12.1.3

    Hi,
    We are using Procurement Contract 12.1.3. As per our business requirement while creating contract template we need to use many variables which are not available in 'System Defined' variable list. Please guide us with some samples (step by step) how to create the 'User defined' variables.
    Regards,
    Prabhu

    Hi Prabhu,
    Did you get the setps how to create user defined variables in Procurement contracts? if so please share me the setp by step flow.
    Prakash

  • QM in procurement basic flow

    Hi all,
    Can anybody explain me about the end to end process of QM in procurement ? means....what is the start point and where it end ? ...master data involved ?.......
    Appreciate your help...
    Cheers,
    Pat

    If you want to procure material from outside vendor then you can activate QM in procurement for this you have to follow following point,
    1. Create Material Master and assign Quality Insp data in QM view. - MM01
    2. Create Vendor Master for which vendor you want to procure material - XK01
    3. Create Source list and/ or Info record as per your business requirement for vendor, material combination
    If you want to procure particular material from particular vendor then this relation you can display here. - ME01/ QI01
    4. Create Inspection Plan for material and assign other master data like MIC, Sampling data, Inspection method, work center, equipment to it - QP01, MS21, QS31, QDV1, QDP1, QPV2, QDR1
    5. Now create Purchase requisition for material - ME51N
    6. Purchase dept. will request for quotation to vendor - ME41
    7. With refeance to quotation create PO - ME21N
    8. Release PO. - ME28, ME29N
    9. Do good receipts with referance to PO.
    10. System will generate Insp. lot auto matically and stock comes in quality - QA32/ QA33
    11. Do sampling and result recording of lot - QE51N
    12. Do usage decision - QA11
    13. Stock comes in unrestricted use - MMBE
    Hope this helps.
    Thanks!!!

  • CCM - content of customer characteristic not mapped to procurement catalog

    Hi experts,
    I uploaded a sample CSV-file supplier catalog. Within the supplier catalog I defined a customer characteristic of type /CCM/ATTACHMENT.
    The supplier catalog is uploaded without any problems and also the /CCM/ATTACHMENT characteristic is filled correctly with description, mime type and URL.
    I mapped now the supplier catalog to the master catalog and then to the procurement catalog.
    All the content except the content of the customer characteristic /CCM/ATTACHMNENT is mapped to the master and procurement catalog. The characteristic /CCM/ATTACHMENT is available in the master and procurement catalog and I can even see the characteristic there. But no content is in there.
    Are there any additional steps when I try to map customer characteristic? The characteristic is in definitely available in the master and procurement catalog schema and catalog.
    Thanks in advance for your help! I will reward points.
    Tom

    Hi,
    Try select both the characteristic in mapping, do "Assign Characteristics" for automatic characteristic assignment, include sub categories and SAVE.
    A message will appear for assigning characteristic, then go for MAP CONTENT all items will be mapped and will be obtained in Procurement catalog.
    Best Reg.,
    Sridhar

  • Procurment and spend analysis

    Hi,
    Wat are dashbords required for Procurment and spend analysis only?
    Thanx

    If you want to see the out of box dashboards and reports for Procurement and Spend, then you can look at Product Guide, it lists all the dashboards and sample reports. However product guide is not available via Metalink3 or oracle site, you can try requesting it via your account representative for Oracle.

  • I want sample code and tables for my requriement

    Hi Experts,
    I have MATNR(material no), Werks(plant) and date as selection screen fields Based on this I have to get procurement data. i.e Material
    Description
    Vendor
    Vendor name
    Product hierarchy
    Qty unrestricted
    Date product recieve at warehouse.
    i.e.Based on MATERIAL and PLANT I have to get total unrestricted quantity of that material.
    please provide me relevant tables and sample code
    thanx in advance

    I have MATNR(material no), Werks(plant) and date as selection screen fields Based on this I have to get  procurement data. i.e
    Material - <b>EKPO</b>
    Description - <b>MAKT</b>
    Vendor - <b>EKKO</b>
    Vendor name - <b>LFA1</b>
    Product hierarchy - <b>(???)</b>
    Qty unrestricted -<b> EKPO</b>
    Date product recieve at warehouse. <b>(EKKO)</b>
    Please provide me relevant tables <b>(As Above)</b>
    and
    sample code -<b> You need to contact technical expert</b>

  • Direct material procurement in PDP scenario for classic mode

    Dear Gurus,
    We have configured classic scenario in our SRM 7.01 with backend system ECC 6.0 Enhpk 5.  We have PDP scenario for direct material as one of the requirement. The requirement generated in MRP in the ECC backend system will be sent to SRM SOCO for sourcing. Once the right source of supply is found, the follow-on purchase order needs to be created in the ECC backend system in direct material mode.
    However, the SAP SRM standard supports only indirect material procurement in PDP scneario for classic mode. How to enable the direct material procurement? Could you suggest any BAdi to be used here?
    Thanks and regards,
    Ranjan
    Ranjan Sutradhar

    Hello,
    You need to activate the Bsdi 'ME_REQ_SOURCING_CUST' for transferring the purchase requisitions from ERP to SAP SRM.
    Some details about the method involved for the same are mentioned below :
    Mehtod : IF_EX_ME_REQ_SOURCE_CUST~ACTIVE
    ->when parameter CV_AUT_SOURCING is set to true, external sourcing (e.g. SRM system) is active in ERP system
    ->when parameter CV_EXT_RFX_IND is set to true, RFx can be created out of PR directly from ERP system using application CPPR
    ->when parameter CV_EXT_SC_IND is set to true, PR in ERP system will be transferred to SRM using application CPPR
    Method b. IF_EX_ME_REQ_SOURCE_CUST~CHECK_EXTERNAL_SOURCE
    Here you need to maintain the logic / condition for which PR has to be transfered to SOCO.
    Example
    IF ( is_req_item-ekgrp = 'SRM' AND is_req_item-matkl = '100' )
    cv_ext_sourcing = cl_mmpur_constants=>yes.
    ENDIF.
    When this BADI is active whenever you save a PR with say the purchasing group as SRM and material group is 100 (as per sample code above), system automatically triggers the PR transfer from ERP to SRM by xml's.
    Best Regards,
    Rahul

  • Where to get ADF Sample Applications with Documentation.

    Hi All,
    I am new to ADF.I have followed oracle tutorials to learn ADF.
    Now I am looking for some sample applications with documentation so I can build some applications in ADF.I did one procurement application using following link.
    http://www.scribd.com/doc/13088674/Oracle-ADF-11g-Learning-Application-My-Procurement-Application
    Also I got one more application from Baig's Blog.But documentation is not there.
    http://baigsorcl.blogspot.com/2010/07/sample-code-quiz-application-in-oracle.html
    I will be very thankful if you provide me the documentation of Baig's application or some other applications with documentation.
    Regards,
    SHD

    Hi SHD,
    U can find some samples and their documentions here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html
    But learning the basics u can go through the developer guide and some hands on Application
    Ref : http://www.oracle.com/technetwork/developer-tools/adf/overview/index.html
    U can start ur learning here http://www.oracle.com/technetwork/developer-tools/jdev/overview/jdeveloper-reviewrguide-086026.html
    Developer Guide : http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/toc.htm
    make use the links below
    http://www.oracle.com/technetwork/developer-tools/jdev/overview/index-100269.html#adf
    http://www.oracle.com/technetwork/developer-tools/jdev/index-087798.html
    http://www.oracle.com/technetwork/developer-tools/jdev/viewlet-097827.html#adf
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html#adf
    Regards,
    Suganth.G

  • ADC sample code MapLargeFile.c returns an error

    I need some help running sample code from the ADC web site. I'm running 10.5.6 on a Mac Pro with 6 GB of RAM.
    The example in question "Shows a technique for mapping files greater than 4GB into memory for faster access."
    I compile it like this:
    gcc MapLargeFile.c -o MapLargeFile
    Then I make a 6GB file like this:
    dd if=/dev/zero of=foobar.txt bs=1024 count=6291456
    Finally I run it like this:
    ./MapLargeFile foobar.txt
    The program fails with this warning:
    ./MapLargeFile: failed to mmap file at offset 0x0
    I get the same error message if I give it a nonexistent file name. Looking at the code I would think it would say it couldn't open the nonexistent file.
    What am I doing wrong?
    Here is the sample code from the Apple ADC site:
    File: MapLargeFile.c
    Description: Shows a technique for accessing files > 4GB in size.
    Copyright: © Copyright 2003 Apple Computer, Inc. All rights reserved.
    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
    ("Apple") in consideration of your agreement to the following terms, and your
    use, installation, modification or redistribution of this Apple software
    constitutes acceptance of these terms. If you do not agree with these terms,
    please do not use, install, modify or redistribute this Apple software.
    In consideration of your agreement to abide by the following terms, and subject
    to these terms, Apple grants you a personal, non-exclusive license, under Apple's
    copyrights in this original Apple software (the "Apple Software"), to use,
    reproduce, modify and redistribute the Apple Software, with or without
    modifications, in source and/or binary forms; provided that if you redistribute
    the Apple Software in its entirety and without modifications, you must retain
    this notice and the following text and disclaimers in all such redistributions of
    the Apple Software. Neither the name, trademarks, service marks or logos of
    Apple Computer, Inc. may be used to endorse or promote products derived from the
    Apple Software without specific prior written permission from Apple. Except as
    expressly stated in this notice, no other rights or licenses, express or implied,
    are granted by Apple herein, including but not limited to any patent rights that
    may be infringed by your derivative works or by other works in which the Apple
    Software may be incorporated.
    The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
    WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
    WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
    COMBINATION WITH YOUR PRODUCTS.
    IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
    GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
    OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
    (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    Change History (most recent first):
    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    #include <sys/time.h>
    #include <unistd.h>
    #include <fcntl.h>
    #include <sys/types.h>
    #include <sys/mman.h>
    struct timeval lastTime, thisTime;
    This sample is set up to map a 6GB file into memory in 256MB chunks.
    #define kFileSize (0x180000000ULL) // size of file we expect to map = 6GB
    #define kBufferSize (0x10000000UL) // we will map it in 256MB chunks
    int main( int argc, const char *argv[] )
    int fd, cnt, loops;
    unsigned long long *buffer, sum;
    off_t offset;
    if ( argc != 2 )
    fprintf( stderr, "usage: %s filename
    ", argv[0] );
    return -1;
    // open the file
    fd = open( argv[1], O_RDONLY, 0 );
    if ( fd == 0 )
    fprintf( stderr, "%s: failed to open %s for read
    ", argv[0], argv[1] );
    return -1;
    sum = 0;
    offset = 0;
    loops = 9; // loop through the file 10 times
    gettimeofday( &lastTime, NULL );
    while ( 1 ) // loop for ever, loop exit is handled below
    // map in a kBufferSize segment of the file
    buffer = mmap( 0, kBufferSize, PROT_READ, MAP_FILE, fd, offset );
    if ( buffer == MAP_FAILED )
    fprintf( stderr, "%s: failed to mmap file at offset 0x%llx
    ", argv[0], offset );
    break;
    // touch every byte in this segment of the file.
    // this 'warms up' the pages in memory so that subsequent accesses will be much faster
    for ( cnt = 0; cnt < kBufferSize / sizeof(sum); cnt += 16 )
    sum += buffer[cnt + 0];
    sum += buffer[cnt + 1];
    sum += buffer[cnt + 2];
    sum += buffer[cnt + 3];
    sum += buffer[cnt + 4];
    sum += buffer[cnt + 5];
    sum += buffer[cnt + 6];
    sum += buffer[cnt + 7];
    sum += buffer[cnt + 8];
    sum += buffer[cnt + 9];
    sum += buffer[cnt + 10];
    sum += buffer[cnt + 11];
    sum += buffer[cnt + 12];
    sum += buffer[cnt + 13];
    sum += buffer[cnt + 14];
    sum += buffer[cnt + 15];
    // unmap the current segment of the file
    munmap( buffer, kBufferSize );
    // increment the offset into the file
    offset += kBufferSize;
    if ( offset >= kFileSize )
    offset = 0; // reset the offset if we're at the end of the file
    gettimeofday( &thisTime, NULL );
    printf( "Time = %u seconds, sum = %llx
    ", thisTime.tv_sec - lastTime.tv_sec, sum );
    if ( loops-- == 0 ) break; // exit if we've done all loops.
    lastTime = thisTime;
    close( fd ); // all done, close the file
    return 0;

    The short comment explains it:
    // touch every byte in this segment of the file.
    // this 'warms up' the pages in memory so that subsequent accesses will be much faster
    This is basically just buffered I/O. If you know you are going to need to read 10000 bytes, there is no need to read each byte one at a time. You read all 10000 bytes at once, then access each byte in memory instead of going to disk for it.

  • Inspection in procurement

    Guys, I have a query regarding inspection types 01, 0101 and 0102 i.e. regular, model and preliminary inspection for a material.
    Although I know the configuration part, I'm not clear conceptually what a model or preliminary inspection means. Would appreciate any inputs.
    1. For a new vendor or new material/ vendor combination what would be the impact of this setup?
    2. For an existing material , I have reached production series release. Can this then be reset to model inspection again? When would this be required?
    3. Before shipping material, a vendor sends me samples for inspection. Once these are approved, the total shipment is received and inspected, next. Any ideas on how this can be mapped?
    thanks!

    Hi,
    You can use here source inspection concept.
    Scenario:
    Purchase order is created for the raw material requirement to the particular vendor and the vendor stock is checked before goods receipt is made in our place where  inspection  lot has to be generated after the  purchase order creation to the particular vendor.
    Prerequisite:
    In the material master QM view inspection type 01, 101 to be activated
    Q-info record (QI01) to be created for the particular vendor and source inspection type 0101 to be assigned in inspection control tab in QI01 screen.
    Once you create purchase order again run transaction QI07 with material, plant .vendor combination.u2014Press Enter u2013in this screen select your line item & click on create inspection lot & save the transaction. Then you will find inspection lot to process.
    Scenario-1:
    Inspection lot is generated when purchase order is created, where result recording and usage decision is made as Approved after that Goods receipt is made with the reference of PO at the time of goods receipt system should not create the inspection lot and it allows to post the stock in unrestricted.
    Scenario-2
    Inspection lot is generated when purchase order is created, where result recording and usage decision is made as Rejected after that Goods receipt is made with the reference of PO at the time of goods receipt the below condition has to happen
    1.     System should create the new inspection lot and do the analysis then accept the stock
    2.     system should not allow to do the goods receipts.
    3.     source inspection has no impact at th time of goods receipt.
    Configuration setting required:
    Quality management-QM logistics-QM procurement -Control key
    Define control key;
    GR/Source inspection control;
    GR for rejection; three option is available
    1.source inspection has no effect on goods receipt
    2.Creation of new inspection  lot
    3.Goods receipt not allowed. 
    If any issue please revert me back.
    Regards
    SANIL

Maybe you are looking for