bdc using lsmwdoc

download

of 58

  • date post

    11-Mar-2015
  • Category

    Documents
  • view

    32
  • download

    1

Embed Size (px)

transcript

EXAMPLE TO UPLOAD BANK MASTER DATA(FI01) USING LSMW. Using Batch Input Recording Technique. Maintain a flat file for FI01 to upload data . Here I am maintaining file with data of transaction FI01 of some fields with tab space.

Go to LSMW (T-CODE)

PROVIDE

(ANY NAME STARTING WITH PROJECT NAME SUBPROJECT OBJECT ZLSMW_PROJ ZLSMW_SUB ZLSMW_OBJ

Y or Z )

(nothing but session name)

SELECT

CREATE(SHIFT+F1)

PROVIDE PROJECT SHORT DESCRIPTION

PROVIDE SUB PROJECT SHORT DESCRIPTION

PROVIDE SHORT DESCRIPTION FOR OBJECT AND PRESS ENTER

SELECT EXECUTE(F8) GET A SCREEN WITH CERTAIN STEPS FIRST 14 STEPS COMES UNDER BATCH INPUT RECORDING TECHNIQUE.

1. MAINTAIN OBJECT ATTRIBUTES. In this step we will provide method or technique name and recording details. SELECT EXECUTE(F8) THEN SELECT DISPLAY/CHANGE OPTION.

NOW SELECT GOTO -> RECORDING OVERVIEWS

THEN BELOW SCREEN APPEARS

SELECT CREATE RECORDING PROVIDE RECORDING NAME AND SHORT DESCRIPTION AND PRESS ENTER

PROVIDE T-CODE NAME AND PRESS ENTER

NOW THE RECORDING IS STARTED FOR TRANSACTION FI01. HERE ENTER REQUIRED FIELDS FOR EACH SCREEN BY PRESSING ENTER AND FINALLY SAVE WHICH YOU ARE GOING TO UPLOAD . HERE I AM DATA FOR SOME FIELDS.

AFTER SAVING FOLLOWING SCREEN APPEARS WITH RECORDING DETAILS WITH SCREEN NUMBERS.

NOW UNDER SCREEN NUMBER 0100 DOUBLE CLICK ON FIELD NAME (BNKA-BANKS)

HERE PROVIDE NAME- FIELDNAME(BANKS) NAME DESCRIPTION(COUNTRY) REMOVE THE DEFAULT VALUE

PRESS ENTER

DO THE SAME FOR ALL FIELDS UNDER DIFFERENT SCREEN NUMBERS. AFTER COMPLETING OF GIVING DETAILS , THEN FOLLOWING SCREEN APPEARS

SAVE. PRESS F3 FOR BACK. AGAIN PRESS F3.

SELECT BATCH INPUT RECORDING RADIO BUTTON PROVIDE RECORDING NAME WHICH WE HAVE DONE.

PRESS ENTER AND SAVE. F3 FOR BACK.

THEN SCREEN APPEARS WITH SELECTING AUTOMATICALLY SECOND RADIO BUTTON.

2. MAINTAIN SOURCE STRUCTURES In this step source structure(internal table) is created for holding data. SELECT EXECUTE F8

SOME TIMES IT WILL BE IN DISPLAY MODE, SO SELECT DISPLAY CHANGE

NOW SELECT CREATE STRUCTURE(CTRL+F4)

PROVIDE STRUCTURE NAME - ITABFI(any name) DESCRIPTION - INTERNAL TABLE

PRESS ENTER

SAVE AND F3 FOR BACK. BELOW SCREEN APPEARS WITH SELECTING RADIO BUTTON 3

3. MAINTAIN SOURCE FIELDS. In this step we have to create source fields based on flat file data

SELECT EXECUTE(F8) THEN SELECT DISPLAY CHANGE OPTION IF IT IS IN DISPLAY MODE, THEN FOLLOWING SCREEN APPEARS

SELECT ITABFI THEN SELECT TABLE MAINTAINENCE(CTRL+F9)

HERE PROVIDE FIELD NAME , TYPE , LENGTH (description will automatically based on field names) BASED ON FLAT FILE FIELDS

SAVE AND PRESS F3 (BACK) FOR 2 TIMES, THEN BELOW SCREEN APPEARS.

4. MAINTAIN STRUCTURE RELATIONS In this step maintain relation ship between source structure and source fields.

