BAPO_PO_CREATE1 giving errors while creating PO by uploading a file?

Hi,
  when i am creating Purchase Order using BAPO_PO_CREATE1 by uploading a File, it is giving below errors
1-> No instance of object type PurchaseOrder has been created. External reference:
2-> PO header data still faulty
3-> No master record exists for vendor 100017
4-> Vendor 100017 does not exist
5-> Can delivery date be met?
and i passed data to bapi as below
CONSTANTS: c_x              TYPE  c         VALUE 'X',
           c_err            TYPE  bdc_mart  VALUE 'E'.
*Structures to hold PO header data
DATA : header  LIKE  bapimepoheader   ,
       headerx LIKE  bapimepoheaderx .
*Internal Tables to hold PO ITEM DATA
DATA : item   LIKE bapimepoitem  OCCURS 0 WITH HEADER LINE,
       itemx  LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE,
*Internal table to hold messages from BAPI call
       rettab LIKE bapiret2         OCCURS 0 WITH HEADER LINE.
DATA:   bapi_err_count TYPE i,
        bapi_warnings  TYPE i,
        ponumber LIKE ekpo-ebeln,
        item_num   LIKE ekpo-ebelp.
DATA : BEGIN OF i_dbtab OCCURS 0,
       bukrs LIKE ekko-bukrs, " company code
       bsart LIKE ekko-bsart, " Po document type
       bedat(10) TYPE c, " po document data
       lifnr LIKE ekko-lifnr, " vendor
       ekorg LIKE ekko-ekorg, " Purchase organisation
       ekgrp LIKE ekko-ekgrp, " Purchase group
       currency like ekko-waers,
       item like ekpo-ebelp,
       matnr(18) TYPE n, " Article
       werks LIKE ekpo-werks, " Werks
       mat_grp type matkl,
       menge(10) TYPE c, " Menge
       netwr type BAPICUREXT.  " nat value
DATA : END OF i_dbtab.
DATA : wa_dbtab LIKE i_dbtab.
                     SELECTION-SCREEN DESIGN                         *
PARAMETERS: p_file LIKE rlgrap-filename MEMORY ID m01 OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
      mask      = ''
      static    = ''
    CHANGING
      file_name = p_file.
START-OF-SELECTION.
  PERFORM f_file_upload.
  IF i_dbtab[] IS NOT INITIAL.
    PERFORM f_po_create.
  ENDIF.
*&      Form  f_file_upload
FORM f_file_upload .
  CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
      filename                = p_file
      filetype                = 'DAT'
    TABLES
      data_tab                = i_dbtab
    EXCEPTIONS
      conversion_error        = 1
      file_open_error         = 2
      file_read_error         = 3
      invalid_type            = 4
      no_batch                = 5
      unknown_error           = 6
      invalid_table_width     = 7
      gui_refuse_filetransfer = 8
      customer_error          = 9
      no_authority            = 10
      OTHERS                  = 11.
  IF sy-subrc <> 0.
    MESSAGE e004 WITH 'File upload Failed'.
  ENDIF.
ENDFORM.                    " f_file_upload
*&      Form  F_po_create
FORM f_po_create.
  DATA : cc TYPE i,
         l_lifnr LIKE lfa1-lifnr.
  LOOP AT i_dbtab INTO wa_dbtab.
    cc = cc + 1.
    IF cc = 1.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = wa_dbtab-lifnr
        IMPORTING
          output = l_lifnr.
*POPULATE HEADER DATA FOR PO
      header-comp_code = wa_dbtab-bukrs.
      header-doc_type   = wa_dbtab-bsart.           "Standard Order
      header-creat_date = sy-datum.
      header-vendor     = wa_dbtab-lifnr.
      header-purch_org  = wa_dbtab-ekorg.
      header-pur_group  = wa_dbtab-ekgrp.
      header-currency = wa_dbtab-currency.
