SA Creation using LSMW BAPI BUS2013
Hi,
We have requirement for uploading open SA in to ECC and would need your help in LSMW, after analyzing I think best option to upload / create open SA is using BAPI method of LSMW as there is standard BAPI available BUS2013. But I have never used this method before though I am well aware of recording method of LSMW. Please let me know how to proceed on LSMW using standardd BAPI.
Step1- Maintain Object Attributes is done -
BUS2013
CREATE
PURSAG_CREATE
PURSAG_CREATE01
Step2- Maintain Source Structure -
Do we need to create 2 different structures here i.e. One for Header and One for item? If yes is it going to be at same level or lower level?
Also need help for next 4 steps.
Thanks
Vihaan
Hi Jurgen,
Sorry didn't get you as I got stuck at step 2, please see how I did till now and provide your valuable input:
Step 2 - Maintain Source Structures
Created one Headerdata structure - HDATA
Create one Itemdata structure - IDATA (IDATA is created as lower level of HDATA)
Step3 - Maintain Source Fields
Under HDATA:
IDENTIFIER C(001) IDENTIFIER
LIFNR C(010) VENDOR
EVART C(004) SA DOCTYPE
EKORG C(004) PORG
EKGRP C(004) PRGP
KDATE C(008) Validity End Date
Under IDATA:
IDENTIFIER C(001) IDENTIFIER
MATNR C(018) Material Numer
KTMNG C(016) Tar Qty
NETPR C(013) Price
WERKS C(004) Plant
LGORT C(004) Storage location
Step4 - Maintain structure relations
Structure Relations
E1PURSAG_CREATE Header segment <<<< HDATA SA HEADER DATA
E1BPMEOUTHEADER Header Data Outline Agreement <<<< HDATA SA HEADER DATA
E1BPMEOUTITEM Item Data of Contract <<<< IDATA SA Item Data
E1BPMEOUTITEM1 Item Data of Contract <<<< IDATA SA Item Data
E1BPMEOUTITEMX Item Data Change Parameter for Outline Agreement <<<< IDATA SA Item Data
E1BPMEOUTACCOUNT Account Assignment Data - Outline Agreement <<<< IDATA SA Item Data
Stpe5 - Maintain filed mapping and Conversion rules
Have mintained all the filed mapping like plant, material PORG etc.
Step7 - Specify file - Done
Step8- Assign file??? Here I am assigning file to HDATA structure only and not able to asign file to IDATA
Source Structures and Files
HEADERDATA SA HEADER DATA
SA Creation - TEST C:\Users\XME31L.txt
ITEMDATA SA Item Data
Here I would like to know how to create file considering above structure, do I need to create a single file with Header and Item fields in that? if Yes, then how to place it on excel - (like first row header column fields, second row - header field values and then in third row Item coloumn fields and 4th row item values)
OR I need to create two different files one for header fields and one for item fields and then aissgn them to HDATA and IDATA respectively?if Yes, then I am not able to aissgn file to IDATA as it gives error saying "File XME31L.txt can only be assigned to one source structure.
Please help me here
Thanks
Vihaan
Similar Messages
-
Sales Order Creation using LSMW-BAPI.
Hai,
While executing a 14th step in LSMW-BAPI,the IDOC is generated.While Testing the IDoc the values for the Header segment alone is displayed.The Segment sfor Item is not Displayed.Should there be any link between Header & the ITem.
Regards,
Padmam.Hi,
Can u tell me the steps to create a sales order using idoc, i've created a bapi but thats a temprory use. I wanted to created a sales order automatically when a purchase order is saved.
Please let me know if u can help me, i wanted to do it using idoc
Regards
Sanju -
Which FM to use while creating a Profit Center using LSMW BAPI
Which FM to use while creating a Profit Center using LSMW using BAPI: BUS0015
Hi,
For creating Profit centre using LSMW bapi method.
You need to give this values in the 1st step of LSMW.
Business Object BUS0015
Method CREATE Create
Message Type PROFITCENTER_CREATE Create profit center
Basic Type PROFITCENTER_CREATE01 Create Profit Center
In We20 port creation use process code as BAPI
Regards,
Shan -
Netprice Picked up from last document-Open PO load using LSMW BAPI method.
Hi Experts,
I m doing Open PO load using LSMW BAPI method...(BAPI_PO_CREAT1).
Inside the LSMW BAPI picks up the NETPR value from the last document and doesnt consider the value from load file...
Please advice me how to handle this issue...
I tried giving values to field CALCTYPE at item level or POCOND table with with carry out new pricing options....but nothig works for me...
PLease give your valuable inputs to achieve the requirement....
Bharathi.Jread OSS Note 580225 - Purchasing BAPIs: Conditions and pricing
-
Uploading subcontracting PO using LSMW-BAPI method
I am trying to upload the subcontracting Purchase order using LSMW-BAPI .
Bapi name -Create from Data1
Business Object - BUS2012 Purchase Order
Method - CREATEFROMDATA1 Create Enjoy Purchase Ord
Message Type - PORDCR1 Create Purchase Order
Basic Type - PORDCR102 Create Purchase Order
In this BAPI - for subcontracting material (component), required quantity & plant values are provided in a input file .
When I trying to upload this PO, PO gets created but component data not getting uploaded.
In documentation of BAPI -under restriction section -there is a restriction for subcontracting.
So can we create Subcontracting PO using this PO.
any solution on same.
Because most of the conversion part is done. Only for subcontracting PO this bapi is not working.
Please anybody know about the solution guide me ASAP.
ThanksHi Vikram,
I am also having same scenario , I m using BAPI - BAPI_GOODSMVT_CREATE To create GR for Subcontracting PO
Can u please tell me how can solve this problem.
Normal GR its working but for Subcontracting PO its not working.
Regards,
Sanket -
Sales order creation using LSMW
Hi All,
I am creating open sales order (VA01) using LSMW where I am using BAPI: BUS2032 and Method CREATEFROMDAT2.
I need to pass multiple line items for the same Header data, but the LSMW is creating multiple sales orders with a single line item every time.
I tried giving "on_change_transfer_record" after Header record but that doesn't work.
Can anyone suggest any suitable solution for this using BAPI only other than BDC, report program etc.
Thanks in Advance
Asif Ali KhanHi Asif Khan,
Please check this link
BAPI_SALESORDER_CREATEFROMDAT2 - Sales Order Create
http://sap-img.com/abap/bapi-salesorder-createfromdat2.htm
Best regards,
raam -
Error while creating the ASSET using LSMW BAPI method ( BUS1022 )
Hello,
Im creating assets using the below LSMW BAPI method
Business Object BUS1022
Method CREATEINCLVALUES
Message Type FIXEDASSET_CREATEINCLVALU
Basic Type FIXEDASSET_CREATEINCLVALU
the following errors were triggered while populating the values to ACQ_VALUE and ORD_DEP value.
Correction to ordinary dep. greater than acc. dep. in area 01
Correction to ordinary dep. greater than acc. dep. in area 30
Correction to ordinary dep. greater than acc. dep. in area 31
Correction to ordinary dep. greater than acc. dep. in area 32
if i pass only ACQ_VALUE, I am able to create the asset with out any issues.
Can you guys plz guide me to fix this issue to create the asset with both ACQ_VALUE and ORD_DEP values??
Cheers,
Sriram.Hello,
Review AO21.
Regards
Waza -
GL Balance upload using LSMW (BAPI bus6035)
Hello everyone,
We are uploading GL balances from legacy to SAP using the LSMW Bapi
object - bus6035
method - post
message type - ACC_DOCUMENT
Basic type - ACC_DOCUMENT03
When we run the lsmw, idoc is created, however with an error 51 saying
"Function module not allowed - APPL_IDOC_INPUT1'
The partner no. is the logical system (the system on which the lsmw is executed)
In the partner profile, we have defined this as LS. In the inbound parameters, we have defined message type = ACC_DOCUMENT, the process code is APL1 and the corresponding function module is - APPL_IDOC_INPUT1
Please let me know if we are missing something or doing anything wrong ?
Since the data in the LSMW will be read frmo a file on the presentation server, do we need to have a port configuration for the same ?
Thanks,
Sushil JoshiHi Sameer,
Have a look at these threads, they might help you
Chart of Accounts Upload
Problem: LSMW with transaction FS00 create account (BI is not generated)
Thanks
Janani
award points if helpful -
Hi All,
I m trying to do vendor creation in LSMW method using RFBIKR00 program,please any one guide me I strucked in 2 Maintain Source Structures after this cursor not moving to next radio button even though I done for next steps final it is not reading the data,pls help me out..
Thanks n regds,
sree.Hi
Check these links..might prove useful
[http://www.sapdb.info/wp-content/uploads/2008/08/lsmw.pdf|http://www.sapdb.info/wp-content/uploads/2008/08/lsmw.pdf]
Regards
Raj -
Upload Material Master using LSMW BAPI BUS1001006-SaveData
Hi Gurus,
I'm working with material master upload using the BAPI BUS1001006-SaveData.
I'm wondering on how can I know what structure should I populate on step 4 of LSMW "Maintain Field Mapping and Conversion Rules".
Seen some tutorials on material master upload but it wasn't explained there why or what structure should be populated..
Thanks and Regards.I just check each structure one by one to which the field is appropriate depending on its description....
-
Assignment on Sales Order creation using a BAPI
hi,
i m new 2 bapi,so i usually knw how 2 create BAPI
1. Create a sales order using BAPI with the header details from selection screen and item details from the file.
2. Have the minimum required header fields for a sales order Sales order type, sales org, distribution channel, division, customer, purchase order type, purchase order number as the selection screen parameters.
3. Have a field to enter the presentation server path on the selection screen where the file with item details is stored. File will have material, size and quantity required.
4. Validate all the relevant selection screen entries.
5. Create a sales order with the obtained details using the BAPI
BAPI_SALESORDER_CREATEFROMDAT2
6. Catch all the BAPI errors and display a report. If the BAPI call was successful display the sales order document number and the items. If the call fails, display all the error message encountered.Hi Priya,
Here is the sample program , it may helpful check,
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Quantity.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Data declarations.
DATA: v_vbeln LIKE vbak-vbeln.
DATA: header LIKE bapisdhead1.
DATA: headerx LIKE bapisdhead1x.
DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
WITH HEADER LINE.
DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text = 'Order type'.
v_text1 = 'Sales Org'.
v_text2 = 'Distribution channel'.
v_text3 = 'Division'.
v_text4 = 'Sold-to'.
v_text5 = 'Ship-to'.
v_text6 = 'Material'.
v_text7 = 'Quantity'.
v_text9 = 'Plant'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
header-doc_type = p_auart.
headerx-doc_type = 'X'.
Sales organization
header-sales_org = p_vkorg.
headerx-sales_org = 'X'.
Distribution channel
header-distr_chan = p_vtweg.
headerx-distr_chan = 'X'.
Division
header-division = p_spart.
headerx-division = 'X'.
headerx-updateflag = 'I'.
Partner data
Sold to
partner-partn_role = 'AG'.
partner-partn_numb = p_sold.
APPEND partner.
Ship to
partner-partn_role = 'WE'.
partner-partn_numb = p_ship.
APPEND partner.
ITEM DATA
itemx-updateflag = 'I'.
Line item number.
item-itm_number = '000010'.
itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
item-plant = p_plant.
itemx-plant = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
APPEND item.
APPEND itemx.
Fill schedule lines
lt_schedules_in-itm_number = '000010'.
lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty = p_menge.
APPEND lt_schedules_in.
Fill schedule line flags
lt_schedules_inx-itm_number = '000010'.
lt_schedules_inx-sched_line = '0001'.
lt_schedules_inx-updateflag = 'X'.
lt_schedules_inx-req_qty = 'X'.
APPEND lt_schedules_inx.
Call the BAPI to create the sales order.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
sales_header_in = header
sales_header_inx = headerx
IMPORTING
salesdocument_ex = v_vbeln
TABLES
return = return
sales_items_in = item
sales_items_inx = itemx
sales_schedules_in = lt_schedules_in
sales_schedules_inx = lt_schedules_inx
sales_partners = partner.
Check the return table.
LOOP AT return WHERE type = 'E' OR type = 'A'.
EXIT.
ENDLOOP.
IF sy-subrc = 0.
WRITE: / 'Error in creating document'.
ELSE.
Commit the work.
COMMIT WORK AND WAIT.
WRITE: / 'Document ', v_vbeln, ' created'.
ENDIF. -
PO creation using LSMW through batch input method
Hi, I am new to working with LSMW and i have completed a project for creating purchase orders using the direct data input method. I need to do the same using batch input method, however in the maintain structure relationship step, it is only allowing me to assign one structure to the recording that i have done, however in po creation we need separate (nested) structure for header and line item, could anybody help me past this please?
Hi Rudra!
OK, now you just know, why you have only one line, not multiple PO item lines. To get a dynamic number of items, you need a complex program - just like standard direct input.
If you need a field, which is not part of this program, don't try to write your own program for batch input - it's just to much work before you have a good result.
You can use Bapi method instead with BAPI_PO_CREATE1. This can handle a lot of fields and there is some documentation available how to fill the Bapi.
If this looks to complicated in the first moment, think about creation of POs via direct input and a small batch recording to change your additional field(s) afterwards. (You can select EKPO table to generate list of 'wrong' migrated orders for input in LSMW.) Use field 'Item' in the bottom of ME22 to position your desired line in first screen line, just change one PO-line after one other (every time a 'save' -> no problem with different number of lines / PO).
Regards,
Christian -
Sales Order Creation using LSMW IDOC method.. ( Custome Interface)
Hi ABAP'rs,
Please provide me LSMW steps for creating Sales Order using IDOC method.
Thanks and Regards,
Param.LSMW-IDOC in General
LSMW Step by Step Guide: Legacy System Migration Workbench is an R/3 Based tool for data transfer from legacy to R/3 for one time or periodic transfer.
Basic technique is Import data from Spreadsheet / Sequential file, convert from source format to target format and import into R/3 database. LSMW not part of standard R/3, if we need this product email [email protected]
Advantages of LSMW:
Most of the functions are within R/3, hence platform independence.
Quality and data consistency due to standard import techniques.
Data mapping and conversion rules are reusable across projects.
A variety of technical possibilities of data conversion.
Generation of the conversion program on the basis of defined rules
Interface for data in spreadsheet format.
Creation of data migration objects on the basis of recorded transactions.
Charge-free for SAP customers and partners.
Working With LSMW:
Use TCODE LSMW
Objects of LSMW:
Project ID with max of 10 char to Name the data transfer project.
Subproject Used as further structuring attribute.
Object ID with max of 10 Characters, to name the Business object .
Project can have multiple sub projects and subprojects can have multiple objects.
Project documentation displays any documentation maintained for individual pop ups and processing steps
User Guide: Clicking on Enter leads to interactive user guide which displays the Project name, sub project name and object to be created.
Object type and import techniques:
Standard Batch / Direct input.
Batch Input Recording
o If no standard programs available
o To reduce number of target fields.
o Only for fixed screen sequence.
BAPI
IDOC
o Settings and preparations needed for each project
Preparations for IDOC inbound processing:
Choose settings -> IDOC inbound processing in LSMW
Set up File port for file transfer, create port using WE21.
Additionally set up RFC port for submitting data packages directly to function module IDoc_Inbound_Asynchronous, without creating a file during data conversion.
Setup partner type (SAP recommended US) using WE44.
Maintain partner number using WE20.
Activate IDOC inbound processing.
Verify workflow customizing.
Steps in creating LSMW Project:
Maintain attributes choose the import method.
Maintain source structure/s with or without hierarchical relations. (Header, Detail)
Maintain source fields for the source structures. Possible field types C,N,X, date, amount and packed filed with decimal places.
Fields can be maintained individually or in table form or copy from other sources using upload from a text file
Maintain relationship between source and target structures.
Maintain Field mapping and conversion rules
For each Target field the following information is displayed:
o Field description
o Assigned source fields (if any)
o Rule type (fixed value, translation etc.)
o Coding.
o Some fields are preset by the system & are marked with Default setting.
Maintain Fixed values, translations, user defined routines Here reusable rules can be processed like assigning fixed values, translation definition etc.
Specify Files
o Legacy data location on PC / application server
o File for read data ( extension .lsm.read)
o File for converted data (extension .lsm.conv)
Assign Files to defined source structures
Read data Can process all the data or part of data by specifying from / to transaction numbers.
Display read data To verify the input data being read
Convert Data Data conversion happens here, if data conversion program is not up to date, it gets regenerated automatically.
Display converted data To verify the converted data
Import Data Based on the object type selected
Standard Batch input or Recording
o Generate Batch input session
o Run Batch input session
Standard Direct input session
o Direct input program or direct input transaction is called
BAPI / IDOC Technique:
IDOC creation
o Information packages from the converted data are stored on R/3 Database.
o system assigns a number to every IDOC.
o The file of converted data is deleted.
IDOC processing
o IDOCS created are posted to the corresponding application program.
o Application program checks data and posts in the application database.
Finally Transport LSMW Projects:
R/3 Transport system
o Extras ->Create change request
o Change request can be exported/imported using CTS
Export Project
o Select / Deselect part / entire project & export to another R/3 system
Import Project
o Exported mapping / rules can be imported through PC file
o Existing Project data gets overwritten
o Prevent overwriting by using
Import under different name
Presetting for Inbound IDOC processing not transportable.
Reward if useful.
regards
santhosh reddy -
Is PPDS PDS possible without ECC ie using LSMW BAPI or similar?
We are trying to get an APO SNP/PPDS model working for planning in divisions before hooking up fully to ECC, and have got SNP PDS uploads working fine for SNP using BAPI (BUS10014 Production Data Structure) which we trigger within an LSMW.
But trying to create PPDS PDS instead (so we can use some block planning functionality) and I have not got to work yet. Almost works, ie data goes into most of the background table, but PPDS PDS cannot be seen in display transaction, and cant use it.
Wondering if anyone else has got to work? And if it is even POSSIBLE? ie maybe PPDS is only designed to work with ECC wheras SNP can work stanalone or with non-SAP system?Hello all,
It is possible that you have syntax error for development objects that are assigned to a package (Dev class) that is 'switchable' and that its switch is off.
In general, these development objects are meant to be used when specific 'business functions' are switched on.
Switching on a business function has to be analyzed and tested carefully because most of them CANNOT be switched off. Even Reversible business functions cannot be switched off when they are activated in a productive system. This is forbidden.
In this specific example, program SAPLBOS04 belongs to package AD_BOS_01. This package contains switchable objects related to switch ECO_BOS. This switch can be switched on via more than one 'industry-specific' business functions all belonging to DIMP.
Switching on DIMP has to be analyzed thoroughly because some business functions are getting automatically switched on (Bfunc DIMP_SDUD) and cannot be reverted.
Each business function activates different functionality. Documentation can be found in IMG -> Activate Business Functions (TA SFW5). There you have a Documentation column with a link to the Help Portal.
Using TA SFW_BROWSER you can see the different objects related to business functions displayed in a tree.
Before switching on business functions you have to take precautions. See http://help.sap.com/saphelp_nw70ehp1/helpdata/en/de/899442047b0831e10000000a1550b0/content.htm
Regards,
Pascale Boyer
SAP Dev Support -
How to maintain inspection type at the time of material creation using LSMW
Hi All,
I have a differnet Issue.
I am using a std. LSMW to create the materials.
But now using same LSMW i have to maintain Inspection types(ART-RMQAM) for the materials to be created.
How this can be done.
This filed is not found in any structures like BGR....to BMMH8
Can I create such a structure ??
AmolSome need the hard answer: it is not possible in one go.
It is an embedded functionality in material master like classification, but it is not stored in a material master table.
Maybe you are looking for
-
i am Oracle DBA for a company from yesterday really i face critical problem which is that we have 17 data servers ( don't smile it's truth), we use various operating systems (Windows servers and Linux Redhat), i try to make strategy to collect all th
-
Hi all! Is it possible to use a SPOP3 connection in mail_sender_adapter in order to get mails? Thank you all! Ignasi
-
Mini-vga out for browser video
How can I direct video from browser windows (when at www.livescorehunter.com) to the external video port? I only know that in VLC you can select external display in the menu.
-
Hello Experts, Could you please provide me steps to achive following. I have one report by "Sales Representative". I want to send report in mail to individual sales representative by for his performance only. In short I want to derive multiple report
-
My personal hotspot completely disappeared off my iPhone 5 settings?
i used it yesterday, I haven't even turned off or charged my phone since then? it's usually always on my settings but when I went to go use it today it just wasn't there.. help??