‎2007 Feb 06 10:15 AM
hi to all
plz help me in this issue
i need differnt address in script layout according to comapny codes
so i have maintained a field called address in ztable whre company code s also stored and i have created standard text for each comapny code and mained in
address field in ztable now how should i proceed in subrotuine so that in script layout the address should change according to comapny code( can i use read text in subrotuine and capture text).
thnaks& regards
kiran reddy
Message was edited by:
kiran reddy
‎2007 Feb 06 10:19 AM
Hello,
in subroutine you can code in such a way that you read print document's company code. & then select appropriate standard text.then read the text using read_text function in subroutine itself.Collect the data in address in various variables as name1,name2,city,country.etc.& then use these variable in script for printing.
Thanks.
‎2007 Feb 06 10:25 AM
hi rushali ,
i have captured company code and the standard text name in my subroutine now iam not understand how to pass this to read text for example my standard text name is zdd_111 and company code is 111 i have captured this,ow to pass this into read_text and how to identify this in script layout.
thanks & regards
kiran reddy
Message was edited by:
kiran reddy
Message was edited by:
kiran reddy
‎2007 Feb 06 10:49 AM
Hi
U need only the use the statament INCLUDE in your sapscript.
So if, for example, the variable with the name of standard text is TEXT_NAME:
/: INCLUDE &TEXT_ NAME& OBJECT TEXT ID ST
In this way the system writes automatically the address.
Max
‎2007 Feb 06 11:01 AM
Hi max
i captured text in subroutine of the script as below
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.
plz help me in this issue
how to pass this l_text to script assdress layout
Message was edited by:
kiran reddy
Message was edited by:
kiran reddy
‎2007 Feb 06 10:21 AM
In your print program.
Get the company code and the standard text id into the internal table.
loop at itab.
call function 'write_form'
.
.
.
endloop.
in the script: text elements.
do this:
http://help.sap.com/saphelp_47x200/helpdata/en/d1/80318f454211d189710000e8322d00/frameset.htm
Regards,
ravi
‎2007 Feb 06 10:37 AM
Hi Kiran ,
Are you encountering problem calling the READ_TEXT FM , if that is the case use the parameters you used when you were creating the standrard text and see .
Regards
Arun
‎2007 Feb 06 10:43 AM
HI Kiran,
Nothing worry abou this.
/: case 'compnay_code'
if XXX
use the address tags for that address
if YYY
use the address tags for YY
/: endcase
please try this, this will works
regards
arjun