64
LSM Workbench 1. LSM Workbench 목?............................................................................................................................. 3 1.1 개개.....................................................................3 1.2 LSM workbench 개 개개개 data migration.....................................3 1.3 LSM workbech 개 개개 개개................................................... 4 2. 목목 목목.................................................................................................................................................. 5 3. 목목목 목목목목............................................................................................................................................ 6 3.1 개개개개...................................................................6 3.2 Initial Transaction....................................................6 3.3 Project, Subproject and Object.........................................6 3.4 개개개 interface..........................................................8 3.5 Administration........................................................12 3.6 Recordings............................................................12 3.7 IDoc Inbound Processing 개 개개 개개개개.....................................13 4. General Tips for the Procedure....................................................................................................... 17 5. Data Migration – Step by Step......................................................................................................... 19 5.1 Maintain Object Attributes............................................19 5.2 Maintain Source Structures............................................20 5.3 Maintain Source Fields................................................21 5.4 Maintain Structural Relationships.....................................26 5.5 Maintain Field Mapping and Conversion Rules...........................28 5.6 Maintain Fixed Values, Translations and User-written Routines.........35 5.7 Specify Files.........................................................38 5.8 Use Wildcards in File Names...........................................43 5.9 Assign Files..........................................................44 5.10 Read Data............................................................45 5.11 Convert Data.........................................................46 5.12 Import Data..........................................................47 6. Recordings....................................................................................................................................... 49 1 of 64

1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

  • Upload
    dobao

  • View
    220

  • Download
    5

Embed Size (px)

Citation preview

Page 1: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

목 차

1. LSM Workbench 란?.................................................................................................................................................3

1.1 개요.......................................................................................................................................................................3

1.2 LSM workbench 를 이용한 data migration.....................................................................................................3

1.3 LSM workbech 의 주요 장점.............................................................................................................................4

2. 전제 조건....................................................................................................................................................................5

3. 시작과 준비사항........................................................................................................................................................6

3.1 사용권한...............................................................................................................................................................6

3.2 Initial Transaction..............................................................................................................................................6

3.3 Project, Subproject and Object.........................................................................................................................6

3.4 사용자 interface..................................................................................................................................................8

3.5 Administration..................................................................................................................................................12

3.6 Recordings.........................................................................................................................................................12

3.7 IDoc Inbound Processing 을 위한 설정사항...................................................................................................13

4. General Tips for the Procedure...............................................................................................................................17

5. Data Migration – Step by Step.................................................................................................................................19

5.1 Maintain Object Attributes..............................................................................................................................19

5.2 Maintain Source Structures.............................................................................................................................20

5.3 Maintain Source Fields.....................................................................................................................................21

5.4 Maintain Structural Relationships..................................................................................................................26

5.5 Maintain Field Mapping and Conversion Rules............................................................................................28

5.6 Maintain Fixed Values, Translations and User-written Routines................................................................35

5.7 Specify Files.......................................................................................................................................................38

5.8 Use Wildcards in File Names...........................................................................................................................43

5.9 Assign Files........................................................................................................................................................44

5.10 Read Data........................................................................................................................................................45

5.11 Convert Data...................................................................................................................................................46

5.12 Import Data.....................................................................................................................................................47

6. Recordings................................................................................................................................................................49

1 of 62

Page 2: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

6.1 Detailed Description of the Process.................................................................................................................49

7. Transport LSMW Projects.......................................................................................................................................52

7.1 Generate Change Request................................................................................................................................52

7.2 Export Project...................................................................................................................................................52

7.3 Import Project...................................................................................................................................................53

8. Periodic Data Transfer............................................................................................................................................54

9. Tips and Tricks.........................................................................................................................................................57

9.1 실행시점에 transaction code 결정..................................................................................................................57

9.2 Rrecord 건너뛰기.............................................................................................................................................57

9.3 한 Transaction 에 있는 모든 레코드 건너뛰기..............................................................................................57

9.4 Record 중복.......................................................................................................................................................58

2 of 62

Page 3: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

1. LSM Workbench 란?

1.1 개요LSM Workbench 는 SAP 가 아닌 다른 시스템(Legacy system)으로부터 R/3 로 데이터를 한번 또는

주기적으로 올릴수 있도록 해주는 R/3 based - tool 이다.

이 툴은 기존 시스템내의 데이터를 R/3 에 올릴수 있도록 conversion 할 수 있도록 하고 Batch inpput, direct

input, BAPI, IDOC 을 이용하여 R/3 로 import 할 수 있도록 한다.

또한, Migration 할 데이터를 생성하거나 변경하기 위한 transaction 의 Recording function 도 함께

제공한다.

1.2 LSM workbench 를 이용한 data migration 1. Import data (legacy data in spreadsheet tables and/or sequential files -> Application server)

2. Convert data (Source Format -> Target format)

3. Import data (Application server -> R/3 system)

1.3 LSM workbech 의 주요 장점- R/3 시스템의 일부 : R/3 의 표준 architecture 를 수용한다.

- 데이터 변환에 있어 다양한 기술 사용 가능

- Standard import technic 을 이용한 데이터의 정확성

3 of 62

Page 4: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Batch input

Direct input

BAPIs(Business Application Programming Interfaces)

IDocs (Intermediate Documents)

Import 할때 사용될 방식은 business object 에 따라 달라진다.

- 정의된 Rule 에 따라 conversion program 의 자동 생성

- 단계별 프로세스 가이드 제공

- Spread sheet format 의 데이터 interface

- Transaction Recording 기능으로 migration object 생성 가능

- 공짜!

4 of 62

Page 5: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

2. 전제 조건

Data migration 하기 건 아래의 사항들이 전제되어야 한다.

R/3 customizing 이 끝나야 한다.

기존 시스템에서 향후 필요한 데이터들을 선택한다.

전송될 데이터의 양을 점검한다. 아주 적은 양은 Mannaul 로 입력하는게 나을것이고 아주많은 양의

데이터를 batch input 이나 IDOC 을 이용하여 입력하게 되면 migration 시간이 아주 많이 걸릴수도

있다. 이러한 방식은 하드웨어나 다른 조건들에 대해서도 많은 변수가 있겠지만 대략 한시간에 만건

정도의 데이터를 처리한다고 보면 된다.

입력할 데이터가 R/3 내에서 처리될때의 transaction 을 알아야 한다.그래야 사후 점검이 가능하다.

Legacy system 내의 데이터를 몇 개 선택하여서 R/3 내 해당 transaction 을 실행시켜 보면서 어떤

필드들이 채워져야 하는지 살펴봐야 한다. 어떤 필수 필드들은 기존 데이터로써는 채워질 수 없고

고정된 값이나 data transfer 하는 동안 임시 값을 입력해야 하는 수가 있다.

우선 종이나 excel 등에서 source field 와 target 필드들을 mapping 시켜 본다.

데이터를 변환시킬 때 그냥 옮기면 되는지 어떤 rule 이 필요한지 파악한다.

만약 정형화된 rule 이 존재하면 translation rule 을 만들어 적용한다.(“Translation”)

Legacy system 에서 어떤 식으로 데이터를 추출할것인지 결정한다.(LSMW 는 기존시스템으로부터

데이터를 추출하는 일을 하지는 않는다.)

