Monday, November 16, 2009

Fonts and Adobe Forms in SAP with Adobe Document Services...

Recently we were experiencing a problem with MICR fonts not showing up when creating a check form using Adobe LiveCycle Designer 8.0 on SAP ERP 6.0. In the past our developers have used mostly SAPScript forms when writing check forms, but this particular check form called for Adobe Forms. The wall we ran into was when trying to get the MICR font to show the check number, routing number and account number in the bottom fields on the check.

Here are a few things we discovered while troubleshooting this issue:
- The SAP MICR fonts MICR_C and MICR_E are installed inside the SAP system
for SAPScript support and for viewing characters in the SAP environment.
- The Adobe LiveCycle Designer tool uses fonts installed locally on the
machine the SAPGui is running on, and does not see the fonts installed inside
SAP.
- The Adobe Document Services (ADS) only sees its default fonts and those
added manually in the J2EE directory structure on the server host.
- ADS creates the PDF files from xml data sent from the frontend LiveCycle
Designer, and utilizes its own installed fonts when generating a form in PDF
format.

If you have a need for non-default fonts to show up in your ADS-generates PDF files, you must first make sure that the fonts are installed in Adobe Document Services, specifically in the Font Manager Service (FMS). To do this, you will need to copy the desired font (.ttf file, for example) into the following directory:
/usr/sap//SYS/global/AdobeDocumentServices/FontManagerService/fonts/customer

If the /fonts/customer directories do not exist, create them. If the other folders do not exist, please check your ADS installation. After adding the font you will need to restart the cluster. It is possible for the settings to take effect by just restarting ADS and FMS through Visual Admin, but I prefer to simply restart the J2EE cluster - it's less work, and we BASIS guys have enough to do already.

Also, you will want to install the same fonts onto the frontend machine that will be developing the forms, otherwise the developer will not be able to select the font name from a drop-down list and will have to key it in exactly as it is named on the server. Plus, the developer will not be able to see the font until he has generated the form and created a print preview.

I hope this helps...

Tuesday, November 3, 2009

Change Table Schema in SQL2005...

Every now and then while running, installing, and copying JAVA AS for SAP on SQL Server you may run into an issue where the wrong schema is set for a set of tables in the database. This is not a problem if you are willing to completely start from scratch and reinstall Java. For most people, however, that would present a significant problem. Changing the schema of these tables is really the best option in this scenario.

In order to change the schema, you need to use the ALTER SCHEMA command in SQL.
The syntax is as follows:

ALTER SCHEMA new_schema TRANSFER old_schema.table_name

This works like a charm if you are trying to change the schema of a single table. However, there are over 300 JAVA tables for SAP, and your fingers can get pretty tired trying to run this command for each and every one individually.

Try this procedure to change the schema of all tables in a particular schema to a new one:

SELECT
'ALTER SCHEMA new_schema TRANSFER old_schema. '+name FROM sys.tables
WHERE schema_id = x

In this simple statement, you will need to insert your values for new_schema and old_schema as well as the schema_id for old_schema. You can find the schema_id by identifying a table in the old_schema and running the following query:

SELECT schema_id from sys.tables WHERE name = table_name

Hope this helps...