‎2008 Aug 08 9:59 AM
Hi all,
Do you know how I can create text symbols or selection texts dynamically by program? (calling a FM or editing a table?)
What's the table for text elements?
Thanks in advance,
Mathieu
‎2008 Aug 08 10:16 AM
Hi,
Not sure of FM. But programically u can do.
Check the statement
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE
SY-LANGU.
This creates the text elements in the specifies program and in specified language.
Not only text elements but also list headings u can create.
Check below sample code given by SAP.
DATA: PROGRAM(8) VALUE 'PROGRAM',
TAB LIKE TEXTPOOL OCCURS 50 WITH HEADER LINE.
TAB-ID = 'T'. TAB-KEY = SPACE. TAB-ENTRY = 'Sales'.
APPEND TAB.
TAB-ID = 'I'. TAB-KEY = '200'. TAB-ENTRY = 'Tax'.
APPEND TAB.
TAB-ID = 'H'. TAB-KEY = '001'. TAB-ENTRY = 'Name Age'.
APPEND TAB.
TAB-ID = 'S'. TAB-KEY = 'CUST'. TAB-ENTRY = 'Customer'.
APPEND TAB.
TAB-ID = 'R'. TAB-KEY = SPACE. TAB-ENTRY = 'Test program'.
APPEND TAB.
SORT TAB BY ID KEY.
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE SY-LANGU.
eg:TAB-ID = 'I'. For Text elements
TAB-KEY = '200'. Text element number
TAB-ENTRY = 'Tax'. Actual text
But use it only for new developments. Bucause it may overwrite the existing texts.
Thanks,
Vinod.
Edited by: Vinod Reddy Vemuru on Aug 8, 2008 2:48 PM
‎2008 Aug 08 10:03 AM
Hi
Create a BDC recording using the TCODE: SHDB for the Transaction SE32 and write the code in your program accordingly.
Hope it helps.
Murthy
‎2008 Aug 08 10:16 AM
Hi,
Not sure of FM. But programically u can do.
Check the statement
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE
SY-LANGU.
This creates the text elements in the specifies program and in specified language.
Not only text elements but also list headings u can create.
Check below sample code given by SAP.
DATA: PROGRAM(8) VALUE 'PROGRAM',
TAB LIKE TEXTPOOL OCCURS 50 WITH HEADER LINE.
TAB-ID = 'T'. TAB-KEY = SPACE. TAB-ENTRY = 'Sales'.
APPEND TAB.
TAB-ID = 'I'. TAB-KEY = '200'. TAB-ENTRY = 'Tax'.
APPEND TAB.
TAB-ID = 'H'. TAB-KEY = '001'. TAB-ENTRY = 'Name Age'.
APPEND TAB.
TAB-ID = 'S'. TAB-KEY = 'CUST'. TAB-ENTRY = 'Customer'.
APPEND TAB.
TAB-ID = 'R'. TAB-KEY = SPACE. TAB-ENTRY = 'Test program'.
APPEND TAB.
SORT TAB BY ID KEY.
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE SY-LANGU.
eg:TAB-ID = 'I'. For Text elements
TAB-KEY = '200'. Text element number
TAB-ENTRY = 'Tax'. Actual text
But use it only for new developments. Bucause it may overwrite the existing texts.
Thanks,
Vinod.
Edited by: Vinod Reddy Vemuru on Aug 8, 2008 2:48 PM
‎2008 Aug 08 10:38 AM