메뉴 건너뛰기

SAP 한국 커뮤니티



Conversion routine

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

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을 구별해서 관리할 수 있습니다.

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

번호 제목 글쓴이 날짜 조회 수
42 문자열에서 특정문자값을 기준으로 첫문자를 대문자로 변경 [8] file SAYA 2009.03.09 6274
41 [FUNCTION] - THUSRINFO , 현재 접속되어 있는 SAP 사용자 정보를 가져오는 펑션 [3] 미소 2011.10.13 6320
40 Online프로그램에서 조회조건 다중선택 관련 [6] file COMAN 2008.11.20 6362
39 앞에 위치하는 0(ZERO)없애는 평션 [12] ks 2011.03.16 6534
38 [PS-CJR2] BAPI_COSTACTPLN_POSTPRIMCOST [1] file poce 2007.12.26 6629
37 클래스 특성 리스트 가져 오기 최선 2011.11.08 6639
36 백그라운드 작업 관련 함수(batch job) [3] sapjoy 2007.03.02 6681
35 STRING 관련 함수 [3] sapjoy 2006.12.28 6743
34 Object 의 version 및 CTS history 가져오기 [3] 머리를쓰자 2015.03.19 6755
33 STRING_REPLACE 함수 문의 드립니다. [3] marco 2016.04.09 6860
32 DATE_CONVERT_TO_FACTORYDATE : 기준일의 최근 영업일 찾기 [4] file Wise 멘토 2013.11.14 6937
31 CSV 형식으로 파일변환 [2] 정두영 2007.09.12 6996
30 POPUP FUNCTION과 사용 예 [8] file cupycopy2000 2014.08.06 7004
» Conversion routine 꿀단지 2011.10.11 7052
28 암호화Function [9] Delight 2008.07.07 7056
27 timestamp 시간변환 file sapjoy 2012.11.07 7229
26 call transaction 함수로 새로운 세션생성하기 [9] 아밥 잭 2009.10.28 7271
25 function 모음입니다. [5] 양파링 2007.11.02 7350
24 암호화 function [14] magicsy69 2008.06.03 7351
23 시간계산, time calc, timezone time stamp, [5] sapjoy 2012.02.09 7374