Problem in FB60 bapi

Hi friends ,
i m developing a prog with bapi of FB60 it always fire the error no 014
i.e.
FI/CO interface: Line item entered several times
i am feeding the data which is given below in the BAPI .
Please help me if anybody has worked on this BAPI
w_item = w_item + 1 .
t_headerdata-COMP_CODE = 'BAI' .
t_headerdata-PSTNG_DATE = sy-datum.
t_headerdata-BUS_ACT = 'RFBU' .
t_headerdata-USERNAME = sy-uname .
t_headerdata-HEADER_TXT = 'ABCsk123' .
t_headerdata-COMP_CODE = 'BAI' .
t_headerdata-DOC_DATE = sy-datum .
t_headerdata-PSTNG_DATE = sy-datum .
t_headerdata-FISC_YEAR = '2007' .
t_headerdata-DOC_TYPE = 'KG' .
t_headerdata-REF_DOC_NO = 'ABCsk123' .
append t_headerdata .
t_currency-itemno_acc = w_item .
t_currency-CURRENCY = 'IDR' .
t_currency-AMT_DOCCUR = '1000' .
t_currency-curr_type = '00'.
append t_currency .
t_accntgl-ITEMNO_ACC = w_item .
t_accntgl-GL_ACCOUNT = '0000619999' .
t_accntgl-COMP_CODE = 'BAI' .
t_accntgl-BUS_AREA = 'JA01' .
t_accntgl-PLANT = 'JA01' .
t_accntgl-doc_type = 'KG' .
t_accntgl-FISC_YEAR = '2007' .
t_accntgl-PSTNG_DATE = sy-datum.
append t_accntgl .
t_ACCOUNTPAYABLE-ITEMNO_ACC = w_item .
t_ACCOUNTPAYABLE-VENDOR_NO = '0000108521' .
append t_ACCOUNTPAYABLE.
Please help as this is very urgent

Shouldn't you be incrementing "w_item" before adding in the accounts payable line item... and specifying the t_currency entry for it too?
Jonathan

