메뉴 건너뛰기

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.



 

번호 제목 글쓴이 날짜 조회 수
3504 <img src=2.gif border=0> 테이블 업데이트 소스좀 수정 해 주세요. [4] 망울 2009.04.06 1072
3503 <img src=3.gif border=0>디렉토리에 저장된 이미지파일 불러와서 보여주는 방법 문의 [4] hogun 2009.04.07 1447
» <img src=2.gif border=0>selection screen 의 text element에 색깔 넣기 [2] 정군 2009.04.07 1255
3501 <img src=3.gif border=0>IMG 세팅 하는것 관련한 자료좀 받아 볼수 있나요?. [10] 신조 2009.04.07 1660
3500 <img src=2.gif border=0>z_fi_postdoc 의 파라에 대한 질문입니다. [2] 아밥돌이 2009.04.07 891
3499 <img src=3.gif border=0>write 프로그램 출력할때 한페이지만 나오네요...^^;; [2] 숟가락맨 2009.04.06 1014
3498 <img src=2.gif border=0>Array [9] file SAP아가씨 2009.04.06 1108
3497 <img src=2.gif border=0><b>[완료]</b>alv 이벤트 오류 메세지 쫌 도와주세요 [4] 아밥고지를 찾아서 2009.04.03 1102
3496 [요청]Table Control에서 데이타가 없을때에도 Scroll bar가 있게 하려면 ? [2] Bizzard.Chul 2009.04.03 1392
3495 <b>[완료]</b>types에서 type 설정중 질문입니다. [7] 쭈니 2009.04.03 990
3494 [요청]ALV TREE 내용을 엑셀로 다운 받는 법 좀 알려주세요 [2] gastone 2009.04.03 2109
3493 <b>[완료]</b>write문에서 input on 으로된 필드 값을 고치고 저장하는 방법에 관한 질문입니다. [2] sora 2009.04.02 1385
3492 [요청]weit 구문의 의미를 모르겠어요... 간단한 답변 부탁드립니다. [5] 또길 2009.04.02 1668
3491 <img src=3.gif border=0>[요청]INTERNAL TABLE질문좀 드립니다. [3] 쭈니 2009.04.02 1051
3490 <b>[완료]</b>Type-1 프로그램을 새창에서 실행시킬수 있을까요? [5] kms 2009.04.02 1459
3489 <b>[완료]</b>테이블 콘트롤 alv 평션 alv 클래스 이벤트 관련 질문입니다. [3] 아밥돌이 2009.04.02 1451
3488 <b>[완료]</b>at user-command와 at selection-screen의 차이 [5] 아밥고지를 찾아서 2009.04.01 3671
3487 <b>[완료]</b>parameter에 관해서 질문좀 드리고자 합니다. [9] file 쭈니 2009.04.01 1196
3486 <img src=3.gif border=0>[요청][NetWeaver 7.0] 설치 오류 : The installer is unable to run graphical mode. [3] file 들딸들빠 2009.03.31 1190
3485 <b>[완료]</b>다른 언어로 번역에 대한 질문을 드립니다 [4] 아밥어렵네요 2009.03.31 1879