LSMW - Upload purchase contracts (ME31K) with BAPI

I'm trying to upload some contracts from the legacy to SAP ECC 6.0 using LSMW.
I've already worked with Direct Input and Batch Input record with LSMW but never with BAPI.
I found business object BUS2014 / Message Type - PURCONTRACT_CREATE but I don't know how to continue the process. Could you give me some suggestions?
Thanks in advance,
Guiza

Hi,
I saw some examples but I'm still with the same problem. At step 4 Maintain Structure Relations I have this error: "No target structures could be found - Message no. /SAPDMC/LSMW_OBJ_030001".
What could be?
Step 1 - Business Object Method -
BUS2014
Method: Create
Step 2 - I've create 2 structures
Header and Item
Step 3 - I associate the fields that I want to upload.
I don't know but could the error be because the Idoc Inbound Processing?
Thanks,
Guiza

Similar Messages

  • LSMW for Purchasing Contracts(ME31k) for Services

    Hi All
    I am hoping that someone would be able to guide me or give a suggestion on this. I have seen many questions asked in the forum about upload for Service Conrtacts but none of these have been clearly answered.
    The standard  idocs PURCONTRACT_CREATE01 doesn't have service segments and also BLAORD03 doesnt have account assignment so the only option is recording but while doing recording using me32k , the cursor points the to recorded entry ( static) used in recording and tries to update that service line record and fails . As a workaround I tried a recording by leaving empty lines and it woked fine but the trouble with that is only 20 service lines ( what is visible in a page) can be recorded
    So I have worked out another option as below and looks to be working but I feel the process is cumbersome and may be error prone when i have different scenarios . Has any body used a better solution using LSMW ? The option i tried is
    Using a recording of ME31k, create the Service Line with a line no equivalent to maximum possible line for example if my maximum possible line is 100, create the contract with Service Line No as 100
    Using a recording of me32k, insert the lines 99 to 1 in descending order and also making sure that source file has line no's from 99 in descending order . Also while recording , the + ( insert row) on left side of service screen was used .
    Using another recording of me32k, renumber the service no's to be consecutive order ( recording of Edit -->renumber in Service Screen ) .This is required because some contracts may only have 3 service lines and some may have 100 lines and it will look odd to have only 3 service line with 98,99 and 100
    Any suggestion from anybody who has uploaded/migrated Service contarcts using LSMW appreciated .In our project, there is a general guidance to avoid Z programs for upload and want to use that as last option.

    Sorry Mallinath
    Can you please clarify me whats the method you are referring. The link you sent me talks about
    BAPI_SAG_CREATE (CHANGE) which doesn't have any fields referencing service master ( Activity Number ) not does it have any fields related to Service tab in ME32K/ME31K?
    Appreciate if you can give some more information.
    Regards
    Abhilash

  • How to use BLAREL03 standard iDOC to upload Purchasing contract to SAP

    Hello
    Guru's
    Thanks in advance for your time.
    we ae planning to upload purchasing contract details to SAP using BLAREL03 standard idoc.
    can any one give me step step procedure to follow.
    i am new to IDOC's i need little bit detail. give me with function modules names to upload.
    In any way can we test it quickly,by creating text file with mandatory fields on the idoc and upload it.
    we just worried about like  contract start date,end date,(how it is handling while uploading) the fields which are on tree view of idoc, are not there,if we look at flat file structure of idoc.

    Hello
    Guru's
    Thanks in advance for your time.
    we ae planning to upload purchasing contract details to SAP using BLAREL03 standard idoc.
    can any one give me step step procedure to follow.
    i am new to IDOC's i need little bit detail. give me with function modules names to upload.
    In any way can we test it quickly,by creating text file with mandatory fields on the idoc and upload it.
    we just worried about like  contract start date,end date,(how it is handling while uploading) the fields which are on tree view of idoc, are not there,if we look at flat file structure of idoc.

  • Price condition determination for purchasing contract(ME31K)

    Hi Experts,
         It is possible to apply  price condition determination in purchasng contract(ME31K)?  We had maintain the price condition for below keys: WBS/Material number and this condition record work well in purchase order. But I hope that this condition record is applied in pruchasing contract when we create contract by ME31K. Plz kindly give me a suggestion.
    So I want to check the condition dtermination is whether fullfil my requirement. If we can not use the price condition determination to get the net price, then we only go for user-exit to get it.
    Thank you very much in advance.

    >
    Gangrong Chen wrote:
    > Hi Experts,
    >  
    >      It is possible to apply  price condition determination in purchasng contract(ME31K)?  We had maintain the price condition for below keys: WBS/Material number and this condition record work well in purchase order. But I hope that this condition record is applied in pruchasing contract when we create contract by ME31K. Plz kindly give me a suggestion.
    >
    > So I want to check the condition dtermination is whether fullfil my requirement. If we can not use the price condition determination to get the net price, then we only go for user-exit to get it.
    >
    > Thank you very much in advance.
    Why not, in me31k, click on condition button on toolbar for item conditions and for header conditions, click on menu bar path HEADER>CONDITIONS and maintain your conditions accordingly.

  • DTW - Upload Purchase Credit Notes with WithholdingTax

    When I try to upload Purchase Credit Notes using WithholdingTax via DTW, I got an error says:
    "All amounts in the Withholding tax data must be in the document currency", the error comes from "WithholdingTaxData" template.   When I upload just "Documents" and "Documents_Lines" don't have any problem, but when I add "WithholdingTaxData" template the error appears.
    Thanks for your help.
    Daniel Rivas.

    Dear,
    Please kindly have check whether your issue is similar to the note 1116680 as below.
    Symptom
    Trying to update a draft with withholding tax via DI generates the
    error:
    All amounts in the withholding tax data must be in the document currency
    [INV5.txblAmntSC][Line:1].
    Scenario:
    1.  Ensure system currency is different from local currency, for
        example, system currency is USD, local currency is GBP.
    2.  Create an A/R invoice draft with withholding tax.
    3.  Update the draft via DI, as follows:
        Set oDraft = vCmp.GetBusinessObject(oDrafts)
        oDraft.GetByKey (XXXX)
        oDraft.Comments = "Update Via DI#1"
        ErrCode = oDraft.Update()
    Other terms
    SAP Business One, SDK, DI, Update, Draft, withholding tax, All amounts
    in the withholding tax data must be in the document currency, INV5,
    txblAmntSC
    Reason and Prerequisites
    Application Error.
    Solution
    SAP planns for this issue to be fixed in a patch of Release 2005 A SP01
    and 2005 B. Please refer to the info.txt file on SAP Service Marketplace
    to confirm that the fix was included.
    Best regards,
    Apple

  • LSMW create Vendor Contract ME31k

    Hello Guys,
    I have create a LSMW using recording to upload a series of contract with multiple lines.
    I have defined 2 source structure with the respective fields I intent to input values.
    Header, field 1, field 2
    Item, field 1, field 2
    I have also maintained the appropriate structure for 2 different files, where first file has the header data and Item files has the item data.
    I am reading and converting the data correctly but the sequence of my LSMW recording is corrupted. What is the best way to go with the recording for this LSMW. I am struggling to define the multiple items for a contract.
    I do not have BUS2014 and IDOC did not work.
    Thanks

    To create the contract with multiple lines you are required to create two recordings and maintain two different source file.
    First Record is dedicate to create the Contract with a dummy item.
    Create the record for ME31K choose the fields you require to maintain. You are required to input the first line, use a dummy item so you are able to save the contract.
    Second Record is dedicate to add item in the contract.
    Create a record for ME32K it is not require to input the contract number as the record will use last create contract. Remember to call Edit Enter lines to call the last line to input the material ID.
    You are required to map the Header and Item level using identifiers for header and Item
    On the Header you can make the Item a constant of the dummy material.
    You are required to maintain two different source file one for Header and one for Item and then define the source structure.
    If someone have a better way I am happy for advices.

  • Purchase order change with bapi

    Hi all,
    does someone know if it's possible to modify a purchase order with a bapi ?
    is it possible with BAPI_ACC_PURCHASE_ORDER_POST ?
    thanks for your help
    Eric

    Hello,
    You can use the BAPI_PO_CHANGE.
    Best Regards,
    Arminda Jack

  • Issue with BAPI CONTRACT CREATE while uploading pricing conditions

    Hi Experts
                        I am using BAPI CONTRACT CREATE to create Purchase Contract ME31K
    I am facing the issue while passing pricing conditions  Could you please help me regarding this
    Could you please help me along with this what are the values has to pass
    Thanks
    Vijay Kumar Reddy

    Hi Experts
                        I am using BAPI CONTRACT CREATE to create Purchase Contract ME31K
    I am facing the issue while passing pricing conditions  Could you please help me regarding this
          gs_oucondition-item_no = w_data-evrtp.  
          gs_oucondition-serial_id = '1'.     
          gs_oucondition-cond_count = '01'.     
          gs_oucondition-cond_type = w_data-cond1.     
          MOVE w_data-amnt1 TO gs_oucondition-cond_value.     
          gs_oucondition-currency  = w_data-curr1.     
          gs_oucondition-numerator   = '1'.     
          gs_oucondition-denominator = '1'.     
          gs_oucondition-change_id   = 'I'.     
          APPEND gs_oucondition TO gt_oucondition.     
          CLEAR gs_oucondition.
          gs_ouconditionx-item_no = w_data-evrtp.     
          gs_ouconditionx-serial_id = '1'.
          gs_ouconditionx-cond_count = '01'.     
          gs_ouconditionx-item_nox = c_x.     
          gs_ouconditionx-serial_idx = c_x.     
          gs_ouconditionx-cond_countx = c_x.     
          gs_ouconditionx-cond_type = c_x.     
          gs_ouconditionx-cond_value = c_x.     
          gs_ouconditionx-currency  = c_x.     
          gs_ouconditionx-numerator   = c_x.     
          gs_ouconditionx-denominator = c_x.     
          APPEND gs_ouconditionx TO gt_ouconditionx.     
          CLEAR gs_ouconditionx.
    Could you please help me along with this what are the values has to pass.
    these are the parameters passing to the condition structure while executing bapi i am getting error like enter quantity conversion.
    but with the same data i am able to create contract using SE37 by directly executing the Function module.
    and if i have net price in my excel sheet also i am able to create contract using my program.
    the only problem with pricing conditions alternatively there will be no net price..
    Please really it will be a challenging question....
    Thanks
    Vijay Kumar Reddy

  • Purchase contract with varient

    Dear Experts
    Need your support pls...
    I want to create a purchasing contract(me31k) for an item with vendor. Scenario is like this, purchase price of material X have 2 price as P1 & P2 because if material X required through a process route hot Rolled then price is P1 but material X required with process  route hot rolled and Anneling then price is P2.
    Even price P1 can also be change if X material-->Hot rolled but dia is in between 5 mm to 30 mm then price of X material will be P1-1, but dia is 31 mm to 90mm then price is P1+2 and same scenario with material which is hot rolled &  anneled of price P2 mean  if material dia is between 5 mm to 30mm then price P2-1 but dia 31- 90 mm, price P2+2
    How can i do..pls help
    Regards
    Mohit

    Thx mr. dev for your reply.
    I have to come up with solution that now purchase price of material 'X' have 2 prices as P1 & P2 as material X required through a process route 'hot rolled' then price is P1 but material X required with process  route 'hot rolled' + 'Anneling' then price is P2. then how can i create contract with this conditions. pls help...
    Regards
    mohit

  • I want to upload material master (MM01) using LSMW with BAPI method

    I want to upload material master (MM01) using LSMW with BAPI method and also later on I may need to change the updated data.
    Which business object and Method I should use so that i can do both.
    Thanks
    kumar n

    Hi,
    The business object is BUS1001.
    Thanks,
    Murali

  • Error while uploading the Real Estate Contract using IDOC & BAPI

    Hi  All ,
    I am trying to uploading the real estate contract data  by using  LSMW IDOC & BAPI methods  .
    In IDOC method I have used the Basic type as BUS1505_CREATE01 and Message type as BUS1505_CREATE. I have passed all mandatory fields then also i am unable to create the CONTRACT but and i am able to create CONTRACT using the bapi BAPI_RE_CN_CREATE  by passing the  values in SE37 and  i am able create CONTRACT manually in transaction code RECN  . Can any body know the reason .
    In BAPI method I have used the Business Object  BUS1505  ,Method CREATE  ,Message type BUS1505_CREATE and Basic type  BUS1505_CREATE03 . I have passed all the mandatory fields then also  i am unable  create the CONTRACT But with the same fields i am able create CONTRACT manually in transaction code RECN and i am able to create CONTRACT using the bapi BAPI_RE_CN_CREATE  by passing the  values in SE37  .
    Regards
    Srihari

    Hi All,
      I was passing blank entries so the above errors were coming. I removed those blank entries and now Im getting error like .
    "Individual renewal rule does not contain any extension periods"
    "No instance of object type ContractREFX has been created. External reference: REC <NEW>'.

  • LSMW with bapi BAPI_REQUISITION_CREATE

    Hi
    I'm creating an LSMW for create purchase requisition with Bapi (BAPI_REQUISITION_CREATE)
    I'm trying to upload 2 items for a PR but the LSMW is creating 2 PR with each item.
    How can I tell to the LSMW that I have to item for the same PR?
    Remember this bapi doesn't has header.

    Hi,
    you need to define hierarchy in your in put file to merge required lines into one BAPI call. You can find some examples how to create order with multiple items (for example [this one|http://www.scribd.com/doc/6646673/Lsmw-With-Bapi]). So you can easily adapt it to your BAPI.
    Cheers

  • LSMW program to upload the sales order with multiple line items.

    Dear SD and PP Gurus,
    I am new to creating LSMW Program.
    I want to create a LSMW program to upload the sales order with multiple line items. I have read on SDN that it can be done on two phases. First Create Header Data than line items. IS IT TRUE??, Or
    Is there any procedure by which we can load the sales orders with multiple line items in a single run (part).
    I want to use Batch process, not a BAPI or IDOC procedure.
    I have created a program with
    object 0090
    Method 0000
    Program Name RVINVB10
    Program Type D
    Source Structure 1 - For Header and Source Structure 2  for Line Items.
    Mapped Field INDET (With Fix Value 1), ORDERTYPE, SALESORG, DISTCHANNEL, DIVISION, CUSTOMER, PONUMBER , DELVDATE, PRCGDATE, PMTTERM
    INCOT1 INCOT2 with Source Structure - 1 and
    Field INDENT (With Fix Value 2),  ITEMNO, MATCODE, MATQTY, SUOM, PLANT, BATCH, AMOUNT with Structure-2
    than maintained Structure relation ship, field Mapping, Specified Files, Assigned files, Read Data and other process,
    At final stage (Start Direct Input program RVINVB10) it is giving a message - Table name not allowed.
    Please tell me where I am wrong.
    Thanks in advance.
    DSC

    Dear SD Gurus n Experts,
    I have solved the above problem. But there is another problem appearing regarding the date format. Now system generating a message: Date . . is not valid.
    While I am using Date: YYYYMMDD format in flat file, which is SAP's Standard Format.
    In SDN Link: LSMW upload Sales Order using VA01/VA02     I have found that there are some date fields which are mandatory to filled. Here I have mapped
    VDATU - Requested delivery date,  BSTDK - Customer purchase order date,  PRSDT - Date for pricing and exchange rate,  BSTDK_E - Ship-to party's PO date, FKDAT - Billing Date, KORDT - Delivery Date,
    and PRGRS - Date type is Constant = D
    Can any one tell me, where is the priblem.
    With thanks,
    DSC

  • BAPI for Purchasing Contract

    Hi  All,
    Can anybody suggest some BAPI for uploading pricing conditions in a purchasing contract.
    Thanks,
    Arun

    Hi Arun,
      refer to the link for BAPI's:
    http://www.sapbapi.com/bapi-list/
      Also refer to the link:
    Re: VK11,
    With luck,
    Pritam.

  • LSMW with BAPI for BAPI_CONTRACT_CREATE

    Hi,
    I am using LSMW with BAPI for creating purchasing contract.
    I got status of the Idoc as " 64 " means Idoc is ready to transferred to application but when i go to next step ...
    I am getting dump when I executing the step  "Start Idoc Processing"
    The errors shows like this: - "Object cannot be assigned to null"
    Any help on this:-

    yes ..
    I can see the data into the idoc.
    But when processing this idoc into application...then going into dump.
    Any ideas...Please let me know.

Maybe you are looking for