CS_BOM_EXPL_MAT_V2  Same Plant

Hi i'm using the FM 'CS_BOM_EXPL_MAT_V2' to extract de BOM of a material, but it returns me materials that are not in the same plant (werks),
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
      EXPORTING
        capid                 = v_appli
        datuv                 = v_date
        mehrs                 = 'X'
        mtnrv                 = ti_mast-matnr
        rndkz                 = ' '
        stkkz                 = ' '
        stlan                 = v_usage
        stlal                 = v_stlal
        werks                 = ti_mast-werks
        nlink                 = 'X'
      IMPORTING
        topmat                = w_topmat
      TABLES
        stb                   = itab_bom
      EXCEPTIONS
        alt_not_found         = 01
        call_invalid          = 02
        material_not_found    = 03
        missing_authorization = 04
        no_bom_found          = 05
        no_plant_data         = 06.

Try using this FM.
Shreekant.
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
      EXPORTING
        FTREL                 = ' '
        ALTVO                 = ' '
        AUFSW                 = ' '
        AUSKZ                 = ' '
        BAGRP                 = ' '
        BEIKZ                 = ' '
        BESSL                 = ' '
        BGIXO                 = ' '
        BREMS                 = ' '
        CAPID                 = P_CAPID
        DATUV                 = V_DATUV
        EMENG                 = ' '
        ERSKZ                 = ' '
        ERSSL                 = ' '
        MBWLS                 = ' '
        MTNRV                 = W_MARC_MKAL-MATNR
        MDMPS                 = ' '
        MEHRS                 = ' '
        MMORY                 = ' '
        POSTP                 = ' '
        SANKO                 = ' '
        SANFR                 = ' '
        SANKA                 = ' '
        SANIN                 = ' '
        SANVS                 = ' '
        RNDKZ                 = ' '
        RVREL                 = ' '
        SCHGT                 = ' '
        STKKZ                 = ' '
        STLAL                 = '01'
        STLAN                 = '1'
        WERKS                 = P_WERKS-LOW
      IMPORTING
        TOPMAT                = XTOPMAT
        DSTST                 = XFELD
      TABLES
        STB                   = XSTPOX
        MATCAT                = XMATCAT
      EXCEPTIONS
        ALT_NOT_FOUND         = 1
        CALL_INVALID          = 2
        MATERIAL_NOT_FOUND    = 3
        MISSING_AUTHORIZATION = 4
        NO_BOM_FOUND          = 5
        NO_PLANT_DATA         = 6
        NO_SUITABLE_BOM_FOUND = 7
        OTHERS                = 8.