Legacy data 를 어떤 형식으로 저장할 것인지 결정하고 LSMW 에서 어떤 fucntion 을 이용하여 upload

할것인지 결정한다.

만약 legacy system 중 일부분만이 R/3 로 대체된다면 어떤 데이타가 R/3 에서 제공되고 어떤 데이타가

legacy 에서 제공될것인지 파악하고 data flow 와 interface architecture 를 구성한다.

5 of 62

Page 6: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

3. 시작과 준비사항

3.1 사용권한권한 레벨 Profile Function

Display B_LSMW_SHOW Display 만 가능

Execute B_LSMW_EXEC display data, read, convert and

import data.

Change B_LSMW_CHG "Execute" 권한도 가지게 되고

변경,복사가 가능하다.

All B_LSMW_ALL 모든 function 사용가능.

위의 프로파일들은 standard R/3 시스템내에는 없으므로 반드시 사용하고자 하는 user 의 마스터 레코드

내에 포함시켜 주어야 한다.

3.2 Initial TransactionLSM Workbench 를 사용하기 위해서는 transaction LSMW 를 이용한다.

3.3 Project, Subproject and Object첫화면에서 Create-> New entry 를 이용하여 새로운 project 를 만들수 있다.

Project: 최대 10 자리로 구성된 ID. 여러 legacy system 에서 data transfer 를 하려면 여러 개의 project

ID 를 구성할 수 있다.

Subproject: Project 를 몇 개의 subproject 로 나눌 수 있다.

Object: Business object 당 하나의 ID 지정

6 of 62

Page 7: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

초기 화면에서는 아래의 기능들이 있다.

“All objects” : 현재 만들어진 모든 project, subproject,object 들을 리스트해서 보여준다.

“All objects of the projects” : 선택한 프로젝트에 포함된 모든 오브젝트들을 tree 형태로 보여준다.

“My objects “ : 내가 만든 object 들을 보여준다.

“Project Documentation “ : Project 의 각 step 마다 description 을 저장한다. File 로부터 import 할 수도있고

파일로 download 받을 수 있다. 문서를 입력하려면 “Documentation”을

선택하고 내용을 입력한다.

예제) All objects of the project

7 of 62

Page 8: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

3.4 사용자 interface Object 를 선택하고 ENTER or CONTINUE 를 선택하면 각 step 에 따라 guide 를 제공한다.

Execute: 선택된 step 을 실행한다.

Personal menu: Processing step 들중 개인적으로 추가적인 스텝을 설정하여 볼 수 있다. 이 버튼을

클릭하면 추가적으로 설정할 수 있는 스텝들이 뜨는데 ‘main steps’를 선택하면 필수적인 스텝들이

자동적으로 선택된다.

Numbers On or Off: processing steps 의 번호를 보이게 할 수 있다.

Double click = Display or Double click = Change: Double click 했을때 어떤모드로 들어갈것인지 선택.

Object overview: 선택된 object 에 관한 정보를 볼 수 있다.(다음장의 그림 참조)

Action log: 실행된 process step 들에 관한 상세정보(date, user name, time)등을 보여준다. Extras

Reset action log 를 선택하면 log 들이 삭제 된다.

8 of 62

Page 9: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Personal Menu: All Processing Steps Available

Object Overview: General Data, Structures, Structure Relations

9 of 62

Page 10: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Object Overview: Source Structures / Target Structures

Object Overview: Rules

10 of 62

Page 11: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Object overview in table form

Note: 이 작업들은 field mapping 하기 전 R/3 structure 를 알기위해 사용된다. R/3 필드들과 legacy

data field 들을 “Paper mapping” 할때 유용하게 사용된다.

11 of 62

Page 12: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

3.5 Administration초기화면에서 Goto Administration 을 선택하면 모든 프로젝트에 대한 정보를 볼 수있다.

여기서 다음의 기능들이 가능하다.

create, process, display, delete, copy ,rename projects, subprojects, objects and reusable rules.

LSM Workbench: Administration

3.6 Recordings초기화면에서 Goto Recordings 를 선택하면 recording 화면으로 넘어온다.

입력할 data object 가 standard batch input program 이나 standard direct input program 또는 IDoc 으로

입력할수 있는 기능이 없을경우 recording function 을 이용하여 오브젝트를 생성할 수 있다.표준

프로그램이 있더라도 target field 를 줄이기 위해 recording function 을 사용하면 필드 맵핑을 좀 더 빨리 할

수 있다.

Note: Recording function 은 고정된 화면 순서를 따라 간다. 따라서 항목수가 변동이 된다든지

12 of 62

Page 13: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

dynamic 하게 screen 순서를 따라가는 오브젝트일경우는 사용이 불가능하다.

Recording 에 대한 좀 더 자세한 정보는 6 장에 기술되어 있다.

LSM Workbench: Recordings

3.7 IDoc Inbound Processing 을 위한 설정사항IDocs (Intermediate Documents) 은 서로 R/3 시스템간 message exchange 를 위해 개발된 것이다. (R/3

R/3; R/3 R/2; R/3 non-SAP system).

R/3 standard application 이기 때문에 이 기술도 data transfer 에 사용될 수 있다.

하지만 이것을 사용할려면 프로젝트마다 몇가지 세팅사항이 선행되어야 한다. LSM workbench

초기화면에서 Settings IDoc inbound processing 으로 가면 세팅사항들이 나와있다.

13 of 62

Page 14: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

LSM Workbench: Settings for IDoc Inbound Processing

우선 첫번째 세팅사항은 file 이 전송될 Port 를 설정해야 한다. “Maintain ports”를 이용해 필요할 경우

port type 을 추가한다. 커서를 "File"에 놓고 ‘Create’를 선택한다.

SAP recommends:

Port: LSMW

Name: Legacy System Migration Workbench

Version: 3 (IDoc record types SAP Release 4.x)

Outbound file (dummy) physical directory 와 file name 을 입력한다.

Ex) ‘filelsmw’

그리고 tRFC port 를 명시해야 한다. 이 port 는 필수사항인데, data conversion 하는 동안 새로운

파일을 만들고 싶지 않으면 function module ‘IDoc_Inbound_Asynchronous’로 데이터가 바로

올라가게 할 수 있다.

SAP recommends:

Port: assigned by the system

Version: 3 (IDoc record types SAP Release 4.x)

14 of 62

Page 15: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

RFC destination: Name of R/3 System

Name of port: Legacy System Migration Workbench

partner type 을 선택한다.

SAP recommends:

Partner type: "US" (User)

4.5A 부터는 partner type 이 미리 몇 개가 정의되어 있는데 4.5 이전의 버전에 대해서는

아래처럼생성해 주어야 한다.

Partner type: Create US

Report name: /SAPDMC/SAP_LSMW_PARTNERTYPES

Form routine: READ_USER

Short description: any

마지막으로 Partner type 을 선택한다. 새로 만들려면 아래와 같이 만든다.

Partner number: LSMW

Partner type: US

Partner status: A (active)

Type: US

Language: DE or EN

Person in charge: Your user ID

Activate IDoc inbound processing

"Yes" 를 선택하여 confirm 한다.(시스템당 한번만 세팅하면 됨)

