Welcome To My BLOG

This site is to give a brief idea for the abap learners who are looking for some real time programs .It consists of collection of programs from my side . I hope these programs are very much used for all of the learners. Please check the links for any information in ABAP.
Please vote for my Blog. And please input me on this mail addrssess.Email me

Share this link with your friends

http://www.rebtel.com/u/15163104576

For every friend who signs up using this link and makes a payment, we'll give you 8 €!


Wednesday, September 22, 2010

Code To Down Load All Text Symbols, Selection Text, List Headings of Program.

Description: ABAP- Program to Down load all Text Symbols, Selection Text and List Headings of Particular Program
DATA: it_pool LIKE TABLE OF textpool.DATA: BEGIN OF it_fname OCCURS 0 ,
name(80),
END OF it_fname.DATA: BEGIN OF wa_out,
id TYPE textpoolid,
key TYPE textpoolky,
entry TYPE textpooltx,
entry2 TYPE textpooltx,
END OF wa_out.
START-OF-SELECTION.
READ TEXTPOOL p_prog INTO it_pool LANGUAGE sy-langu. LOOP AT it_pool.
wa_out-id = it_pool-id.
wa_out-key = it_pool-key.
wa_out-entry = it_pool-entry.
APPEND wa_out TO it_out.
ENDLOOP. it_fname-name = 'ID'.
APPEND it_fname.
it_fname-name = 'KEY'.
APPEND it_fname.
it_fname-name = 'ENTRY IN ENGLISH'.
APPEND it_fname.
it_fname-name = 'ENTRY IN OTHER LANGUAGE'.
APPEND it_fname.* CONCATENATE: p_fpath p_prog '.XLS' INTO p_fpath. CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename = 'C:\data1.txt'
filetype = 'DAT'
TABLES
data_tab = it_out
fieldnames = it_fname
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
MESSAGE e000(zmul).
ELSE.
MESSAGE s001(zmul) .
ENDIF.
CLEAR:it_out.

No comments: