cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload Bulk Customer Data from Excel or Notepad?

Former Member
0 Kudos

Hi

Could any body explain me how can we upload bulk customer master data into SAP system. How the LSMW functionality works for it. what are the prerequisites to upload the data into the system, and Could any body explain me the detailed procedure to upload Customer master data into the system.

As well I request you to know what are the other functionality we use for uploading. What would be the difference between IDOC and BDC functionalities.

your suggestions will be highly appreciated?

Raghu Ram

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi raghu,

this is sample code of bdc,

REPORT zbdc_cus_create_ctm NO STANDARD PAGE HEADING MESSAGE-ID zsmep.

&----


*& Request ID: ECCK900136

*& Author : seshu

*& Date : 20/03/2007

*& This report Creates customer Master Details through BDC-Call transaction

*& method and download error files to the presentation server.

&----


DATA: BEGIN OF t_tab OCCURS 0,

kunnr TYPE kun16,

bukrs TYPE bukrs,

vkorg TYPE vkorg,

vtweg TYPE vtweg,

spart TYPE spart,

ktokd TYPE ktokd,

name1 TYPE name1_gp,

sortl TYPE sortl,

ort01 TYPE ort01_gp,

land1 TYPE land1_gp,

spras TYPE spras,

pstlz TYPE pstlz,

civve TYPE civve,

akont TYPE akont,

awahr TYPE awahr,

waers TYPE waers_v02d,

kzazu TYPE kzazu_d,

antlf TYPE string.

DATA: END OF t_tab.

DATA: BEGIN OF t_tab1 OCCURS 0,

kunnr TYPE kun16,

bukrs TYPE bukrs,

vkorg TYPE vkorg,

vtweg TYPE vtweg,

spart TYPE spart,

ktokd TYPE ktokd,

name1 TYPE name1_gp,

sortl TYPE sortl,

ort01 TYPE ort01_gp,

land1 TYPE land1_gp,

spras TYPE spras,

pstlz TYPE pstlz,

civve TYPE civve,

akont TYPE akont,

awahr TYPE awahr,

waers TYPE waers_v02d,

kzazu TYPE kzazu_d,

antlf TYPE string.

DATA: END OF t_tab1.

DATA: BEGIN OF g_tab_create OCCURS 0,

kunnr TYPE kunnr,

messa TYPE string.

DATA: END OF g_tab_create.

DATA: BEGIN OF g_tab_error OCCURS 0,

kunnr TYPE kunnr,

messa TYPE string.

DATA: END OF g_tab_error.

DATA: g_tab TYPE TABLE OF string,

g_wa TYPE string.

*DATA: g_tab TYPE TABLE OF t_tab,

  • g_wa LIKE LINE OF g_tab.

*

DATA: g_tab1 TYPE TABLE OF string.

*itab for mapping...

DATA: BEGIN OF tab_map OCCURS 0.

INCLUDE STRUCTURE bdcdata.

DATA: END OF tab_map.

*itab for error messages...

DATA: BEGIN OF tab_error OCCURS 0.

INCLUDE STRUCTURE bdcmsgcoll.

DATA: END OF tab_error.

DATA: BEGIN OF l_tab OCCURS 0,

l_text TYPE string.

DATA: END OF l_tab.

*delcarations for blocked alv...

TYPE-POOLS: slis.

DATA: l_tab_fieldcatlog TYPE slis_t_fieldcat_alv,

l_tab_fieldcatlog1 TYPE slis_t_fieldcat_alv,

l_layout TYPE slis_layout_alv,

l_events TYPE slis_t_event,

l_events1 TYPE slis_t_event,

l_wa_events LIKE LINE OF l_events,

l_pos TYPE i,

report TYPE sy-repid,

path TYPE string,

path1 TYPE string.

      • End generated data section ***

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

PARAMETERS: file TYPE ibipparms-path OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.

PARAMETERS: file1 TYPE ibipparms-path.

SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.

CALL FUNCTION 'F4_FILENAME'

IMPORTING

file_name = file.

MOVE file TO path.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR file1.

CALL FUNCTION 'F4_FILENAME'

IMPORTING

file_name = file1.

MOVE file1 TO path1.

AT SELECTION-SCREEN .

IF file EQ file1.

