Reg : Sample BOM

Hi PP Guru's
Please tell me step by step method of creating Sample BOM with usage " 8 "
My scenario is like this I receive customer requirement  for developing new product in Research & development
Part number ( FG material ) is created in PLM & MDM system and I will create Production order manually in CO07
Regards,
Jaya
Edited by: jaya vimal on May 17, 2010 8:22 AM

Hi Jaya Vimal,
Following are the detailed steps for creating BOM with usage "8"
Creating a Material BOM with usage "8"
*Procedure*
How to create a BOM with usage "8":
Choose Logistics ® Production ® Master data ® Bills of material ® Bill of material ® Material BOM ® Create.
You see the Create material BOM: Initial screen.
Enter the following data:
u2013 Material (Finish product for which BOM is to be created)
u2013 Plant (in which you want the BOM to be valid)
u2013 Usage (8)
u2013 Alternative (if required)
u2013 Data to define the validity period
Confirm your entries.
The item overview appears.
Enter all the items you require.
Confirm your entries.
The BOM usage you selected may support some item status indicators as optional fields. If you want to process the indicator for several items, select these items and click .
The item detail screen appears.
Choose the Status/Long text tab page.
See also:
Status/Long Text
u2013 Process the indicators for the item status and new item data, as required.
u2013 Confirm your entries.
Save your BOM.
You get the message:
BOM for material  created
The system assigns a new internal BOM number.
With usage "8", this is only a planning BOM.
Regards,
Shiva