Verify workflow customizing (시스템당 한번만 세팅하면 됨)

아래의 항목들에 모두 파란 불이 들어와야 한다:

Workflow Administrator maintained

Workflow RFC destination completely configured

15 of 62

Page 16: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Generic decision task classified completely

Sending to objects and to HR objects is active

‘automatic customizing’을 실행시키면 자동으로 설정된다.실행후에 "Monitoring job for work items

with errors" 라는 아이템이 "not scheduled"로 바뀌어 있어야 한다. (This means that you unmark

the ID "Monitoring of WIs with temporary errors".) 만일 이 세팅을 하지 않으면 시스템은

계속적으로 migration 하면서 생성된 잘못된 IDOC 에 대해 계속 세팅을 수행할 것이다.

‘Test RFC destination’을 이용하여 제대로 되었는지 테스트해본다. 제대로 되었으면 아래와 같은

메시지가 떠야한다:

'Ping' executed successfully. The RFC destination for the SAP Business Workflow is fully

configured.

Verifying Workflow Customizing

16 of 62

Page 17: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

4. General Tips for the Procedure R/3 시스템내 Customizing 이 모두 끝났는지 우선 확인한다.

이상적인 프로젝트는 :

우선 customizing 을 끝낸다.

그리고 data migration 을 수행한다.

관련 데이터오브젝트에 대한 내용을 숙지하여야 한다.

E.g. XD01: 고객마스터 생성

시스템내에 채워져야 할 필드를 명시한다.

Standard import program (batch input, direct input, BAPIs, IDocs)을 이용할것인지 Recording 을

이용할 것인지 결정한다:

표준 import program 을 사용할때의 장점:

화면 순서가 다양해질수 있다. (e.g.각각 다른 material type 을 이용할 경우)

Recordings 을 이용할때의 장점:

target field 의 수가 적다

거의 모든 transaction 에 대해 migration 이 가능하다.

Recording 을 사용하려면 : transaction 과 처리사항을 record 한다.

그리고 아래의 내용을 정의한다.

필드명

필드 description

Default 값

Legacy data 의 레코드 구조를 정의하고 R/3 내에 입력한다.

Case 1: 데이터가 하나 또는 그 이상의 파일에 존재할 경우

R/3 내에 파일내 데이터의 구조들을 모두 정의한다.

Case 2: 데이터가 legacy system 내에 있고 기존 시스템이 데이터를 export 하는 function 을

제공해 줄경우.

R/3 내에 export 할 데이터의 구조들를 정의한다.

Case 3: 데이터가 legacy system 내에 있고 기존 시스템이 export 하는 기능을 제공하지 않을 경우.

우선 필요한 데이터의 구조를 정의한다.

Legacy system 내에 export program 을 만들어 데이터를 export 한다.

17 of 62

Page 18: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

R/3 에 export 받은 데이터 구조를 지정한다.

field mapping 과 conversion rules 을 정의한다.

우선 수작업으로 필드를 mapping 할때는 ‘object overview ‘기능을 이용하면 편리하다.

Reusable rule 관리

변환 테이블이 있으면 translation tables 을 작성한다. 입력값이 많으면 파일로부터 upload 할 수

있다.

고정된 값이 있으면 fixed value 를 생성하여 값을 지정한다. Ex) company code, COA

Read data – 실행 버튼을 누르면 이미 명시된 파일을 자동으로 읽는다.

Convert data

주어진 rule 에 따라 자동으로 변환되어 변환된 sequencial file 이 자동으로 생성된다.

Import data.

Object type 에 따라서 :

Batch input / recording:

Generate batch input session.

Run batch input session.

Direct input

Start direct input session.

IDocs / BAPI:

Transfer converted data to IDoc inbound processing.

Check inbound processing.

18 of 62

Page 19: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

5. Data Migration – Step by StepAdministration 화면에서 Chage 를 click 하여 변경 모드로 들어간다.

5.1 Maintain Object Attributesimport 될 object type 과 import technique 을 선택한다.

Maintain Object Attributes

19 of 62

Page 20: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Object : description 과 owner(자신의 user id)를 입력한다. -> 초기화면에서 My objects 리스트에

뜨게된다.

Data transfer 를 한번만 할것인지( one-time ) 주기적으로 할 것인지(periodic) 선택한다. 주기적으로

한다고 할 경우에는 파일은 PC 로부터 올릴 수 없고 Frame program for the periodic data transfer

단계에서 선택할 파일들에 대한 세팅을 더 해주어야 한다.

파일명이 시스템 dependent 한지 결정한다. 선택하지 않으면 나중에 파일명을 입력할 수 있다.

object type 과 import technique 을 선택한다.

batch input 과 direct input 인 경우는 표준 프로그램을 사용하게 되는데 이 프로그램에 대한 자세한

정보는 프로그램에 가서 ‘Documentation’을 선택하면 볼 수 있다.

Batch input recording 을 선택하면 이미 저장된 recording 들을 선택한다.

BAPI 나 Idoc 을 선택하면 프로그램은 저장시 IDOC inblound processing 에 관한 사항이 제대로 세팅

되었는지 점검하고 없으면 에러를 발생한다.

5.2 Maintain Source StructuresSource structure 의 이름관 description 을 정의한다. 만일 Hierarchy 구조를 가진다면 소스 오브젝트간의

관계에 맞게 정의한다.

이름을 정의하고 변경, 재지정,삭제등을 수행할 수 있다.

하나이상의 구조를 정의하려면 새로운 구조와의 관계를 지정하는 팝업화면에 뜨게 된다.

: same level/subordinated?

Recording 을 이용하여 오브젝트를 생성할때는 하나의 structure 만 생성할 수 있다.Recording 에 대해서는

‘Flat structure’만이 지정가능하기 때문이다.

20 of 62

Page 21: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Maintain Source Structures

위의 예에서는 여러 개의 CUSTOM_CONTACTS 레코드가 하나의 CUSTOMER_HEADER 에 대해

존재한다. 여기서는 레코드들이 모두 한 파일에 저장될지 두개에 저장될지는 결정되지 않은 상태이다.

5.3 Maintain Source Fields여기서는 앞에 정의한 구조에 대한 상세 필드들을 정의한다.

21 of 62

Page 22: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Maintain Source Fields

Source field 들을 정의하는데는 몇가지 방법이 있다.

5.3.1 한 개씩 생성하는 방법

변경모드인지 확인하고 커서를 source structure 나 이미 정의된 source field 위에다 놓고 ‘Create field’를

선택하면 아래와 같은 화면이 뜬다:

필드이름과 내역,길이, 그리고 필드 유형을 입력한다. 필드유형은 F4 를 눌러 선택한다.

22 of 62

Page 23: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

데이터를 읽는 동안 내부적인 날짜 포맷(YYYYMMDD)로 변환할것인지 금액에 대해서는 내부적인 금액

포맷(1234.56, i.e. no triad separators, decimal point)로 변환할 것인지 선택할 수 있다.

만약 몇 개의 구조가 하나의 파일내에 존재한다면 필드의 구조를 명시할 수 있는 필드가 있어야 한다.

‘Identifying field value’ 에 값을 입력하면 그 값은 필드 구조마다 다르게 입력하여 구조를 구분할 수 있다.

