Class for Purchase order item components and Production order components

I'm looking for a some classes.   I'm very new to objects, so I could be searching for them incorrectly.
The first class I'm looking for is a purchase order class that contains the item components.  I've looked at CL_PO_ITEM_HANDLE_MM and CL_PO_HEADER_HANDLE_MM.  I couldn't find components as a part of either of the classes.
The second one I'm looking for is not as critical.  It is for the components for a production order.   I have a function module: BAPI_PRODORD_GET_DETAIL that gets the components for the order.  However, to take advantage of objects - I read somewhere - that if possible I should avoid calling a function module.
Any help that you could give would be greatly appreciated.
Thank you!
Michelle

Hello Michelle
I do not think there are already classes available on ERP 6.0 for reading production order (yet I might be wrong...). However, regarding purchase order you are already on the right track.
*& Report  ZUS_SDN_OO_READ_PO
*& Thread: Class for Purchase order item components and Production order components
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1206523"></a>
"& NOTE: Coding adapted from BAPI_PO_GETDETAIL1
REPORT  zus_sdn_oo_read_po.
TYPE-POOLS: abap, mmpur.
PARAMETER:
  p_ebeln   TYPE ebeln  DEFAULT '3000000045'.
DATA: gs_document    TYPE mepo_document,
      go_po          TYPE REF TO cl_po_header_handle_mm,
      gs_header      TYPE mepoheader,
      gd_tcode       TYPE sy-tcode,
      gd_result      TYPE mmpur_bool.
data: gt_items       type PURCHASE_ORDER_ITEMS,
      gs_itm         type PURCHASE_ORDER_ITEM,
      gs_item        type mepoitem.
START-OF-SELECTION.
*  prepare creation of PO instance
  gs_document-doc_type    = 'F'.
  gs_document-process     = mmpur_po_process.
  gs_document-trtyp       = 'A'.  " anz.  => display
  gs_document-doc_key(10) = p_ebeln.
*  object creation and initialization
**  l_ebeln = purchaseorder.
  CREATE OBJECT go_po.
  CALL METHOD go_po->po_initialize( im_document = gs_document ).
  CALL METHOD go_po->set_po_number( im_po_number = p_ebeln ).
  CALL METHOD go_po->set_state( cl_po_header_handle_mm=>c_available ).
*  read purchase order from database
  gd_tcode = 'ME23N'.
  CALL METHOD go_po->po_read
    EXPORTING
      im_tcode     = gd_tcode
      im_trtyp     = gs_document-trtyp
      im_aktyp     = gs_document-trtyp
      im_po_number = p_ebeln
      im_document  = gs_document
    IMPORTING
      ex_result    = gd_result.
*  there was a problem in reading the PO
  IF ( gd_result EQ mmpur_no ).
**    l_messages = l_handler->get_list_for_bapi( ).
**    PERFORM return TABLES l_messages return
**                          poitem poschedule poaccount.
**    CALL METHOD l_po->po_close( ).
  ELSE.
    gs_header = go_po->if_purchase_order_mm~get_data( ).
    WRITE: / gs_header-ebeln,
             gs_header-bukrs,
             gs_header-bsart,
             gs_header-lifnr.
  ENDIF.
  gt_items = go_po->if_purchase_order_mm~get_items( ).
  LOOP AT gt_items INTO gs_itm.
    gs_item = gs_itm-item->get_data( ).
    write: / gs_item-ebelp,
             gs_item-matnr,
             gs_item-menge.
  ENDLOOP.
END-OF-SELECTION.
Regards
  Uwe