MESSAGE e103(zsmep).

EXIT.

ENDIF.

START-OF-SELECTION.

*call transaction method...

PERFORM call_ctm.

*display the output in blocked alv...

PERFORM disply_block_alv.

&----


*& Form call_ctm

&----


  • text

----


FORM call_ctm.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = path

filetype = 'ASC'

  • HAS_FIELD_SEPARATOR = ' '

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • VIRUS_SCAN_PROFILE =

  • NO_AUTH_CHECK = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

data_tab = g_tab

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

DATA: text TYPE TABLE OF string.

LOOP AT g_tab INTO g_wa.

SPLIT g_wa AT '|' INTO: t_tab-kunnr

t_tab-bukrs

t_tab-vkorg

t_tab-vtweg

t_tab-spart

t_tab-ktokd

t_tab-name1

t_tab-sortl

t_tab-ort01

t_tab-land1

t_tab-spras

t_tab-pstlz

t_tab-civve

t_tab-akont

t_tab-awahr

t_tab-waers

t_tab-kzazu

t_tab-antlf,

TABLE text.

APPEND t_tab.

CLEAR g_wa.

ENDLOOP.

LOOP AT t_tab.

REFRESH tab_map.

PERFORM sub USING 'SAPMF02D' '0100'.

PERFORM sub1 USING 'BDC_CURSOR'

'RF02D-KTOKD'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub1 USING 'RF02D-KUNNR'

t_tab-kunnr.

PERFORM sub1 USING 'RF02D-BUKRS'

t_tab-bukrs.

PERFORM sub1 USING 'RF02D-VKORG'

t_tab-vkorg.

PERFORM sub1 USING 'RF02D-VTWEG'

t_tab-vtweg.

PERFORM sub1 USING 'RF02D-SPART'

t_tab-spart.

PERFORM sub1 USING 'RF02D-KTOKD'

t_tab-ktokd.

PERFORM sub USING 'SAPMF02D' '0110'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNA1-SPRAS'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub1 USING 'KNA1-NAME1'

t_tab-name1.

PERFORM sub1 USING 'KNA1-SORTL'

t_tab-sortl.

PERFORM sub1 USING 'KNA1-ORT01'

t_tab-ort01.

PERFORM sub1 USING 'KNA1-LAND1'

t_tab-land1.

PERFORM sub1 USING 'KNA1-SPRAS'

t_tab-spras.

PERFORM sub1 USING 'KNA1-PSTLZ'

t_tab-pstlz.

PERFORM sub USING 'SAPMF02D' '0120'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNA1-LIFNR'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub USING 'SAPMF02D' '0125'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNA1-NIELS'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub USING 'SAPMF02D' '0130'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNBK-BANKS(01)'.

PERFORM sub1 USING 'BDC_OKCODE'

'=ENTR'.

PERFORM sub USING 'SAPMF02D' '0340'.

PERFORM sub1 USING 'BDC_CURSOR'

'RF02D-KUNNR'.

PERFORM sub1 USING 'BDC_OKCODE'

'=ENTR'.

PERFORM sub USING 'SAPMF02D' '0370'.

PERFORM sub1 USING 'BDC_CURSOR'

'RF02D-KUNNR'.

PERFORM sub1 USING 'BDC_OKCODE'

'=ENTR'.

PERFORM sub1 USING 'KNA1-CIVVE'

t_tab-civve.

PERFORM sub USING 'SAPMF02D' '0360'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNVK-NAMEV(01)'.

PERFORM sub1 USING 'BDC_OKCODE'

'=ENTR'.

PERFORM sub USING 'SAPMF02D' '0210'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNB1-AKONT'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub1 USING 'KNB1-AKONT'

t_tab-akont.

PERFORM sub USING 'SAPMF02D' '0215'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNB1-GUZTE'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub USING 'SAPMF02D' '0220'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNB5-KNRMA'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub USING 'SAPMF02D' '0230'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNB1-VRSNR'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub USING 'SAPMF02D' '0310'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNVV-BZIRK'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub1 USING 'KNVV-AWAHR'

t_tab-awahr.

PERFORM sub1 USING 'KNVV-WAERS'

t_tab-waers.

PERFORM sub USING 'SAPMF02D' '0315'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNVV-LPRIO'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub1 USING 'KNVV-KZAZU'