*POPULATE HEADER FLAG.
      headerx-comp_code  = c_x.
      headerx-doc_type   = c_x.
      headerx-creat_date = c_x.
      headerx-vendor     = c_x.
      headerx-purch_org  = c_x.
      headerx-pur_group  = c_x.
      headerX-currency = c_x.
     headerX-currency_iso = c_x.
    ENDIF.
*POPULATE ITEM DATA.
    item-po_item  = wa_dbtab-item.
    item-material = wa_dbtab-matnr.
    item-plant    = wa_dbtab-werks.
    item-matl_group = wa_dbtab-mat_grp.
    item-quantity = wa_dbtab-menge.
    item-net_price   = wa_dbtab-netwr.
    APPEND item.
    CLEAR item.
*POPULATE ITEM FLAG TABLE
    itemx-po_item    = wa_dbtab-item.
    itemx-po_itemx   = c_x.
    itemx-material   = c_x.
    itemx-plant      = c_x .
    itemx-matl_group = c_x.
    itemx-quantity   = c_x .
    itemx-net_price  = c_x.
    APPEND itemx.
    CLEAR itemx.
  ENDLOOP.
  CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
      poheader         = header
      poheaderx        = headerx
    IMPORTING
      exppurchaseorder = ponumber
    TABLES
      return           = rettab
      poitem           = item
      poitemx          = itemx.
  PERFORM f_bapi_errors.
  IF bapi_err_count = 0.
    PERFORM bapi_commit.
     PERFORM f_bapi_errors.
    WRITE: 'Created Po no:', ponumber COLOR 5.
  else.
    PERFORM bapi_commit.
  ENDIF.
ENDFORM.                    " F_po_change
      FORM f_bapi_errors                                            *
FORM f_bapi_errors.
  CLEAR: bapi_err_count, bapi_warnings.
  LOOP AT rettab.
    CASE rettab-type.
      WHEN 'S' OR 'I'.
      WHEN 'W'.
        ADD 1 TO bapi_warnings.
        WRITE rettab-message COLOR 3.
      PERFORM zjnc_dump_list  USING 'RETTAB[]' 'RETTAB' 'Bapi Errors Table'.
      WHEN OTHERS.
        ADD 1 TO bapi_err_count.
        WRITE rettab-message COLOR 6.
     PERFORM zjnc_dump_list  USING 'RETTAB[]' 'RETTAB' 'Bapi Errors Table'.
    ENDCASE.
  ENDLOOP.     " LOOP AT RETTAB
IF bapi_err_count <> 0.
   MESSAGE e999 WITH 'Note Messages and inform SAP Support'.
ENDIF.
  REFRESH rettab.
ENDFORM.                    "f_bapi_errors
*&      Form  bapi_commit
FORM bapi_commit.
commit the changes
  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
      wait   = 'X'          " COMMIT WORK AND WAIT
    IMPORTING
      return = rettab.      " Confirmations
ENDFORM.                    "bapi_commit
can anyone me how to solve it.

HI,
Also 'Can delivery date be met ' is the usual information meesage u get when u give date atleast a day after today as date .
Write an inner join for vendor master table and the PO details
(Which is also a recommened way of checking  value from master table all the time )

