ABAP purchase / Goods receipt

Hi ,
  Actually i am trying to get tax% ,when working on   purchase order / goods receipt report.
I am using tables , konv and konp with fields knumv ,knumh
  but i'm not sure that whether i'm fetchin the right tax %.
Any one can please help me.
Actually I've to calculate VAT or CST
according to KSCHL (condition type).

Hi
You will get cst and vat value after posting incoming invoice
logic is simple for that
1) from table EKKO or EKPO get po number
2) pass this number into tabel RSEGand you will get invoice number
3) pass this invoice number into BKPF into refrbce field where you will get invoice number+ fiscal year
and in same table you will get accounting doc
4) pass this doc into BSET and check you condition type you will get value
Regrads
Kailas ugale

Similar Messages

  • Purchase goods receipt base on components

    Dear Guru ,
    We have one requirement which is the purchase goods receipt is base on sales bom components level .
    For instance , in system we have A material number and it have 3 sales bom components : B , C and D .
    And we created one Purchase Order only with A items , we need the Storage Location can receive the B , C and D components during the purchase goods receipt . ( that means Storage Location only increase the Stock Qty for B , C and D material )
    Is it possible to do that in SAP ?
    Thank you .
    Best Regards,
    Carlos

    I don't think so. There are many reasons why; for example costs. You ordered A, it has a price, it might have requirements from MRP or something else (sales order, project), but for the components there's nothing, no information. What if only B arrives? How should the vendor be paid, how much?
    So to close the business process you need to receive what you ordered.
    Later, when in stock, you may be able to disassemble A to it's components if that's what is required.

  • Goods receipt for purchase order with account assignment 'K'

    Hello All,
    There are couple of purchase orders with acc.*** "K". On doing the GR for these PO's they have been done with mvt type 103 & mvt typ 105.
    I understand that material has been directly consumed to the respective cost center.
    How do track the internal movement for these materials??
    I need to view the stock for these materials at the cost center as in MMBE the stock is seen as ZERO.
    All these materials are with QM proc ACTIVE. So a goods receipt is done 105, then the inspection lot is cleared. However, in this case as the material is directly consumed, it is NOT displayed in QA32.
    Is the above procedure correct??? Is it better to receive stock against mvt type 101 & then do a 201 mvt ??
    Request your inputs.....
    Regards,
    Manoj Reddy

    Account assignment inventories are not maintained. To maintain a report for cost center receiving/issuing you need to make a customized report with help of ABAP.
    Other way is to pull report in MB51, with selection criteria COST CENTER and it will give you result of stocks available on cost center. For stocks received on cost center, you can pull report with cost center and movement 101.
    201 is used for goods issue to cost center from warehouse, the stock you receive from PO against 101 is directly charged to cost center, so no need to issue later to cost center.
    Edited by: Afshad Irani on May 17, 2010 2:17 PM

  • Call BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order

    Hi,
    I'm calling the bapi BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order, but the following code doesn't work. It doesn't give me any kind of error message but it does nothing as well...
    Can anyone help me please?
    Thank You
    Hugo
    Code
    DATA: wa_goodsmvt_header  LIKE bapi2017_gm_head_01,
                            wa_goodsmvt_code    LIKE bapi2017_gm_code,
                            wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
                      DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS  0 WITH HEADER LINE,
                            it_return        LIKE bapiret2 OCCURS  0 WITH HEADER LINE.
                      wa_goodsmvt_header-pstng_date = SY-DATUM.
                      wa_goodsmvt_header-doc_date   = SY-DATUM.
                      wa_goodsmvt_header-ref_doc_no = '4500000020'.
                      wa_goodsmvt_code-gm_code = '01'.          "Goods receipt for purchase Order
                      it_goodsmvt_item-stge_loc  = 'BPF2'.
                      it_goodsmvt_item-move_type = '101' .
                      it_goodsmvt_item-entry_qnt = 17.
                      it_goodsmvt_item-entry_uom = 'KG'.
                      it_goodsmvt_item-mvt_ind   = 'B'.
                      it_goodsmvt_item-po_number = '4500000020'.
                      it_goodsmvt_item-po_item   = '00010'.
                      it_goodsmvt_item-material  = '50'.
                      APPEND it_goodsmvt_item.
                      CALL FUNCTION  'BAPI_GOODSMVT_CREATE'
                        EXPORTING
                          goodsmvt_header  = wa_goodsmvt_header
                          goodsmvt_code    = wa_goodsmvt_code
                        IMPORTING
                          materialdocument = wa_bapi2017_gm_head
                        TABLES
                          goodsmvt_item    = it_goodsmvt_item
                          return            = it_return.
                        data: begin of errmsg occurs 10.
                                include structure bapiret2.
                        data: end of errmsg.
                        data: wmenge like iseg-menge,
                              errflag.
                        clear errflag.
                        loop at errmsg.
                          if errmsg-type eq 'E'.
                            write:/'Error in function', errmsg-message.
                            errflag = 'X'.
                          else.
                            write:/ errmsg-message.
                          endif.
                        endloop.
                        if errflag is initial.
                          commit work and wait.
                          if sy-subrc ne 0.
                            write:/ 'Error in updating'.
                            exit.
                          else.
                            write:/ 'Ok'.
                          endif.
                        endif.
                        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                        EXPORTING
                        wait = ' '.

    Hi,
    Thank you for the asnwer! I'm a rookie at ABAP so please forgive my stupid questions
    I've changed the code to:
    DATA: wa_goodsmvt_header  LIKE bapi2017_gm_head_01,
                            wa_goodsmvt_code    LIKE bapi2017_gm_code,
                            wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
                      DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS  0 WITH HEADER LINE,
                            it_return        LIKE bapiret2 OCCURS  0 WITH HEADER LINE.
                      wa_goodsmvt_header-pstng_date = SY-DATUM.
                      wa_goodsmvt_header-doc_date   = SY-DATUM.
                      wa_goodsmvt_header-ref_doc_no = '4500000020'.
                      wa_goodsmvt_code-gm_code = '01'.          "Goods receipt for purchase Order
                      it_goodsmvt_item-plant     = 'BP01'.
                      it_goodsmvt_item-stge_loc  = 'BPF2'.
                      it_goodsmvt_item-move_type = '101' .
                      it_goodsmvt_item-entry_qnt = 10.
                      it_goodsmvt_item-entry_uom = 'KG'.
                      it_goodsmvt_item-mvt_ind   = 'B'.
                      it_goodsmvt_item-po_number = '4500000020'.
                      it_goodsmvt_item-po_item   = '10'.
                      it_goodsmvt_item-material  = '50'.
                      APPEND it_goodsmvt_item.
                      CALL FUNCTION  'BAPI_GOODSMVT_CREATE'
                        EXPORTING
                          goodsmvt_header  = wa_goodsmvt_header
                          goodsmvt_code    = wa_goodsmvt_code
                        IMPORTING
                          materialdocument = wa_bapi2017_gm_head
                        TABLES
                          goodsmvt_item    = it_goodsmvt_item
                          return            = it_return.
                          write:/ it_return-message.
    And the return message is : Material document data and PO data do not match (Material)
    Any idea of what might be the problem?
    Thanks

  • Problem for Goods Receipt for Subcontracting Purchase Order

    Dear all,
    Presently, we are using SAP version 4.6C and we need to introduce GR for
    Subcontracting Purchase Order. We have developed a ABAP program to handle
    subcon Goods Receipt by uploading flat-files from our subcontractor. The
    scenario is as follows :
    Goods Receipt for Subcontracting Purchase Order
    1. In the ABAP program, function BAPI_GOODSMVT_CREATE will be used for goods
    movement.
    2. Data provided to the function are as follows :
    - Posting date
    - Document date
    - Material number
    - Plant
    - Storage location
    - Batch
    - Movement type (101)
    - Quantity
    - Purchase order number
    - Purchase order item
    - Movement indicator (B - Goods receipt for purchase order)
    3. The function will do data verification and automatically determine GI
    item for subcon stock:
    - Movement type (543)
    - Special stock (O - parts prov. vendor)
    - Material
    - Quantity
    - Plant
    Our problem is that :
    Only the GR item in the interface is to be transferred and the GI item is
    determined by the system. So, the quantity for subcon stock cannot be
    changed using this BAPI. Then the system will continue processing the goods
    receipt and create material document.
    Manually, by using transaction code MIGO, the user can display the subcon
    stock data and then change the quantity.
    By using transaction code MB01, after the user fills in all the GR fields,
    the system comes to line item 002 (subcon stock data) and then quantity can
    be changed.
    As per user requirement, quantity for GI item must be same with the quantity
    that has been transferred to subcon vendor in Delivery for Subcon
    (transaction code VL02N).
    We cannot achieve this requirement by using the BAPI mentioned above. Would
    appreciate any valuable help from anyone who is able to help us on this
    matter. Are there any other BAPI's that can help us to achieve the same
    result ?
    Thank you in advance and best regards.

    As far as i understood the problem I suggest u to create the
    BDC according to user actions that are performed in he manual
    operation.
    I can't say that the BAPI performs the exac solution what you want.
    I have done some BDC work using MB01 and suggest you to be careful
    and try to keep the complete in the logic as some chages in rows in BDC will
    change the complete scenario.And throw correct quantity val in correct
    material
    row.
    This methodology will help u even in mass uploads.
    Or in case of automation u can perform the call transaction BDC in
    background mode.
    so As per my understanding bdc program is the solution. pls try and let me
    know.

  • Purchase order text that appear automatically in Goods Receipt Automotive

    Hello,
    I am looking for a possibility to add a text (header or position) to the purchase order
    which than later will be shown as a popup for example   before posting in Goods Receipt.
    E.g.
    The purchase order  could maintain a text like "when material arrives please immediately advice Mr. xxx" in order to achieve a certain flow of information in the goods receipt area.
    I have seen that you can define many different kind of texts  wihtin the PO but I hav not managed
    to pass this information through to where I need it , i.e. the   Goods receipt posting.
    Any ideas.
    Thanxs, Volker

    Hi Volker,
    i think this could not be Possible in MIGO.
    Since there are no text feilds Defined in MIGo to copy the same.
    you can do the same setting in MIRO,Defined in Standard.
    so for you Purpose.
    You can achieve te same in Print out of the GRN,where we can link the test in PO to the GRN output print.and user after the GRN can proceed with the note in the po.
    Again,i believe ,it could be possible to to copy the text to your Feild presnt in the MIGO.
    But it is is Abaper activity ,i am not sure of the Posibility we need to check and work wth the tech guy.
    Third thing is you need to customize your requirement,so you need again a tech guy for the same.
    Regards
    Anjanna

  • Goods Receipt Against Purchase Order

    Hi All,
             I am creating a report for goods receipt tracking against purchase order  within in date range .  If any material documant has been canceld ( 101 to 102 or 103 to 104 ) then it (101 or 103) should not be calculate receipt goods. if 105 is pending for any 103 still 103 qty should be add in receipt goods. Is there any Function module for do that or any other logic. plz tell.
    Thanks in Advance.
    Jitendra

    Hi
    Please take a look at the links for sample coding of the function module - BAPI_GOODSMVT_CREATE.
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    http://www.4ap.de/abap/bapi_goodsmvt_create.php
    <b>Reward points</b>
    Regards

  • Goods receipt  for purchase order not allowed for a particular wbs

    hello everybody..
    Am creating a good receipt for a purchase order using the T-CODE-: MIGO...
    While doing so am getting an error as " goods receipt  for purchase order not allowed(wbs element)".
    What can be done to rectify this error?
    Plz do help me....
    Regards,
    Deepika
    Moderator message: not directly related to ABAP development, please have a look in the appropriate functional forum, study the long text of this error message.
    Edited by: Thomas Zloch on Dec 1, 2010 5:52 PM

    Hi Br. Ajay M,
    Released the order and Status line as follow
    REL  AVAC BUDG GMPS
    but the error changed while reverse the document
    item 0001 Order is invalid.
    Many thanks for your kindly reply.
    regards,
    Steven

  • Error - E 036 No goods receipt possible for purchase order

    Good Day,
    Am not able to do the Goods Receipt through BAPI : BAPI_GOODSMVT_CREATE.But am able to create GR through MIGO.Am getting the below error through BAPI:
    E 036 No goods receipt possible for purchase order  4500000563 0010.
    I gone throug the SDN,  but i count not found any solution for this. Please help me in this regard.
    Cheers,
    sravan

    Hi,
    Maybe this example can help you.
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    Regards,
    Harish

  • Lock Purchase Order fields after goods receipt

    Hello everyone,
      I need to be able to set a couple of fields in ME22N as display only after goods receipt has been done for the PO. Is there any config that I can do to get this done? Any idea or suggestion?
      Thank you very much for your help!
    Kelly.

    You can change PO after GR in standard SAP and there is no standard customization feature available to block that.
    Use ABAP to check for GR against the PO and block PO fields once GR is posted.
    Use tables MKPF for GR posting, EKKO and EKPO for Purchase Order.
    ABAP will have to change the field status of Purcahse Order screens as blocked, if GR is posted.
    It might be added as a subroutine that gets triggered after each GR posting.

  • SAP Adapter: Error when committing SAP good receipt on purchase order.

    Hi guys:
    I’m trying to perform a sap good receipt on purchase order, and the BAPIs are the followings:
    1) BAPI_GOODSMVT_CREATE
    2) BAPI_TRANSACTION_COMMIT
    Note: This is only a proof of concept. Therefore, only I'm considering the commit of transaction.
    I’ve followed the example SAPTransaction, but in the moment when the BizTalk is sending the commit (point 2), BT get this error:
    There was a failure executing the send pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLTransmit, Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35" Source: "XML assembler" Send Port: "SP_BAPI" URI: "sap://CLIENT=800;LANG=EN;@a/192.168.0.102/00" Reason: This Assembler cannot retrieve a document specification using this type: "http://Microsoft.LobServices.Sap/2007/03/Rfc/#BAPI_TRANSACTION_COMMIT". 
    The operations:
    <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Operation Name="Bapi" Action="http://Microsoft.LobServices.Sap/2007/03/Bapi/MKPF/CREATEFROMDATA/BAPI_GOODSMVT_CREATE"
    />
      <Operation Name="Commit" Action="http://Microsoft.LobServices.Sap/2007/03/Rfc/BAPI_TRANSACTION_COMMIT"
    />
    </BtsActionMapping>
    Thanks in advance.
    Luis

    Hi Luis,
    Refer to links, they might be useful:
    This Assembler cannot retrieve a document specification
    This Assembler cannot retrieve a document specification
    using this type: "http://www.sap.com/abapxml#abap
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • Error in creation of purchase materials/Goods receipt against PO(FI-MM)

    Hi All,
    While processing FI - MM integration iam facing below errors,request to guide me with same
    1) While creation of purchase materials
    Valuation class 7920 not allowed for material type Raw material Message no. M3180
    Diagnosis
    The combination of values you have entered is not defined in the system.
    Procedure
    Check your entries, and choose a valid value or combination of values with F4.
    I have crossed checked in t code OMSK valuation class 7920 exists.
    2) Goods receipt against PO:
    Number range for trans./event type WE in year 2014 does not exist Message no. M7562
    Diagnosis
    The number range for document number assignment has not been maintained in the year 2014 for the transaction/event type WE.
    Procedure
    Contact your system administrator.
    in second case i have maintained number ranges in OBA7,OMBT,still iam facing with the same issue
    Regards
    Santosh

    Hi Dev,
    Thanks for your reply...yea i have done the ground work before posting this query
    but bitt confused with the post i have come across..
    Problem was occurring due to the wrong updating of raw material instead of finished goods in  MM01 (CREATION OF PURCHASE MM)
    however i have over come my 2nd issue,hopefull will over come my 1st issue also
    Thanks a lot
    Santosh 

  • Report with open Purchase orders and open Goods Receipt (without invoices)

    Dear All,
    We require a report in purchasing which will show:
    1. open purchase orders
    2. open goods receipts
    We do not want POs and GRs that have been created into invoices to be included in the report.
    At the moment we tried ME2N with RECHNUNG in selection parameters but it includes invoices. We have tried other selection parameters and reports but the results are not helpful.
    I have also checked SDN but there is no correct answer. Most of them specify the ME2N with RECHNUNG as a solution but this does not work for us.
    Any help would be appreciated.
    G.

    Hi,
    Try ME2N, Select WE101....Also Select ALV
    go to next screen....Go to change layout
    Select to be deliverd(Qty) and Value, also to be invoice(Qty) & Value.
    Hope Help U!
    Regards,
    Pardeep Malik

  • Need to specify different price on Goods Receipt than on Purchase Order

    Hi!
    My application creates Goods Receipt (object of type SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes). This Goods Receipt is based on an existing Purchase Order. Creation itself (including the reference to the Purchase Order) works well.
    The problem is that using DI API, price in a document line is always set (automatically) to the price specified on the Purchase Order line. I'm not able to set the unit price to any other value. When I assign my unit price, document is added successfully, but my unit price is ignored. Unit price specified on the appropriate line on Purchase Order is used instead.
    Thanks for help!
    Jan

    Hi! I'm using SBO 8.81. I put my C# code below. The %xxx% strings are just symbols - for simplification.
    SAPbobsCOM.Documents oPurchaseDeliveryNotes = (SAPbobsCOM.Documents)SBOCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes);
    oPurchaseDeliveryNotes.CardCode = %CARDCODE%;
    oPurchaseDeliveryNotes.DocDate = %DOCDATE%;
    oPurchaseDeliveryNotes.TaxDate = %TAXDATE%;
    bool first = true;
    while(...) {
        if(!first) oPurchaseDeliveryNotes.Lines.Add();
        oPurchaseDeliveryNotes.Lines.BaseType = (int)SAPbobsCOM.BoAPARDocumentTypes.bodt_PurchaseOrder;
        oPurchaseDeliveryNotes.Lines.BaseEntry = %DOCENTRY_OF_PO%;
        oPurchaseDeliveryNotes.Lines.BaseLine = %LINENUM_OF_PO%;
        oPurchaseDeliveryNotes.Lines.ItemCode = %ITEMCODE%;
        oPurchaseDeliveryNotes.Lines.Quantity = %QUANTITY%;
        oPurchaseDeliveryNotes.Lines.Price = %UNIT_PRICE_DIFFERENT_FROM_PO%;
        oPurchaseDeliveryNotes.Lines.Currency = %CURRENCY%;
        first = false;
    oPurchaseDeliveryNotes.Add();
    Althought the unit price on the Purchase Order is for example 7 and in my code I assign the Price property for example 9, then when the document is successfully added, I see that on newly created document the unit price is still 7 (same as on PO). Value 9 is ignored without any errors or warnings.
    When I remove the code which connects this Goods Reception with PO (i.e. assignment to BaseType, BaseEntry and BaseLine properties), created document is correct. However when there is a connection to PO, I'm unable to set different unit price.
    Do you or anybody else have explanation for this? Or do you have some piece of working code you can provide?
    THANKS!

  • Automatic creation of transfer orders from goods receipt of purchase order.

    Hi experts
    The project i am currently working on requires the following;
    When goods receipting a purchase order i have a requirement for the system to create automatic transfer orders to put the stock away into storage bins.  I am aware that the stock goes straight into the 902 area once goods receipted.  Is it possible to have the transfer orders created automatically out of 902 once the goods receipt has been posted.
    In support of this, i have made an entry in transaction OMKX for the following;
    Reference Movement Type - 101
    Movement Indicator - B (goods movement for purchase order)
    Movement Type - 101
    TR Create Transfer requirement - X
    Immed. TO Creation - A
    Addl Data - X
    Once i receipt the PO it just sits in 902 and does not create any automatic transfer orders.
    Could someone please help me
    Thanks
    Simon

    Please try to process the material document of the GR manually by LT06 in foreground to find out the root cause of the error.
    You may also want to setup the mail control (V_T321-MAILK) for immediate TO creation in OMKX. The system will send you a express message (depending on your setup) if TO creation is failed.

Maybe you are looking for

  • IBook won't download and can't delete

    I recently downloaded iBooks. Today I downloaded an iBook and it won't download properly, always freezes. I want to delete it but seems you can't because it hasn't downloaded. I deleted the iBooks app but on reinstallation it keeps trying to download

  • Facetime fails to connect

    I am trying to FaceTime with my daughter in Sweden. I am using OS 10.9.4 on a MacBook Pro with Facetime 3.0. She is using an iPad mini with the current software. The query initally goes through and says "connecting" then fails to connect. I have chec

  • Working with subPaths

    Hi, I'm having a lot of trouble with nested Data Sets. Neither subPaths on my existing Data Set, nor creating a Nested Spry Data Set are working on my page. I've linked to the .js file, but Dreamweaver CS3 doesn't seem to recognize (highlight) the Ne

  • Outline order - clarification.

    When ordering the outline for "optimal" performance, should this be based on the # of members in the outline or the # of stored members? Intuition tells me it's the number of stored members, but I would just like to clarify... In relation to that the

  • IPhoto launches with pictures showing then quits

    I am using iPhoto 4.03 with OS 10.3.9, it has never given me any problems until I installed the latest Security Update from Apple. The first time I went to launch IPhoto after the install it quit on start up, then came up with the dialog box asking i