Similar Messages

  • Asking for purchasing reqistioner no. while making production order

    dear all
    asking for purchasing reqistioner no. while making production order.how do get rid of this reqisitioner no. option from production order.
    regards
    manish sharma

    Hi,
    Chcek the BOM copied to the order or the items that you are entering while creating the order, if item categories are N, purchse requisitions are automatically created and related info is queried from the user. Change item categories to L, stock items if external procurement is not relevant.

  • Scheduling Parametrs for the Plant and Production Order Type

    hi SAP Gurus,
    Pls it is very urget
    Pls let me know how to maitain the Scheduling parameters for the combination of Plant and Production Order type.
    Pls provide me the Path also.....
    Points will be rewarded .....
    Ranjit Kumar

    hi Murthy,
    thanks for the solution... Problem resolved.
    Assigned points...
    Ranjit

  • Notification on Receipt and Purchase documents getting fired on Production order having Items with planning method as MRP

    I have written a SP Notification to block adding of documents if block number is not provided. Notification is working fine on Purchase and Receipt documents. This notification also gets executed on Production Order where items included in Production order have planning method as MRP.
    Can anyone explain me the relationship between
    "MRP planned items"
    and
    "Purchase documents (Purchase Order; GRPO; Purchase Return; AP Invoice and Credit Memo) and Receipt of Production."
    Thanks & Regards
    Sonil Bhardwaj

    Hi Sonil,
    Can you post your SP , to look if there is any problem with SP ..
    Regards

  • Settings for Item Proposal and Product Proposal

    Hi Gurus,
    How to do the configuration settings for Item Proposal and Product Proposal.
    I also want to know what is the difference between Item Proposal and product Proposal.
    Give me your Solution.

    Item proposal is the list of regularly/frequently ordered items of a particular customer. this will be useful when u are entering the sales order. it will be used to speed up the order entry process.
    For that Goto VA51, enter item proposal type as MS and sales area details.
    enter the customer name and the list of products and save. Assign the item proposal No in the customer master sales area data, sales tab.
    create the sales order  and enter the customer no and press the propose items button in the sales order.
    the system will propose one box and it will display all the materials. then u can continue further.
    Product proposal:
    To configure product proposal, Go to IMG,SD, Basic functions, Dynamic product proposal, Maintain all the settings
    **A product proposal is a list of products for a specific customer that is automatically proposed during sales document processing. You can decide for yourself which materials should be displayed as product proposals in the sales document. You can also determine the sequence in which the materials appear in the product proposal.
         During sales document processing, the system displays a product proposal in the item overview according to the customer and the business transaction. It displays the material number, material description, and historical order quantites in the sales unit last used. To use a material again, you just have to copy it. The system does not run the standard checks (pricing, availability, incompletion, material determination, free goods determination and so on) until you have entered the order quantities.
    The product proposal is both an entry help and an aid to sales support and promotions. It is particularly useful in Telesales, where the employee automatically receives a display of all the materials that are of interest to a particular customer. This helps them to provide appropriate advice to the customer quickly and easily. The sales document history enables you to analyse the purchasing behaviour of a customer and recognize early on if it changes, for instance, when the customer suddenly stops ordering a product.
    The product proposal differs to cross-selling in that it is dependent on the customer and sales area, and is displayed in the sales document as soon as you have entered a customer. Cross-selling, on the other hand, is triggered by a material. In other words, the system proposes cross-selling materials according to the material or a characteristic of the material you have entered.
    You can determine the product proposal from different data sources:
    Order history
    Listed materials
    Excluded materials
    Item proposal
    Customer-material info records
    Customer-specific data sources
    You can combine materials from these data sources to create a product proposal. The system then accesses the data sources either online or in the background.
    To define a product proposal for sales document processing, you must carry out the following activities in Customizing:
    Define customer procedure for product proposal
    Define document procedure for product proposal
    Assign document procedure for product proposal to order types
    Maintain table of origin for product proposal
    Define product proposal procedure and determine access sequences
    Maintain procedure determination (in background) for product proposal
    Maintain procedure determination (online) for product proposal
    The product proposal procedure determines how the system displays the product proposal in the sales document. For instance, if the system has accessed the order history, it determines how many columns should be displayed in the sales document, in which period intervals thehistoric order quantities should be displayed (for instance, day, week, or month), and most importantly, the sequence in which the system should access the data sources (for example, order history, listing, exclusion).
    The product proposal procedure depends on the:
    Customer determination procedure
    The customer procedure determines which product proposal procedure the system automatically uses when you create a sales document for a particular customer.
    It is specified in the customer master record per sales area.
    Document determination procedure
    The document procedure determines which product proposal procedure the system automatically uses for a certain document type. The document procedure is stored as a key in the header for the sales document type.
    If you use online processing, the product proposal procedure is determined according to the customer and document determination procedures.
    If you use background processing, the product proposal procedure is determined according to the sales area in the customer master and the customer determination procedure. It does not use the document determination procedure because the document type is not recognized in background processing.
    Difference:
    Item proposal is the list of products the customer used to buy frequently.
    Product proposal is also the list of products but it will explode in the sales order, once u enter the sold to party field. But this will be based on the following criterias.
    Order history
    Listed materials
    Excluded materials
    Item proposal
    Customer-material info records
    Customer-specific data sources
    Hope this clarifies.
    Reward points if useful

  • Link between Purchase Order and Production Order

    Hi,
    Could some one tell me how i could get a relation ship between Purchase order and Production Order after a Good receipt is done. Coz after a GR is done I am not able to see the production order for a particular material in MD04 transaction.
    Thanks,
    Arul.

    Hi Arul ,
    i think u may not get the LINK b/w Production Order and PO , Bcos--->
    check the process --->
    RUN MRP , here System will generate the Production Plan and PRs( based on the avail.of that Raw Material).So PO will be generated by PRs.So I think there is no link b/w Production and Purchase .
    this is based on the my system settings and my knowledge.
    Regards
    Prabhu

  • Function Module /BAPI for changing the components in Production order

    Hi,
    We are in ECC5.0. We have requirement wherein we want to change /delete the existing component of the production order and add new component through RFC call from an external system. We tried to use CO_XT_COMPONENT_ADD FM for adding new components and when we tested this FM in SM37  with data there were no error messages . When we checked the Production order ,no changes were made to the production order component. Tried to use Commit statement and there is no change in the system behavior.Can some one help me to  understand the system behavior . If possible kindly suggest me some alternate FM/BAPI .
    With regards,
    Joseph Anand B

    Dear,
    Please check this link,
    ADD COMPONENTS TO PRODUCTION ORDER
    Regards,
    R.Brahmankar

  • Committed Date For Components in Production Order

    Dear All,
    I m facing this,  Committed Date For Components in Production Order,
    the date appeared as 31.12.9999,
    How can i make this correct.
    please tell me..
    Thanks
    Raghu

    Hi, Thnkx,
    You Are correct, I got this while doing Availability Check, 2 dates.
    Requirement Date, and Committed Date.
    I tried your solution,
    I change the Quantity of one of my BOM , I tried to change the Quantity by Change Number,
    So in CS 03 I can see the Validity of that component up to 01-09-2010,
    I run MRP agian, new planned Order, tried to convert, the question is same.
    I still get the date as 31-12-9999.
    Thanks
    Regards
    Raghu

  • How BOM and routing is selected for Planned order and Production order?

    Hi,
    Can any1 plz tell me how BOM and routing is selected for a planned order and production order. ?

    Hello Mathisuthan,
    BOM and Routing selection for the planned order and production order through production version, If u have more than one BOM and more than one Routing then u can maintain this information as Production Version in the system.
    Production version you maintained
    MM01/MM02 -- MRP4--- Production version
    Or you can create Production Versions in Mass also with Transaction Code "C223"
    In the case no production version maintained/created  for the material, then system by default  will pick the first BOM and routing.
    I hope this information helpful to you.
    Regards
    Umesh Mali

  • Unable to Return Components of Production Order

    Hi,
    Created Production Order (PdO) with 9-10 components, the 8th component being Item HEX with planned quantity of 5 and actual issue of 200 at row number 8 of PdO. In meantime, someone had deleted some row of PdO. The user then tries to click "Report Completion" and "Return Components" and selects Item HEX. The row number for Item HEX is now strangely Row 9 and the user is unable to return the quantity of 200 for Item HEX.
    The "available batches" table of the Item HEX just does not show the quantity of 200 and the user is unavailable to "return components".
    Could someone help me what the problem could be?
    Thanks,
    Ajay Audich

    Hi Gordon,
    The item row deleted was some other item and not Item HEX. The Item HEX which now shows as row 9 DOES show the issued quantity as ~200 but the batches for this quantity are not visible and cannot be selected in the batch selection screen.
    Could the deletion of some OTHER item in the production order create this problem?
    Hi Sridharan- I do not understand your reply "wrongly posting"-could you please explain...this error is happening in the production order of SAP Business One.
    Thanks,
    Ajay Audich

  • Component allocation in planned order and production order

    Hi all,
    I want  table  or Function module for component allocation in production order and planned order.If component changes done in
    planned order or production order.
    In Table PLMZ and STPO I am getting component which are allocated in routing MASTER DATA.But if after generation of
    production order or planned order and I had changed one component in production order then it will not show in PLMZ and STPO
    table.
    Please reply.
    Regards,
    Vidyasagar

    Dear
    Please check the following table :
    AFKO         Order Header
    AFPO          Order Item Detail -Compoenets
    AFVC          Order Operations Detail
    AUFG         Allocation Table Sub-Item, Store Group
    AUFI           Allocation Table, Document Sub-item, Store
    AUFK          Order master data
    RESB
    FM: CO_BC_INSERT_CMP_OF_ORDERS . BAPI : BAPI_PRODORDCONF_GETDETAIL.
    Refer : Change components and Routing of production order
    Edited by: Jiaul Haque on Dec 13, 2010 7:54 PM

  • Reg : BOM and production order

    Hi all,
    I have created two production orders for the same material but with diffrent BOM explosion date. now can any one please let me know how will i find which version of alternate BOM of the material is used in the production order.
    In the production order header table ( AFKO) i am getting only the alternate BOM number, i am ubable to find which version of alternate BOM is used for Production order.
    Thanks .
    VIJAY

    the relation is as below
    AFKO-STLNR = STAS-STLNR
    AFKO-STLTY = STAS-STLTY
    AFKO-STLAL= STAS-STLAL
    FROM HERE TAKE ALL
    STAS-STLKN AND STAS-STLTY
    PASS IT TO STPO
    STPO-STLNR = STAS-STLNR
    SPO-STLTY = STAS-STLTY
    STAS-STLKN-= STPO-STKLN
    THIS WILL GIVE YOU ALL THE BOM ITEMS USED IN THAT PROD ORDER.
    IS IT OKAY?

  • Bapi or FM or tabel or any standard transaction code for Production order linking to get child production orders based on parent production order

    Dear Guru's,
    we have a requirement i.e. user can convert planned orders in to production orders (CO41) based on those production orders we can get Route card( Z Smart form)  presently we are using manual input for that Route card. recently we got requirement for this i.e. make to automatic generation of route card for this requirement we need to get the list of child's production orders based on parent production order
    so as per my requirement i need to get all child part numbers production orders based on parent production order number and quantity i tried in MD4C and CO46 but those transactions codes are picking multiple lines also so for this requirement please give your valuable suggestions
    Regards,
    Venkat 

    Dear Friends,
    Thanks for your reply,
    My business process is MTS purely strategy 10, for route card all components with production orders we can give input as like bellow these production orders are converted from planned orders,between few components are don't have production orders those are F-30 materials,because of this reason i need link for production order to child components orders
    01
    IND1
    IND1
    A1CE2003520103-005
    55685815
    02
    IND1
    IND1
    A1CE2003520103-010
    55685814
    03
    IND1
    IND1
    A1CE2003520103-015
    55685813
    04
    IND1
    IND1
    A1CE2003520103-020
    55685812
    05
    IND1
    IND1
    A1CE2003520103-025
    55685811
    06
    IND1
    IND1
    A1CE2003520103-030
    07
    IND1
    IND1
    A1CE2003520103-035
    55685810

  • Replicate the Sales order Line Item Text to Production Order

    I want to replicate the Sales Order Line Item Text to Production Order? Please tell me if this is Functional job or a Developers Job?
    I believe this can be achieved by customization and doesnot need any programming and I am trying hard to gather relevant posts for this, but didnt find any.
    Please help me with some information if some body encountered this earlier.
    Regards,
    Jessica Sam.

    Hey Jay, thanks for your reply.
    Please confirm me if this is a developers job or a functional job?
    Do i need to do some programming to achive this?
    I checked with couple of my collegues and friends and 90% people say it can be achieved throug functional configuration.
    can thorugh some light on this as i had been researching on this seriously and still have mixed opinions .
    Thanks,
    Jessica

  • Varaince settlement and costing sheet in REM and Production order

    for REM, repetetive manufacturing, what's the difference between REM and production order in terms of variance settlement and settlement profile design? what's the difference between process order and production order in terms of variance settlement and settlement profile design?
    for actual overhead(fixed and variable), can it be calculated automatically by costing sheet? user is very angry to input actual overhead by jounal entry. also how about plan scrap, how to define it in configuration? besides order confirmation, where can I input actual scrap?

    For variances, there is no difference between the 3 diferrent orders. The settlement profile can also be the same.  The real difference from a CO perspective concerns the calculation of WIP and the settlement rule.  Process orders and production orders normally use a full settlement rule (though periodic settlement is also possible) and WIP is calculated based on actual cost.  Repetitive orders only use periodic settlement and WIP is valued at target cost.
    From an overhead perspective, there is no difference between the 3 types of orders.  Overhead sheets are assigned through the costing variant and costs are applied through period-end process. 
    Plan scrap is maintained in master data, either in material master, routing (receipe for process orders), or bill of material.  Acttual scrap usually happens based on the quantity of components issued to the order during confirmation or by the amount of scrap reported during confirmation.  If you are backflushing components, as you normally would do for repetitive, then you can adjusted the consumed quantities by doing an additional goods issue to the order (movement type 261).
    thanks,