t_tab-kzazu.

PERFORM sub1 USING 'KNVV-ANTLF'

t_tab-antlf.

PERFORM sub USING 'SAPMF02D' '0320'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNVV-PERFK'.

PERFORM sub1 USING 'BDC_OKCODE'

'/00'.

PERFORM sub USING 'SAPMF02D' '1350'.

PERFORM sub1 USING 'BDC_CURSOR'

'RF02D-KUNNR'.

PERFORM sub1 USING 'BDC_OKCODE'

'=ENTR'.

PERFORM sub USING 'SAPMF02D' '0324'.

PERFORM sub1 USING 'BDC_CURSOR'

'KNVP-PARVW(01)'.

PERFORM sub1 USING 'BDC_OKCODE'

'=ENTR'.

CALL TRANSACTION 'XD01' USING tab_map

MODE 'N'

UPDATE 'A'

MESSAGES INTO tab_error.

LOOP AT tab_error.

DATA: l_message TYPE string.

IF tab_error-msgtyp = 'I' OR tab_error-msgtyp = 'S'.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

id = tab_error-msgid

lang = 'EN'

no = tab_error-msgnr

v1 = tab_error-msgv1

v2 = tab_error-msgv2

v3 = tab_error-msgv3

v4 = tab_error-msgv4

IMPORTING

msg = l_message

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

MOVE: t_tab-kunnr TO g_tab_create-kunnr,

l_message TO g_tab_create-messa.

APPEND g_tab_create.

ELSEIF

tab_error-msgtyp = 'E'.

MOVE-CORRESPONDING t_tab TO t_tab1.

APPEND t_tab1.

DATA: text1 TYPE string.

CONCATENATE t_tab-kunnr

t_tab-bukrs

t_tab-vkorg

t_tab-vtweg

t_tab-spart

t_tab-ktokd

t_tab-name1

t_tab-sortl

t_tab-ort01

t_tab-land1

t_tab-spras

t_tab-pstlz

t_tab-civve

t_tab-akont

t_tab-awahr

t_tab-waers

t_tab-kzazu

t_tab-antlf

INTO text1 SEPARATED BY '|'.

l_tab-l_text = text1 .

APPEND l_tab.

*error records downlaod to pc...

PERFORM gui_downlaod.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

id = tab_error-msgid

lang = 'EN'

no = tab_error-msgnr

v1 = tab_error-msgv1

v2 = tab_error-msgv2

v3 = tab_error-msgv3

v4 = tab_error-msgv4

IMPORTING

msg = l_message

EXCEPTIONS

not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

MOVE: t_tab-kunnr TO g_tab_error-kunnr,

l_message TO g_tab_error-messa.

APPEND g_tab_error.

ENDIF.

ENDLOOP.

REFRESH tab_error.

CLEAR l_message.

ENDLOOP.

ENDFORM. "call_ctm

&----


*& Form sub

&----


  • text

----


  • -->A text

  • -->B text

----


FORM sub USING a b.

CLEAR tab_map.

tab_map-program = a.

tab_map-dynpro = b.

tab_map-dynbegin = 'X'.

APPEND tab_map.

ENDFORM. "FORM

" sub

&----


*& Form sub1

&----


  • text

----


  • -->P_0579 text

  • -->P_0580 text

----


FORM sub1 USING c d.

CLEAR tab_map.

tab_map-fnam = c.

tab_map-fval = d.

APPEND tab_map.

ENDFORM. " sub1

*END-OF-SELECTION.

&----


*& Form disply_block_alv

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM disply_block_alv .

PERFORM fill_fieldcatlog.

PERFORM fill_fieldcatlog1.

PERFORM call_block_alv.

ENDFORM. " disply_block_alv

&----


*& Form fill_fieldcatlog

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM fill_fieldcatlog .

PERFORM build_catlog USING l_pos 'G_TAB_CREATE' 'KUNNR' '16' text-004.

PERFORM build_catlog USING l_pos 'G_TAB_CREATE' 'MESSA' '90' text-005.

ENDFORM. " fill_fieldcatlog

&----


*& Form BUILD_CATLOG

&----


  • text