주의: Identifying field 값은 각각의 구조마다 다른 값을 입력해야 한다!

필드에 “Selection parameter for "Read data/convert data"에 check 하면 데이터를 읽고 변환하는 스텝에서

입력 조건으로 범위를 지정할 수 있다.

5.3.2 테이블 형태로 생성하는 방법

변경모드에서 source structure 나 source field 에 커서를 놓고 “Table Maintenance”를 선택하면 아래와

같은 화면이 나타난다:

Maintain Source Fields in Table Form

필드명과 길이 타입,내역을 테이블에 입력한다.

23 of 62

Page 24: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

5.3.3 Copy Source Fields from Other Sources

변경모드에서 source 필드나 구조에 커서를 놓고 ‘Copy fields’를 선택하면 아래와 같은 화면이 나타난다.

Copy Source Fields: Selecting the Source

5.3.4 Upload (text separated by tabs):

소스 필드의 구조가 TAB 으로 분리된 텍스트 파일에 저장되어 있다면 이 파일을 upload 하여 구조를

생성할 수 있다.그 파일은 반드시 필드명,필드내역,타입,길이 순으로 저장되어 있어야 한다.

예)

24 of 62

Page 25: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Field Description

5.3.5 Copy from another object:

다른 프로젝트의 오브젝트에 정의된 소스구조를 복사한다.

5.3.6 Copy from data repository:

R/3 Data Dictionary 에 정의된 테이블이나 structure 의 구조를 복사한다.

5.3.7 From data file (field names in 1st line)

데이터 파일이 ‘tab’으로 분리된 텍스트 파일형태로 PC 에 저장되어 있고 첫번째 라인에 필드 description

이 있다면 이 파일로부터 구조를 생성할 수 있다.

25 of 62

Page 26: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Example of a data file from which the source fields are to be copied from

5.4 Maintain Structural Relationships구조관계 정의는 source 구조와 target 구조와의 관계를 정의한다.

Target 구조는 처음 오브젝트 유형과 import technique 을 지정하는 단계에서 결정된다.

어떤 target 구조는 반드시 관계가 정의되어야 하는데 이런 경우는 가 반드시 있어야 하고 이련 경우는

"This structure must be selected"이라는 메시지가 떠있다.

관계를 정의하기 위해서는 커서를 R/3 strucutre 위에 놓고 ‘create releationship’ 아이콘을 선택하면 source

structre 가 뜨는데 여기서 연결될 소스 구조를 선택하면 된다. 만일 하나의 소스구조가 있을경우는

자동으로 선택된다.변경하고 싶으면 우선 삭제 후 다시 생성한다. 지정된 구조에 대해 에러가 있는지

점검해 볼려면 ‘Check’ 버튼을 클릭하면 된다. "The structural relationships do not contain any errors"

라는 메시지가 뜨면 제대로 assign 된 것이다.

26 of 62

Page 27: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Maintain Structural Relationships

위의 예제에서 R/3 structures 인 BGR00, BKN00, BKNA1, BKNB1 의 데이터들은 CUSTOMER_

HEADER 구조에서 가져오고, R/3 structure BKNVK 는 CUSTOMER_CONTACTS 라는 구조에서

가져오게 된다.

Note 1: 대부분의 Batch Input 또는 Direct Input program 들은 BGR00 나 BI000 이라는 구조를

필수적으로 사용한다. 이런 구조에 대해서는 반드시 헤더레벨 구조의 데이터가 assign 되어서 레코드

전체를 제어하는데 사용된다.

Note 2: 하나의 target 구조에 대해서 여러 개의 source 구조가 assign 될수도 있다.

27 of 62

Page 28: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Structure relations: Example

5.5 Maintain Field Mapping and Conversion Rules이 단계에서는 소스필드에 target 필드를 지정하고 변환 rule 을 지정한다.

모든 target 구조의 필드들에 대해 아래의 정보들이 보여진다:

Field description

Assign source fields (if any)

Rule type (fixed value, translation etc.)

Coding.

Note: 어떤 target 필드들은 시스템에 의해 자동으로 세팅되는데 이런 필드들을 ‘technical field’라고

한다. 이 필드의 내용은 처음에 이 화면에 들어가면 안보인다. 이 필의 내용이 보일려면 Extras->Display

variant 에서 technical field 를 선택하면 보이게 되는데 이렇게 되도록 default setting 을 바꾸려면 ‘Extras-

>Restore defaults’를 선택하면 세팅이 변경된다. 그러나 이 default setting 을 변경하는건 data conversion

flow 에 심각한 영향을 줄수도 있다.

28 of 62

Page 29: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Field Mapping: Tree of Target Fields for the Target Structures Selected

필드 mapping 에 있어서 아래의 function 들이 제공된다:

Field documentation : 커서가 있는 target field 에 대한 정보를 보여준다..

Possible values : target field 에 대해 입력 가능한 값을 보여준다.

Longtext / Documentation : field 에 대한 documentation 입력.

Assign a source field: target 필드에 대응하는 source field 를 지정하려면 target field 에 커서를 놓고 이

버튼을 클릭한다. 그러면 지정가능한 source field 들의 리스트가 뜨는데 지정하고자 하는 source field 를

더블클릭하면 assign 된다.

Note: Extras Auto-Fieldmapping : source field 들과 비슷하거나 동일한 target field 를 기준으로

자동으로 지정한다.

Remove the assignment of a source field: 지정된 내역을 삭제하고 싶으면 target field 를 선택한 뒤 이

기능을 선택하면 지정된 사항이 삭제 된다. 하나의 source field 가 하나의 target field 에 지정되어 있으면

바로 삭제되고 여러 개의 source field 가 지정되어 있으면 삭제할 대상을 선택할 수 있는 source field list 가

29 of 62

Page 30: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

뜬다.

Source field 를 지정한 다음에는 conversion rules 을 생성한다. 기본적으로는 "Move" 가 지정되고 바꾸고

싶으면 다른 Rule 을 지정할 수 있다. 제공하는 Rule 은 아래 그림과 같다.

Conversion Rules: Select Rule

Assign rules:

Initial: Target field 에 지정된 사항을 삭제한다. 따라서 지정된 source field 도 없어진다. Target field

의 값은 Object 유형에 따라서 아래의 값들이 세팅된다:

Standard batch input/standard direct input: Nodata characters .default 로는 ‘/’ 이고 session header

에 다르게 지정하게 되면 그 character 가 들어간다.

Batch input recording: '/' (nodata character)

BAPIs, IDocs: Clear field (i.e.: character field blank; numeric field '00...0')

Move: ABAP 명령어인 "Move"를 이용하여 옮겨진다.소스필드의 타입이 ‘C’나 ‘N’이 아니면:

Packed field Unpack to target field WRITE...TO...

Date field Popup to select e.g. 01.10.1998

30 of 62

Page 31: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

- internal format

- user format

- ... YYYYMMDD

Amount field Batch input/direct input: User master

에 세팅된 금액 유형으로 바뀐다.

BAPIs, IDocs: 내부적인 계산유형으로

변형된다.

Constant: 고정된 값을 지정한다.

Fixed value (reusable): "fixed value object" 에 저정된 변수(FV_<fixed value>)의 값을 지정한다.

"Maintain fixed values, translations and user-written routines"단계에서 이 고정값 변수에 실제 입력될 값을

입력한다.

Translation (reusable): Target field 의 값은 translation table 을 통하여 변환된 값이 지정된다. Translation

table 의 값은 "Maintain fixed values, translations and user-written routines" 단계에서 입력된다. 6)장 참조.

User-written routine (reusable): “ur_”로 시작하는 ABAP subroutine 을 짜서 이 routine 을 통해 나온 값을

target 필드에 지정한다. 이 routine 이나 고정값,translation 등은 프로젝트내 다른 오브젝트들 에도 사용이

가능하다.

Prefix: Source field 의 앞에 prefix 를 붙인다.

Suffix: Source field 의 뒤에 suffix 를 붙인다.

Concatenation: 하나 또는 그 이상의 source field 의 값을 연결시킨다.

Transfer left-justified: Source field 의 값을 왼쪽 정렬된 형태로 저장한다.

ABAP coding: ABAP 프로그램을 원하는 conversion logic 을 프로그램으로 짜서 넣는다..

‘Insert’ 메뉴에 보면 아래의 세가지 사항을 프로그램 속에 입력할 수 있다.:

source fields: 입력 가능한 모든 소스 필드들이 보여진다.

global variable: 7) 참조

global functions: 5.3 참조

XFIELD: 이 Rule 은 IDocs 에 사용되는 특별한 function 이다. 어떤 경우에는 ‘X-structure’ 라는 구조가 data

transfer structure 이외에 또 존재하게 되는데 이 ‘X-구조의 필드들은 data transfer 구조에 있는 필드들이

전송될것인지 말것인지 결정하게 위해 ‘X’또는 Blank 로 채워져야 한다.

아래의 코딩내용은 자동으로 생성된다:

31 of 62

Page 32: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

If not <field in the data transfer structure> is initial.

<field in X-structure> = ‘X‘.

else.

<field in X-structure> = ‘ ‘.

Endif.

Note: Extras -> fill X-structures : 전체 structure 에 대해 위 코딩을 추가한다.

5.5.1 For the Advanced User: Display Variant, Processing Times

Define display variant: "Maintain field mapping and conversion rules"단계에서 '* display variant'를

선택하면 Define display variant 가 뜬다. 이 기능은 익숙한 사용자들이 필드 mapping 사항을 변경하고

싶을 때 주로 사용하는데 아래의 정보들을 선택할 수 있다.

Define Display Variant

Global data definitions: __GLOBAL_DATA 라는 제목이 뜨게되는데 여기에 global 변수를 선언하는

곳이다. 변수뿐 아니라 field mapping 의 프로그램에서 사용될 구조나 테이블등을 정의한다.

Processing points: 프로그램 진행 도중 특정 프로세스시점에 대해 로직을 입력한다.

지정할 수 있는 프로세스 시점은 아래와 같다:

32 of 62

Page 33: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Processing time Meaning Default setting

__BEGIN_OF_PROCESSING__ 전체 프로세스 시작 전 (blank)

__BEGIN_OF_TRANSACTION__ Transaction 시작 전 (blank)

__BEGIN_OF_RECORD__ Source structure 에

conversion rule 을

적용하기 전

Initialize the structure <segment>

(Name of target structure)

Batch Input, Direct Input:

<segment> = init_<segment>.

BAPI, IDoc:

g_edidd_segnam = '...'.

g_edidd_segnum = '....'.

g_edidd_psgnum = '......'.

g_edidd_hlevel = '..'.

Clear <segment>.

__END_OF_RECORD Source structure 에

conversion rule 을

적용하고 난 뒤

Transfer_record.

__END_OF_TRANSACTION__ Transaction 이 끝난뒤 Transfer_transaction.

__END_OF_PROCESSING__ 전체 프로세스가 끝난 뒤 (blank)

Form routines: __FORM_ROUTINES__ 라는 라벨이 보이는데 field mapping 시 사용될 sub routine 을

만드는데 사용된다. .

Technical fields: ‘technical field’ 가 보여지도록 한다.이것은 LSMW 가 자체적으로 기본 세팅이 되어있는

필드들을 말한다. 이 필드의 내용은 바꾸지 않는 것이 좋다.

Initial fields: initial 값으로 세팅된 field 들을 보이게 한다.

Coding: Coding 내용이 보여진다.

Note: Extras Not assigned source fields 를 선택하면 source field 들중 target field 에 지정되지 않은

필드들이 뜬다.

33 of 62

Page 34: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

5.5.2 For the Advanced User: Global Variables

LSM Workbench 는 내부적으로 몇 개의 global 변수를 가지고 있다.

1. Field mapping and conversion rule 스텝으로 간다.

2. target fiel 를 더블클릭하여 코딩 editor 로 간다.

3. Insert Global variable 를 선택한다.

아래의 변수들이 사용되어질 수 있다.

Global variable Description

g_project Current project

g_subproj Current subproject

g_object Current object

g_record Current target structure

g_cnt_records_read Number of records read

g_cnt_records_skipped Number of records skipped

g_cnt_records_transferred Number of records transferred to a file

g_cnt_transactions_read Number of transactions read

g_cnt_transactions_skipped Number of transactions skipped

g_cnt_transactions_transferred Number of transactions transferred to a file

g_cnt_transactions_group Number of transactions in the current batch input session

g_userid User ID

g_groupname Name of the batch input session

g_groupnr Current number of the current batch input session

5.5.3 For the Advanced User: Global Functions

LSM Workbench 는 ABAP coding 시 사용할 수 있는 global function 을 몇가지 제공한다.

Note: 이 function 들은 data conversion 시 상당한 영향을 주는 것들이다. 따라서 이 function 들을

34 of 62

Page 35: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

사용할때는 신중을 기해야 한다.

1. Field mapping and conversion rule 단계로 간다.

2. target field 를 더블클릭하여 ABAP editor 로 간다.

3. Insert Global functions 를 선택한다.

아래의 function 들이 사용가능하다:

Global function Description

transfer_record. Transfers the current record (i.e. for the current target

structure) to the output buffer.

transfer_this_record '...'. Transfers a record of another target structure to the output

buffer. The name of the target structure has to be specified as

argument in single quotes.

At_first_transfer_record. Transfers the current record to the output buffer, if it is the first

transaction.

On_change_transfer_record. Transfers the current record to the output buffer, if it has

changed compared to the last record.

transfer_transaction. Writes the current transaction to an output file. All records of

the output buffer are transferred to the output file.

skip_record. The current record is not transferred to the output buffer.

skip_transaction. The current transaction is not written to the output file.

5.6 Maintain Fixed Values, Translations and User-written Routines

Reusable rules 을 정의하는 단계이다:

35 of 62

Page 36: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Process Reusable Rules

Fixed value: 필드 길이.유형,내역 대소문자 구분여부 그리고 고정값을 입력한다.

Change Fixed Value

Translation: source field 와 target field 에 관한 정보를 입력한다.

36 of 62

Page 37: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Change translation / Source field, target fields

새로운 translation 을 생성하려면 우선 information 만을 입력하고 저장한다.

37 of 62

Page 38: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Control data: 여기서 translation 유형을 결정한다.우선 두개의 translation table 중 어떤 table 을 먼저

찾을것인지 결정하고 그 테이블에서 값을 못 찾았을 경우 어떤 테이블을 다음으로 찾을것인지 선택한다.

마지막으로도 못 찾을 경우는 어떻게 할 것인지 지정한다:

1:1 translation values: translation 하면서 찾게될 value table 을 1:1 의 형태로 입력한다. PC 파일이

있으면(tab 으로 분리된 text file 형태) upload 해서 입력되게 할 수 있다.

Translation 하는 동안 OK flag 에 ‘X’된것만 유효하다.

38 of 62

Page 39: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Interval translation values: 여기서는 범위단위로 새로운 값이 지정되는 형태의 conversion table 을

입력한다. 마찬가지로 PC file 로부터 upload 할 수 있다.

마찬가지로 OK 에 ‘Check’된것만 유효하다.

39 of 62

Page 40: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

5.7 Specify Files

이 단계에서는 사용될 파일들에 대해 명시한다:

legacy data on the PC and/or R/3 server

The file for the read data

The file for the converted data

40 of 62

Page 41: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Specify Files

Legacy data 가 PC 에 있다면:

1. 변경모드에서, "Legacy data — on PC (frontend)"에 커서를 놓는다.

2. Create entry 를 click 하면 popup 화면에 보여진다.

3. 파일명을 입력하고(F4 help) description 과 기타 사항들을 입력한다.

41 of 62

Page 42: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

File on Frontend (PC): Properties

Legacy data 가 R/3 server 에 있다면 :

1. 변경모드에서, "Legacy data on R/3 server (application server)"에 커서를 놓는다.

2. Create entry..

3. 파일명과 내역을 입력한다.

4. 아래 "Codepage ID"에서는 legacy system 의 character set 을 입력한다.

5. 기타 기술적인 사항들을 선택한다.

Note: Server 에 데이터가 있을경우에는 data migration 을 수행하는 user 가 해당 파일에 대한

read/write 권한이 반드시 있어야 한다.

42 of 62

Page 43: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

File on R/3 Server: Maintain Properties

파일을 명시할때 다음사항을 고려해야 한다:

하나의 파일이 두개이상의 source 구조를 가진다면 필드의 순서는 source strucutre 에 정의된 순서와

반드시 같아야 한다.

한 파일이 하나의 source 구조를 가지면 source 구조에 정의했던 순서와 같든지 또는 source 구조에

사용된 필드명이 맨 첫줄에 있어야 한다.

만일 파일이 레코드의 끝을 나타내는 지시자를 포함하고 있다면(text file) packed field 는 허용되지

않는다.

파일이 필드마다 분리자를 가지고 있다면 packed field 는 허용되지 않는다.

43 of 62

Page 44: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

PC file 과 server file 은 혼용될 수 없다.

다음 단계에서 여러 source 구조를 가지고 있는 파일은 여러 source 구조에 assign 될수 있다.

다음 단계에서 한 구조를 가지고 있는 파일은 한 source 구조에만 assign 될수 있다.

한 object 에 대해 여러 개의 파일이 사용되었다면 같은 이름을 가진 필드(키필드)가 관련 파일 모두에

있어야 한다. 아래 그림의 예에서는 CUSTOMER_NUMBER 가 키필드이다.

Display Merge Fields

File of read data:

Legacy data 를 server 로 읽어들일 파일명을 입력한다. 확장자로 ".lsmw.read" 가 default 로 지정되는데

다른 conversion 된 데이터와 구분하기 위해서 바꾸지 말것을 권장한다.

44 of 62

Page 45: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

File of converted data:

읽어들인 파일을 주어진 rule 에 맞게 변환한 결과를 저장할 파일명을 입력한다. 마찬가지로

".lsmw.conv"라는 확장자가 default 로 지정되는데 그대로 사용할 것을 권장한다. Fields "Logical path" 와

"Logical file name" 는 batch input 프로그램이나 direct input 프로그램에서 필요한 경우에 뜨는데 F4 를

누르면 가능한 값들이 보여진다.

Note 1: 파일 path 와 이름은 operating system 의 naming rule 에 따라 자유롭게 지정될 수 있다.

Note 2: 만약 데이터가 하나가 아닌 여러 개의 파일에 저장되어있을 경우에는 wildcard(‘*’)를 파일명에

지정할 수 있다. ‘*’에 대한 내용은 "Values for wildcard" 에 지정한다.

5.8 Use Wildcards in File Names파일명에 wildcard 를 사용하는 예를 들어보자.

legacy data 가 아래의 4 파일에 저장되어 있다고 하면 :

File 1: D:\Mig\Purchase Orders\PO Header 1.txt

File 2: D:\Mig\Purchase Orders\PO Position 1.txt

File 3: D:\Mig\Purchase Orders\PO Header 2.txt

File 4: D:\Mig\Purchase Orders\PO Position 2.txt

파일들이 두개씩 set 을 이루고 있다.(*1.txt and *2.txt) , i.e. 파일 2 는 파일 1 에 대한 position data 를 가지고

있고 파일 4 는 파일 3 의 position data 를 가지고 있다. Record 를 읽을때는 파일 1,2 는 파일 3,4 보다 먼저

읽고 처리되어야 한다.

45 of 62

Page 46: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

이런 경우 다음의 그림과 같이 세팅하면 된다:

Note: Read data 와 Converted data 에 대해서도 wildcard 를 사용할 수 있다.

Specify Files: Using Wildcards

5.9 Assign Files이 단계에서는 File 들을 source structure 에 지정한다.

46 of 62

Page 47: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Assign Files

Note: 파일명이나 다른 property 를 변경하더라도 file assignment 는 변경되지 않는다.

5.10 Read DataProceeding:

오브젝트에 대한 데이터 전체를 읽고 싶으면 ‘Execute’를 선택하면 실행된다.

데이터의 특정 부분만을 처리하고 싶으면 "General selection parameters"에서 선택 조건을 지정할 수

있다. "Transaction number" 에 처리할 데이터의 개수를 지정한다.

만약 source field 를 정의할 때 ‘Selection parameter for "Read data/convert data’에 check 하였으면 여기서

선택조건으로 나오게 된다.

추가로, 두가지 check box 가 제공되는데:

Amount field: 금액필드를 내부적인 calculation format (with decimal point)으로 변경.

Date field: 날짜 필드를 내부적인 format(YYYYMMDD)으로 변경.

만일 파일명에 wildcard 를 사용했다면 wildcard 에 대한 조건도 지정할 수 있다. 여기에 값을 입력하지

않으면 wildcard 는 file 지정시에 입력된 모든 값으로 인식해서 처리된다.

47 of 62

Page 48: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Data Read Program: With User-defined Selection Parameter

Note: 우선 시스템은 data read program 이 가장 최신것인지 점검하고 그렇지 않으면 실행전에 다시

generation 하여 프로그램을 생성한다.

5.10.1 Display Read Data

이 단계에서 읽혀진 데이터를 테이블 형태로 볼수있다. 보고자 하는 레코드를 클릭하면 해당 레코드의

전체 값이 보여진다. 또는 커서를 라인에 놓고 Field contents 를 클릭해도 된다.

Change display 는 한 레코드를 한 라인에 보여줄것인지 여러 라인에 보여줄 것인지 선택하는 기능이다.

Display color palette 는 구조에 따른 라인 색상을 보여준다.

5.11 Convert Data

5.11.1 General Remarks

실행하는 방법에 있어서 이 단계는 Read data 단계와 동일하다. (see 10).

48 of 62

Page 49: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Data Conversion Program: With User-defined Selection Parameter

5.11.2 Additional Function for BAPI/IDoc

만약 LSMW object 가 BAPI 나 Idoc 을 기반으로 한다면 data conversion 시 output type 관련해서 몇 개의

parameter 가 더 보여질 것이다:

Convert Data: Further Selection Parameters for BAPI/IDocs

Create file 을 선택하면 conversion 하는 동안 새로운 파일이 생성된다.

Create IDocs directly 를 선택하면 conversion 하는 동안 IDoc 이 모여서 package 로 만들어진다. 이

package 당 IDoc size 는 지정할수도 있고 default 로는 50 개가 된다.

49 of 62

Page 50: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

5.11.3 Display Converted Data

See section 10.1.

5.12 Import DataImport 는 object type 에 따라 아래의 단계로 실행된다.

Standard batch input or recording:

- Generate batch input session

- Run batch input session

Standard direct input:

- Start direct input session

BAPI or IDoc:

- Start IDoc creation

- Start IDoc processing

- Create IDoc overview

- Start IDoc postprocessing

5.12.1 Import Data with Batch Input

5.12.1.1 Generate Batch Input Session

이 단계에서는 지정한 오브젝트에 연결되어 있는 standard batch input program 이 실행된다. 이

프로그램의 입력이 되는 converted data 의 이름은 자동적으로 보여진다.

e.g) 프로그램마다 조금씩 틀리지만 GL master 의 경우 오브젝트 유형에서 Flat strucutre 로 지정한

경우에는 ‘File without Session Record’ 라는 옵션에 체크하고 ENTER 를 눌러야 한다. 그러면 NODATA 와

세션 이름을 지정할 수 있게 되는데 NODATA 라는 필드에 ‘/’ 또는 NODATA 로 인식할 chracter 를 입력한

뒤 실행시킨다. 세션 이름은 지정되어 있지만 실행전에 바꿀 수 있다. 이런 옵션을 제공하지 않는

프로그램이라면 나타나는 parameter 들에 맞게 입력하고 바로 실행시키면 된다.

5.12.1.2 Run Batch Input Session

이 단계를 실행시키면 바로 SM35 transaction 으로 건너간다. 생성된 세션을 선택하고 실행시킨다.

50 of 62

Page 51: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

5.12.2 Import Data with Direct Input

5.12.2.1 Start Direct Input Session

오브젝트 유형에 따라 오브젝트에 연결된 direct input program 이 자동으로 실행되는 경우도 있고 direct

input program 이나 transaction 을 직접 선택할 수 있는 경우도 있다.

5.12.3 Import Data with BAPI or IDoc Technique

5.12.3.1 Start IDoc creation.

5.12.3.2 Start IDoc processing.

51 of 62

Page 52: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

6. RecordingsObject 를 import 하는 방법중에 Recording 을 통한 방법이 있다. Recording 을 사용하면 Standard program

보다 target 필드를 줄일 수 있고 standard program 에 대한 내용을 몰라도 data upload 가 가능하다는

장점이 있다.

LSMW 초기 화면에서 Goto -> Recordings 를 선택하면 recording 을 생성하고 관리할 수 있다.

우선 데이터를 R/3 에서 입력하는 transaction 을 지정하여 순서대로 화면을 따라가 본다.

레코딩에서 입력하는 데이터는 테스트용이 아니라 실제 시스템에 저장된다.

시뮬레이션 모드가 절대 아니다!

Recording 을 한 다음 필드명과 default 값을 지정한다.

Save recording: 입력한 필드로 Data Repository 에 structure 를 생성한다.

Attributes for an object 단계에서 한 오브젝트에 대해 여러 개의 recording 이 지정

가능하다. 이런 방법으로 한 레코드에 대해 여러 개의 transaction 을 차례로 실행할 수 있다.

6.1 Detailed Description of the Process6.1.1 초기화면에서 Goto-> Recordings 을 선택한다.

52 of 62

Page 53: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Note: 한 Recording 은 하나의 프로젝트에만 지정가능하다.s are assigned to exactly one project.

6.1.2 Recordings Create recording

아래의 사항을 입력한다.

Create Recording

6.1.3 Recording 할 transaction code 를 지정한다.

Create Recording: Enter Transaction Code

Legacy data 로부터 입력될 필드들에 값을 입력한다.

Recording 이 끝나면 화면단위로 필드이름과 입력한 값들이 보여질 것이다.

6.1.4 Field 명 지정

Recording 을 수행한 transaction 에서 입력가능했던 필드들중 legacy data 로부터 입력될 필드들의 이름을

입력한다.

더블클릭 : 지정할 필드를 더블클릭하고 필드이름과 description, default value 를 입력한다.

Reset : 지정된 필드명이 삭제 된다.

Default : 만일 시스템내에 있는 필드명과 동일하게 가져가려면 필드에 커서를 두고 “Default”를 선택한다.

Default all : 모든 필드들에 대해 시스템필드명과 동일하게 가려가려면 “Default all”을 선택한다.

Add screen field : Recording 할때 빠진 필드가 있으면 이 버튼을 Click 하여 빠진 필드를 선택한다.

Delete screen field : 반대로 빼고싶은 필드가 있으면 필드를 선택하고 이 버튼을 Click 한다.

53 of 62

Page 54: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Process Recording

같은 필드명을 여러 번 사용할 수 있지만 field mapping 시에는 하나의 필드명에 대한 rule 은 하나만 지정

가능하다.

필드명을 지정하지 않은 필드들은 batch session 을 생성하는 동안 지정된 default 값으로 입력된다. 따라서

Default 값은 상수로 인식 될수도 있다. 특정 checkbox(e.g:MM view 선택)에 대해서 이런 default 값들은

매우 유용하다. 필드를 삭제시켜 버리면 시스템은 default 값이 아닌 NODATA 로 인식한다.

6.1.5 저장

저장을 하면 아래와 같은 메시지가 출력되며 오브젝트에 해당 recording 을 지정할 수 있다.

"Data saved successfully".

54 of 62

Page 55: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

7. Transport LSMW ProjectsLSM Workbench 프로젝트를 upload/download 를 이용하거나 transport 시스템을 이용하여 R/3 시스템간

