BD20, Duplicate material document (BD20)

hi guys,
We have a IDOC number status 64 generated with barcode and quantity details(POS data) in the segments through custom programs.. when we run BD20 to post the IDOC into application then the IDOC status changes to 53 and material document and Billing document is generated ( we can check in WPER)..
but sometimes for a single IDOC we can see multiple Material documents and billing documents where the data (articles) in both the material documents are SAME..
Can some one through light on this issue plz..
reg,
nazeer

Hi Nazeer,
Is this problem come when due to some reason IDOC stuck and then reprocess .
or one shot posting .. and who much number of segment in one IDOC
you can use RWPOS_PARA_ENQUEUE in palce of BD20
Regards,
Amit Shivhare

Similar Messages

  • Duplicate material document created BD20 (POS)

    hi guys,
    We have a IDOC number status 64 generated with barcode and quantity details (POS data) in the segments through custom programs.. when we run BD20 to post the IDOC into application then the IDOC status changes to 53 and material document and Billing document is generated ( we can check in WPER)..
    but sometimes for a single IDOC we can see multiple Material documents and billing documents where the data (articles) in both the material documents are SAME..
    Can some one through light on this issue plz...
    regards,
    nazeer

    Hi Nazeer,
    Its very much possible that multiple IDOCs get generated for the same material it depends how frequently your BD20 program is scheduled, What parameters are passed to BD20. Another possibility is that same IDOC may get generated with change pointer program RBDMIDOC.
    Do you sense any Negetive impact of having the Duplicate IDOCs. I guess you just need to Ignore it.
    Regards
    Shital

  • To avoid Duplicate material entry while making sales order by VA01

    Sir / Madam,
    While making sales order by VA01 , duplicate material also accepted by system .There should be no duplicate material in sales order list.
    please suggest solution.
    Thanks.

    Hi,
    You should use userexit USEREXIT_SAVE_DOCUMENT_PREPARE in MV45AFZZ and not USEREXIT_SAVE_DOCUMENT,.The reason behind this is prepare userexit is activated just before saving the document,so at the time of saving if the logic which you will give is not satisfied then you can set warning or error in the code.
    Rewards points if useful.
    Regads,
    Amrish Purohit
    Message was edited by:
            AMRISH PUROHIT

  • Material document problem and stock not appearing

    Hi All,
    I am doing goods receipt for production order through MB31.. after completion of goods receipt system is generating material document.. but when I go to MB03 to see the material document ,system throwing following error and stock is also not visible in MMBE....
    can any body help me out why it is happening and how to resolve this...
    Thanks
    Kumar

    I can see it is an SQL error about inserting duplicate record.
    this just means that you have already a record with the same key in your data base.
    I dont really think it is the material document number, otherwise you would not get the error in transaction MB03, you would get a material document just from an older process instead.
    you have to analyze it in more detail. I hope you have an ABAPer or a basis guy or any other collegue that could help you to navigate through SM13 to find the right information. Or help you reading the dump.
    if you can read some ABAP then click the icon for ABAP Editor (F5) and it will take into the program to the statement where it failed.
    From this statement you can probably know which table is to be updated.
    if you find the failed update module then you can check via the icon for VB-Data what the values are  and you may find already a record in that table with the same values.
    Then you have to analyze why it can have the same keys.

  • IS-Retail POSDM- double posting of  material documents and billing document

    Hello All,
    I had initially posted this question in "Industries Solution General" forum. Reposting it in the appropriate forum-
    We have a nightly job for program "RWPOS_PARA_ENQUEUE" which processes all WPUBON idocs (sales info) that comes in from POSDM. Sometimes we have noticed that for one idoc 2 material documents and 2 billing documents are being created with the same information.
    Note that this happens sporadically and we have no idea why or when it can happen. Also, we have duplicate checks in POSDM and this happens only when the idoc flows into ECC from POSDM i.e. one sales idoc posts 2 sets of documents for no apparent reason. Is there any way to prevent this? Why is this happening? Your inputs will be really appreciated.
    Thanks,
    Smitha

    hi,
    Just go to FB03 click enter and then
    Company code
    Fiscal Year
    Ledger
    Document type against customer invoice DR and then if u hav an idea abt the customer invoice doc then give doc number ....other excute and search for the customer no....
    And then double click on the document
    then goto ENVIRONMENT -
    > Document over view -
    > relation ship brower click
    then you can see all the relating document to that account  i.e account doc,profitcenter doc ,material ,oytbond delivery doc ,billing doc etc...
    if useful assign points.....
    regards,
    santosh kumar

  • Automatic TO creation and confirmation for a Material document

    Hi Dear All,
    i am new to MM andWM.
    I have to customization for auto transfer orders and confirmations for material documents what ever created with 101 movement type in Inventory Management. I have down configuration like below.
    SPRO->Logistics Execution->Warehouse Management->Activities->Transfers-> Set Up Autom. TO Creation for TRs / Posting Change Notices
    Double click on ‘control data ‘tab
    Hear for my warehouse I given input like   Auto TO = ‘1’,
                                                                             AddId = ‘select check box’.
    And in ‘Assign control’ tab for 101 movement type I have given input like below.
    Automatic TO = ‘1’.
    TO item can be confirmed immed. = ‘tick checkbox’
    Propose Confirmation = ‘tick checkbox’.
    Foreground/Backgrnd = ‘D’.
    After creating of Material document I am executing report RLAUTA10 in SE38.When I execute this report system showing message like ‘TO processing finished: TR total:   17, TO created:    0, Errors:   17’.
    If I check header details of transfer requirements in LB03, i am not seeing ‘Tick Mark’ in Auto TO Creation field.
    Can any one tell me what the mistake i have down or if i need to do any further configuration. Please help me regarding this concern?
    Thanks in Advance..

    Dear Steve,
    Thanks a lot for giving reply with what I need to do, but I am unable to see result.
    I have down configuration like below even though system not processing Auto TO creation. Can you explain me if I have down any mistake below.
    Click on ‘Assign’ button,
    Press on ‘New entries’
    WhN = ‘900’
    Reference Movement Type = ‘101’
    Movement indicator = ‘B’
    Movement type for Whse Mgmt = ‘101’
    TR create Transfer Requirement = ‘X’
    Immed.TO Creation
    Mail confirmation for background processing = ‘01’.
    GR date = ‘2’

  • BAPI_GOODSMVT_CREATE - Error while posting a Material Document

    Hi Experts,
    We are  trying to do the material document posting using the transaction "MB1C" manually in SAP. The movement type which we are using for the same is "261".  While doing this is, it is asking for a work order number and the Recipient number. We gave the Recipient Number as "123". Material document is created successfully.
    Again using the same transaction  "MB1C" , we are trying to do the reversal of the material document which we posted previously against another work order number for the same material and the serial number if the material is serialised and as well as for the non serialised material.
    Both this case, in SAP the material document is created succesfully. This is done manually in SAP.
    When we are trying to create the material document using the BAPI 'BAPI_GOODSMVT_CREATE', for the above scenario, posting the material document '261' movement type for one work order and the reversal for another work order '262' movement type for the same material (whether it is a serialised or non serialised) we are getting the eror as "RE Qty. transferred exceeded 1 PC: 50,003,695 C001 USED 1200".
    We are passing the following at the item level. MATERIAL Number, Plant, STGE_LOC, ENTRY_QNT, MOVE_TYPE, BATCH, ORDERID, RESERV_NO,  RES_ITEM, ACTIVITY, XSTOB for reversal.
    We are passing the GM_CODE as '05'.
    Please let us know what needs to be changed inorder to create the material document properly without getting errors.
    Thanks in Advance,
    Mohan.

    Hi,
    We fixed this issue by removing the reservation number of the material when we are trying to post the material document with the movement type "262".
    The reason for removing the reservation number for the movement type "262"
    The reservation number is getting created against a work order when we trying to create the work order in IW32. This reservation number is used for validating the stock while we are trying to consume and doing the reversal.
    SAP is allowing us to reverse the consumed quantities only based on the reservartion number and hence we got this error.
    To fix this error, if we are trying to reverse a particular material against a different work order for which it has been consumed previiously, remove the reservation number and item number and try posting the material document.
    Hope this solution will solve your issue:)
    Thanks and Regards,
    Mohan.

  • Creation of Material Documents With Mvt Type

    On Performing Post Goods Issue (PGI) in one Plant in case of Plant to Plant Dispatches, there should be Inbound delivery created for already created Purchase Order (PO). In addition after creation of inbound delivery, there should be material document created with 103 movement. This Material document is triggered when the inbound delivery is saved. Once Warehouse processes are finished, then Post Goods Receipt (PGR) happens, so 101 Movement Type happens for Purchase Order. PGR document should trigger one more material document with 104 movements; this document is reversal for material document with 103 movement type.
    can any one suggest to enhance SAP for this?
    Moderator message : Requirements dumping is not allowed, show the work you have already done. Thread locked.
    Edited by: Vinod Kumar on Oct 21, 2011 5:18 PM

    Hi Nitin,
    Before creating the Service type of product, you have to define the Base category for Service type product. Generally the category for service will be created under the R3 hierarchy R3PRODSTYPE. You can create this category using the TCode:
    COMM_HIERARCHY. Here you have to select the product type as Service and have to assign the set types to the category.
    You can create a service product using the transaction : COMMPR01 -> Click on Service ICON -> Select the Category for Service Type. Then fill in the details for Service Product description, Service ID(Based on number range settings for products), Language.
    Also fill other details like Base Unit of measure, Pricing condition for different sales areas for the service product.
    Since you are using CRM7.0, you can do all these activities using a POWER USER role.
    For more information about Set types and hierarchies please refer the following help link:
    http://help.sap.com/saphelp_crm70/helpdata/EN/46/57672501a208e7e10000000a114a6b/frameset.htm
    Hope this helps!
    Regards,
    Chethan

  • Multiple Posting change notice created for one material document

    Hi All,
    The scenario is that the user needs to transfer material from unrestricted to quality stock type. while doing so the storage type is different than the actual storage type for the material. Meaning if the material is normally stored in high rack storage type, when it is found that the material is damaged or expired it need to be moved to the quality storage type. For this the user will first create  material document in IM with movement type 322 transferring material from unrestricted stock to qualtiy stock. A PCN will be created in back ground which will in turn be converted manually by the user to a TO. while doing so the user will pick the quant manually from the required storage type and select the destination storage type as the quality or quanranntine area.
    The issue here is that system creates one PCN for each material document line item. The requirement is that the system should create only one PCN with multiple lines for one Material document.
    The setting in the movememnt type clearly says that it will behave as it is behaving.
    Is there any other way or setting by which we can create one PCN with multiple line items for a material document.
    Would look forward to your replies.
    Regards,
    Jeetendra

    Thanks and Sorry for the delayed reply. We have now convinced the users that the system behaviour is standard and we cannot change the same.
    To your question about the need to have one PCN with multiple lines please note that the setup is such that when material document is created for transferring material from unrestricted to quality and vice versa this document is created with multiple materials in one go. Now when the PCN is to be converted to TO then the user ends up in creating number of TO's equal to the number of lines in the Material Document. We wanted to avoid this and hence this was posted in SDN.

  • STO - Excise tab not getting displayed in material document after posting.

    Dear all,
    We are facing an STO issue where in after we have done the receipt at the receiving plant with excise, the excise tab does not display in the GR material document.
    It is plant to plant stock transfer with excise, the process that we are following as given below:
    1) STO PO - ME21N
    2) Outbound delivery - VL10B - Post PGI in VL02N
    3) Outgoing excise invoice - J1IIN  - With the key DLFC.
    4) GR - MIGO with excise invoice capture.
    During GR posting in MIGO screen the system does display the excise tab, we enter the outgoing excise number and the corresponding values appear in BED, ECS and HCES. We post the GR material document.
    But after posting the material document if we display the same GR material document it does not show the excise invoice tab. And since we are not having part 1 entry number we are not able to post the part 2 entry in J1IEX.
    Request to please do let us know if we have missed out on any configuration or master data.
    Regards,
    mahesh.

    Hi,
    Do the all customization setting for CIN for reference check the following link for India. and Material management
    http://help.sap.com/bp_bblibrary/600/BBlibrary_start.htm
    You have to maintain Excise master data for material,vendor and PLant in J1ID .
    reward if helpful,

  • Material Document is not generated in PGI

    Hi,
    Iam doing PGI i am not getting Material document number and i went to MB51 there also i am not any document number is there any customizing settings for the material document
    thanks
    seshu

    Hi,
    Check the material, it might be service material, go to material master in MM02 and check the Item category group and check weather it to be LEIS "Service with delviery" if it is then PGI will be done but not material doc will be generated
    Second:- Check weather material is maintained as Non-Valuated, and check weather Accounting1 view is maintained or not
    if not maintained then maitain standard price and valuation control there
    Regards
    Shambhu Sarkar

  • Standard report for material document with excise

    Dear Gurus,
        Is there any standard report for which i can trace for all the incoming material grn whether excise is captured or not.
        i.e) a report with excise no, quantity and material document   
        thanks in advance
    Vasanth

    Hi,
    J1i7 is the standard report which shows wether the part1 or part2 is posted or no posting is done, you can select the layout as per your choice by change layout.
    Thanks,
    Vinay

  • Find Material Document with Movement type 103 for material document 105

    Hi experts,
    In PO History, I have three line items with movement type 103 (Blocked Stock) and one with movement type 105 (From blocked stock to unrestricted stock). I would like to know the material document with movement type 105 document that has the movement type 103.
    Regards,
    Abdullah

    Hi,
      you can get the material documents (mblnr) for the movement type(bwart) in table AUFK.
    But i think you need to pass some other data along with bwart like matnr or aufnr for getting the correct mblnr.
    Regards,
    Chaitanya

  • Report for material documents with storage location

    Hi gurus,
    I would like to know if there is a report to display material documents but in the same screen display storage location from and storage location dest.
    Thanks for your help.
    Regards.

    Hi,
    You can use MB51 or MB59 with customised layout selection for your requirement.
    With regards,
    Ajay.

  • Regarding : Material document data and PO data do not match (Plant)

    Hi Gurus,
    Please go through this BAPI program.
    While uploading it is giving an error ' Material document data and PO data do not match (Plant) '.
    Please help regarding this issue.For all Other moment types it is working fine except this 351 moment type.
    dATA: i_excel TYPE truxs_t_text_data. "work table for excel upload
    DATA: BEGIN OF it_itab OCCURS 100,
          docdate(10),
          postdate(10),
          mvt_type(3), "Movement Type
          plant(4), "Plant
          lgort(4),
          pur_doc(10), "Purchase Document No
          po_item(3), "Purchase Document Item No
          material(18), "Material Number
         delnote(16),
          erfmg(13),
          uom(3),
         lfmng(13), "Quantity
          batch(10) TYPE c,
          vfdat TYPE vfdat,
          END OF it_itab.
    DATA: it_goodsmvt_head TYPE TABLE OF bapi2017_gm_head_01      INITIAL SIZE 100,
          it_goodsmvt_code TYPE TABLE OF bapi2017_gm_code         INITIAL SIZE 100,
          it_goodsmvt_item TYPE TABLE OF bapi2017_gm_item_create  INITIAL SIZE 100.
    DATA: wa_goodsmvt_head LIKE LINE OF it_goodsmvt_head,
          wa_goodsmvt_code LIKE LINE OF it_goodsmvt_code,
          wa_goodsmvt_item LIKE LINE OF it_goodsmvt_item.
    DATA: w_mat_doc  TYPE bapi2017_gm_head_ret-mat_doc,
          w_year     TYPE bapi2017_gm_head_ret-doc_year.
    DATA: BEGIN OF it_errmsg_goodsmvt OCCURS 10.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF it_errmsg_goodsmvt.
    DATA : obj_type LIKE bapiache09-obj_type,
           obj_key  LIKE bapiache09-obj_key,
           obj_sys  LIKE bapiache09-obj_sys.
    DATA: v_date1 TYPE sy-datum.
    DATA: v_date2 TYPE sy-datum.
    DATA: w_lines TYPE i.
    DATA: errflag.
    SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-100.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK bk1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    Start-of-selection processing
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_line_header        = 'X'
          i_tab_raw_data       = i_excel
          i_filename           = p_file
        TABLES
          i_tab_converted_data = it_itab[]
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT it_itab.
        REFRESH it_goodsmvt_head.
        REFRESH it_goodsmvt_item.
        CONCATENATE it_itab-docdate6(4) it_itab-docdate3(2) it_itab-docdate+0(2) INTO v_date1.
        CONCATENATE it_itab-postdate6(4) it_itab-postdate3(2) it_itab-postdate+0(2) INTO v_date2.
        wa_goodsmvt_head-pstng_date = v_date2.
        wa_goodsmvt_head-doc_date   = v_date1.
       wa_goodsmvt_head-ref_doc_no = it_itab-delnote.
    wa_goodsmvt_head-pr_uname   = sy-uname.
        APPEND wa_goodsmvt_head TO it_goodsmvt_head.
    Maintain it_goodsmvt_code
        wa_goodsmvt_code-gm_code    = '04'.
    Maintain it_goodsmvt_item
    *LOOP AT it_itab.
    IF wa_goodsmvt_item-po_number IS INITIAL.
        wa_goodsmvt_item-po_number    = it_itab-pur_doc.
        wa_goodsmvt_item-move_type    = it_itab-mvt_type.
        wa_goodsmvt_item-MOVE_PLANT      = it_itab-plant.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = it_itab-material
          IMPORTING
            output = it_itab-material.
        wa_goodsmvt_item-material     = it_itab-material.
        wa_goodsmvt_item-stge_loc     = it_itab-lgort.
        wa_goodsmvt_item-po_item      = it_itab-po_item.
        wa_goodsmvt_item-entry_qnt    = it_itab-erfmg.
        wa_goodsmvt_item-ENTRY_UOM_ISO    = it_itab-uom.
       wa_goodsmvt_item-po_pr_qnt    = it_itab-lfmng.
        wa_goodsmvt_item-batch        = it_itab-batch.
        wa_goodsmvt_item-expirydate   = it_itab-vfdat.
       wa_goodsmvt_item-NO_MORE_GR   = 'X'.
        wa_goodsmvt_item-mvt_ind      = 'B'.
        APPEND wa_goodsmvt_item TO it_goodsmvt_item.
        CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header  = wa_goodsmvt_head
            goodsmvt_code    = wa_goodsmvt_code
          IMPORTING
            materialdocument = w_mat_doc
          TABLES
            goodsmvt_item    = it_goodsmvt_item
            return           = it_errmsg_goodsmvt.
    Process of commit work
        IF it_goodsmvt_head[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_head LINES w_lines.
        ENDIF.
        IF it_goodsmvt_item[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_item LINES w_lines.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
        IMPORTING
        RETURN        =
          CLEAR errflag.
          READ TABLE it_errmsg_goodsmvt INDEX 1.
          IF it_errmsg_goodsmvt-type EQ 'E'.
            WRITE:/'Error in function', it_errmsg_goodsmvt-message.
            errflag = 'X'.
          ELSE.
            WRITE:/ it_errmsg_goodsmvt-message.
          ENDIF.
          IF errflag IS INITIAL.
            COMMIT WORK AND WAIT.
            IF sy-subrc NE 0.
              WRITE:/ 'Error in updating'.
              EXIT.
            ELSE.
              WRITE:/ 'Material Document created successfully and the Document Number for the Material',
                      wa_goodsmvt_item-material,'is:', w_mat_doc, w_year.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.

    Hey,
    Just wanted to post that in my case this was the error of MVT_IND field in item table. When I made it from 'B' to blank then it worked.
    Mine is solved....
    Thanks

Maybe you are looking for