----


  • -->P_L_POS text

  • -->P_0844 text

  • -->P_0845 text

  • -->P_0846 text

  • -->P_TEXT_004 text

----


FORM build_catlog USING u_pos TYPE any

value(u_0844) TYPE any

value(u_0845) TYPE any

value(u_0846) TYPE any

u_text TYPE any.

DATA: l_wa_fieldcatlog TYPE slis_fieldcat_alv.

ADD 1 TO u_pos.

l_wa_fieldcatlog-col_pos = u_pos.

l_wa_fieldcatlog-tabname = u_0844.

l_wa_fieldcatlog-fieldname = u_0845.

l_wa_fieldcatlog-outputlen = u_0846.

l_wa_fieldcatlog-reptext_ddic = u_text.

APPEND l_wa_fieldcatlog TO l_tab_fieldcatlog.

ENDFORM. " BUILD_CATLOG

&----


*& Form fill_fieldcatlog1

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM fill_fieldcatlog1 .

PERFORM build_catlog1 USING l_pos 'G_TAB_ERROR' 'KUNNR' '16' text-004.

PERFORM build_catlog1 USING l_pos 'G_TAB_ERROR' 'MESSA' '90' text-005.

ENDFORM. " fill_fieldcatlog1

&----


*& Form build_catlog1

&----


  • text

----


  • -->P_L_POS text

  • -->P_0913 text

  • -->P_0914 text

  • -->P_0915 text

  • -->P_TEXT_004 text

----


FORM build_catlog1 USING u_pos TYPE any

value(u_0913) TYPE any

value(u_0914) TYPE any

value(u_0915) TYPE any

u_text TYPE any.

DATA: l_wa_fieldcatlog1 TYPE slis_fieldcat_alv.

ADD 1 TO u_pos.

l_wa_fieldcatlog1-col_pos = u_pos.

l_wa_fieldcatlog1-tabname = u_0913.

l_wa_fieldcatlog1-fieldname = u_0914.

l_wa_fieldcatlog1-outputlen = u_0915.

l_wa_fieldcatlog1-reptext_ddic = u_text.

APPEND l_wa_fieldcatlog1 TO l_tab_fieldcatlog1.

ENDFORM. " build_catlog1

&----


*& Form CALL_BLOCK_ALV

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM call_block_alv .

report = sy-repid.

CLEAR l_events.

l_wa_events-name = slis_ev_top_of_page.

l_wa_events-form = 'TOP_OF_PAGE'.

APPEND l_wa_events TO l_events.

CLEAR l_wa_events.

l_wa_events-name = slis_ev_top_of_page.

l_wa_events-form = 'ETOP_OF_PAGE'.

APPEND l_wa_events TO l_events1.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'

EXPORTING

i_callback_program = report

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

  • IT_EXCLUDING =

.

IF g_tab_create[] IS INITIAL.

MESSAGE s101(zsmep).

  • EXIT.

ELSE.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = l_layout

it_fieldcat = l_tab_fieldcatlog

i_tabname = 'G_TAB_CREATE'

it_events = l_events

  • IT_SORT =

  • I_TEXT = ' '

TABLES

t_outtab = g_tab_create

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • MAXIMUM_OF_APPENDS_REACHED = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

IF g_tab_error[] IS INITIAL.

MESSAGE s102(zsmep).

ELSE.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'

EXPORTING

is_layout = l_layout

it_fieldcat = l_tab_fieldcatlog1

i_tabname = 'G_TAB_ERROR'

it_events = l_events1

  • IT_SORT =

  • I_TEXT = ' '

TABLES

t_outtab = g_tab_error

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • MAXIMUM_OF_APPENDS_REACHED = 2

  • OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDIF.

CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'

  • EXPORTING

  • I_INTERFACE_CHECK = ' '

  • IS_PRINT =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

  • EXCEPTIONS

  • PROGRAM_ERROR = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " CALL_BLOCK_ALV

&----


*& Form top_of_page

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM top_of_page .

WRITE: 'Created Records'.

ENDFORM. " top_of_page

&----


*& Form ETOP_OF_PAGE

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM etop_of_page .

WRITE: 'Error Records'.

ENDFORM. " ETOP_OF_PAGE

&----


*& Form gui_downlaod

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM gui_downlaod .

MOVE file1 TO path1.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

filename = path1