Maybe you are looking for

  • PHOTOSHOP CS4 DOES NOT RECOGNIZE MY SCANNER

    I just installed Photoshop CS4 64 bit in a new computer with Windows 7.  I downloaded and installed Twain Driver and Epson Scan Utility v3.04A as recommended by Epson for my Epson Perfection 4990 Photo Scanner to use with Windows 7.  The scanner work

  • How to Import pictures in iphoto on ipad with original name

    How to import pictures into iphoto on my ipad air with the original filenames. IT now Seems my pictures get a new name.

  • Photoshop CC unexpectedly terminates just after startup. Other Creative cloud applications starts normally. Any sugggestions?

    Photoshop CCunexpectedly just after startup. Other Creative cloud applications starts normally. I am running Windows 7 64 bit, GForce GTX670. Any sugggestions? I've tried re installing photoshop, tablet drivers, adobe cloude, and graphic drivers. I g

  • PHP & OHS

    Hi, Can Oracle HTTP Server 10.1.3.5 be made to work with a recent vintage of PHP that also has mysql support? Here is my problem. The marketing dept hired a design firm to redo our site. As part of the redo they are moving it to Drupal. The requireme

  • Problems recovering my password and login

    [Topic title updated by moderator to be more descriptive. Original topic title was: "hi all and i just need help"] after using skype for more of a decade, now i have problems with login. first time in god knows how many years. just switched my pc and