Thursday, July 30, 2009

Display background (water mark) image using SAPscript

Joyjit Ghosh, Kolkata

Detail Steps:

Step 1: Create a standard text (transaction SO10) and insert the background image in it


Step 2: Now open the layout set (transaction SE71) in which background image needs to be displayed and do the required changes as mentioned below.

Note: Here I am using an existing custom sapscript layout where all windows, pages and page windows are already created except the background image. And for this demo I am showing the changes required for inserting the background image in the 1st page.

Goto “Page window” of the 1st page and create another page window of type ‘MAIN’. And its attributes must be same as the existing “MAIN” window.





Now open the Text Elements of the main window in edit mode and in the 1st line of the Sapscript editor insert the standard text (created above) that contains the background image.




Now in the 2nd line insert the special command NEW-WINDOW


Definition of NEW-WINDOW command:

Each page can consist of up to 99 main windows. Each main window is assigned a consecutive identifying number (0..98), and the windows are filled in this order. This feature enables SAPscript to print labels and to output multi-column text. When one main window fills up, the next main window on that page is taken, if there is a next one. A page break is inserted after the last main window.

You can use the NEW-WINDOW command to call the next main window explicitly, even if the current main window is not yet full. If you are in the last main window of the page, the command has the same effect as the NEW-PAGE command

Now activate the form

Step 3: Maintain required configuration for triggering the form

Step 4: Now trigger the form and see the print preview


Result:

Form is displayed with background image in print preview.





Tuesday, July 28, 2009

ALE Audit

Joyjit Ghosh, Kolkata.

You can configure the receiving system to generate ALE Audit messages for all incoming ALE IDocs for certain message types, and to send these messages to the sending system, where the ALE Audit toolset can use them to maintain a complete audit trail.

To enable ALE Audit:

§ Set up the ALEAUD message type in the Customer Distribution Model and Partner Profiles.

§ Define a filter object in the distribution model to specify the message type that you want to audit.

The data contained within the ALEAUD messages (IDOC type ALEAUD01) provides detailed status information on the IDocs in the receiving system, as well as the links between the IDocs and the resulting SAP application objects on the receiving system.

Audit IDoc Structure

These are the segments in an ALEAUD01 IDoc, with the fields they contain:

§ Segment E1ADHDR

o Message type

§ Segment E1STATE

o Sender’s IDoc number

o Current status

o Message fields

§ Segment E1PRTOB

o Receiver’s IDoc number

o Application object information

Two programs enable cross-system reporting.

§ RBDSTATE. This program is scheduled to run periodically on the destination system. It reports the status of incoming IDocs to the sending system, using the ALEAUD message and ALEAUD01 IDoc. This status information is recorded separately from IDoc status information in the audit logs.

§ RBDAUD01. This program is executed on the sending system. It analyzes the audit log and displays the output as a report.

Program RBDSTATE

Transaction: BDM8

Program: RBDSTATE

Use the program RBDSTATE on the receiving system to send the audit messages to the sending system, using ALE (I.e. asynchronously). You typically run this program as a scheduled batch job. The parameters of RBDSTATE are:

§ The sending system (of the original IDoc)

§ The message type

§ The date range the IDoc’s status was changed. Any IDoc having a status record in this date range will be confirmed.

The audit messages contain:

§ The current status of the inbound IDoc

§ The id of the resulting SAP application object (if the IDoc was
successfully posted)

The system will confirm up to 500 IDocs in one ALEAUD message. If
there are more than 500 IDocs to be audited, then it will create multiple
audit IDocs.

NOTE: The RBDSTATE program looks at IDoc status records to determine which IDocs to audit. If any status record was added to an IDoc during the specified date range, the program will audit the IDoc.

The RBDSTATE program returns the following statuses, from the receiving to the sending system.

Status of IDoc in receiving system

Status reported to sending system via ALEAUD

53 (Application document posted.)

41 (Application document created in receiving system.)

51 (Error: Application document not posted.)

Status 39 (IDoc is in the receiving system.) This status is repeated each time RBDSTATE is run, as long as the IDoc remains in status 51.

68 (Error: No further processing.)

40 (Application document not created in receiving system.)


Program RBDAUD01

Transaction: BDM7

Program: RBDAUD01

Use the program RBDAUD01 on the sending system to look at the ALE Audit IDoc statistics.

§ “IDocs total” is the total number of IDocs audited

§ “Queue Outbound” is the number of IDocs that have not yet been sent to the other system

§ “Queue Inbound” is the number of IDocs that are still being processed by the receiving system

§ ALE Audit records may be selected by message type, date range, etc. You can drill down into the report to see information on daily statistics, detailed information on IDocs, and cross-system links for successfully processed IDocs:


Monday, July 27, 2009

How to execute SOLMAN_DOCU_VERSION_DEL

Joyjit Ghosh, Kolkata.

Program SOLMAN_DOCU_VERSION_DEL is part of Solution Manager and purpose of it is to delete versions of stored documents. To run this program successfully we need to do following things:

In tran. SOLAR02 for a project when we upload a document it is stored in folder SOLAR00 by default (see the screen shot below), we need to change it to our project folder, ex: for project SARA_TEST9 all documents should be in the folder SARA_TEST9.


It can be done by clicking button beside folder field.

Now click on change button and then SAVE the document so that SAP generates separate version for every change

Here we have changed a web link (TEST) with status NOT_STARTED (Z001).

Now run the program with value shown in the screen shot:

As result we will get the status log: