‎2007 Feb 06 12:28 PM
hi to all
plz help me in this issue
i captured text in subroutine of the script as below
there the address field consits of standard text anmes for differnt comapny codes
select single * from zsd
where bukrs eq p_bukrs
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = 'ST'
LANGUAGE = 'EN'
NAME = ZSD-ADDRESS
OBJECT = 'TEXT'
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES = L_TEXT.
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
this standard text i need to pass to script layout notw it has captured in table as above l_text
how to pass this l_text to script assdress layout
Message was edited by:
kiran reddy
‎2007 Feb 06 12:47 PM
hi u can use include
but if u r using write_form
u need to pass element name, window name .
‎2007 Feb 06 12:39 PM
hi,
this code is in u r driverprogram right?
if yes,
then call u r script in driver program .define a text element for the address window call write_form and loop this function
loop at l_text into wa.
call function write_form.
endloop.
‎2007 Feb 06 12:43 PM
hi is there no need to do anything in the script layout other than this can i use include for this.
in write form what parametes we need to pass.
thanks & Regards
kiran reddy
Message was edited by:
kiran reddy
‎2007 Feb 06 12:45 PM
Hi Kiran,
You don't need to use read_text if you want to include it in a sapscript/form.
Just use the following statement in your page/window:
/: INCLUDE ZSD-ADDRESS OBJECT TEXT ID ST
Erwan
‎2007 Feb 06 12:46 PM
Hi,
This will be in a perform in teh driver program right?
In SAPSCRIPT text editor
write
PERFORM ..... and specify program name like
PERFORM GET_VBAK_DATA IN PROGRAM ZTEST
USING &VBDKA-VBELN(K)&
USING &VBDKA-LAND1(K)&
CHANGING &TEXT1&
CHANGING &CMIR_IND&
ENDPERFORM
‎2007 Feb 06 12:47 PM
hi u can use include
but if u r using write_form
u need to pass element name, window name .
‎2007 Feb 06 12:50 PM
Kiran,
In the window/page you want the text, just create a text element and put the above statement ( include .... )
In the "print" program just call the element in your write_form.
Erwan
Message was edited by:
Erwan LE BRUN
‎2007 Feb 06 12:51 PM
hi nakul,
i got data in internal table l_text from read_text fm then using write_form
looping l_text. to address window
but after that how to keep this l_text in address window in layout
how can we include internla table in address window.
thanks & Regards
Kiran reddy
‎2007 Feb 06 12:53 PM
hi,
loop at itab into wa.
calll this wa in u r text editor &wa-<fieldname>&
‎2007 Feb 06 12:56 PM
hi nakul in text editor in an include command or same as ur code
tanks
kiran reddy
‎2007 Feb 06 1:04 PM
Hi Kiran,
To display the contents in your internal table in the script you can try the following. In the driver program use
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'ADDRESS'
EXCEPTIONS
UNOPENED = 1
UNSTARTED = 2
OTHERS = 3.
CALL FUNCTION 'WRITE_FORM_LINES'
EXPORTING
FUNCTION = 'SET'
HEADER = THEAD
TYPE = 'BODY'
WINDOW = 'MAIN'
TABLES
LINES = I_text
EXCEPTIONS
FUNCTION = 1
TYPE = 2
UNOPENED = 3
UNSTARTED = 4
WINDOW = 5
BAD_PAGEFORMAT_FOR_PRINT = 6
SPOOL_ERROR = 7
CODEPAGE = 8
OTHERS = 9.
If useful reward points.
Regards,
Kalpana.
‎2007 Feb 06 1:04 PM
hi,
no need to use an include
under the text element u defined
just mention &wa-<fieldname>&
cheers!