Automatic Goods Receipt from for a Plant

Hi Experts
       We are doing shipment from one plant to another plant.
Now my requirement is,
when i do PGI(Post Goods Issue) activity from one plant to   other plant using VL02N, i need to do automatic GR for other plant.
         The PO number will be maintained in the sales order itself, so how to do this.
         Can we use BADIs, if so, whats the right one, and how to do it, pls advise me on this.
Thanks in advance.
Regards
Rajaram

Hi Raja,
data: bapi_head   LIKE bapi2017_gm_head_01,"OCCURS 10 WITH HEADER LINE,
bapi_move   LIKE bapi2017_gm_code,
bapi_move   LIKE bapi2017_gm_code,
bapi_headret LIKE bapi2017_gm_head_ret,
bapi_out    LIKE bapi2017_gm_head_ret-mat_doc,
bapi_year LIKE bapi2017_gm_head_ret-doc_year,
bapi_item LIKE bapi2017_gm_item_create OCCURS 10
                                              WITH HEADER LINE,
wa1 LIKE bapi2017_gm_item_create,
bapi_serial LIKE bapi2017_gm_serialnumber OCCURS 10
                                              WITH HEADER LINE,
bapi_return LIKE bapiret2 OCCURS 10 WITH HEADER LINE.
bapi_move = '01'.
MOVE t_sd-bldat TO bapi_head-doc_date.
MOVE  t_sd-budat TO bapi_head-pstng_date.
MOVE  t_sd-xblnr TO bapi_head-ref_doc_no.
MOVE  t_sd-bktxt TO bapi_head-header_txt.
loop at t_sd.
MOVE t_sd-werks TO wa1-plant.
MOVE t_sd-lgort_r TO wa1-stge_loc.
wa1-move_type = '101'.
MOVE t_sd-ebeln_s TO wa1-po_number.
MOVE t_sd-ebelp_s TO wa1-po_item.
MOVE t_sd-VBELN TO wa1-DELIV_NUMB_TO_SEARCH.
MOVE t_sd-POSNR TO wa1-DELIV_ITEM_TO_SEARCH.    
MOVE t_sd-menge TO wa1-entry_qnt.
MOVE t_sd-base_uom TO wa1-entry_uom.
MOVE t_sd-matnr TO wa1-material.
MOVE t_sd-reswk TO wa1-plant.
MOVE t_sd-lgort_s TO wa1-stge_loc.
APPEND wa1 TO bapi_item.
endloop.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    EXPORTING
      goodsmvt_header             = bapi_head
      goodsmvt_code               = bapi_move
  TESTRUN                     = ' '
   IMPORTING
      goodsmvt_headret            = bapi_headret
      materialdocument            = bapi_out
      matdocumentyear             = bapi_year
    TABLES
      goodsmvt_item               = bapi_item
      goodsmvt_serialnumber       = bapi_serial
      return                      = bapi_return
  IF sy-subrc = 0.
    headr_ret = bapi_headret.
    mat_doc   = bapi_out.
    doc_year  = bapi_year.
    ret_tab[] = bapi_return[].
  ENDIF.
  IF ( bapi_return-type = ' ' ) AND ( NOT bapi_out IS INITIAL ).
if the material document created this function is used to make the
permanent changes to the database
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = space.
           IMPORTING
             RETURN = MESSTAB_COMMIT.
  ENDIF.
if it is helpfull pls reward pts.
Regards
Srimanta

Similar Messages

  • How to change goods receipt time for a plant?

    Hi All,
    How do I change the goods receipt time for a plant?
    Thanks for your help!!!
    Rana

    hi,
    GR time is defined for the specific material ..it is defined as GR processing time..in the Material master in the MRP view...
    Pls check ...
    Hope it helps..
    Regards
    Priyanka.P

  • Message no. RU 195:Automatic goods receipt for order 619271463 is not possi

    dear expert:
    when i confirm the production order via co15  ,sytstm prompt :
    Automatic goods receipt for order 619271463 is not possible
    Message no. RU 195
    Diagnosis
    Order 619271463 contains several operations, which have a control key which indicates "automatic goods receipt".
    However, an automatic goods receipt is only allowed once per order for the following reason:
    If the automatic goods receipt is posted more than once, this would lead to incorrect stock quantities.
    Procedure
    Check the control keys of the operations in order 619271463. Change the control keys in such a way, that an automatic goods receipt occurs for one operation only.
    production order is confirmed  but it cann't be delivered automatically.
    help me analyse it .
    best reagards.

    Hi,
    In normal scenario in a production order each routing operation will consist a control key with settings for automatic goods reciept.
    So in a production order you can use only one control key with automatyic goods recipt. This will be the last operation of the order. From message mentioned by you it is showing as may u have mentioned auto goods reciept for more than one operation.
    PP01 is normal confirmation control key & PP99 is for milestone with auto goods reciept. PP95 - w/o milestone with auto GR.
    Please check control key & correct it.
    Hope this will help you.
    Regards,
    Ashish

  • How do I link manufacturing label designed in wwi to print automatically during the time of goods receipts from the production

    Hello
    Is there any way to link label to print automatically from the printer at the time of TECO ,Goods receipts from production and PGI at the time of delivery to the customers .
    Regards,
    M D

    Hi !
    GLM supports Automatic Label Print requests & Automatic Label Printing(immediately after generation of automatic print requests). But this is limited to Delivery order, Process Order & Handling Unit as standard. For other scenarios, you will have to customize.
    Automatic Print Request Generation - Global Label Management (EHS-SAF-GLM) - SAP Library
    http://help.sap.com/erp2005_ehp_07/helpdata/en/32/a81051e71e2514e10000000a44176d/content.htm?frameset=/en/00/704e3340074776bb6877aa7edb7394/frameset.htm&current_toc=/en/54/c86cb93bdc4d698eb8e2524b59692b/plain.htm&node_id=38
    But this is possible with "Enhanced" GLM. It's better explained here,
    New changes for GLM in EHP7.0 and ERP 6.0
    Regards
    Subash Sankar

  • Automatic goods receipt for more than one phase

    Hi all,
    I want to make automatic goods receipt in the confirmation COR6N for more than one phase , i know that it is not possibe in the standard system but is ther any fuction module or note can support this issue?
    Regards
    Ahmed Sobhi

    Dear Ahmed Sobhi,
    If my understanding is correct,then it's not possible to perform Automatic GR for more than one operation or phase in standard
    SAP.
    Regards
    Mangalraj.S

  • Process steps for Capital goods transfer from one exciseable plant to another exciseable plant

    Please guide me about below mention process :
    Capital goods transfer from one exciseable plant to another exciseable plant with updation of RG23C register.
    Goods purchase in prev month.

    Company code to company code u have to treat the another company as Vendor/Customer in each company code books. Then the process is same.  Sale order, delivery and billing to the Customer(2nd company code i.e. stock receiving company code).  Then in receiving company code based on the delivery document of other company code GR can be made. and IV.

  • Goods Receipt from Purchase requestion

    Deal All,
    Any possible Goods Receipt from Purchase requisition directly in standard sap or customization or any enhancement.
    Plz tell me if any possible is there.
    Thanks in advance
    Chandhu.

    Hi,
    There is no possibility to use the Purchase requisition for the Goods receipt dorectly. Standard SAP does not allow that.
    Instead of going to the GR directly against pr, you can do the following steps:
    Create the PR.
    Use the Standard automatic conversion of PR into PO program.
    Create the Z report to display the PO against the PR. (You can also use the standard reports available.)
    Do the GR against them.
    Regards

  • Backflush --Goods receipt from Production -- Goods Issue 261 Process

    Hi all
             Can anyone please explain the steps that take place in SAP right from when backflush -goods receipt from production happens to the goods issue with movement type 261. At what point does 914 Interim get involved, TR/TO creation etc..
    I have an issue where there are stranded open TR's left out which are associated to 261 mvmt type and I would like to understand the whole process better to be able to look analyze the issue. .
    Thanks

    Hi,
    In Standard SAP and RF transaction,
    If GR is done for the order, system will generate a TO to place the stock in the warehouse bin, based on the stock placement strategy (thro stock placement indicator) it will search the correct bin location.
    So TO will be generate automatically then you can scan the TO to confirm it through RF gun, warehouse staff can confirm the TO by scanning it (LM03).
    If you need the GR to be done by the production staff by scanning the order number, you need to go with the development, so in the RF gun, they can scan the order and enter the qty to be received and in the back ground TO will be created and warehouse staff can scan and confirm the TO.
    Thanks,
    JK

  • Automatic goods receipt happening without any settings

    Hi,
    I created a production order and released it... now I am confirming it through CO15 at header level... in that system is proposing automatic goods receipt...I checked these settings...no Production scheduling profile attached in material master... in the routing no control key is attached which is having automatic goods receipt indicator....then why system still allowing to do Automatic goods receipt...is there any other setting which results in this..can you guide...
    Thanks
    Kumar

    Hi Kumar
    Please check the production scheduling profile field in production order control tab.
    If you find production scheduling profile, then check the Substitute Scheduler field in order type dependent parameters for your order type. If you find entry value in production scheduler. From here the production scheduler will be picked by default and in OPJ9 what production scheduling profile assigned that will be picked in production order as default.
    Based on settings in default production scheduling profile  this automatic GR is happening.
    Regards
    Kesava

  • To Set Goods Receipt Indicator For Particular Line Items In SRM

    Hi All,
      i am working on BBP_DOC_CHANGE_BADI in SRM. i am trying to set the goods receipt indicator for particular line items based upon certain conditions. The values are being set in the badi. But when the Purchase Order is created in the backend R/3 i coudn't able to find the goods receipt indiactor being set..
    i used this field to set the GR indicator
      GR_IND = 'X'.  " Goods Receipt Indicator
    Can anyone help me in this?
    helpfull answers will be rewarded....
    Thanks,
    Murali

    To Murali and Christophe,
    I have set the GR and GR non val indicator in CREATE_PO BADI but I face the following situation :
    problem -
    In case of multiple account assignment in the shopping cart, the R/3 transaction ME21N sets these flags. 
    The flag status determined as per EBP conditions is lost.
    I need to retain the flag status as per EBP conditions even in this multiple account assignment scenario.
    proposed solution -
    - CREATE PO badi is already implemented in EBP and customised logic for GR and GR non valflag is in place.
    - I create user exit in R/3 backend system in ME21N transaction 
    - I make RFC call in this user exit to EBP and check the table BBP_PDPSET for the shopping cart.
    This is how I get the flag status as per EBP conditions and copy the same to R/3 thereby overriding the multiple account assignment check of the R/3 system.
    issue - 
    When I tried to verify that I can check the BBP_PDPSET table from R/3, I found that this table is not having entries for all the records in  CRMD_ORDERADM_I table.
    For which shopping carts will the BBP_PDPSET table not  be populated ?
    thank you in advance,
    Bhakti.

  • Partial reversal of a goods receipt from process order

    Dear All
    Could anyone please help me with explaining how to do a partial reversal of a goods receipt from process order? If Iu2019m using trans CORS I have to cancel the entire operation, which I donu2019t want to do. If Iu2019m using MIGO and MT 102 I only reverse the goods receipts of the produced material, the corresponding components from the BoM is not reversed with MT 262 as they are if I cancel with CORS, and I donu2019t want to do a second MIGO transaction in which I cancel the components with MT 261. I have also tried to create an operation with a negative quantity, but without any success.
    Itu2019s not an option for the business to reverse the entire quantity and then perform a new goods receipt with the right quantity.

    Hi again,
    I have been trying to do the reversal with CORR but Iu2019m getting the error message u201CMixed confirmation types (time ticket/time event) are not allowedu201D, message number RU179.
    Anyone who can help me on the way?
    /WM consultant on unknown territory

  • No goods receipt possible for purchase order

    Hi Experts,
       Received the goods 10 PC from Vendor on one date, then reversing the GRN on another date, So now GRN total quantity is zero. I am getting error  u201CERROR - 036No goods receipt possible for purchase order 43086066 00220 " while again i am trying to do GRN. Please help me to solve the problem.
    Thanks

    Hi,
    Try to do the GR wrt Mat doc # which you have cancelled.
    regds,
    CB

  • No goods receipt possible for purchase order 'PO#" "Lineitem"

    Hi gurus,
    Please help on below error.
    While doing return to vendor transaction using BAPI 'BAPI_GOODSMVT_CREATE' error 'No goods receipt possible for purchase order 'PO#" "Lineitem"' was encountered. As checked, all data are correct including the plant, sloc, PO#, stocks, batch.
    Please kindly advice on how to resolve the issue.
    Thank you in advance.

    Hi,
    Few things which immediately comes to my mind.
    1. Check if the PO is released?
    2. Check if the confirmation control is properly set in Confirmations tab of item details of a PO.
    3. Check if the Goods Receipt indicator is ticked at item level of PO.
    I hope these helps.
    Kind Regards,
    Prakash

  • BAPI_GOODSMVT_CREATE, will do the goods receipt ( MB01 )for the subcontracting PO with batch management.

    Dear Professionals ,
    I Just want to confirm that whether BAPI "BAPI_GOODSMVT_CREATE " will do the goods receipt ( MB01 ) for the subcontracting PO with batch management.
    Since I will be passing only 101 mvy type in BAPi, will the system automatically call 543 mvt type with batch management and post the consumption.
    can I change the batch of the component items ?

    Hi ,
            Delivery note is like a ref document number
    so you can use the
    In the BAPI_GOODSMVT_CREATE There is header structure BAPI2017_GM_HEAD_01 which has a field REF_DOC_NO
    you can pass the delivery note value to that field .
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jul 10, 2008 3:41 PM

  • No goods receipt possible for the PO - Interesting issue

    HI all,
    I need to do the GR for an open inbound delivery. At the item level of precessing document i.e PO 'No goods receipt' check is marked. Same thing is copied to my inbound delivery 'No goods Movement' is marked in Adminstrative tab of my inbound delivery item.
    When I use the BAPI BAPI_GOODSMVT_CREATE to do GR for this Inbound delivery, it throws an error saying that 'No goods receipt possible for the PO item'.
    But when I do the same thing manually it happened successfully by creating a "service confirmation document" and changed the goods movement status as C (fully completed) without creating an material document as these items are no relevant items for goods movement.
    As we are moving goods directly from Vendor to customer, just we want to do service confirmation to vendor without any goods movement. It happening manually but not through BAPI. Please suggest.
    Helpful anwers are certainly rewared
    Thanks,
    Raggs.

    Hi AP,
    I didn't find any relevant FM to do the same.
    Thanks.

Maybe you are looking for

  • Synchronize with local development environment

    Hello, I'm not familiar with ABAP development and therefore I'm not well schooled in utilizing SAP/Netweaver development environment/infrastructure. I want edit in my local editor/development environment html/css files, which I had generated with the

  • IDVD 6 Chapter Menu Buttons all leading to 1st Chapter/New problem.

    I've got a pressing issue never previously encountered. iDVD 6 Chapter Menu Buttons all leading to 1st Chapter! I've tried reloading the iMovie file after checking chapter markers. The problem has persisted. This is due to client tomorrow. I've been

  • Using ext monitor for timeline and laptop screen as preview?

    is it possible that when i connect my external monitor to my macbook pro i can use the external for the timeline and the laptop screen for the previewing? cheers

  • Discounts for Volunteer Fire and EMS personnel discontinued?

    I have been a Verizon customer for a long time and have enjoied a 19% discount due to my service as a EMT in my local volunteer ambulance squad. In fact the ambulance squad chose Verizon as their wireless provider because the Verizon rep stated that

  • Thinkpad t420i 4177CTO windows 8 integrated camera driver

    I have a Thinkpad t420i bought with Windows 7. Recently, I upgraded it to windows 8, but find issue with it integrated camera.  with Windows drivers, the camera can work, but the image is flipped up/down. but with official driver ( windows 8 version