Application Development 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: 

I want to change the address in a sapscript

Former Member
0 Kudos

But I dont know how to change it.

The code is as follows:

/: IF &PAGE& EQ '1 '.

/: INCLUDE &T001G-TXTAB& OBJECT TEXT ID ADRS LANGUAGE &T001-SPRAS&

/: ENDIF.

/: ADDRESS PARAGRAPH AS

/: TITLE &DKADR-ANRED&

/: NAME &DKADR-NAME1&, &DKADR-NAME2&, &DKADR-NAME3&, &DKADR-NAME4&

/: STREET &DKADR-STRAS&

/: POBOX &DKADR-PFACH& CODE &DKADR-PSTL2&

/: CITY &DKADR-ORT01&, &DKADR-ORT02&

/: POSTCODE &DKADR-PSTLZ&

/: COUNTRY &DKADR-LAND1&

/: REGION &DKADR-REGIO&

/: FROMCOUNTRY &DKADR-INLND&

/: ENDADDRESS

How can I change the address?

Thanks.

7 REPLIES 7

Former Member
0 Kudos

Hi

You can write the fields with your own paragraph (ZA)

ZA &DKADR-NAME1&, &DKADR-NAME2&,

ZA &DKADR-STRAS&

ZA &DKADR-PFACH& &DKADR-PSTL2&

ZA &DKADR-ORT01&, &DKADR-ORT02&

ZA &DKADR-PSTLZ&

ZA &DKADR-LAND1&

You can insert other fields in the structure DKADR

you can change the line position

You can fetch a new field from outside using sub routine and can add here

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

Hi,

You are viewing this LAYOUT from a Transction, so you need to chage the Address in that transaction to reflect over here. Based on that transaction address only this layout prints the address

Regards

Sudheer

0 Kudos

Sudheer Junnuthula hi,

I did not understand what the transaction and the address at transaction.

I have displayed this layout from se71 and used no other trans.

Sorry could you explain it a little more?

Thanks.

Former Member
0 Kudos

Hi,

Lets say, if you want to view the Sales order, then normally we run the layout from VA02/VA03. from there we press the print preview, so then layout will be displayed, there the Sales Order Address will be printed in teh layout, if you want to change the Address then we change the address in VA02, then the changes will be reflected in the layout ....

If you want to change the Fields in the SAPSCRIPT in SE71, then change it from SE71, now the ADDRESS format is ok in the SAPSCRIPT, if you wan to change then change the Paragraph format (ADDRESS PARAGRAPH AS ).

Regards

Sudheer

Former Member
0 Kudos

The problem here is that:

Address is not text, the address data comes from db table.

It is inserted the structure, DKADR, at the abap side and then written.

Do I have to change the address of db table?

Thanks.

0 Kudos

Any answer?

Please send me your opinions.

0 Kudos

Yes, I think you do. If you want to display fields different from the content of the current address fields in DKADR you could do this in your print program. An alternative is to call a subroutine from your script passing some data and getting back your new fields.

If you only want to change the layout of the address you can do this in the form.

If you want to change the address premenantly (ie not just for output on the form) you will need to do as Suhdeer suggests and update the data first using the standard maintenance transaction.

Regards,

Nick