2006 Aug 22 2:13 PM
Hi,
I am using SAP Scripts to print the purchase orders. I have problem in printing the address for Puerto Rico. All other addresses print well except for PR. In this case, it prints the postal code prior to the city. Is it because it is a province. We are using the Standard print program which uses the NAST table. Please advice.
Thanks.
Raj
2006 Aug 22 3:31 PM
This is configuration. It will apply to all of your layout sets, not just the purchase order.
The address layout format is set up for each country. I think the transaction code is OY01. It is in the IMG with the label SET COUNTRIES.
PR is probably set for 010.
2006 Aug 22 2:34 PM
Hi
See the Address Maintenance as done in database, because address is printed as per the preview avialabel in the SAP database. If you wanna modify change it there it will be reflected in SAPSCript don't have to write any extra code for that.
Hope This Helps
Anirban
2006 Aug 22 2:47 PM
hi Raj,
Change alignment to display format for City and PO Code display
chk this one..
/:ADDRESS PARAGRAPH AS
/: TITLE &VBLKK-ANRED&
/: NAME &VBLKK-NAME1&, &VBLKK-NAME2&, &VBLKK-NAME3&, &VBLKK-NAME4&/: Street 115
/: POBOX &VBLKK-PFACH& CODE &VBLKK-PSTL2& CITY &VBLKK-PFORT&
/: POSTCODE &VBLKK-PSTLZ&
/: CITY &VBLKK-ORT01&, &VBLKK-ORT02&
/: COUNTRY &VBLKK-LAND1&
/: REGION &VBLKK-REGIO&
/: FROMCOUNTRY &TVST-ALAND&
/: End Address
hope this helps
Revert back for more help
Regards
Naresh
2006 Aug 22 2:54 PM
Hi Naresh,
The address is printing correctly for all other states and cities in proper format. Only in case of Puerto Rico ( province)it is printing the postal code prior to the city. Do you think it should stil;l help for this case.
Also, can you please let me know if I can do this change in the same Script or if I need to copy the script and then modify.
Thanks,
Raj
2006 Aug 22 3:18 PM
Hi Raj,
you can make the change to SAP-Script form in transaction code SE71.
make a copy and make changes in original language for layout design.
SAPscript calls the function module <b>ADDRESS_INTO_PRINTFORM</b> for formatting the address. If the display is not in the required form, please check the settings valid for this function module (see the documentation on the function module).
This FM will print the address according to the Standard address format of the sender_country. So the address format will change depends upon the sender country.
CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'
EXPORTING
address_type = '1'
address_number = adrnr
sender_country = sender_country
number_of_lines = 10
street_has_priority = 'X'
IMPORTING
address_printform = wa_address.
If the problem is with only PR i suggest you to use an if condition.
else modify the address format by using the user exit:
"EXIT_SAPLSADR_001" .
Guess this helps
Reward points if helpful
Regards
Naresh
2006 Aug 22 3:31 PM
This is configuration. It will apply to all of your layout sets, not just the purchase order.
The address layout format is set up for each country. I think the transaction code is OY01. It is in the IMG with the label SET COUNTRIES.
PR is probably set for 010.
2006 Aug 22 3:48 PM
Norman,
Can you suggest me as to what PR can be set to instead of 010.
Thanks,
Raj
2006 Aug 22 3:53 PM
Raj,
It depends how you want it formatted. The address, currency, and dates are usually formatted for the destination country. All of these settings are in txn OY01.
If you want it to look like US formatting, it would be 004.
2006 Aug 22 4:20 PM
Thanks Norman. That solved the problem.
I have awarded points to you.
Raj.