04-25-2008 1:30 PM
HI,
I've some questions regarding LSMW.
1) How to write subroutine in LSMW?
2) How to go for LSMW for transaction data e.g. purchase order, sales order etc.
waiting for your quick valuable reply.
Regards
Anupam
04-25-2008 1:44 PM
Hi Anupam,
Please check this link
http://www.saptechnical.com/Tutorials/LSMW/BAPIinLSMW/BL1.htm
regards,
raam
04-25-2008 2:26 PM
Hi,
Thanks for your answer.
Can you give me some link for transaction data upload using recording ????
Regards
Anupam
04-25-2008 6:10 PM
hi anupama,
SAP Data Migration with LSMW
No ABAP effort are required for the SAP data migration. However, effort are required to map the data into the structure according to the pre-determined format as specified by the pre-written ABAP upload program of the LSMW.
The Legacy System Migration Workbench (LSMW) is a tool recommended by SAP that you can use to transfer data once only or periodically from legacy systems into an R/3 System.
More and more medium-sized firms are implementing SAP solutions, and many of them have their legacy data in desktop programs. In this case, the data is exported in a format that can be read by PC spreadsheet systems. As a result, the data transfer is mere child's play: Simply enter the field names in the first line of the table, and the LSM Workbench's import routine automatically generates the input file for your conversion program.
The LSM Workbench lets you check the data for migration against the current settings of your customizing. The check is performed after the data migration, but before the update in your database.
So although it was designed for uploading of legacy data it is not restricted to this use.
We use it for mass changes, i.e. uploading new/replacement data and it is great, but there are limits on its functionality, depending on the complexity of the transaction you are trying to replicate.
The SAP transaction code is 'LSMW' for SAP version 4.6x.
For those with the older SAP version (4.7 and below), the data migration programs might not have been pre-loaded.
You can download the LSMW at no cost from SAPNet under Services, SAP Methodology and Tools, category Tools.
If you are an existing SAP customer with an OSS ID, you can access the SAP Service Marketplace to download the LSWM for your Basis teams to install to your SAP system: http://service.sap.com/lsmw
The LSM Workbench carries out the following tasks:
Reads the transfer data from one or more files (for example, spreadsheets, sequential files etc.)
Converts the data from the source format into the target format
Note that with background processing, the input file must not be located in the presentation server. Access to presentation server files is only possible when you are working online.
You can have a look at the example of an upload data format for the Condition Pricing for Sales Order.
RV14BTCI - Batch Input for Uploading Condition Pricing
After executing the program, you have to use SM35 to process the update program.
Envirionment : 4.6x
Require flat file :-
ROW 1 BGR00
ROW 2 BKOND1
ROW 3 BKOND2 - no scale
ROW 4 BKOND2 - no scale
ROW 5 BKOND3 - with scale
ROW 6 BKOND2 - no scale
Sample flat file for uploading table A305 - Customer/Material with release status :-
0BIPRICE 123SAPABAP X
1VK15 A305V PR00
2ALL 990000123456SAP8204142100 2002043020020401 50USD 100PC
2ALL 990000123456SAP8217168100 2002043020020401 50USD 100PC
3 100PC 2
3 200PC 1
2ALL 990000123456SAP8220133910
There a total of 4 flat file format :-
BGR00 - Session Header Record
-
Field name | Description | Report header | Cat. | Length | Dec. |
-
STYPE | Record type | 0 | CHAR | 000001 | 000000 |
GROUP | Group name | BI Session Name | CHAR | 000012 | 000000 |
MANDT | Client | Your client no | CLNT | 000003 | 000000 |
USNAM | User ID | Queue user ID | CHAR | 000012 | 000000 |
START | Lock until: | Queue start date | DATS | 000010 | 000000 |
XKEEP | Keep indicator | X - don't delete SESS | CHAR | 000001 | 000000 |
NODATA | No batch input | / | CHAR | 000001 | 000000 |
-
BKOND1 - Header Record
-
Field name | Description | Report header | Cat. | Length | Dec. |
-
STYPE | Record type | 1 | CHAR | 000001 | 000000 |
TCODE | Transaction code | TCode = VK15 | CHAR | 000020 | 000000 |
KVEWE | Usage | U | CHAR | 000001 | 000000 |
KOTABNR | Table | Table e.g. 305 | CHAR | 000003 | 000000 |
KAPPL | Application | App e.g V | CHAR | 000002 | 000000 |
KSCHL | Condition type | CTyp e.g PR00 | CHAR | 000004 | 000000 |
-
BKOND2 - Main Data Record
-
Field name | Description | Report header | Cat. | Length | Dec. |
-
STYPE | Record type | 2 | CHAR | 000001 | 000000 |
VAKEY | VarKey | VarKey | CHAR | 000100 | 000000 |
DATBI | Valid to | Valid to | DATS | 000010 | 000000 |
DATAB | Valid on | Valid on | DATS | 000010 | 000000 |
KBETR | Amount | Amount | CHAR | 000015 | 000000 |
KONWA | R/2 table | R2tab | CHAR | 000005 | 000000 |
KPEIN | R/2 table | R2tab | CHAR | 000005 | 000000 |
KMEIN | CHAR | 000003 | 000000 |
MWSK1 | Tax code | Tx | CHAR | 000002 | 000000 |
KONMS | Scale UoM | UoM | UNIT | 000003 | 000000 |
MXWRT | Amount | Amount | CHAR | 000015 | 000000 |
GKWRT | Amount | Amount | CHAR | 000015 | 000000 |
STFKZ | Scale type | S | CHAR | 000001 | 000000 |
KZNEP | Exclusion | CndEx | CHAR | 000001 | 000000 |
LOEVM_KO | Deletion indic. | D | CHAR | 000001 | 000000 |
SKONWA | R/2 table | R2tab | CHAR | 000005 | 000000 |
-
BKOND3 - Scale Data Record
-
Field name | Description | Report header | Cat. | Length | Dec. |
-
STYPE | Record type | 3 | CHAR | 000001 | 000000 |
KSTBM | Quantity | Quantity | CHAR | 000018 | 000000 |
KONMS | Scale UoM | UoM | UNIT | 000003 | 000000 |
KBETR | Amount | Amount | CHAR | 000015 | 000000 |
-
thanks
karthik
04-25-2008 6:14 PM
hi anupma,
transmission upload
links
http://www.huntlycomputers.co.uk/exel-sap-data.html
http://www.sap-img.com/sap-catt.htm
http://help.sap.com/saphelp_nw04/helpdata/en/f3/3a69377f2b8032e10000009b38f8cf/content.htm
For a BDC upload you need to write a program which created BDC sessions.
Steps:
1. Work out the transaction you would use to create the data manually.
2. Use transaction SHDB to record the creation of one material master data.
Click the New recording button or the Menu - Recording - Create
3. Save the recording, and then go back a screen and go to the overview.
4. Select the recording and click on Edit - Create Program. Give the program a Z name, and select transfer from recording.
5. Edit the program. You will see that all the data you entered is hard-coded into the program. You need to make the following changes:
5.1 After the start-of-selection, Call ws_upload to upload the file (the excel file needs to be saved as TAB separated).
5.2 After the open-group, Loop on the uploaded data. For each line, perform validation checks on the data, then modify the perform bdc_field commands to use the file data.
5.3. After perform bdc_transaction, add the endloop.
Execute the program. It will have options to create a batch session or to process directly.
These are all my finds . Might be it will be useful to you.
Direct call of transactions, session handling:
/nxxxx This terminates the current transaction, and starts transaction xxxx
/n This terminates the transaction. This generally corresponds to pressing F15 to go back.
/nend This termiantes all separate sessions and logs off (corresponds to System - Logoff).
/nex This terminates all separate sessions and logs off immediately (without any warning!).
/oxxxx This opens a new session and starts transaction xxxx in This session.
/o This lists existing sessions and allows deletion or opening of a new session.
/i This terminates the current session (corresponds to System End
/i1, /i2,... This terminates the session with the number given.
.xyzw Fast path: 'xyzw' refers to the underlined letters in the menus. This type of navigation is uncommon and is provided more for emergencies (such as a defective mouse).
Batch
The following commands can be entered in correction mode ('Process in foreground' or 'Display errors only') when processing a batch input session:
/n This terminates the current batch input transaction and characterizes it as
/bdel This deletes the current batch input transaction.
/bend This terminates batch input processing and sets the session to Failed
/bda This switches from Display errors only to Process in foreground
/bde This switches from Process in foreground to Display errors only
ABAP/4
/h This switches into debugging mode.
/hs This switches into debugging mode and activates the debugging of system functions.
Buffer
WARNING: Resetting buffers can significantly change the performance of the entire system for a long time.
It should therefore only be used where there is a good reason tdso. As of release 3.0B system administator authorization is required (authorization object (S_ADMI_FCD). The action is noted in the system log.
/$SYNC This resets all buffers of the application server
/$CUA This resets the CUA buffer of the application server
/$TAB This resets the TABLE buffers of the application server
/$NAM This resets the nametab buffer of the application server
/$DYNP This resets the screen buffer of the application server
thanks
karthik
06-23-2008 3:38 PM
Hello Gurus,
Please help me with RV14BTCI program. I am trying to create the structure in LSMW with program structures. It creates an hierarchy, however it is unable to write the multiple files after reading.
Please help!!
Thanks!
Indrajit
04-05-2011 12:24 PM