SELECT EXECUTE(F8) SELECT DISPLAY /CHANGE, IF IT IS IN DISPLAY MODE, THEN BELOW SCREEN APPEARS

SAVE AND F3 FOR BACK. THEN SCREEN APPEARS AS

5. MAINTAIN FIELD MAPPING AND CONVERSION RULES In this field mapping is maintained. Select execute.

Select DISPLAY/CHANGE OPTION.

HERE SELECT FIELD (BANKS) AND THEN SELECT SOURCE FIELD OPTION(CTRL+F2)

NOW DOUBLE CLICK ON FIELD(BANKS) UNDER SOURCE FIELD.

THEN GET A WARNING, CLICK ON ENTER

REPEAT THE SAME PROCEDURE FOR ALL FIELDS.

SAVE AND F3 FOR BACK, THEN BELOW SCREEN APPEARS.

6. MAINTAIN FIXED VALUES, TRANSLATIONS USERDEFINED ROUTINES. Here this step is not required.

MANUALLY SELECT STEP-7 (SPECIFY FILES), THEN BELOW SCREEN APPEARS

7.

SPECIFY FILES In this flat file is maintained. Select execute(F8)

SELECT DISPLAY/CHANGE

Here double click on legacy data- on the PC (front end)

PROVIDE FILE PATH

PROVIDE NAME(any name) Then in Delimiter tab, select radio button TABULATOR, as we maintain flat file with tabulator as space

In File structure tab, defaultly 2nd check box is selected, if we maintain field headings in the flat file, we have to select 1st check box(field names at start of file) here. But here I maintained flat file without field headings.

PRESS ENTER

SAVE(CTRL+S) AND F3 FOR BACK.

8. ASSIGN FILES In this step flat file is linked with source structure.

SELECT EXECUTE(F8) SELECT DISPLY/CHANGE, IF IT IS IN DISPLAY MODE.

SAVE(CTRL+S) AND F3 FOR BACK.

9. READ DATA In this flat file data is uploaded to source structure(similar to GUI_UPLOAD function module) Select execute(F8)

AGAIN SELECT EXECUTE(F8)

Here we can see 2 records which we maintained in flat file is uploaded to source structure.

F3 for BACK 2 TIMES.

10. DISPLAY READ DATA In this step read data will be displayed which is in sourc structure. SELECT EXECUTE(F8)

PRESS ENTER

Here we can see flat file data. F3 FOR BACK.

11. CONVERT DATA In this step data is converted for screen mapping and field mapping..

Select execute F8

AGAIN SELECT EXECUTE(F8)

Here we can see that given 2 records are converted F3 FOR BACK 2 TIMES

12. DISPLAY CONVERTED DATA In this converted records (mapped records) are displayed. SELECT EXECUTE(F8)

PRESS ENTER

F3 FOR BACK.

13. CREATE BATCH INPUT SESSION In this step session is created with the name (ZLSMW_OBJ) which is nothing but object name which we have given.

SELECT EXECUTE(F8)

AGAIN SELECT EXECUTE(F8)

THEN THE ABOVE SCREEN APPEARS WITH MESSAGE 2 TRANSACTIONS (RECORDS) ARE CREATED. THEN PRESS ENTER

14. RUN BATCH INPUT SESSION In this step we session should be processed. SELECT EXECUTE(F8) After execution, we will go to SM35 transaction, where the session will process

NOW SELECT THE SESSION NAME AND CLICK ON PROCESS SESSION(F8)

Here we will have 3 processing modes, 1. process foreground 2. display errors 3. background In flat file if we maintained any data in non-sap format(legacy format), we will go with foreground process. For each and every record there will be screen flow. If entire data in sap format, we can go with back ground. If we select display errors , it will show error if any error occurs(i.e for non-sap data ). HERE I AM USING FOREGROUND.

SELECT FOREGROUND AND SELECT PROCESS OPTION

HERE FIRST RECORD IS UPLOADING VIA SCREENS

2ND RECORD

HERE BANK COUNTRY GER IS NOT ACCEPTING, WHY BECAUSE IT IS NOT IN SAP FORMAT, FOR GERMANY -- GE is the standard sap format

So instead of GER provide GE , then press enter

PRESS ENTER

GET A MESSAGE THAT PROCESSING OF SESSION IS COMPLETED.

HENCE WE SUCCESSFULLY UPLOADED THE RECORDS. Then we can check in respective tables. Here table is BNKA