Similar Messages

  • Giving error while creating a sales contact for the previous year (2008)

    Hi Friends,
    We are currently with SP12. When we try to create a sales contract for the previous year it is giving error like "Schedule line is for the item 100 cannot be after the order's latest delivery date".
    i tried debugging and found that that there is a rule created for this (in SP12). I commented the rule and tried to create a contract but, again got an error "Error while saving". This error I can't catch while debugging.
    I even didn't find where the schedule line date and header cancel dates are set so that I can change the dates manually.
    If any one has any idea, kindly help me.
    Best regards,
    Swarna Seeta

    Hi Wolfhard,
    Thanks for the reply.
    You are right and I have uncommented the line which assigns true to the return value and the contract got saved now.
    Thank you so much.
    I just want to know whether commeting this rule effects any of the functionalities of the sales contract.
    Best regards,
    Swarna Seeta

  • Error while Creating External definition with WSDL file

    Hi ALL,
    I need to create a External defination with a WSDL file in PI 7.1.so i selected the Option WSDL & From all available message defination while creating External defination  & imported the WSDL file.
    I am getting an error
    javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.sap.aii.utilxi.wsdl.api.WsdlHandler.parseWsdlWithOrderRearrange(Lcom/sap/aii/utilxi/xml/xdom/XElement;Z)Lcom/sap/aii/utilxi/wsdl/api/Wsdl; java.lang.RuntimeException: java.lang.NoSuchMethodError:
    Note : i checked the WSDl file in altova its no error's ,i know there is no problem with the WSDL file ,i tried importing the same in other XI 3.0 system it has no problem.
    help me in solving this ..
    Regards
    Shakeif

    Hi Tony,
    Somehow I solved this issue. I dont remember what exactly I did, as it was sometime back in December. I think I used the Wizard initially to do the configurations in Solution Manager and again i tried to do the same manually as the earlier one threw some errors.
    It seems the wizard proceeded half-way through and hence the entry was made in the database already and hence that error.
    Anyways thank you for replying me.
    best regds,
    Alagammai.

  • DMS Connector error while creating folder and uploading document.

    Hi,
    I have configure DMS connector on Portal with ECC. We are able to see /dmsrm -->Dynamic folder and also variant available in ECC and files in variant.
    When i try to create new folder in variant, i am unable to create folder . It give me error.
    The item could not be created because an exception occurred in the framework
    Also i get same errror when i upload new document in same variant.
    Please help out.
    Regards
    Biren

    Hi Biren,
    Is your issue resolved?
    Even I am not able to upload/create documents.
    One thing I learnt is you can not create/upload files at the variant level.
    You need to create a subfolder under the variant and then you cna create/upload files.
    But for me at the subfolder level I am getting "No document Type Specified error"
    Regards,
    rao

  • Newly instlled system giving error while creating GL

    Dear all,
    While I am trying to post GL I am getting error;
    "Msg No F1030, Functional module FMFK-FIKRS-READ"
    Parameters;
    "IP_FIKRS_FMA_OBJNR"
    Can any body suggest me how to rectify this problem.
    Regards,
    NSB

    Can u explain it..and Text of Error.

  • Error while creating process chain for flat file loading

    Hi All,
    I had Created a process Chain to load Transactiion data(Full load) form flat file which is in my computer.
    start>Load>DTP>DeleteIndex>DTP loading CUBE--> Create Index
    but the system is throwing an error as "An upload from the client workstation in the background is not possible."
    I dont know why this error is coming?
    Can some one help me
    Regards
    Mamta

    Hi Mamta,
    Basically if you want to load the DS through FF using process chain, the FF has to be placed in Application server. We cant load the FF when it is located in the client local workstation(FF On your PC).
    So better you remove the Infopackage step from the PC. Load the IP manually. Once it is completed you can start the process chain with the following steps:
    start>DTP>DeleteIndex>DTP loading CUBE> Create Index
    Hope it is clear & helpful!
    Regards,
    Pavan

  • Error while creating a report from personal files.

    Hi All,
    We are trying to insert a report from excel file( Env BO XIr3 Desktop intelligence)
    Poping up with error "Too many data to display"
    Is there any data limit or data size limit or no of rows limit.
    Thanks in advance...

    Hi Rachna,
    Can you try one thing can you restrict the values to less then 16000 to check the behavior.
    What is the excel version is it 2007 Excel.
    Are you  trying to use an excel sheet which have more then 256 columns 
    Regards
    Kultar

  • Error while creating a Development plan template

    Hi Gurus,
    I am facing errors  while creating Development Plan Template.
    This is how it goes :
    When i click on Define Forms for Talent Assessment --> a wizard pops up & i select Development Plan :
    In first step, I am giving Title,Integration with SAP Learning Solution (check) & a rating scale.
    Now after clicking next, I am adding 2 development areas :
    1) Training
    2) Mentoring,
    now as soon as I'm clicking on End Configuration, It displays 2 errors & 1 warning message :
    error1 : Element Appraisal Template 'XXXXX' contains errors.Cannot change status.
    error2 : Value type 000000XXX of value class Q does not exists
    Warning 1 : You have maintained a description that is not displayed.
    In PHAP_CATALOG, when I'm trying to manually release the Criterion Group (VB) or Appraisal template (VA), it does not allow me to do it.
    Kindly let me know how to proceed further.
    Regards
    bharti

    Hi,
    Even though it gives the error,the new RTF template is uploaded and it is reflected when I query the template again.
    But when I run the Concurent program and see the output,the output still shows me the old template.
    Regards
    Jujaar

  • Error while creating product group

    hi,
    i am getting error while creating Product group.
    Required parameters missing when calling up module
    Message no. M3749
    Please suggest me.. how to cop this
    Regards,
    amit

    Dear Brahmankar,
    I am using product groups in SOP as well as in the normal plannning scenario.In the normal planning scenario I am giving my PIR's in MD61 for the entire group.Then I am running MRP in MD02 for my product group.System is generating all the requirements normally for the entire group .
    Please suggest me , this process is correct or it will create any problem in any module .
    Thanks & Regards
    Prabhakar

  • Error while creating table "EDISEGMENT' entry 'BIC/CIBA0PLANT_ATTR

    While loading master data for 0PLANT, its giving me following error.
    "error while creating table "EDISEGMENT' entry 'BIC/CIBA0PLANT_ATTR"
    Please help me out.
    Thanks

    steve,
    Can you give the solution you used to correct this problem?
    This error occurred in BW during import.
    Raj.

  • Error while creating the structure

    hello friends,
    i have two doubts
    1)
    i am getting the error while creating the structure in se11.
    well i am creating the structure in the following way
    in component i am giving the values as bom and in component type i am giving the value as meins.
    i am getting the status warning message as the below
    'field name does not agree with the proposed name base_bom for bapi table'
    2)
    and more over can we create the structure as the follwing in se11.
    component = f1 and
    component type =  tablename-fieldname
    when i am doing in the second way i am getting the error as the following table is not active though the table is active

    hi guru,
    just component name as --- your field name.
    where as component type as give just data element k.
    no need to give tablenme-fieldname k.
    component         component type .
    f1                        matnr----
    data element
    thanks anji.
    Moderator message: please do not use SMS speak, what does that "k" mean, short for "OK"? please get your act together, these are professional forums.
    Edited by: Thomas Zloch on Nov 15, 2010 9:10 AM

  • Error while creating SO w/r to quotation

    Hi All,
    When I create a sales order with reference quotation the following error occurred. In selection list also Quotation number was not displayed.
    Copying is not possible because an entry is missing in Table TVCPL: LO TA TAN
    Waiting for ur replies
    Regards,
    Ganesh
    Edited by: KAGaneshbabu on Jul 15, 2011 7:28 AM

    Dear Ganesh Babu,
    Eventhough you have mentioned that you are copying from quotation to sales order,the error message you have given suggests thats you are facing the error while creating the delivery as  TVCPL is the table for copying from sales order to delivery.
    Hence kindly check in VTLA giving your document types (sales order and delivery) and check whether your item category TAN is included.
    If not , check OR-LF copying control and you will find TAN.
    Create a new entry for item category, enter TAN and maintain the same settings as you see in OR-LF copying control.
    Check and revert back.
    Thanks &  Regards,
    Hegal K Charles

  • Source sys Restore "error while creating table EDISEGMENT "

    Dear All,
    I am Basis person and recently we have refreshed data of Test BI system from Development BI system. we normally carry out these Refresh but In this case we have also changed Hostname and SID for Test BI system.
    We have done all BW refresh steps as per guide and during Restore of source system we
    are getting errors during datasource activation as  " error while creating table EDISEGMENT ".
    we have checked RFC and Partner profiles and working fine.
    We have 2 clients connected from source system to our Test BI box.strange thing is we got one source system activated without any errors and for second
    source system we are getting above mentioned error.
    We have reviewed notes 339957 , 493422 but our BI fuctional team is not sure whether
    those apply to our OLTP system , as one source system from same OLTP system got
    successfully activated and source system for other client giving this issue .
    Please help us out with this problem.
    we are running on BI 7.0 platform and ECC 6.0 for source.
    Regards,
    Rr

    check the relevant profiles in We20 t code and also in sm59 if the remote connection with autorisation is sucssessfull, connection is ok otherwise you need to check th paramters.
    hope this helps
    regards
    santosh

  • Error while creating table 'EDISEGMENT' entry '/BIC/CIBB0DISTR_CHAN_TEXT'

    When I am activating the transfer rules of 0divison_text giving me the error
    Error while creating table 'EDISEGMENT' entry '/BIC/CIBB0DISTR_CHAN_TEXT'
    Message no. EA201
    Diagnosis
    An attempt was made to create the entry '/BIC/CIBB0DISTR_CHAN_TEXT' in table 'EDISEGMENT'. The attempt failed.
    System Response
    The operation was canceled.
    Procedure
    Please check whether the relevant entry already exists.
    I have checked the note 493422 but I did not understand it can any one help me in this
    I am  working on 7.o with  SP SAPKW70010

    Hi Priya,
    Delete entries for the data source in ROOSGEN,  EDISEGMENT and EDSAPPL tables, both on ECC and BI sides.
    Try activating the infosource again.  This should solve your problem.
    Sasi

  • Serial number error while creating the production order

    Hello frds,
    I am getting the following error while creating the production order.
    "Item 000000 requires exactly 100 serial numbers for the asset".
    If i give 100 serial numbers in the order, the error is solved. But i do not want to assign 100 serial numbers, i want to assign only 2 numbers.
    I have tried using the new serial number profile also, but it is giving same error.
    Kindly guide.
    Regards,
    Narendra Bora

    Dear Narendra
    Select the serial number profile and go to serialization procedure and set the ser. usage status 02 - Optional as below.
    Procd Procedure description Ser.Usage
    PPRL PP order release 02
    since the serail number creation is optional for order relase this will allow you to relase with out error and with serail number assigned in partial.
    Regards
    Soundar

