Powered By

Free XML Skins for Blogger

Powered by Blogger

Sunday, January 18, 2009

SAP ABAP to Edit Text Symbols in INCLUDE RSAQEXCE

Description: Whenever some one faced problem in the existing report text elements as consistencies can check this program as a reference.

Problem Faced: The requirement is that i need to add a column to the report header. Here in my existing report text elements has inconsistencies why because is in the report called a subroutine(page) of include RSAQEXCE(Runtime Routines for Query Reports). Here they maintained the entire report header as one text symbol(GH0). If i tried to add a column & delete entire GH0 the program is not allowing to do. Instead it it regenrating the GH0 twice. Here while debugging i observed that the GH0 text symbol appears as 'GH000001'. So to overcome this problem externally written below separate program.

********************************************************************
*This Program is used to edit text symbols in RSAQEXCE
********************************************************************
REPORT ZDP_TEMP .

DATA: it_pool LIKE TABLE OF textpool.
DATA: WA_POOL like textpool.
DATA: VA_TEMP LIKE wa_pool-entry,
VA_TEMP1 LIKE wa_pool-entry.

START-OF-SELECTION.

* reads the text elemets from 'ZMIR00B' into an internal table
READ TEXTPOOL 'ZMIR00B' INTO it_pool LANGUAGE sy-langu.

* Loop the text symbol where key = 'GH000001' & modify it accordingly
* as per requirement to reflect it in your Report Output header
LOOP AT IT_POOL into wa_pool where key = 'GH000001'.

* Move all the textpool entry with key 'GH000001' to wa_pool-entry
VA_TEMP =
'SLoc Material Material d TCod MvT Mat.doc. Document '.
va_temp1 =
' h Material Slip GR/GI sl Rec. Price Quantity Total '.
clear: wa_pool-entry.
concatenate va_temp va_temp1
' Cost PO Rec. batch Receiving material Plan PARENT'
' Cost c G/L ac User nam Pstg date Time Order'
into wa_pool-entry.

* Delete all text elements of the program 'ZMIR00B' in the language
* "English":
delete textpool 'ZMIR00B' LANGUAGE sy-langu.

* Modify the TEXTPOOL i.e.,it_pool with wa_pool
modify it_pool from wa_pool.
endloop.

* Inserts the text elements from it_pool with language 'EN' to Program
* i.e.,'ZMIR00B' library
insert textpool 'ZMIR00B' from it_pool LANGUAGE sy-langu.

No comments: