메뉴 건너뛰기

SAP 한국 커뮤니티



Conversion routine

꿀단지 2011.10.11 11:15 조회 수 : 7050

1. 상황 설명

Sales and Distribution 쪽의 CBO 프로그램을 개발해달라는
요청을 받고는 코딩을 시작했습니다.(사실은 내가 아니고,
종인씨가~)

KNVP(Customer Master Partner Functions)라는 테이블의 데
이타를 Selection 해야했답니다.

PARVW라는 필드를 가져와야 하는데, 하 글쎄 요놈이 SE11에
서 보면 분명히 있는데, 못끌고와요. 버근가?

참고로 이 필드는 Partner function 키입니다.


2. 상황 확인 및 메뉴

초기화면
--> Tools
--> ABAP Workbench
--> Development
--> SE11 ABAP Dictionary

database table 란에 KNVP 를 입력하고 display하세요.

일단 레코드들을 확인해보세요. 그리 많지는 않습니다.
PARVW 란에 PE를 입력하고 조회해보세요. 해당하는 레코드
들이 보입니다. 그럼 다시 VE를 입력하고 조회해보세요.

확인해보면 알겠지만, PE와 VE를 입력한 결과가 동일하게
나옵니다. 왜 그럴까요?


3. 요약된 문서 보기

테이블 구조 화면에서 PARVW를 더블클릭하면 팝업이 뜨는
데, 거기서 domain name인 PARVW를 더블클릭하세요.
convers. routine란에 PARVW가 있죠. 사실 이게 비밀이었
답니다. 일단은 F1을 꾹 늘러서 요약된 help 문서를 보세
요.

 

Conversion routine

Conversion takes place when converting the contents of a screen field
from display format to SAP-internal format and vice versa and when
outputting with the ABAP statement WRITE, depending on the data type of
the field.

If standard conversion is not suitable, it can be overridden by
specifying a conversion routine in the underlying domain.

A conversion routine is identified by its five-place name and is stored
as a group of two function modules. The function modules have a fixed
naming convention. The following function modules are assigned to
conversion routine xxxxx:

o CONVERSION_EXIT_xxxxx_INPUT

o CONVERSION_EXIT_xxxxx_OUTPUT

The INPUT module performs the conversion from display format to internal
format. The OUTPUT module performs the conversion from internal format
to display format.

If a screen field refers to a domain with a conversion routine, this
conversion routine is executed automatically each time an entry is made
in this screen field or when values are displayed with this screen
field.

 

4. 함수 확인하기

Function builder 화면에 가서 다음 두 함수를 관찰하세요.


CONVERSION_EXIT_PARVW_INPUT
CONVERSION_EXIT_PARVW_OUTPUT


TPAUM 과 위의 간단한 두 쏘스를 관찰하면 VE와 PE의 관계를
아실 수 있을겁니다.

위와같은 Conversion routine 은 SAP Data 곳곳에 반영되어
있습니다. 요약된 문서에서와 같이 다음과 같은 함수의 형식
으로 반영되어 있습니다.


o CONVERSION_EXIT_xxxxx_INPUT
o CONVERSION_EXIT_xxxxx_OUTPUT

 

5. 결론 및 남은 문제

Conversion routine 을 이용하면, 데이타의 display format
과 internal format을 구별해서 관리할 수 있습니다.

그런데, 이거 유저마다 다르게 보이는데 그 이유는 뭘까요?

번호 제목 글쓴이 날짜 조회 수
62 반올림 꿀단지 2011.10.11 4927
61 문자열의 길이에 맞게 앞의 공백을 0으로 채워주는 함수 꿀단지 2011.10.11 5627
60 Noraml Sales Order를 변경하거나 지웁니다. 꿀단지 2011.10.11 4068
» Conversion routine 꿀단지 2011.10.11 7050
58 여러가지 Order를 만들어줍니다. 꿀단지 2011.10.11 4435
57 파일의 경로를 입력하면, 그 파일명과 디렉토리를 딱 나누어줍니다 [3] 꿀단지 2011.10.11 4990
56 사원의 계획근무시간을 알려주는 펑션입니다. 꿀단지 2011.10.11 3945
55 앞에 위치하는 0(ZERO)없애는 평션 [12] ks 2011.03.16 6533
54 OSS NOTE 찾는 Function [2] magicsy69 2010.11.24 5939
53 [Function] 메세지 박스를 뛰워보자 [10] file 양키 2010.09.29 7914
52 [Function]오늘은 몇요일일까요? [4] file 양키 2010.09.29 8446
51 [부가세] Multi key 변환 펑션 [6] file 미소 2010.07.26 7854
50 이메일로 파일 보내는 함수 [3] 열공아밥 2009.12.20 9275
49 call transaction 함수로 새로운 세션생성하기 [9] 아밥 잭 2009.10.28 7264
48 암호화 function [14] magicsy69 2008.06.03 7348
47 현재 떠있는 화면에서 특정 필드의 값을 읽어오는 함수 및 방법 [8] Delight 2008.04.28 9886
46 CSV 형식으로 파일변환 [2] 정두영 2007.09.12 6995
45 SELECT 구문을 사용하지 않고 데이터 가져오는 방법 [13] sapjoy 2006.12.04 7609
44 ALV BUFFER CLEAR [3] ecbase 2006.12.02 8010
43 소수점 이하 체크 [5] ecbase 2006.12.02 9706