Similar Messages

  • Problem with mutiple BAPI calls during the commit

    Hi all,
    I am trying to create accounts for a given partner i the transaction F9K1 using the BAPI BAPI_BKK_ACCNT_CREATE. After calling the BAPI I am committing it too.
    The problem is if I try to create multiple accounts like RCA, ACA, MCA, IOE and so on, the first time the BAPI is called to create RCA account it is successful an it is even committing. When I call the BAPI to create the the ACA account the return table from the BAPI shows success message but the commit fails. If I restart the program and try creation of accounts now the RCA will throw a error msg saying account already exist, ACA account will be created and then the MCA account creation fails in the same manner explained above.
    I see the issue is with multiple BAPI calls and I tried using all sort of methods like clearing buffers, start new task in local and wait command and all.  But none of them seems to be working for me.
    Can anyone please guide me on how I can overcome this problem.
    Thanks.

    BAPI :
    BAPI BAPI_BKK_ACCNT_CREATE
    Functionality
    Use this method to create an account in Bank Customer Accounts. This method returns the following values:
    Identification details for the newly created account such as the internal and the external account number, and the bank area details
    A table containing error messages
    To create an account by using this method, you must specify values for the import parameters Bank Area (BANKAREA) and Product (PRODUCTNAME).
    Note: You must also specify a value in the External Account Number (EXTERNALACCOUNTNR) parameter if you have defined an external number range for the bank .
    REgards,
    Jayan.

  • Problem with a BAPI collecting dunning levels

    Hello all experts,
    I am having a problem with BAPI “DebtorCreditAccount” (called from a VB program), collecting dunning levels.
    The BAPIs is called like follows (only the essential code is shown):
    The first function (GetCustomerCurrentBalance) works fine but the second (GetCustomerHighestDunningLevel) doesn’t work.
        Public Function GetCustomerCurrentBalance(ByVal strCustomerID As String) As Decimal
            Dim objARAccount, objReturn, objActualBalance As Object
            Try
                objARAccount = Me.p_sapBapi.GetSAPObject("ARAccount", "1000", Me.ConvertCustomerID(strCustomerID))
                objARAccount.GetCurrentBalance(Return:=objReturn, ActualBalance:=objActualBalance)
                Return CType(objActualBalance.Value("TOTAL_BAL"), Decimal)
            Catch ex As Exception
                Return 0
            Finally
                objARAccount = Nothing : objReturn = Nothing : objActualBalance = Nothing
            End Try
        End Function
        Public Function GetCustomerHighestDunningLevel(ByVal strCustomerID As String) As Integer
            Dim objDebtorCreditAccount, objReturn, objHighestDunningLevelD As Object
            Dim objTEST1 As Object
            Try
                objDebtorCreditAccount = Me.p_sapBapi.GetSAPObject("DebtorCreditAccount", Me.ConvertCustomerID(strCustomerID), "0001")
                objDebtorCreditAccount.GetHighestDunningLevel(Return:=objReturn, HighestDunningLevelD:=objHighestDunningLevelD)
                Return CType(objHighestDunningLevelD.Value("DUNN_LEVEL"), Integer)
            Catch ex As Exception
                Return 0
            Finally
                objDebtorCreditAccount = Nothing : objReturn = Nothing : objHighestDunningLevelD = Nothing
            End Try
        End Function
    The error message I get is:
    Message: The runtime object of type DebtorCreditAccount with the persistent key 00000480060001 could not be created in the Business Object Repository.
    Message-Nr: 826
    Workarea: OL
    R/3 error message: Object does not exist
    Please give me some input on how to proceed!
    Best Regards,
    Niklas

    Thanks Vijaya for your fast reply. The parameters that I am giving as input are however correct.
    I have investigated the problem a bit further and tried some other calls.
    If I just chose to create an object of the type “DebtorCreditAccount” (without submitting any parameters) and then use the same method call as before (se code in topic above) I get the following error: “Mandatory parameter HIGHESTDUNNINGLEVELA missing.” This must mean that it knows that something is missing.
    objDebtorCreditAccount = Me.p_sapBapi.GetSAPObject("DebtorCreditAccount")
    objDebtorCreditAccount.GetHighestDunningLevel(Return:=objReturn, HighestDunningLevelD:=objHighestDunningLevelD) 
    If if add the mandatory parameter “HIGHESTDUNNINGLEVELA” I get the error message "The persistent key for an business object instance of type DebtorCreditAccount has not been set. Cannot invoke method GETHIGHESTDUNNINGLEVEL”. This I interpret as the object has not been right instantiated. This brings me back to square one.
    objDebtorCreditAccount = Me.p_sapBapi.GetSAPObject("DebtorCreditAccount")
    objDebtorCreditAccount.GetHighestDunningLevel(HIGHESTDUNNINGLEVELA:="0", Return:=objReturn, HighestDunningLevelD:=objHighestDunningLevelD)
    Grateful for a response!
    Regards,
    Niklas

  • Problem of calling BAPI to release transport request

    Dear Friends,
    I want to automatically release Transport Request using BAPI (BAPI_CTREQUEST_RELEASE), but I met a difficult during the process that only TR TYPE 'K'or 'W' can be release using this BAPI, if I create an addon program which TR Type is 'S' (stand for Development/Correction), then this BAPI does not work. 
    BTW, you can refer table E070.
    Could you please kindly give me some idea to solve this problem?
    Thank you in advance.
    Best regards,
    Nick

    Dear Li Nick,
    The reason that you cannot release a request of type 'S' is that type 'S' names a local correction, which cannot not be transported (and therefore of course not released).
    Regards, Tino

  • Problem in mapping-BAPI to file.

    Hi all,
    I am working on an bapi to file scenerio.My requirement is 2 files need to created in the target ,
    First file has the payload and its name(filename) needs to hav message id.
    Second file is a catalog file which only holds the name of the first file(Howmany ever file are reaching target,this file wil hav names of all those files.).
    I have used multi mapping wherein for the first structure i hav done dynamic configuration to generate filename and its wrking fine.
    For the second stucture (has only 1 field for passing filename)i wrote following UDF and mapped it
    String constant;
    java.util.Map map;
    map = container.getTransformationParameters();
    constant = (String) map.get(StreamTransformationConstants.MESSAGE_ID);
    String fileName = constant + ".txt";
    return constant;
    but now  output of the second file is empty ie the filenames of the first file is not present in it.
    Please help as its very urget.

    heyy...thanks for that, but that was a typing mistake..problem is elsewhere, i had tested by mapping that field to a constant, even then no value was present in output.
    My structure looks like below.
    Messages
       Message1
          mt_abcd
    .        field1
             field2
             field3
       Message2
          mt_abcd2
             filename
    Message1 and message2 are 2 separate files in output.
    Message1's output is correctly generated.But for message2 no output atall.

  • Problem with the bapi.

    hi ,
    i transfered legacy data to sap system using bapi.
    for that i used salesorder creation bapi.
    'BAPI_SALESORDER_CREATEFROMDAT2'.
    it is uploading my header data and item data .
    even it set the values correctly.
    but the above rfc not creating saledocument.
    where i did mistake pls rectify my problem.

    hi michel i agree with u. i called 'bapi_transction_commit' first
    after than i called bapi_saleorder_createformdat2.
    i checked in debugging modein that function module.
    it gives sy-subrc 4 for the below statement
    fbgenmac 'BAPI_SALESORDER_CREATEFROMDAT2'.
    how i will rectify this problem.
    do u want the code.
    i will send my code.
    Edited by: kartik p on Sep 22, 2008 5:00 PM

  • Problem(?) with BAPI BAPI_PRODORDCONF_CREATE_TE

    Hi everybody!
    I want to use the BAPI BAPI_PRODORDCONF_CREATE_TE to create confirmations for productionorders! I only use the recordtypes 'B10' and 'B40'.
    The problem is, that the  BAPI only creates partial confirmations, and no final confirmations.
    For the B10 I fill the following fields in the table TIMEEVENTS:
    CONF_NO - The confirmation of the prod.order.
    RECORDTYPE - Is 'B10'
    LOGDATE - The Date when the work starts
    LOGTIME - The Time when the work starts
    CONF_TEXT - A Short text to the confirmation
    TIMEID_NO - Time Recording ID Number
    PERS_NO - Personnel number
    For the 'B40' i fill following fields:
    CONF_NO - The confirmation of the prod.order.
    RECORDTYPE - Is 'B40'
    LOGDATE - The Date when the work ends
    LOGTIME - The Time when the work ends
    CONF_TEXT - A Short text to the confirmation
    TIMEID_NO - Time Recording ID Number
    PERS_NO - Personnel number
    CONF_QUAN_UNIT - Confirmation unit of measure
    YIELD or
    SCRAP Confirmation quantity
    FIN_CONF - If the confimation should be final confirmated I set a 'X', if the confirmation should be partial confirmated the field is blank!
    I fill the table TIMEEVENTS with one entry at a time and then comes the COMMIT or ROLLBACK WORK.
    I hope anyone can help me!
    regards!

    I found it out!

  • Problems with running BAPI   BAPI_SALESORDER_CREATEFROMDAT2

    Hi all,
    I’ve got a problem running BAPIs in SD invironment.
    I’m creating contract releases in SD via BAPI.
    First I run BAPI BAPISORDER_GETDETAILEDLIST in my program to get detaildata of the contract.
    Then I run the BAPI   BAPI_SALESORDER_CREATEFROMDAT2 filled with contract reference data and in addition with order data to create the contract release.This works properly so far. On both sides in the contract and in he contract release I find the correct document flow. Means: in document flow of the contract I find all the releases created . Also I find the contract in the documentflow of the releases.
    But…something does not work: In the contract the released values are not updated. When I create a release manually, the release values are accumulated  in the contract in field  ‘value released’ under flag ‘item detail’. But this does not work, when the leases are created via BAPI. However I checked several parameters in the BAPIS but I cannot find something that leads to an update .
    Can somebody help me and can tell me what is to be done to get this field updated? Thanks in advance.
    same in German...
    Ich habe ein Problem mit BAPIs im SD.
    Ich erzeuge Abrufe zum Kontrakt im SD mittels BAPIs.
    Zuerst lasse ich den BAPI BAPISORDER_GETDETAILEDLIST laufen, um mittels Kontraktnummer alle Daten zum Kontrakt zu bekommen. Dann lasse ich den BAPI   BAPI_SALESORDER_CREATEFROMDAT2 gefüllt mit SD-Abrufdaten und den Referenzdaten des Kontraktes laufen Dies funktioniert soweit sehr gut. Sowohl im Kontrakt als auch im Abruf sind jeweils die übergeordneten bzw. untergeordneten Vertiebsbelege zu sehen. Die Referenz wird also hergestellt. Jedoch wird im Kontrakt nicht die Abrufwerte aufsummiert. Normalerweise wird bei manueller Erstellung der Abrufe im Kontrakt die jeweilgen abgerufenen Werte gegen den Kontraktwert aufsummiert (Feld abgerufene Werte im Kontrakt unter Reiter ‚Positionsdetail‘. Ich habe alle möglichen Parameter im BAPI geprüft und getestet aber nichts gefunden, was mir die abgerufenen Werten aufsummiert.
    Kann mir dazu einen Tip geben, was ich tun kann, damit auch die Werte richtig referenzieren ? Danke im Voraus.

    the usage of exactly this BAPIs in the way I described  is in according to SAP note 370988.
    BAPI_SALES_DEL_SCHEDULE_CREATE ist for SD schedule agreements and not for SD contracts and does not offer Input parameters for e.g.  adding price conditions what is needed for my task.
    The field in contract I mentioned e.g. in Transaction VA42 VA43 is filled / gets its Information out of Infostructure/table S135. The BAPI seems not be able to fill this structure while creating the contract release.
    I'm looking for example an input parameter I did not found already or any other option that leads to an update of infostructure S135 while creating/posting a release via BAPI.

  • Problems to find bapi to insert itens and services ME32K

    Hi Guys,
    I need insert itens and services on ME32K transaction. I run this using the call transaction method. But, I have problems with this because the program delay very much to run. It load the data, however, delay very much.
    I am finding a bapi to load the contracts. I tried to use BAPI_CONTRACT-CHANGE, but I cannot find the parameter table where I put the line services.
    Can you help-me?!
    I am very worry with this. The client to get it.
    Patrícia.

    Hi All:
    I have found the reason why was not connecting from the NWDS, it was connection problem due to a problem with the HostName.
    I have installed both the NW ABAP 7.0 and SAP CE 7.1 on the same PC and the harder is fixing problems with the connections between servers
    I am using localhost and computer name on different places and it was causing the problem. I am still not able to see from the VC 7.1 but I am working on fixing it.
    Kind regards
    Gonzalo Pérez-Prim

  • FB60 BAPI

    Hi there ,
    can anybody please tell me if there exists any std BAPI
    for
    1) FB60 for posting
    2) FV60 for parking
    Please help as it is urgent

    Hello Shaiil,
    Check the below BAPI
    BAPI_ACC_GL_POSTING_POST or
    BAPI_ACC_DOCUMENT_POST   for the transaction FB60
    BAPI_INCOMINGINVOICE_PARK  For transaction FV60.
    If i am wrong correct me.
    Regards,
    Phani.

  • Problem in executing BAPI

    Hi all
    I am executing the bapi BAPI_PO_CREATE. I have initialized the BAPI input fields and populated with necessary inputs. But when i execute the bapi, i get no output. Output should be available in Model node Return. But i get nothing. The bapi is fine and the model input nodes also gets populated. Any help will be appreciated.
    Thanks in Advance,
    Regards
    Rakesh ;>)

    Hi All
    Sorry for the late response. Actually the problem was with assigning inputs to the model data. Its solved now and the bapi is executing. But it shows an abort message in return structure.
        Msg Type A
        Msg.no   000000
        Code     ME159
        Message  Function modules invoked in wrong sequence
    Any help will be useful.
    Thanks in Advance ;>)
    Regards
    Rakesh

  • Problem with a bapi

    Moderator message: please choose more descriptive subject lines for your posts.
    Hi,
    i face with a problem while using the bapi bapi_document_create2.
    it adds the file path like '
    Dogan\Main\Standards\0010415--P.pdf'
    but i cannot open the file in cv02n.
    And also it adds the material master elements but the description is not seen and when looked at with cv02n for material master, it asks me to 'Do you want to delete the object links? ', why i get this error?
    The file is not on desktop, it is in another server and its path like that:
    Dogan\Main\Standards\0010415--P.pdf'
    Here is my sample code(i am trying to make it run):
    (itabb is the internal table that i upload the file, tab-delimeted txt file.)
    data:
    lt_drad like standard table of BAPI_DOC_DRAD with header line,
    data like BAPI_DOC_DRAW2,
    dd like standard table of BAPI_DOC_DRAT with header line,
    dfiles like standard table of BAPI_DOC_FILES2 with header line,
    return like BAPIRET2.
    clear:lt_drad,lt_drad],data,dd,dfiles,dfiles[.
    LOOP AT itabb.
    CLEAR lt_drad.
    lt_drad-objecttype = 'MARA'.
    lt_drad-objectkey = itabb-matnr.
    APPEND lt_drad.
    data-DOCUMENTTYPE = itabb-dokar.
    data-DOCUMENTNUMBER = itabb-doknr.
    data-DOCUMENTVERSION = itabb-dokvr.
    data-DOCUMENTPART = itabb-doktl.
    data-DESCRIPTION = itabb-dktxt.
    data-WSAPPLICATION1 = itabb-dappl.
    data-DOCFILE2 = itabb-filep.
    data-DATACARRIER2 = itabb-dttrg.
    data-username = itabb-dwnam.
    data-LABORATORY = itabb-labor.
    dfiles-storagecategory = 'SAP-SYSTEM'.
    dfiles-docfile = itabb-filep.
    dfiles-wsapplication = itabb-dappl.
    APPEND dfiles.
    ENDLOOP.
    sort:dfiles.
    delete adjacent duplicates from dfiles.
    data: dtype like BAPI_DOC_AUX-DOCTYPE,
    dnumber like BAPI_DOC_AUX-DOCNUMBER.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
    EXPORTING
    DOCUMENTDATA = data
    ** HOSTNAME =
    ** DOCBOMCHANGENUMBER =
    ** DOCBOMVALIDFROM =
    ** DOCBOMREVISIONLEVEL =
    ** CAD_MODE = ' '
    ** PF_FTP_DEST = ' '
    ** PF_HTTP_DEST = ' '
    ** DEFAULTCLASS = 'X'
    IMPORTING
    DOCUMENTTYPE = dtype
    DOCUMENTNUMBER = dnumber
    ** DOCUMENTPART =
    ** DOCUMENTVERSION =
    RETURN = return
    TABLES
    ** CHARACTERISTICVALUES =
    ** CLASSALLOCATIONS =
    DOCUMENTDESCRIPTIONS = dd
    OBJECTLINKS = lt_drad
    ** DOCUMENTSTRUCTURE =
    DOCUMENTFILES = dfiles
    ** LONGTEXTS =
    ** COMPONENTS =
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'.
    endform.
    Edited by: Thomas Zloch on Jun 9, 2011 4:05 PM

    Thanks
    however i can refer to the other server's files manually, through cv01n.
    please write me about how to use this bapi?
    thanks.

  • Locking Problem while calling BAPI

    Hi ,
    I am calling a BAPI in my wd appln . if there is some problem while executing the bapi like posting period not open then i am displaying the error of the BAPI . but after that i see in the locked tables through SM12 some tables gets locked .
    so when i call the BAPI again it gives me error like the following tables are locked by the user... so is there any way by which i can release the locks hold by the bapi if problems occurs.
    Regards
    Yash

    Hi Yash,
    Try the command ROLLBACK WORK if the error occurs.
    This will remove all locks set by the BAPI.
    Regards,
    Jos

  • Problem in calling bapi

    hi
    i developed one report and one bapi (to create sale order with ref to contract) every thing working fine.
    now my client asked he want to call bapi program from report because my report output is input to bapi for this i maintained check box for every row in report and in application tool bar i maintained one key , suppose he selected one record and press on that key it should move to bapi up to this working fine .for this my logic is
    SET PF-STATUS 'ZCON'.
    At USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'BAPI'. "this is key
    CALL TRANSACTION 'ZBC'. "zbc = my bapi tcode
    endcase.
    now i have to pass selected record values to bapi input automatically so what i have to write .
    please share information
    thanks in advance
    Moderator message : Duplicate post locked. Continue with the original thread.
    Edited by: Vinod Kumar on Sep 7, 2011 10:32 AM

    Hello Bhavin,
    you have marked your question an self solved. Would be fine if you post your solution.
    Regards
    Gregor

  • Problem in Extension BAPI

    Hi All,
    I am trying to use the BAPI BAPI_BUS2001_CREATE which contains 60 user-defined fields.
    I have written the code
    T_EXTNIN-STRUCTURE  = 'BAPI_TE_PROJECT_DEFINITION'.
    ASSIGN I_BAPI_PROJ TO <FS1> .
    MOVE: <FS1>+0(240)   TO T_EXTNIN-VALUEPART1.
    MOVE: <FS1>+240(140) TO T_EXTNIN-VALUEPART2 .
    APPEND T_EXTNIN.
    CLEAR  T_EXTNIN.
    UNASSIGN: <FS1>.
    Working on ECC6.0 system.
    I got dump when the statement occurs MOVE: <FS1>+240(140) TO T_EXTNIN-VALUEPART2 .
    please suggest me the code for ECC6.0 on Extension BAPI
    Regards,
    Raju

    Hi Prabhu,
    Can you please provide your code snippet ?
    Regards
    HM

Maybe you are looking for

  • 24" iMac displaying small green lines

    I'm having a big problem with my iMac 24" when I'm using Aperture or iTunes music videos in full screen mode. I am getting groups of little green lines about an inch long and a pixel or two deep, stacked in groups of five or six on top of each other

  • Looking for a good group texting app. Any suggestions?

    hey, i'm looking for an app that lets me create a group and then have a group conversation with everyone in that group where we can all see the comments of other people. For example, if i need to talk to the family in a group conversation I want to c

  • Problem with SF

    Hi all, I have a problem with SmartForms i.e i have developed a SF that contains 3 form pages these 3 pages contain Terms and Conditions in back side if i give &SFSY-FORMPAGES& it is giving 1/6,2/6 ....6/6   but my requirement is it should display on

  • Photoshop cs5 is having trouble loading.

    PS CS5 is having trouble loading getting hung on reading preferences.  This started after I imported many patterns.  Can anyone help me fix this issue?

  • Dreamweaver using wrong directory for root

    I following problem occurs with Dreamweaver CS4 and CS5.5 running under Windows Vista. A site is defined in Dreamweaver with the local site folder several levels deep in the host file system (i.e., C:\D1|D2\D3\D4\D5).  The folder D5 contains folders