Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

address for differnt company code

Former Member
0 Likes
751

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

7 REPLIES 7
Read only

Former Member
0 Likes
699

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.

Read only

0 Likes
699

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

Read only

0 Likes
699

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

Read only

0 Likes
699

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

Read only

Former Member
0 Likes
699

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

Read only

Former Member
0 Likes
699

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

Read only

Former Member
0 Likes
699

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