Lsmw using bapi's

hi all,
Can any body provide the code to upload purchase order data using bapis in lsmw.urgent pls...
thanks.
assad

BAPIs are normally called synchronously in order to get feedback immediately.A synchronous call will only work if the system we want to access is up and running.For some purposes like data transfer, SAP wanted BAPIs to invoke asynchronously  so that the calling application could proceed even if the remote system was currently unavailable.
Hence these BAPIs are linked to ALE (Application Linking and Enabling),an asynchronous message passing mechanism with guaranteed delivery.ALE uses Idocs as the containers for messages. Idocs are instances of Idocs types, which in turn are associated ALE message types
SAP has provided a generator which takes a BAPI and generates an appropriate ALE message type and an associated Idoc type.
Data stored in a file by means of the IDoc technique is generally imported in two steps. You can call these steps in LSM Workbench:
Start IDoc creation.
First, the file of the converted data is read. The "information packages" contained are stored in the R/3 database in IDoc format. It is, however, not stored in the database of the corresponding application. The system assigns a number to every IDoc. Then the file of the converted data is deleted.
Start IDoc processing.
The IDocs created in the first step are submitted to the corresponding application program. This application program checks the data and posts it in the application’s database, if applicable.
Thanks,
Manjunath MS
"Reward Points if it is useful"