Similar Messages

  • Sales order same plant different storage location

    Hi
         We are doing a sale order for a material that is storage in two storage location.
    Storage location A:
    2 units
    Storage location B:
    3 units
    We did a sale order for 5 material. Stock availability asigned 5 unit in one position of the purchase order. Then the system create just one delivery for 2 units.
    Which procedure or customizing we have to do to get two deliveries, one for each storage location.
    Thanks in advance for the help
    Regards
    Enzo

    thanks SAJU SOM
    We need to create two deliveries from one sales order, that have quantities for differents storage locations.
    Example:
    Sales order A: 5 units
    We have, 2 in storage location C and 3 in storage location D under same plant. The storages locations are in differents places, so we need two deliveries, one from C and the other one from D.
    I suppose that this situation is normal and occurs in many companies.
    So, we have to create a sales order with 2 positions, or the system split the deliveries during deliveries creation?
    I think the system should split the positions automatically in the sales order creation.
    Thanks for your help
    Regards
    Enzo

  • STO ( stor. loc. to stor. loc of same plant ) creation frm Sales Order

    Hello guys
    I am facing a unique scenario in our current environment. Need you input ASAP
    environment:
    Org 1 - Plant 1 - division 1
    Org 2 - Plant 2 - division 2
    Org 1 wants to take over the sales of all the items belonging to division 2 which are currently being sold by Org 2.
    These items are HAWA and their procurement is currently done outside ECC.
    Now the procurement of these items will continue to be done by Org 2 & even its inventory will be owned by Org 2.
    Proposed Sales Flow:
    1) Org 1 accepts Order for the item with Plant as Plant 2
    2) Plant 2 Delivers the goods to customer
    3) Org 1 invoices the customer
    4) Org 2 invoices Org 1 using Intercompany billing.
    Now the challenge is wrt step 2.
    The Items are shipped from Plant 2 with their Issuing storage location as ABC.
    However these items are initially stocked in a different building outside the Plant 2 .. say stor. location = XYZ
    Now based on the Sales Requirements due for shipment today .. the users will move the Inventory of the items from Stor. Location XYZ to ABC for which they want some reference document for the move (which I have recommended as STO)
    I have come across some threads which give input regarding triggerring STO from Sales Order.
    However my challenge is the STO in this case is between 2 storage locations ABC & XYZ  of the same plant.
    Do you think Sales Order triggering a PR (similar to 3rd Party scenario) & then this PR converts to a STO work ?
    Please let me know the steps if possible.
    THanks
    Vin

    Well actually the Selling Org ABCD is of a different Company code .. it is a typical case of Intercompany Sales .. where the Plant WXYZ is belonging to another company code.
    I have setup the Intercompany Sales Process .. and want to trigger the Stock movement as mentioned above.
    I have configured the STO for storage location - stor. location in a Plant. ...
    However I am struggling to trigger a STO from a Sales Order.
    I tried using the Schedule Lines to trigger a Pur. Req ... however the Supplying Plant field remains blank (which is the same in this case as it is a stock movement between 2 locations of the same plant).
    The flow looks somewhat like this
    Sales Order -
    > Stock Transfer PR in Plant WXYZ -
    > Delivery Doc for the STO --- > MIGO to receipt the inventory in 0001 -
    > Delivery DOc for Sales Order -
    > Invoice for end customer --- > Intercompany Invoice
    If anyone has automated creation of a STO from a Sales Order .. please advice
    Thanks
    Vin

  • Transfer pricing between the same plant

    Our multimational client has desired, transfer pricing between the profit centres. The profit centres have been designed as a combination of product lines and plant. My first query is that whether it is possible to have Transfer pricing in the same plant, i.e. when the finished goods one material is moved & fed as raw material from one product line to another product line. How will the same be mapped in MM and PCA/ COPA??

    Suraj ,
       Could you please elaborate on that .Iam not very clear on that
    Regards
    Deepesh S

  • Delivery without reference for stock transfer within the same plant 311

    Dear all,
    I need to create a delivery without reference for stock transfer within the same plant, movement 311,  i.e. just from 1 storage location to another storage location.
    I tried to use VL01NO with delivery type UL.
    Now my question is how can I assign a receiving plant for a customer?
    I can't do the MIGO or MB1B document because I need the delivery document (packing list, forms, Texts,...).
    It's possible this option???
    Thank you very much.

    Hi,
    What is the item category you are assigning while doing VL01NO?  Check the schedule line category for that item category assignment.  That Schedule line category has an option for one step GI.  There you can assign 311 or create a separate item category and schedule line category and in that SC assign 311. 
    Thanks
    Krish.

  • Same plant serving two company codes

    hi gurus
    can any one share there experiance in configuring that single plant serving two company codes, requirement is need simple sto process for exchange of finished and raw materials between two company codes
    baalakrushnan.da
    sd

    HI,
    No, It is not possible. Even though u are doing STO process u need to mainatin two different plants. More you can not assign the same plant to two company codes.but u can assign more than one plant to one company code it is like N:1 relation ship..
    Please create one more virtual plant for stock exchange for other company code. Because Material valuation will happen at plant level only..
    Regards
    sankar

  • PR Item Text Different for same Material in the same Plant.

    I have a Query for SAP MM.
    Below is the Scenario:
    User raises a PR through SAP for a particular Material (Spare) which belongs to an Equipment.
    Let's say in Plant A, we have an Equipment 10001 & it has a sub-Equipment as 1000112 & further it has a spare which belongs to the sub-equipment as 1000001.
    Now when the user raises a PR for 1000001 then he wants to automatically populate the information in the Item Detail Text tab  such as:
    Equipment No.: 10001
    Sub-Equipment No.: 1000112
    The above text enables the vendor to track & source the correct material.
    The problem here is that the same material is being used in the same plant for another equipment also, hence we cant just update the PO text in the Material Master record.
    How to map the above in the std SAP system???
    Require your help / expert comments.
    Regards,
    Yogesh.

    Hello friend,
                      i feel that u want to send the material to the supplier of that equipment for sum work,
    then it would b better that u maintain the supplier model no. or manufacturing part no. which u can give in the detail.
    it would be better to give the manufacturer part no. The manufacturer can more easil track the part by giving the manufacturer part no, rather then giving your own SAP No.
    and regarding the SUB-Equipment and its part no. there is no standard functionality.
    Regards,
    yk
    Edited by: 1234_abcd on Apr 1, 2010 5:27 PM

  • Eliminating "same-plant" movements in Query Designer

    Hi all,
    We have extended the standard BC InfoCube (0IC_C03) to include the Issuing/Receiving Plant characteristic.
    Now in our some of our queries we want to perform calculations like Total Receipt last 3 months per Plant, but we want to exclude "same-plant" movements (Plant=Iss/Rcv Plant) from these calculations, since this is not really incoming material.
    Is it possible to do this in Query Designer? (without using Customer Exit and without modifying the InfoCube)

    >
    Simon Turnbull wrote:
    > Have a look at the "elimination of internal business volume" function
    I have not tried it yet, but it looks like it does exactly what I want (and the fact that this user exit exists is also encouraging, guess it makes sense what I am trying to do ...).
    I will need to change the InfoCube, but seems quite straight-forward.
    Thanks Simon!

  • Stock transfer between stor loc. of same plant triggered by Sales Order

    Hello everyone
    I need some input regarding triggerring Stock Transfer between 2 storage locations of the plant from a Sales Order.
    Sales Org: ABCD
    Plant: WXYZ
    Stor Location: 0001 & 0002
    Now here 0001 is the Picking location for the Delivery Document.
    However 0002 is where all the stock is stacked.
    Physically they both are different buildings in the same vicinity.
    The Business wants the Sales Order to trigger the stock movement from 0002 to 0001 on a daily basis.
    So from a end user prospective, they will move the stock from 0002 to 0001 for all the items needed to fulfill the Orders due for Shipment for that day.
    What options do I have for this ?
    Thanks
    Vin

    Well actually the Selling Org ABCD is of a different Company code .. it is a typical case of Intercompany Sales .. where the Plant WXYZ is belonging to another company code.
    I have setup the Intercompany Sales Process .. and want to trigger the Stock movement as mentioned above.
    I have configured the STO for storage location - stor. location in a Plant. ...
    However I am struggling to trigger a STO from a Sales Order.
    I tried using the Schedule Lines to trigger a Pur. Req ... however the Supplying Plant field remains blank (which is the same in this case as it is a stock movement between 2 locations of the same plant).
    The flow looks somewhat like this
    Sales Order -
    > Stock Transfer PR in Plant WXYZ -
    > Delivery Doc for the STO --- > MIGO to receipt the inventory in 0001 -
    > Delivery DOc for Sales Order -
    > Invoice for end customer --- > Intercompany Invoice
    If anyone has automated creation of a STO from a Sales Order .. please advice
    Thanks
    Vin

  • Lock the plant so that other user cannot use the same plant.

    Hi Gurus!
    I ahve this small report which shows the pro-rate factor . In this report I need to block the plant or lock it(a soft) lock witha  message that some other user is using the plant so that other cannot use the same plant to post.Following is the report and if soemone can help me out would be very kind enough.I ahve added teh code where validation of plant is doen , so it must be somewhere here the locking should be done as per my thinking . Kindly suggest please.
    *&      Form  get_pro_factor
    *       get pro rate factor from the given
    *       combination of plant/sloc/mat#/period
    form get_pro_factor .
      select single zpr_factor zpr_disp_factor zpr_pipe_net zpr_pipe_gross
      from zprfactor
      into (zprfactor-zpr_factor, zprfactor-zpr_disp_factor,
            zprfactor-zpr_pipe_net, zprfactor-zpr_pipe_gross)
      where zpr_werks = p_werks    and
            zpr_lgort = p_lgort    and
            zpr_matnr = p_matnr    and
            zpr_mjahr = p_mjahr    and
            zpr_monat = p_monat.
      v_subrc = sy-subrc.
      if zprfactor-zpr_factor = 0.
        if c_wp = p_lgort+0(2).
          zprfactor-zpr_factor = 1. " Don C added this routine
        endif.
      endif.
      if zprfactor-zpr_disp_factor is initial.
        if not zprfactor-zpr_pipe_gross is initial.
          zprfactor-zpr_disp_factor = zprfactor-zpr_pipe_net / zprfactor-zpr_pipe_gross.
        endif.
        if zprfactor-zpr_disp_factor is initial.
          zprfactor-zpr_disp_factor = 1.
        endif.
      endif.
    endform.                    " get_pro_factor
    *&      Form  valid_plant
    *       validate whether plant entered in selection screen
    *       exists in database or not
    form valid_plant .
      if not ( p_werks is initial and
                 p_lgort is initial and
                 p_matnr is initial and
                 p_mjahr is initial and
                 p_monat is initial ).
        select single werks from t001w into t001w-werks
               where werks = p_werks.
        if sy-subrc ne 0.
          message e048(zmm) with p_werks.
        endif.
      endif.
    endform.                    " valid_plant
    *&      Form  FIND_MATKL
    form find_matkl .
      select single matkl into v_matkl from mara where matnr = p_matnr.
    endform.                    " FIND_MATKL
    *&      Form  UPDATE_ZPRFACTOR
    form update_zprfactor using p_flag.                         "DEVK903224
      call function 'ENQUEUE_E_TABLEE'
        exporting
          mode_rstable   = c_e
          tabname        = 'ZPRFACTOR'
        exceptions
          foreign_lock   = 1
          system_failure = 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.
      else.
        select single * from zprfactor where zpr_werks = p_werks
                                       and   zpr_lgort = p_lgort
                                       and   zpr_matnr = p_matnr
                                       and   zpr_monat = p_monat
                                       and   zpr_mjahr = p_mjahr.
        if sy-subrc = 0.
          zprfactor-zpr_rate_flag = p_flag.                     "DEVK903224
          update zprfactor.
        endif.
      endif.
      call function 'DEQUEUE_E_TABLEE'
        exporting
          mode_rstable = c_e
          tabname      = 'ZPRFACTOR'.
    Thanks
    Aarav

    call function 'ENQUEUE_E_TABLEE'
        exporting
          mode_rstable   = c_e
          tabname        = 'ZPRFACTOR'
        exceptions
          foreign_lock   = 1
          system_failure = 2
          others         = 3.
    ENQUEUE_E_TABLEE   } E_TABLEE is the name of the lock object, it starts with character "E".

  • Transfer between storage location to storage location within same plant

    Dear Gurus,
    We r doing storage location to storage location transfer within same plant through purchase order.
    Due to excise requirement we have to raise excise invoice for the same for captive consumption purpose.
    Is it possible to make it One step procedure so that GR will take place at same time as GI the way it works for plant to planrt.
    In ECC 6.0 option is there for transfer between storage location. I configured but it is not working.
    Please check the same.
    Rgds,
    Saurabh

    Hi Saurabh,
    The proceedure you are following is a bit wierd. But I think this is as per your business requirements.
    You can continue to follow the same proceedure as this may  not be possible through one step movement type.
    Best Regards,
    Prateksha.

  • Transfer project/ SO stock between 2 storage locations of same plant

    HI,
    We have a requirement in which the we have to transfer  project/sales order stock between 2 storage locations of the same plant.

    Transfer between storage location.
       311 Q - Project Stock
       311 E - Sales Order Stock
    Transfer between storage location to own stock
       411 Q - Project stock to own
       411 E - Sales Order to own

  • Account/Cost Center Determination (OKB9) for same plant & 2 cost centers.

    Hi,
    I faced a weird situation My situation is i have the same plant but 2 different profit center's & 2 different cost center's . My OKB9 cost element is configured through "Plant/Valuation Area (1)".
    Previously when ever we used this "Plant/valuation Area" determination we used to give plant and corresponding cost center and left other fields like Business Area, Order and profit center blank. see below thing for clear idea
    Plant A - Cost Center A
    Plant B - Cost Center B
    Now with this weird situation, i am not sure whether we can configure OKB9  as below
    Plant A - Cost Center A - Profit Center A
    Plant A - Cost Center B - Profit Center B
    If we can do as above, will their be any implications.
    could anyone help me out of this situation.
    Thanks
    Shriya

    HI
    No complications for this u can assign the CCtrs to Profit Centres.
    Regards
    Shammi

  • Disallow opening of two screens with same plant.

    Hi Gurus!
    I need to block the plant entered in a particular screen so that others cant use the same plant to run the report. For example if I use a plant say 200 in a screen for example 1000 with other entries like division , year , month and material, and run the report it will allow me , but at the same time another user wants to execute the same same screen  or program with same plant 200 , I want the report o block that plant or the screen itself so that other user wont be able to enter the report and make the changes corresponding to the same plant at the same time, to avoid confusiioon qmong themselves.
    Is it possible to do so , if so how do I go about doing it.
    Regards
    Aarav

    your logic is incorrect. You need to execute the code within enque / dequeue only if sy-subrc = 0.
    Right now it is gettign executed for all cases
    *&      Form  valid_plant
    *       validate whether plant entered in selection screen
    *       exists in database or not
    FORM valid_plant .
    DATA : lv_key TYPE rstable-varkey  .
      CONCATENATE sy-mandt p_werks INTO lv_key .
      IF NOT ( p_werks IS INITIAL AND
                 p_lgort IS INITIAL AND
                 p_matnr IS INITIAL AND
                 p_mjahr IS INITIAL AND
                 p_monat IS INITIAL ).
    CALL FUNCTION 'ENQUEUE_E_TABLEE'
    EXPORTING
       MODE_RSTABLE         = 'E'
       TABNAME              = 'ZPRFACTOR'
       VARKEY               = lv_key
    IF SY-SUBRC  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      message i000 with text-000.
                            <<<--------- Move this ENDIF to down
        SELECT SINGLE werks FROM t001w INTO t001w-werks
               WHERE werks = p_werks.
        IF sy-subrc NE 0.
          MESSAGE e048(zmm) WITH p_werks.
        ENDIF.
    CALL FUNCTION 'DEQUEUE_E_TABLEE'
    EXPORTING
       MODE_RSTABLE       = 'E'
       TABNAME            = 'ZPRFACTOR'
       VARKEY             = lv_key       .
    ENDIF.  --- Move ENDIF here from above
      ENDIF.
    ENDFORM.

  • Release Strategy for inter Storage Loc Material transfer within same Plant

    Hi Guru's
    I hope all are doing good. I gota small concern to share with you. Is it possible to apply Release Strategy between two Storage Locations within same Plant for Material Movement?
    Many Thanks
    SONAL

    Release Strategy cannot be assigned in material document.
    However you can restrict this at authorisation level for T code MIGO_TR.
    Regards
    Bhavesh Mistry

Maybe you are looking for

  • Creative Zen Micro won't turn

    Creative Zen Micro - When I plug the usb into a computer, it has the charge icon in the top right corner of the screen. If I attemp to turn it on, while plugged in, the creative sceen come on, and then dissapears. When it is not plugged into the comp

  • [AS] Can't open multiple indd files of a chosen folder

    Hi, I just can't get the opening of a bunch of indesign files inside a chosen folder with AS. I write this : --Prompt the user for a folder to be picked including indd files set b originfolder to (choose folder with prompt "Choisissez le dossier cont

  • CS5 preferences

    CS5 will not save preferences. Instead I get a window that says "Could not save preferences because the file is locked or you do not have the necessary access privileges. Use the get info command in the Finder to unlock the filer change permission on

  • Resume Install and Failures?

    I started the download of my selected applications last night before I left the office. When I cam in this morning, the Photoshop install had failed. The disk images for inDesign and Illustrator were on my desktop and I had to manually install them.

  • OS 9 won't work

    I just got a MAC mini and transferred info, apps. etc from my powerbook G4 running 10.4.3 via firewire. I have a lot of files etc that only run on Classic but none of them will open. On 10.4.3 on the powerbook a classic window opened and I could use