메뉴 건너뛰기

SAP 한국 커뮤니티

누가 물어봐서 찾아봤는데.. 안될 것 같지만, 혹시 고수께서 알고 계실까 해서 올립니다.


textpool 타입에 아예 색깔 관련 속성은 없어서 불가능하지 싶습니다만;;


 


 


참고로 dynamic 하게 설정하는걸 찾았는데.. 참조로 한 번 보실분을 위해서..


 


 



Text Elements



Text elements allow you to store texts without hard-coding them in your program. You can maintain text elements outside the program in which they are used (choose Goto → Text elements in the Editor). They are particularly important for texts in applications that will be translated into other languages.
All programs (including include program) have a title. Other text elemen are assigned to the associated main program.

ABAP has the following kinds of text element:




  • Program title

  • List heading

  • Column heading

  • Selection texts (for texts belonging to selection criteria and program parameters)

  • Text symbols (constant texts)




The construction of text elements is defined by the structure TEXTPOOL. It contains the following fields:



ID:
A single character, representing the text element type. You can use the following values:

R - Program title
T - List heading
H - Column heading
S - Selection text
I - Text symbol



KEY:
Key field, which may contain the following values, depending on the type of the text element:

H - Number of a row with columns
-headings (001 - 004)
S - max. 8 character name of a selection
criterion or program parameter
I - 3 character number for a text symbol

The field is empty for program titles and list headings.



ENTRY:
Text of the text element (maximum 255 characters)



LENGTH:
Length of the text


Example


The following table displays some typical values for text elements:




































ID KEY ENTRY LENGTH
H 001 Name Age 10
I 100 Tax 10
R , Test program 12
S CUST Customer 8
T , Sales 10


Notes



  1. LENGTH determines the total available length for the text. If the text is to be translated into other languages, you should choose a value of LENGTH that is greater than the length required in the original language, to allow for translations that are longer than the original language version.


  2. You can address text elements in two ways, either using TEXT-xxx or using '...'(xxx). Here, xxx stands for the number, and ... for the text of the text symbol.

    The first form requires that there is already a text for number xxx. If there is not, the output is empty.

    The second form improves the readability of the program. The text in inverted commas should correspond to the text stored under the text symbol. If it does not, the system uses the text stored for the text symbol. Exception: If there is no text saved under number xxx, the text in inverted commas is used.

    Example: Text symbol number 001 has the text 'Please enter your name'. The following commands:

    WRITE: / TEXT-001,
    / 'Please enter your name'(001),
    / 'What is your name?'(001).

    all have the same output: "Please enter your name".

    You can compare the texts used in the program with the texts stored as text symbols by choosing "Goto → Text elements → Compare text symbols" in the Editor.


  3. If you set a LENGTH for the text element that is longer than the text itself, this is interpreted as though the text had trailing spaces up to the specified LENGTH. This means that if you use the notation '...'(xxx), the text between the inverted commas must have trailing zeros up to the length LENGTH. Otherwise, the text stored under the text symbol will not correspond with the text in inverted commas (see note 2).

    Example: Suppose text symbol number 036 has the contents 'Name', and length 10. The following statement: folgende Befehl

    WRITE: / SY-VLINE, TEXT-036, SY-VLINE,
    / SY-VLINE, 'Tax '(036), SY-VLINE,
    / SY-VLINE, 'Tax'(036), SY-VLINE.

    would then output "| Tax |" three times. In particular, in the third line, the text symbol number 036 is output in length 10, and not the three-character text "Tax". If you compare the text elements (see note 2), the text symbols in the second and third lines are flagged as being different.



  4. You should not use text symbols in subroutines that have more than one main program, since this leads to redundant text and unnecessary translation.
    Instead, you should store these portions of code in subroutine pools.



 

번호 제목 글쓴이 날짜 조회 수
3527 <img src=2.gif border=0>기본단위를 변환해주는 FUNCTION이 있나요? [4] 아~밥줘 2009.04.10 1526
3526 <img src=3.gif border=0> Vendor Master생성시 자동으로 Idoc생성되게 할려면.. [1] 간바레 2009.04.08 908
3525 <img src=2.gif border=0>외부 unix 서브에 있는 서브로 파일 참조해서 가져 오는 방법에 대한 질문입니다. [7] SSong 2009.04.09 927
3524 <img src=2.gif border=0>FRONTEND_UPDATE 와 FLUSH 의 의미가 궁금합니다. [1] 피크민 2009.04.09 1806
3523 <img src=3.gif border=0>function에서 tables 질문드립니다. [2] GoodAbap 2009.04.09 981
3522 <img src=3.gif border=0>htmlb chart에서 한글 텍스트 깨질때 해결방법 문의 [2] hogun 2009.04.09 1304
3521 <img src=3.gif border=0>char를 조건으로 줄때 질문입니다.급 [14] 쭈니 2009.04.09 1430
3520 <img src=3.gif border=0>Include = >MV50AFZ1 이곳에 조건 EXIT를 하고 싶어요 [3] 안면도 2009.04.09 2554
3519 <img src=3.gif border=0>APPEND LINES OF 와 APPEND 차이점 [3] ToBe_anexpert 2009.04.09 1064
3518 <img src=3.gif border=0>TABLES관련되어서 질문 드립니다... [5] 우락부락 2009.04.09 1179
3517 <img src=2.gif border=0>CO 모듈 통계주요지표 생성(T-CODE : KB31N)에 대해서 궁금한 점이 있습니다. [2] file 리브레 2009.04.09 2241
3516 <img src=2.gif border=0>조회 조건에 따라 입력값 변하게 하기 [2] 슈퍼아밥퍼가되련다 2009.04.09 1248
3515 <img src=2.gif border=0>간단한 조회 리스트 출력하기 문제에요 [7] 쿵쓰 2009.04.08 1216
3514 <img src=2.gif border=0>개발섭에서 테스트 섭으로 cts 중 에러가 발생했습니다. [2] 아밥어렵네요 2009.04.08 1146
3513 <img src=3.gif border=0>스탠다드 프로그램 성능개선에 관해서 질문드립니다. [8] hccpi 2009.04.08 931
3512 <img src=3.gif border=0>스케쥴로 배치할경우와 직접 실행할때 결과가 틀립니다. [4] 도련님 2009.04.08 933
3511 [re] <img src=2.gif border=0> Vendor Master생성시 자동으로 Idoc생성되게 할려면.. [1] file sapjoy 2009.04.08 1054
3510 [re] Vendor Master생성시 자동으로 Idoc생성되게 할려면.. 간바레 2009.04.08 1039
3509 <img src=3.gif border=0>컴퓨터이름을 한글로 하면 아밥에디터가 안열리는건가요? [6] file 하오 2009.04.08 1134
3508 <img src=3.gif border=0>간단한 구문 해석 부탁드립니다.. [10] 우락부락 2009.04.08 1222