Similar Messages

  • Sample bom creation and explosion in sales order

    hi,
         can any one help to create a simple bom with atleast one sub item for the bom and create a sales order in which the bom explodes ( i mean when u enter the main bom item it should list its sub items as its line item below it)...
    (also mention what item categories are to be taken care ... )
    rewards for sure
    thanks
    mmn

    Hi MMn,
    Bill of materials (BOM)
    1. In the SAP System, you can use BOMs to represent different objects (such as materials, equipment, functional location BOMs, and documents) and to maintain object-specific data.
    2. Document BOM: A complex document may be made up of several documents, such as a program, technical drawings, papers, and photographs. These related information and documentation objects are grouped together as a unit using a document structure – a BOM for a document.
    3. Equipment BOMs are used to describe the structure of equipment and to assign spare parts to equipment for maintenance purposes. Bills of material for functional locations group together the elements of a technical structure, such as the functional unit of an entire plant.
    4. You work with order BOMs when you specially tailor the make-to-order production of your products to the requirements of your customers. In order to meet the customer requirements, sales order specific modifications to various assemblies are often required. Furthermore, assemblies are often specially constructed for a particular sales order.
    5. Before you can create a BOM for the component parts of an object, the object must have a valid master record in your system.
    6. A bill of material that you create for a material is known as a material BOM in the SAP System. A BOM explosion answers the question: What is the product made of? This question arises in various situations, such as when you want to:
    Determine material requirements for a product
    Look at the overall structure of a product in a design department
    See an overview of the parts and materials required
    Calculate the effects of changes to costs
    7. BOM is a collection of materials that make up a product. For example – computer, home theatre system. Material BOM is complex and is dependent on sales and distribution, material management or production planning.
    8. The most important rule is that the material type has to be a FINISHED PRODUCT (FERT) in order to categorise it as a BOM.
    9. BOM processing is divided into two different ways – either at the MAIN item level if the item is assembled or at the sub-item level (i.e. at the component level) if the material is not assembled.
    10. BOM is configured at the item category level (VOV7) and transaction code to create a BOM is CS01.
    11. In case of single level BOM, main item categories TAQ and TAP should represent single level BOM in VOV7 and in case of multi level BOM, the main item categories should represent multi level BOM.
    Main item level processing
    1. The material master records should have the item category group ERLA in the sales org.2 screen of the finished product. In this case, the associated sub items function only as text items, and thus are not relevant for delivery. This process ensures that pricing, inventory control and delivery processing is carried out the header level that is for the finished product only. This is mainly relevant to the assembled products.
    2. item category group – ERLA; main item category – TAQ (schedule line – CP) and sub item category – TAE (schedule line – CT)
    Sub-item level processing
    1. If the business prefers to have the sub-items be responsible for pricing, inventory control and delivery processing, the item category group should be LUMF on screen sales org.2 of the respective material master record. This ensures that subcomponents are relevant for processing. This is relevant to the products that are not assembled.
    2. item category group – LUMF; main item category – TAP (schedule line is CT), sub item category – TAN (schedule line is CP)
    Multi-level BOM
    In order to activate the multi-level BOM, structure scope in VOV7 has to be changed from single level explosion to multi level explosion.
    Try this and revert back fr clearifications
    Reward Points if helpful.
    Regards
    Srini

  • Reg: Afs BOM

    hai experts,
    my client is using afs for make to order senario, i have to calculate the required quantity of the boms of the sale order , after attached the boms. i cannot use the function module CS_BOM_EXPL_KND_V1 to explode the bom.please let me know how to explode bom.
    thanks in advance.

    Hi,
    You need to use table and get the data
    MAST,STKO,STAS,STPO,J_3ABOMD
    Regards,
    Vishal

  • Question reg sample init files??

    I was looking for sample init files
    I found the following files in Windows
    initsmpl.ora under C:\Oracle10g\product\10.2.0\admin\sample\pfile
    initdw.ora under C:\Oracle10g\product\10.2.0\dbs
    and in UNIX AIX
    -rw-r----- 1 oracle dba 8385 Sep 11 1998 init.ora
    -rw-r--r-- 1 oracle dba 12920 May 03 2001 initdw.ora
    under /oracle/OraHome2/dbs
    I can see initdw.ora for datawarehouse databases
    I have following questions
    1.Are these are the only files I have mentioned are there or are there any more
    sample files i have missed?
    2. initsmpl.ora or init.ora are for which kind of databases ?General purpose or OLTP or?
    Thanx
    Gagan

    Hi,
    1 Those are the same files
    2 There are no special files are created for OLTP or DatawareHouse DataBases.
    These files are unique for different type of database you may choose. Only the parameters values will be
    adjusted based on the Environment upon which we create the database. It's parameters changes during the
    Course of Tuning of your database.
    - Pavan Kumar N

  • Reg: Sampling procedure .

    Dear friends,
    Currently we are implementing QM for process industry.
    I need your valuable inputs on Sampling procedure. what exactly meant by sampling procedure.
    How to configure for sampling procedure.
    Thanks in Advance.

    You acn get many threads & Input if you go through the sdn but I will try to explaain you & give you some input for sampling procedure for process industry............
    Sampling procedure simply means how samples are going to determine the a char & a Inspction lot.......
    sampling procedure has sampling type like "percentage ,100% ,fixed sampling or with sampling procedure......which has valuation type like manual ,attribute or variable depending upon the mic used.
    In Process industry sampling procedure can be used with Inspection point or without inspection points.
    QPV1 is t code for sampling procedure. Mianly customization related to sampling procedure is by default available in SAP QM.
    Explore SAP help &
    Also refer :
    Re: Sampling Procedure
    Assign the sampling procedure aginst each MIC & chek using some manual inspection lot in QA01 to see the effect of sampling ype & valuation type.........

  • Reg. material BOM

    Hello,
    I have a material and i want to know if it has BOM or not?
    Can you tell me the table where i can find all the list of materials which has BOMs? if not, can you tell me what is the best way to find out if the material has BOM or not?
    I appreciate.
    Thanks,
    Krishen

    Hi ,
    THIS WILL GET THE BOM IF YOU KNOW THE MATERIAL AND PLANT.
    data: begin of itab_item occurs 0,
            idnrk like stpo-idnrk,
            posnr like stpo-posnr,
            meins like stpo-meins,
            menge like stpo-menge,
          end of itab_item.
    data: w_stlnr like mast-stlnr.
    parameters:
      p_matnr like mseg-matnr,
    p_werks like mseg-werks.
    select stlnr into w_stlnr from mast
             where matnr = p_matnr
             and   werks = p_werks.
      endselect.
    if w_stlnr is initial.
        message  Material is not a bill of material
    ENDIF.
    select idnrk posnr meins menge
                   into table itab_item
                   from stpo
                   where stlty = 'M'
                   and   stlnr = w_stlnr.
    REWARD POINTS IF HELPFUL
    THANKS

  • Reg Sample resumes & scenorios

    Hi experts,
    Iam new to sap can any one help me by providing sample resumes and scenorios
    thanks in advance..

    Start your CV with your Name at Header Level.
    1. Profile: Mention a brief profile of your SAP & Non-SAP Environment.
    2. Functional & Industry Experience: Non SAP Experience.
    3. Education Qualification & Certification
    4. SAP Experience
    4.a. Client
    4.b Duration
    4.c Role
    4.d SAP Version
    4.e Project Description
    4.f Contribution
    5.  Professional History
    Company | Designation | Duration
    6. Personal Details
    Regards,
    Rajesh Banka
    Reward points if helpful

  • Reg:Sample Questions on portals

    Hi All,
    Please Provide me Some sample questions on portal Fundamentals.
    Thankyou,
    Ramganesh.

    Hi
    Chek out the following links on portal.
    <a href="https://www.sdn.sap.com/irj/sdn/thread?messageID=1508517&">https://www.sdn.sap.com/irj/sdn/thread?messageID=1508517&</a>
    <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2746">Beginning EP Development</a>
    For sample questions chek out braincert.com.You will find a whole bunch of questions there.
    P.S:Reward Points if helpful.
    Regards,
    Abhishek.

  • Reg : VC BOM componenets printing

    Hi ALL,
    please  tell me how can i print selected componenets and some standard components in variant
    configuration . Is there any settings or any Tcode for this .
    Marks will be awarded for all relevant  answers .
    rgd
    vimal

    Hi Brahmankar,
    In cu50  entered the following
    material ,  plant in the selection
    Configuration result  
    i selected BOM
    Configuration :  sales & distribution
    then i pressed control F9  nothing has selected  no change in the screen
    rgds,
    Vimal

  • Prototype manufacturing BOM

    Dear Sir.
    How r u ? I am facing a problem in sample BOM.
    Here they want sampling materials without creating BOM and routing.
    how to do prototype manufacturig BOM.
    pleae give me suggestion
    Thanks & Regards
    Sudha

    Hi,
    You can create a Engineering BOM for your proto type purpose. Once you finalised the components and process, you can create a Production BOM. Engineering BOM will not be considered for the production orders.
    Regards,
    V. Suresh

  • Update Sales Document

    Hi ,
    i try to update a sales order with B1i , but can't suceed :
    i put <DocEntry> in the message , but DI failed with "DocEntry is read only"
    how can i setup a scenario for update ?
    where can i put the DocEntry to find the object to update ?
    thanks for help 
    Laurent

    Hi,
    If it is updating operation, you should put <DocEntry> under <QueryParams>. Sample:
    <BOM>
         <BO>
              <AdmInfo>
                   <Object>22</Object>
                   <Version>2</Version>
              </AdmInfo>
              <QueryParams>
                   <DocEntry>
                        <xsl:value-of select="BOM/BO/Documents/row/NumAtCard"/>
                   </DocEntry>
              </QueryParams>
              <Documents>
                   <xsl:for-each select="BOM/BO/Documents/row">
                        <row>
                             <!--Update the Vendor Ref. No of  Purchase order as the sale order in Headquarter-->
                             <NumAtCard>
                                  HQ SO#<xsl:value-of select="DocEntry"/>
                             </NumAtCard>
                        </row>
                   </xsl:for-each>
              </Documents>
         </BO>
    </BOM>
    Kind Regards, Yatsea

  • LMS-to-PI upgrade different hardware

    hi
    Here is a scenario
    LMS installed on virtual environment & PI appliance with upgrade license is purchased?
    how to proceed with the installation on the newly purchased PI appliance with upgrade license? considering LMS will be out of network after PI on production
    any clue
    thanks, vishal

    Tira,
    If you're a partner, please refer to the PI BOM Builder on the partner community..
    It will show you that, yes - you start with the part number you mentioned. Then add base and lifecycle licenses (and support) to complete the order. CCW will also help you validate the final order. I have pasted in a sample BOM below for a 50 device upgrade. Only the one line item with the number of lifecycle license would change. Options are 50, 100, 300, 500, 750, 1000 etc.
    1
    R-L-PI2X-U-K9
    LMS to Cisco Prime Infrastructure 2.x Upgrade          [TOP-LEVEL SKU]
    1
    R-PI21-SW-K9
    Prime Infrastructure 2.1 Software
    1
    L-PI2X-BASE
    Prime Infrastructure 2.x Base License
    1
    L-L-PI2X-50-U
    LMS to Prime Infrastructure 2.x Upgrade 50 Device
    If the customer is staying on LMS, then you would not use the ISO (intended for NCS appliance use only) but rather use the OVA distribution which requires an existing VMware ESX server to host LMS.

  • None editable Div tag within a editable Div tag template

    I am using a template i created to build a website and the only editable Div is the 'Content'. Using this template i have created a 2nd template for a portfolio page. On my 2nd template i have a Div tag within the 'Content' Div tag with list of all the jobs i have  done with hyperlinked to photos. I want this list to be only editable on  the template so when i update the 2nd template rest of the files related to  this template get updated.
    Is it possible to have a none editable Div tag within an editable Div tag?
    I hope i have explained this well. Many thanks for your help

    Thank you for your respond.
    I have a main template with just the 'Content' Div Tag editable. Using this template i created anyother template for my portfolio page. Inside the editable Div Tag i have another Div Tag with 2 sets of tables for my portfolio lists. I want this Div tag to be only editable through the 2nd template only as i will have portfolio lists of over 30 pages/links.
    I selected the Div Tag with the 2 set of tables and selected 'Add Object to Library'. First message was that the CSS coding will not be copied but errors messages as follows;
    'While executing canInspectSelectio in phatfusion slideShow_FAB75CA2.htm, a JavaScript error occurred.'
    'While executing canInspectSelectio in Ken Burns Slideshow.htm, a JavaScript error occurred.'
    'While executing canInspectSelectio in Shadowbox3b Gallery_2528933A.htm, a JavaScript error occurred.'
    Everytime i click inside the Div Tag, i keep getting these messages.
    I went to the library and amended the list but only the 2nd template changed, not the related pages linked to the 2nd template.
    Is there a place where i can upload my page in this website so you can see it?
    Please see below the coding for the 2nd template for my portfolio pages;
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main_templateV4.dwt" codeOutsideHTMLIsLocked="false" -->
    <!-- saved from url=(0014)about:internet -->
    <!-- this and above comment should be removed for live, non-demo use -->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <META NAME="robots" CONTENT="index, follow">
        <meta name="google-site-verification" content="a_way2ZMkNZuMTtOveF3o1bvtWsVMBQujbA5jw9i0Q0" />
        <META name="y_key" content="d38873598f3b3934" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>???s</title>
    <!-- InstanceEndEditable -->
    <link href="../_css/main.css" rel="stylesheet" type="text/css" />
    <!-- InstanceBeginEditable name="head" -->
        <link href="../Galleria/galleria.css" rel="stylesheet" type="text/css" media="screen">
        <script type="text/javascript" src="../Galleria/jquery.min.js"></script>
        <script type="text/javascript" src="../Galleria/jquery.galleria-0.9.js"></script>
        <script type="text/javascript">
        $(document).ready(function(){ $('ul.gallery_demo2').galleria({nextText:'Next portfolio item'}); }) // activates the gallery
        </script>
        <style media="screen,projection" type="text/css">   
        p,.caption{
        font-size: 10px;
        color:#006;
        .demo2{
        position:relative;
        clear:both;
        background:black;
        width: 600px;
        .gallery_demo2{
        width: 600px;
        .gallery_demo2 li{
        width:68px;
        height:50px;
        border:thin solid #000;
        background:#111;
        padding-left: 5px;
        overflow: hidden;
        .gallery_demo2 li.active{
        border-color:#623;
        .gallery_demo2 li div{
        top:60px;
        left:0;
        border:3px solid #111;
        background:#111;
        .gallery_demo2 li img.thumb{
        opacity:.3;
        padding-left: 3px;
        .gallery_demo2 li.active img.thumb,.gallery_demo2 li:hover img.thumb{
        opacity:.99;
        </style>
        <!--[if lt IE 8]>
        <style media="screen,projection" type="text/css">
            .gallery_demo2 li img.thumb { filter: alpha(opacity=30) !important; }
            .gallery_demo2 li.active img.thumb, .gallery_demo2 li:hover img.thumb, .gallery_demo2 li img.hover { filter: alpha(opacity=100) !important; }
        </style>
        <![endif]-->  
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <!-- InstanceEndEditable -->
    <script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    body {
        background-color: #FFF;
        background-image: url(../_images/background.jpg);
    </style>
    </head>
    <body>
    <div class="container">
      <div class="header">
        <div class="header2">
          <h4><strong>ARCHITECTURAL &amp; STRUCTURAL ENGINEERING SERVICES<br />
            PROJECT MANAGEMENT &amp; CONSTRUCTIONS</strong></h4>
        </div>
      <!-- end .header --></div>
      <div class="linkBar">
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="index.html">HOME</a></li>
          <li><a href="about.html">ABOUT US</a></li>
          <li><a href="service.html" class="MenuBarItemSubmenu">SERVICES</a>
            <ul>
    <li><a href="service.html">Overview</a></li>
    <li><a href="planning.html">Planning Permission</a></li>
    <li><a href="building.html">Building Regulations</a></li>
    <li><a href="partywall.html">Party Wall Act</a></li>
              <li><a href="schedule.html">Schedule of Work</a></li>
              <li><a href="project.html">Project Management</a></li>
              <li><a href="structural.html">Structural Surveys</a></li>
            </ul>
          </li>
          <li><a href="portfolio.html">PORTFOLIO</a></li>
          <li><a href="contact.html">CONTACT US</a></li>
        </ul>
      <!-- end .linkBar --></div>
      <!-- InstanceBeginEditable name="mainContent" -->
      <div class="content">
        <h3>PORTFOLIO- website under construction</h3><!-- #BeginLibraryItem "/Library/Untitled.lbi" --><div class="portfolioText">
          <h2 class="textSubHeading">Commercial</h2>
          <div class="portfolioCommercial">
            <table width="374" align="right">
              <tr>
                <td width="181" height="20">AA Partner Ltd</td>
                <td width="181" height="20">Railing London Ltd</td>
              </tr>
              <tr>
                <td height="20">Pemon Ltd</td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20">lhjffkhgkhg</td>
              </tr>
            </table>
    </div>
          <h2 class="textSubHeading"><br />
          </h2>
          <h2 class="textSubHeading"> </h2>
          <h2 class="textSubHeading"> </h2>
          <h2 class="textSubHeading"> </h2>
          <h2 class="textSubHeading">Residential</h2>
          <div class="portfolioResidential">
            <table width="374" align="right">
              <tr>
                <td width="181" height="20">Batchworth Lane, <span dir="ltr">Northwood</span></td>
                <td width="181" height="20">Derrylands, Harrow</td>
              </tr>
              <tr>
                <td height="20">Pine Walk, Surrey</td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20"> </td>
                <td height="20"> </td>
              </tr>
              <tr>
                <td height="20">teytdytyt</td>
                <td height="20"> </td>
              </tr>
            </table>
    </div>
        </div><!-- #EndLibraryItem --><div class="portfolioSlideshow">
          <p>Project Title Goes Here:</p>
          <div class="demo">
    </div>
    <div class="demo2">
    <ul class="gallery_demo2">
        <li class="active"><img src="../_images/portfolio/planning.jpg" alt="Planning sample drawing" width="600" height="400"></li>
        <li><img src="../_images/portfolio/building.jpg" alt="Building Reg sample drawing" width="600" height="400"></li>
        <li><img src="../_images/portfolio/structural.jpg" alt="Structural sample drawing" width="600" height="400"></li>
        <li><img src="../_images/portfolio/fabrication.jpg" alt="Fabrication sample drawing" width="600" height="400"></li>
    </ul>
    </div>
        </div>
      <!-- end .content --></div>
      <!-- InstanceEndEditable -->
      <div class="footer">
      <table width="1025" border="0">
      <tr>
        <td width="500"><h6>??? </h6></td>
        <td width="10"> </td>
        <td width="500" align="right"><h6>???</h6></td>
      </tr>
    </table>
      <!-- end .footer --></div>
      <!-- end .container --></div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"../SpryAssets/SpryMenuBarDownHover.gif", imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    </script>
    </body>
    <!-- InstanceEnd --></html>

  • Sample production run without bom,routing

    at our client place we have a scenario where we will run sample production (before real production run) without creating bom/routing for the material...
    someone suggested we use finance internal order and then post the material documents in migo against that internal order and labor costs in kb21n..
    is this the only easiest way for this kind of scenario? or do you have any other ideas?

    Hi Swatghi Rege,
    You can create a production order without Routing and without BOM by creating a new order type.
    To be able to create an order without Routing: Change the Config in OPL8 ( order type dependent parameters) as routing optional.
    To be able to create the Order without the BOM you will need to:
    - Configure a new BOM Application. This can be done in tcode OS30.
    - Create a BOM ID in T-code OS31 with BOM Usage as Production.
    - Assign this BOM ID in BOM Application.
    - In the ID maintain a BOM alone without any items.
    - Finally in OPL8, you need to assign the new BOM Application for your Order type.
    Thansk and Regards,
    Mariano

  • Please give me some sample program releated BOM

    please give me some sample program releated BOM

    Hi,
    *& Module : PP                                                         |
    *& Application : The program loads the Bill of Material                |
    *&                                                                     |
    *| Modification Log                                                    |
    *| -
                                                        |
    *| Programmer                                                          |
    *|                                                       Change        |
    *| -
    |
    REPORT zpp0120 NO STANDARD PAGE HEADING
                                      MESSAGE-ID z0
                                      LINE-SIZE  132
                                      LINE-COUNT 65(2).
                         Internal Tables                                 *
    *Internal table for the BOM file.
    DATA: BEGIN OF i_bom OCCURS 0,
          matnr(18),
          werks(4),
          stlan(1),
          stlal(2),
          stktx(40),
          bmeng(16),
          menge(16),
          posnr(4),
          postp(1),
          meins(3),
          datuv(10),
          fmeng(1),
          idnrk(18),
          potx1(40),
          ausch(7),
          END OF i_bom.
    Extracting Document and Doc type for POSTP = D.
    DATA : BEGIN OF i_stpo OCCURS 1,
           doknr(25),
           dokar(3),
           posnr(4),
           stlnr LIKE mast-stlnr,
           END   OF i_stpo.
    Local work area
    DATA:  g_my_rec_in   LIKE i_bom.
    Declare internal table for Call Transaction and BDC Session
    DATA: i_bdc_table LIKE bdcdata OCCURS 0 WITH HEADER LINE.
                         Global Variables                                *
    DATA: g_counter(2) TYPE n,
          g_field_name(18) TYPE c,
          zc_yes  TYPE syftype VALUE 'X'.
                         Selection Screen                                *
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
    PARAMETERS: p_fname1 TYPE localfile .
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
    PARAMETERS: p_rloc1 AS CHECKBOX  DEFAULT 'X'.
    SELECTION-SCREEN BEGIN OF BLOCK c WITH FRAME TITLE text-005.
    PARAMETERS p_group(12) OBLIGATORY DEFAULT 'ZBOM'.
    SELECTION-SCREEN END OF BLOCK c.
    SELECTION-SCREEN END OF BLOCK b.
    SELECTION-SCREEN END OF BLOCK a.
    **WRITE the report header
    TOP-OF-PAGE.
      INCLUDE zheading.
                         Start of selection                              *
    START-OF-SELECTION.
    Load Input file
      PERFORM f_load_input_file.
    Create BDC records.
      PERFORM create_bdc_records .
    *&      Form  Create_BDC_records
          text:* perform the BDC for the records in the internal table
    -->  p1        text
    <--  p2        text
    FORM create_bdc_records .
      DATA: v_stlnr LIKE mast-stlnr.
      DATA: v_postp(1) VALUE 'D'.
      IF NOT i_bom[] IS INITIAL.
    Open BDC session
        PERFORM open_bdc_session.
        SORT i_bom BY matnr werks posnr.
        SELECT  SINGLE stlnr  INTO v_stlnr
        FROM mast
        WHERE    matnr = i_bom-matnr
         AND     werks = i_bom-werks.
        SELECT doknr dokar posnr stlnr
                    INTO TABLE i_stpo
                    FROM stpo
                    FOR ALL ENTRIES IN i_bom
                    WHERE postp = v_postp
                    AND   posnr = i_bom-posnr
                    AND   stlnr = v_stlnr.
        SORT i_stpo BY posnr stlnr.
        LOOP AT i_bom.
          g_my_rec_in = i_bom.
          READ TABLE i_stpo WITH KEY posnr = i_bom-posnr
                                     stlnr = v_stlnr
                                     BINARY SEARCH.
          AT NEW matnr.
            CLEAR i_bdc_table[].
            PERFORM insert_screen_header.
          ENDAT.
    Setting up counter for 20 line items
          IF g_counter = 20.
            g_counter = 1.
          ENDIF.
          PERFORM bdc_field  USING 'BDC_OKCODE'
                                        '/00'.
    *next screen
          PERFORM bdc_dynpro USING 'SAPLCSDI' '0140'.
          PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29P-FMENG(01)'.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
          CONCATENATE 'RC29P-POSNR('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-posnr.
          CONCATENATE 'RC29P-IDNRK('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-idnrk.
          CONCATENATE 'RC29P-MENGE('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-menge.
          CONCATENATE 'RC29P-MEINS('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-meins.
          CONCATENATE 'RC29P-POSTP('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-postp.
          CONCATENATE 'RC29P-FMENG('  g_counter  ')' INTO g_field_name.
          PERFORM bdc_field USING g_field_name i_bom-fmeng.
    *next screen
          PERFORM bdc_dynpro USING 'SAPLCSDI' '0130'.
          PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
    Check the Item category to direct the screen flow accordingly.
          CASE i_bom-postp.
            WHEN 'B'.
              PERFORM item_text_insert.
            WHEN 'Z'.
              PERFORM item_text_insert.
            WHEN 'T'.
              PERFORM item_text_insert.
            WHEN 'N'.
              PERFORM bdc_field   USING 'BDC_CURSOR' 'RC29P-AUSCH'.
              PERFORM bdc_field   USING 'RC29P-AUSCH' i_bom-ausch.
    next screen
              PERFORM item_text_insert.
    *next screen
              PERFORM bdc_dynpro  USING 'SAPLCSDI' '0133'.
              PERFORM bdc_field   USING 'BDC_OKCODE' '/00'.
              PERFORM bdc_field   USING 'RC29P-EKORG' ' '.
            WHEN 'D'.
              PERFORM bdc_field   USING 'RC29P-DOKNR' i_stpo-doknr.
              PERFORM bdc_field   USING 'RC29P-DOKAR' i_stpo-dokar.
    next screen
              PERFORM item_text_insert.
    When POSTP = X, L.
            WHEN OTHERS.
              PERFORM bdc_field   USING 'BDC_CURSOR' 'RC29P-AUSCH'.
              PERFORM bdc_field   USING 'RC29P-AUSCH' i_bom-ausch.
    next screen
              PERFORM item_text_insert.
          ENDCASE.
          g_counter = g_counter + 1.
    next screen
          PERFORM bdc_dynpro      USING 'SAPLCSDI' '0140'.
          PERFORM bdc_field       USING 'BDC_CURSOR' 'RC29P-POSNR(01)'.
          PERFORM bdc_field       USING 'BDC_OKCODE' '=FCBU'.
          AT END OF matnr.
            PERFORM insert_bdc_new.
          ENDAT.
        ENDLOOP.
        CLEAR i_bom[].
        PERFORM close_bdc_session.
    Release the BDC sessions created
        PERFORM release_bdc.
      ENDIF.
    ENDFORM.                    " open_group
    *&      Form  bdc_dynpro_start
          Initialize the screen
         -->P_G_PROGRAM_1
         -->P_G_SCREEN
    FORM bdc_dynpro USING    p_g_program_1
                                    p_g_screen.
      CLEAR i_bdc_table.
      i_bdc_table-program  = p_g_program_1.
      i_bdc_table-dynpro   = p_g_screen.
      i_bdc_table-dynbegin = 'X'.
      APPEND i_bdc_table.
    ENDFORM.                    " bdc_dynpro_start
    *&      Form  bdc_field
           Insert field                                                  *
    FORM bdc_field USING f_name f_value.
      CLEAR i_bdc_table.
      i_bdc_table-fnam = f_name.
      i_bdc_table-fval = f_value.
      APPEND i_bdc_table.
    ENDFORM.                    "bdc_insert_field
    *&      Form  open_bdc_session
         Open the BDC session
    FORM open_bdc_session .
    Open BDC session and creat and update condition records
      CALL FUNCTION 'BDC_OPEN_GROUP'
        EXPORTING
          client                    = sy-mandt
          DEST                      = FILLER8
          group                     = p_group
          HOLDDATE                  = FILLER8
          keep                      = 'X'
          user                      = sy-uname
          RECORD                    = FILLER1
          PROG                      = SY-CPROG
        IMPORTING
          QID                       =
    EXCEPTIONS
       client_invalid            = 1
       destination_invalid       = 2
       group_invalid             = 3
       group_is_locked           = 4
       holddate_invalid          = 5
       internal_error            = 6
       queue_error               = 7
       running                   = 8
       system_lock_error         = 9
       user_invalid              = 10
       OTHERS                    = 11
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " create_bdc_session
    *&      Form  insert_screen_header
          Insert the Header data into the screens
    FORM insert_screen_header .
      g_counter = 1.
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0100'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29N-STLAL'.
      PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field  USING 'RC29N-MATNR' g_my_rec_in-matnr.
      PERFORM bdc_field  USING 'RC29N-WERKS' g_my_rec_in-werks.
      PERFORM bdc_field  USING 'RC29N-STLAN' g_my_rec_in-stlan.
      PERFORM bdc_field  USING 'RC29N-STLAL' g_my_rec_in-stlal.
      PERFORM bdc_field  USING 'RC29N-DATUV' g_my_rec_in-datuv.
    next screen
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0110'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29K-BMENG'.
      PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field  USING 'RC29K-STKTX' g_my_rec_in-stktx.
      PERFORM bdc_field  USING 'RC29K-BMENG' g_my_rec_in-bmeng.
    *next screen
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0111'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29K-LABOR'.
    ENDFORM.                    " insert_screen_header
    *&      Form  insert_bdc
         Insert the BDC session
    FORM insert_bdc_new .
      CALL FUNCTION 'BDC_INSERT'
         EXPORTING
           tcode                  = 'CS01'
          POST_LOCAL             = NOVBLOCAL
          PRINTING               = NOPRINT
          SIMUBATCH              = ' '
          CTUPARAMS              = ' '
         TABLES
           dynprotab              = i_bdc_table
      EXCEPTIONS
        internal_error         = 1
        not_open               = 2
        queue_error            = 3
        tcode_invalid          = 4
        printing_invalid       = 5
        posting_invalid        = 6
        OTHERS                 = 7
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CLEAR i_bdc_table[].
    ENDFORM.                    " insert_bdc
    *&      Form  close_bdc_session
          Close the BDC session
    FORM close_bdc_session .
      CALL FUNCTION 'BDC_CLOSE_GROUP'
           EXCEPTIONS
                not_open    = 1
                queue_error = 2
                OTHERS      = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " close_bdc_session
    *&      Form  f_load_input_file
         Load the file into the Internal table
    FORM f_load_input_file.
      IF p_rloc1 = zc_yes.
        CALL FUNCTION 'WS_UPLOAD'
             EXPORTING
                  filename                = p_fname1
                  filetype                = 'DAT'
             TABLES
                  data_tab                = i_bom
             EXCEPTIONS
                  conversion_error        = 1
                  file_open_error         = 2
                  file_read_error         = 3
                  invalid_type            = 4
                  no_batch                = 5
                  unknown_error           = 6
                  invalid_table_width     = 7
                  gui_refuse_filetransfer = 8
                  customer_error          = 9
                  OTHERS                  = 10.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          STOP.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_load_input_file
    *&      Form  release_bdc
         Release BDC session
    FORM release_bdc.
      SUBMIT rsbdcsub WITH mappe EQ p_group
                      WITH von EQ sy-datum
                      WITH bis EQ sy-datum
                      WITH fehler EQ '.'
                      EXPORTING LIST TO MEMORY
                      AND RETURN.
    ENDFORM.                    " release_bdc
    *&      Form  item_text_insert
          Repetitive code in the screen flow
    FORM item_text_insert.
      PERFORM bdc_dynpro USING 'SAPLCSDI' '0131'.
      PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_field  USING 'BDC_CURSOR' 'RC29P-POTX1'.
      PERFORM bdc_field  USING 'RC29P-POTX1' i_bom-potx1.
    ENDFORM.                    " item_text_insert

Maybe you are looking for

  • Problem restoring my iPod - "Resource was not found"

    My iPod hardrive is a little bit dodgy (to say the least.) When I try to connect it to my computer, it comes up with an error message that says "ITunes has detected an iPod that appears to be corrupted. You may need to restore this iPod before it can

  • Mac mini portable display options

    Pretty certain by reading through every forum in the world that the iPad cannot be used as a reliable primary monitor for the new Mac Mini. Soooooo.... Can I use one of those USB touchscreen monitors like the Toshiba or Mimo as the ONLY monitor on th

  • Why I have to use -s after sqlplus in a shell script?

    Hi, sqlplus -s "/as sysdba" is in my script. But why I have to use -s?

  • Does C30 Require Memory Chillers

    The C20 line required memory chillers for 4GB or more of RAM per processor. Since there is no reference to memory chillers in the C30 maintenance manual, are none needed, even with lots of RDIMMs? Thank you Solved! Go to Solution.

  • No System Profiler in my Applications Folder

    No System Profiler in my Applications Folder. Where is the System Profiler ? There seems to be none on the whole disk -