filetype = 'ASC'

  • APPEND = ' '

write_field_separator = '|'

  • HEADER = '00'

  • TRUNC_TRAILING_BLANKS = ' '

  • WRITE_LF = 'X'

  • COL_SELECT = ' '

  • COL_SELECT_MASK = ' '

  • DAT_MODE = ' '

  • CONFIRM_OVERWRITE = ' '

  • NO_AUTH_CHECK = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • WRITE_BOM = ' '

  • TRUNC_TRAILING_BLANKS_EOL = 'X'

  • WK1_N_FORMAT = ' '

  • WK1_N_SIZE = ' '

  • WK1_T_FORMAT = ' '

  • WK1_T_SIZE = ' '

  • WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE

  • IMPORTING

  • FILELENGTH =

TABLES

data_tab = l_tab

  • FIELDNAMES =

  • EXCEPTIONS

  • FILE_WRITE_ERROR = 1

  • NO_BATCH = 2

  • GUI_REFUSE_FILETRANSFER = 3

  • INVALID_TYPE = 4

  • NO_AUTHORITY = 5

  • UNKNOWN_ERROR = 6

  • HEADER_NOT_ALLOWED = 7

  • SEPARATOR_NOT_ALLOWED = 8

  • FILESIZE_NOT_ALLOWED = 9

  • HEADER_TOO_LONG = 10

  • DP_ERROR_CREATE = 11

  • DP_ERROR_SEND = 12

  • DP_ERROR_WRITE = 13

  • UNKNOWN_DP_ERROR = 14

  • ACCESS_DENIED = 15

  • DP_OUT_OF_MEMORY = 16

  • DISK_FULL = 17

  • DP_TIMEOUT = 18

  • FILE_NOT_FOUND = 19

  • DATAPROVIDER_EXCEPTION = 20

  • CONTROL_FLUSH_ERROR = 21

  • OTHERS = 22

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " gui_downlaod

this is one of the bdc method to upload data from notepad to sap.

regards,

seshu.

Former Member
0 Kudos

hi,

pl check this info on LSMW :

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.

We use IDOC's primarily when the source is non SAP or a different system. And BDC are much faster to upload data, and generally chosen when huge data is there.

But for master data's the functional consultants do it.. and LSMW is more functional friendly than a BDC which requires more programming compared to LSMW.

Hope it helps..

Thanks

Sadhu Kishore

Former Member
0 Kudos

Hi

Give your mail id

Former Member
0 Kudos

Hi Raghu.,

To upload a data first we need to make note of legacy data in excel sheet or note pad & this will be the source doccument and this is linked in LSMW with SAP,So <u><b>LSMW mainly reads the doccument converts & Imports the data in to SAP</b></u>,

Difference between BDC & IDOC,BDC is also a tool to convert the data like LSMW & IDOC is different & the concept of IDOC is different IDOCs are the carriers of the data just like a container where we use in EDI

BDC is nothin but BATCH DATA CONVERSION, we can upload the data using BDC or LSMW(Legacy system migration workbench,OR SECATT,

GIVE your mail id So that i can send you step by step procedure of LSMW with screen shots

REWARD if helpfull

Thanks & Regards

Narayana

Former Member
0 Kudos

Please send the detailed procedure of uploading customer master data into sap using LSMW and also using BDC

Former Member
0 Kudos

Hi Friends,

Please send the info to this email: sapisr@yahoo.com

Thank you

Raghu

Former Member
0 Kudos

Hi Raghu.,

Sent mail

REWARD if helpfull

Thanks & Regards

Narayana

Former Member
0 Kudos

Hi Manam,

Can you pls send the docs to christine.2004@yahoo.com

Thanks

Christine

Former Member
0 Kudos

Hi christine.,

Sent mail

REWARD if helpfull

Thanks & Regards

Narayana

Former Member
0 Kudos

SENT MAIL PL'S CHECK

Former Member
0 Kudos

Hi Manam,

This is Suji, Mumbai.

Can you pls send me the mail across for the same.

Thanks and Regards,

Suji.

0 Kudos

Hi

give ur mail id i will send them

regards

preetham

Former Member
0 Kudos

hi,

can us send me the soft copy plz.

my maild is ravindranathan.sunil11@gmail.com

regards

KR