Maybe you are looking for

  • I want to know why all of the music that is still on my iphone is not on my itunes acct and how I can get it all on there?

    For some reason all of the music on my iPhone is no longer on my iTunes account.  I have done a down load and quite a bit of it has been added to the itunes account, but there is still quite a bit of music that is still not on the iTunes that I have

  • Gnome 3.8 - nautilus crashes gnome-shell

    Hi, I have a problem on two users where by once opening nautilus, the shell crashes and then re-blinks in and recovers some times, and sometimes I get a grey screen saying I need to logout. I did a complete removal of gnome 3.6, and then removed all

  • How to remove the letters from the Application vie...

    Hi, Just got my new Lumia920 yestarday in AbuDhabi and very happy with it. ok, it was showing the application and all setting one below eachother, after i download any software from the Market, a letters comes up and make my apps in like a group (lik

  • CIF Queue Error

    Dear All After transfering the data from R/3 to APO system it going in error mode as show in transaction code /N/SAPAPO/CQ. But after selecting and activating the , it is clear and updating the APO Tables. Can it be automatic, please suggest the solu

  • A modern MIDI - Please reach new Cubase's standards

    From the Steinberg site, regarding the 3.1 update (which by the way is free). I think those features would be GREATLY needed by us Logic (and midi instruments) users. "For existing Cubase SX3 customers, the update to 3.1 brings major new developments