Similar Messages

  • Kindly help reg - LSMW using BAPI

    Hi All,
      I am using LSMW using BAPI method to upload data to create an Purchase order. I m getting this error.
    " Identification specifications missing for source structure 'PSOURCE_HEAD' ".
    Here are the steps I have followed.
    1. Created an IDOC Inbound Processing.
    2. Bussiness Object: BUS2012
        Method          : CreateFromData
        Message Type    : PORDCR
        Basic Type      : PORDCR05
    3. Maintained Source Structure : PSOURCE_HEAD AND PSOURCE_ITEM
    4. Maintained Source Fields for PSOURCE_HEAD AND ITEM
    5. Maintained Structure Relations:
         E1PORDCR=>PSOURCE_HEAD
         E1BPEKKOC=>PSOURCE_HEAD
         E1BPEKOC=>PSOURCE_ITEM
         E1BPEKET=>PSOURCE_ITEM
    6. MAINTAINED FIELD MAPPING:
         E1PORDCR - E1PORDCR-HEAD_ADD_DATA_RELEVANT = 'H'.
         E1PORDCR - E1PORDCR-ITEM_ADD_DATA_RELEVANT = 'I'.
    7. specify files
    8. Assign Files : assigned uploaded file to both PSOURCE_HEAD AND PSOURCE_ITEM
    9. IMPORT DATA: I M GETTING THE PROBLEM " Identification specifications missing for source Structure 'PSOURCE_HEAD' ".
      H     1001     1000     000     
      I     100-130     20     200     001     1000     28.06.2006
    With Regards
    Vasu

    Hi vasu
    I have encountered the same problem with material BOM creation.
    The reason you get this message is probably because you didn't define correctly the identification field in the source structures.
    In step 'Maintain source fields' you should define the first field of every structure as identification field by creating char field of length 1. Then from the tree view of source fields, double click this field (in change mode) and give appropriate value in field 'Identifying Field Content', meaning 1 for header structure, 2 for items structure etc.
    This should fix the problem.
    Best regards

  • Class data upload through LSMW using BAPI

    Hi All,
    Plz tell me how to upload class data through LSMW using BAPI.I also need some study material on BAPI.
    Bye,
    Mithilesh Tiwari

    its not possible with single file
    for this you need to pass two files of data
    1 ) Header data ZSOURCE_LIST_HEADER       Source List Header
         MATNR                          C(018)    Material Number
                                        Selection Parameter for "Import/
         WERKS                          C(004)    Plant
    2) item data     ZSOURCE_LIST_ITEM         Source List Item
             MATNR                          C(018)    Material Number
             LIFNR                          C(010)    Vendor Number
             EKORG                          C(004)    Purchasing Organiz
             WERKS                          C(004)    Plant
             VDATU                          C(008)    Valid From
             BDATU                          C(008)    Valid to
    for this use below LSMW IDOC method
    Message Type         SRCLST                      Source List
    Basic Type           SRCLST01                    Source List

  • Difference between lsmw using BAPI & lsmw using IDOC?

    HI everybody
    can anybody tell me  difference between lsmw using BAPI & lsmw using IDOC?

    IDocs and BAPI are very different, so it should be easy to choose between them depending on your requirements.
    IDOCS
    Advantages
    System can work even if target system not always online. The IDoc will be created and sending will just continue once you get connected to the other system.
    No additional programming required. You just need to set up the configuration.
    Disadvantages
    Receipt/processing on the target system may not be immediate.
    The sending system has no way to know whether the target system actually received what you sent (unless you use ALE).
    If there is no SAP standard IDoc available for your requirement, it's harder to create a customized IDoc than a customized BAPI.
    BAPIS
    Advantages
    You can tell if your sending was successful or not
    Sending to/processing on the other side is immediate
    Easier to create your own BAPI than your own IDoc
    Disadvantages
    Will only work if you have an active online connection.
    Some programming required to call the BAPI.
    Others interface methods you might also want to consider are ALE and RFCs.

  • Please can anyone send me a snapshot of lsmw using bapi

    please can anyone send me a snapshot of lsmw using bapi
    pointz wll b rewarded to the person who send a snapshot of the above query in my mail
    [email protected]

    Hi,
    Please check these links for step by step including snapshot.
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI
    http://www.****************/Tutorials/LSMW/BAPIinLSMW/BL1.htm
    Regards,
    Ferry Lianto

  • HELP NEEDED *Lsmw using bapi as import method*

    Hi,
        I am trying a n example implementing lsmw using bapi as inport method for the purchase order data. Here when i am trying to get the data i am getting an error "Ensure field sequence is correct for data for multiple source  structures". I have single text file which has both header and the line item data.
    IDENTIFIER VENDOR PURCH ORG     PURCH GRP                
    H                  100001           0001                  001               
    IDENTIFIER MATERIAL QTY PRICE MATGRP PLANT     DELDATE
    I                   A         50        1000               YAS1     20/10/2007
    Thank you,
    Madhu

    Hi madhu,
    check the step where you assign the source structure in the LSMW and check whether it is in accordance with your flat file field sequence.  I think that is cause for your error.
    Reward points if useful.
    Best Regards,
    Sekhar

  • LSMW using BAPI

    why we have to create PARTNER PROFILE while using BAPI in LSMW , and what is the correct way to create that

    Hi
    Partner Profile creation is not linked with LSMW or BAPI
    it is linked with ALE,EDI, IDOC
    we create partner profiles using WE20 tcode
    and we define Inbound, Outbound paramters related to Idoc data transmission
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Screen shots of lsmw using bapi and idoc.

    hi
    can anybody plz send me the step by step lsmw procedure using
    bapi and idoc screen shots.
    regards
    vijay

    Refer this link... it has step by step procedure with screen shots....
    http://www.****************/Tutorials/LSMW/LSMWMainPage.htm
    Regards,
    Pavan

  • Lsmw - using bapi's (file structure)

    HI,
      I am trying to use LSMW to upload the purchase order using the bapi.
    I am using the Business object - BUS2012
                          Method             - CREATEFROMDATA
                          Message type   - PORDCR
                          Basic type        - PORDCR05
    In source structure - Posource_head is given and in the lower level
    POsource_item is given. 
    In the maintain source fields,
    For POsource_head,  following fields are given,
    IDENT                          C(001)    Identifier
    LIFNR                          C(010)    Vendor
    EKORG                          C(004)    Purch. Org
    EKGRP                          C(003)    Purchasing group
    for Posource_item , following fields are given,
    IDENT                          C(001)    Identifier
    EMATN                          C(018)    MPn material
    NETPR                          C(011)    Net price
    MATKL                          C(009)    Material group
    WERKS                          C(004)    Plant
    DDATE                          C(010)    Delivery date
    Mapping also done.
    In the excel sheet or notepad, how the fields should be ordered.?
    I just need to know the file format which should be specified in the specify file.
    can anyone give the fields and length that i should create in the excel file or notepad?
    Points will be awarded.
    Regardss,
    Vinoth.

    Hi,
    Field should be ordered as per the source structure of your own.
    In header you can have unique data (strictly) and one more file of item whch will be having correpsonding data for header records.
    Length is as per the Data Element.
    Reward if useful!

  • LSMW using BAPI method for ME21N

    Hi to all,
    I am using LSMW BAPI method for the transaction ME21N Iam able to post a PO document successfully, But in my flat file I have a header and followed by item in the same line, while I was posting with same header for different line items its posting different PO's for different  line items but suppose it has to post one document with multiple items.
    My flat file fields are like this : (where as ABCD my header and rest are line items) I am using only one structure 'podata' in LSMW and I am not using any identifier.
    header--Line items
    A B C D S P Q W E X
    A B C D 1 D 3  F K L
    Business Object -     BUS2012     
    Method                -    CREATEFROMDATA1
    Message Type    -    PORDCR1
    Basic Type         -     PORDCR101
    As per my requirement if I have multiple line items for the same header then only one PO should be posted.
    Could you suggest me, How can I achieve this.
    Thanks,
    Lahari

    Hi Jurgen,
    Thanks for your reply.
    As poer your suggestion, I passed my flat file data into a single file and in the begin of transaction, I divided the data into 2 structures as Header & Item.
    Still I am unable to achieve the desired results, can you please elaborate more on how SAP internally joins the structures again.
    To be more clear my flat file data look like this :
    217836     NB     1826162667     0127     00   1     LEAN SIX SIGMA PRIMER     MRO     Z     4.00     EA     60.00     1     EA     
    217836     NB     1826162667     0127     00     2     LEAN SIX SIGMA PRIMER     MRO     Z     4.00     EA     860.00     1     EA     
    217836     NB     1826162668     0127     00     1     LEAN SIX SIGMA PRIMER     MRO     Z     4.00     EA     160.00     1     EA
    217836     NB     1826162668     0127     00     2     LEAN SIX SIGMA PRIMER     MRO     Z     4.00     EA     560.00     1     EA     
    The bold ones being header and the remaining Items, the underlined field is PO number.
    In normal process this file is considered to have 4 records, and tries to create 4 PO's.But my requirement is to create only 2 PO's with 2 items each.
    Thanks.
    Lahari

  • In LSMW using BAPI Scenario, how to assign the same file to HEADER and ITEM

    Hi,
    i got a problem when we are in ASSIGN FILES step how to assign the same file to both HEADER and ITEM Structures?

    Hi,
    When defining the file in specify files step check the option 'Data for Multiple Source Structures'.
    Hope it helps.
    Thanks,
    Mahesh

  • Using bapi in lsmw posting g/l account

    hi experts,
    i am trying to post a document in lsmw using bapi method.
    i am using business object:  BUS6030 (Accounting GL posting).
                               method :   POST.
    when trying to mapping the line items i coudnt find the line item NEWBS(posting key for next line item)..
    hope u understand what i said..
    thanks in advance...
    Edited by: dominic joe on Mar 11, 2009 5:56 AM

    why your using the BAPI methiod , you can use Direct Input, its works fine....
    Object               0100   Financial documents
    Method               0000
    Program Name         RFBIBL00
    Program Type         D   Direct Input

  • Data tranfer using bapi(lsmw)

    please explain the steps that are used to upload legacy data into sap using lsmw (bapi method)
    Message was edited by:
            neela renganathan

    Hi,
      is step by step process .
    Step-by-Step Guide for using BAPI in LSMW
    Note! The screen prints in this article are from ECC 5.0. They may differ slightly in other versions.
    Introduction:
    This document details the usage of BAPI in LSMW. We have used the example of migration of the purchase order data into SAP.
    Pre-requisites:
    It is assumed that the reader of this article has the minimum knowledge required on the Business Object, BAPI, Message Types and IDoc Types.
    Step-by-Step Procedure:
    Details of the BAPI used in this scenario:
    Business Object: BUS2012
    Method: CreateFromData
    Details of Message Type and Basic IDoc Type:
    Message Type: PORDCR
    Basic IDoc Type: PORDCR02
    Let’s have a look at the BAPI first, before proceeding to the LSMW:
    1. Go to Transaction BAPI
    2. Click on Search Button
    3. Enter the value “BUS2012” and select “Obj.type(Technical Object Name”
    4. Press ENTER
    5. Following screen appears:
    6. On the left side of the screen, Expand the “PurchaseOrder”.
    7. Select “PurchaseOrder” and double-click on the same for details.
    Building LSMW using BAPI:
    1. Go to Transaction LSMW.
    2. Enter the Project, Subproject and Object information and click on CREATE.
    3. Enter the descriptions for Project, Subproject and Object as prompted.
    4. Now select Settings à IDoc Inbound Processing
    5. “IDoc Inbound Processing” screen appears. Enter the required details as shown below:
    6. Click on “Activate IDoc Inbound Processing”.
    7. Click on “Yes” when prompted for “Activate IDoc Inbound?”
    8. Hit on “Back” to return to the main screen.
    9. Click on Continue (F8). Following Screen appears:
    10. Select the Step 1 “Maintain Object Attributes” and select “Execute”.
    11. Select the radio button “Business Object Method” and enter the following details:
    Business Object: BUS2012
    Method: CreateFromData
    Hit ENTER
    12. Save and click on BACK button. Following information message is displayed.
    13. Now select step 2 “Maintain Source Structures” and click “Execute”.
    14. In this step, we need to maintain the source structure. In our example, lets consider the example of a file with 2 structures Head and Item data as shown below:
    Click on Create and name the source structure as HEADERDATA. Now select HEADERDATA and click on “Create” again to create the child structure. Following popup appears:
    Select “Lower Level” and click on Continue. Enter the Item data structure name.
    Click Save and hit BACK button to go to the main screen.
    15. Select step 3 “Maintain Source Fields” and hit execute.
    16. Enter the fields as shown below:
    17. Click SAVE and return to main screen.
    18. Select step 4 “Maintain Structure Relations” and click Execute.
    Select E1PORDCR and click on CREATE RelationShip. Following screen appears:
    Select HEADERDATA and hit ENTER
    Similarly do the same for the structure E1BPEKKOA, E1BPEKPOC and E1BPPEKET.
    Click Save and return to main screen.
    19. Select the step “Maintain Field Mapping and Conversion Rules” and click on execute. Maintain the Field Mapping as seen below:
    20. Select step 7 “Maintain Source Files” and provide the link for the test file created. (Create a test file with the same structure as defined earlier).
    Save and return to main screen.
    21. Select the step “Assign Files” and click on Execute.
    Assign the file provided to the source structure. Here the same file is provided for both the structures.
    Save and return to the main screen.
    22. Select the step “Read Data” and click on Execute.
    Click on Execute.
    Return to the main screen.
    23. Select the step “Display read data” and click on execute.
    Click on the structure name to get the field level values.
    24. Return to main screen and now select “Convert Data”.
    25. Return to the main screen and select “Display Converted data”.
    26. Return to main screen and select “Start IDoc generation”.
    27. Now select the step “Start IDoc Processing” on the main screen.
    28. Return to main screen and click on “Create IDoc overview”. Here the data record and status records of the IDoc could be viewed:
    Please Go through these Links ,
    BAPI with LSMW
    http://esnips.com/doc/ef04c89f-f3a2-473c-beee-6db5bb3dbb0e/LSMW-with-BAPI
    For document on using BAPI with LSMW, I suggest you to visit:
    http://www.****************/Tutorials/LSMW/BAPIinLSMW/BL1.htm
    http://myweb.dal.ca/hchinni/sap/lsmw_home.htm
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    Regards

  • Need screen-shot  for create mm01 using BAPI(Through lsmw or ecording)

    hi,
    could u give screen-shot of the lsmw using bapi.for material master data create using t.code (mm01')
    i will be waiting for eply.
    regards
    eswar.

    Check this link dude.....
    http://www.****************/Tutorials/LSMW/LSMWMainPage.htm
    It has all different types of LSMW with the screen shots.... keep doin
    Regards,
    Pavan

  • LSMW Cost Center creation using BAPI BUS0012

    Hi
    I am creating a LSMW using BAPI BUS0012, I have done the setting for inbound Idoc Processing, but when i am clicking on maintain structure relations, i am getting an error No Target structure could be
    found
    please let me know what to do ?
    thanks in advance
    Lokesh

    Hi
    YOu can check http://help.sap.com/saphelp_nw04/helpdata/en/ad/2d54a41d7011d2b42e006094b944c8/frameset.htm
    Here you may get a answer to your question.
    Cheers,
    Hakim

Maybe you are looking for

  • Mail "To Do" hangs / crashes Mail since 10.5.2 update

    Since I updated to 10.5.2, I'm having some Mail issues, primarily with the "To Do" function. If I so much as click on a To Do, I get the spinning beach ball and ultimately have to force quit Mail. I have an Exchange Email account and .Mac account. Un

  • "This content requires HDCP for playback..."

    I am trying to play Star Trek HD on my atv but I get a message that states "this content requires HDCP for playback." My TV is HD and the atv is connected with an HDMI cable that I purchased at the Apple Store. I have been able to play HD movies on t

  • I have lost all my ringtones, and music...HELP ME!

    I recently bought 4 songs, and 1 ringtone from the iTunes Store on my iPhone 3GS. I went to plug my iPhone in my computer so I can transfer my music from my iPhone to my computer. When none of my music files transfered I got a little worried so I loo

  • Wacom Console Error

    Was gonna put this in the periphreal forum but there isn't a legit subcat for it. Anywho - I have this message in my sys log: " 1/16/12 7:01:37 PM WacomTabletDriver[90] The function `CGSCreateCString' is obsolete and will be removed in an upcoming up

  • Audition CS5.5 does not play any sound

    Hello to everybody, I got a big problem with Audition. After buying a new Mac I imported the whole user to the new system. Nearly most of the Master Suite Modules work, but when starting Audition, it tells me right away that the audio hardware settin