이동할 수 있도록해준다. (IDoc 관련된 세팅사항은 제공하지 않는다. 이 세팅사항은 R/3 각 시스템 과 client

마다 직접 manual 로 세팅해야 한다.

7.1 Generate Change Request이 기능을 수행하게 되면 지정한 프로젝트내에 있는 LSMW 관련 모든 정보를 포함하는 requst 번호가

생성된다. 이 change requst 를 다른 request 전송하는 것과 동일한 방법으로 다른 시스템에 export/import

할 수 있다. 초기 화면에서 Extras -> Create change reques 를 선택하면 된다.

이 방법을 이용하여 LSMW data 를 전송할때는 transaction SE10 에서 해당 request 를 추적할 수 있다.

Note 1: Request 로 전송할 때 target 시스템에 같은 이름의 project 가 있으면 시스템은 해당

프로젝트를 우선 삭제하고 다시 생성한다.

Note 2: Request 를 export 할때 해당 프로젝트내서 변경된 모든 사항이 반영된다. 변경내용은 request

의 생성 시점이 아니라 release 시점까지 반영된다.

7.2 Export ProjectTransport 가 아닌 PC ASCII 파일 형태로 데이터를 생성했다가 다른 시스템으로 import 하는 방법이있다.

초기화면에서 Extras Export project 를 선택한다.선택한 프로젝트를 tree 구조로 보여주는데 export 할

대상을 선택한 뒤 ‘Export’를 Click 하고 파일명을 입력하면 된다.

Note: 선택된 요소들의 ‘documentation’도 같이 export 된다.

55 of 62

Page 56: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Export Project: Project Table of Contents

7.3 Import ProjectExport 된 project 는 다시 R/3 system 으로 import 가 가능하다.

초기화면에서 Extras -> Import 를 선택하고 export 된 파일명을 입력하면 시스템은 입력된 파일을 import

해서 내용을 점검한뒤 제대로 된 파일이면 포함된 subproject 와 object 들을 보여준다. 이미 시스템내에

있는 오브젝트이면 옆이 CHEC-표시가 되어있는데 여기서 import 할 object 들을 선택하고 omport 를

실행시키면 된다. 이미 시스템내에 있는 오브젝트이면 overwrite 된다.

"Import under different name" 기능을 사용하면 오브젝트가 overwrite 되는걸 막을 수 있다.

56 of 62

Page 57: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

8. Periodic Data Transfer제한된 범위내에서 LSM workbech 는 주기적인 data transfer 기능을 제공한다. 전제조건은 :

LSMW object 는 성공적으로 만들어져서 테스트완료된 것이라야 한다.

입력할 데이터가 주기적으로 R/3 application server 에 파일로 만들어져야 한다.

Frontend(PC) data 는 access 하지 않는다

전제조건들이 모두 만족되면, “Maintain object attributes”단계에서 “Periodic” 버튼을 선택할 수 있다.

그리고나면 "Control program for periodic data transfer" 이라는 단계가 workstep 에 추가되어 있을것이다.

이 프로그램은 Read->Convert->Import 단계를 순서대로 실행한다.

이 프로그램(/SAPDMC/SAP_LSMW_INTERFACE)에 대해 아래 그림에서보는 옵션들을 지정할 수 있다.

Note 1: Flag file 명 지정은 선택적이다.(optional)

Note 2: Flag file 은 입력화일을 제공하는 appication 과의 연결고리를 생성하도록 해준다.

57 of 62

Page 58: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

Frame Program for Periodic Data Transfer: Selection Screen

58 of 62

Page 59: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

주기적인 데이터 전송을 위한 control program 은 flag file 이 있을때만 실행된다.

데이터 전송을 끝낸뒤 control program 은 flag file 을 삭제시킨다.

새로운 flag file 을 생성할 때 해당 파일이 있는지 점검해서 이미 존재하면 프로그램은 중단되고 없으면

새로운 flag file 을 생성하고 데이터 전송을 실시한다.

Note 3: 어떤 standard batch input 프로그램이나 direct input 프로그램은 추가적인

parameter들을 필요로한다. 어떤 parameter들이 어떤 program에 의해 사용되는지에 관해 상세한

정보를 알고 싶으면 프로그램 /SAPDMC/SAP_LSMW_INTERFACE 의 코딩내용을 참조하면 된다.

Program Parameter used

Test run without

update

Create

batch input

session

BI, DI, Call

Transaction,

Test

Lock

mode

Action User

group

RAALTD01 RAALTD11

X

RCCLBI01 RCCLBI02 RCCLBI03 RCCTBI01

X

RCSBI010 RCSBI020 RCSBI030 RCSBI040

X

RCVBI010 X

RFBIBL00 X

RHALTD00

X

RLBEST00 RLPLAT00

X

RMDATIND

X

59 of 62

Page 60: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

RPUSTD00

X X

Note 4: Batch /Direct input program 에 대해서 variant 를 만들어서 지정할 수 도 있다.

60 of 62

Page 61: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

9. Tips and Tricks9.1 실행시점에 transaction code 결정Situation: 이미 시스템에 데이터의 일부가 있을 때 데이터 전송을 할 경우가 있다. 따라서 데이터 전송을

실행하면서 ‘생성’인지 ‘변경’인지 선택할 필요가 있을 때.

Example: 고객 마스터

Solution: "Global Data" 에 다음과 같이 선언한다.

TABLES: KNA1.

BKN00-TCODE 필드에 대해 아래와 같이 코딩한다.

Select count(*) from kna1 where kunnr = <alte_kundennummer>.

if sy-dbcnt = 0.

bkn00-tcode = 'XD01'.

else.

bkn00-tcode = 'XD02'.

endif.

9.2 Rrecord 건너뛰기 Situation: 상황에 따라 특정 레코드를 처리하지 않고 다음 레코드로 프로세스를 넘기려고 할 경우가 있다.

이 레코드는 convert 파일로 전송되지 않는다.

Solution:

if <condition>.

skip_record.

endif.

9.3 한 Transaction 에 있는 모든 레코드 건너뛰기Situation: 특정 상황에서 transaction 에 있는 모든 레코드를 처리하지 않고 넘어가고자 할 경우.

Solution:

if <condition>.

skip_transaction.

endif.

9.4 Record 중복Situation: 한 source record 로부터 두개 이상의 target record 를 만들고자 할 경우

Example: Legacy data file 에 있는 고객마스터가 하나의 고객에 대해 contact person 의 성,이름,

61 of 62

Page 62: 1drklion.tistory.com/attachment/cfile6.uf@1…  · Web view · 2015-04-24/SAPDMC/SAP_LSMW_PARTNERTYPES. Form routine: READ_USER Short ... Legacy data file에 있는 고객마스터가

LSM Workbench

전화번호필드를 두개씩 가지고 있다면, R/3 의 BKNVK(contact person) 레코드의 수는 contact person 의

수만큼(2 개) 생성되어야 한다.

Solution: 기존 데이터 구조가 다음과 같다고 가정하면:

CUST 고객마스터

...

VORNAME1 First name of first contact person

NACHNAME1 Name of first contact person

TELEFON1 Phone number of first contact person

VORNAME2 First name of second contact person

NACHNAME2 Name of second contact person

TELEFON2 Phone number of second contact person

...

아래와 같이 Rule 을 생성한다:

...

BKNVK-NAME1

CUST-NACHNAME1 (Move)

BKNVK-TELF1

CUST-TELEFON1 (Move)

BKNVK-NAMEV

CUST-VORNAME1 (Move)

그리고 End_of_record 에 아래와 같이 코딩한다.

End_of_Record

BKNVK-NAME1 = CUST-NACHNAME2.

BKNVK-TELF1 = CUST-TELEFON2.

BKNVK-NAMEV = CUST-VORNAME2.

transfer_record.

...

실행될때는 한 고객마스터에 두개의 BKNVK record 가 생성된다.

62 of 62