Google Search - Blog...........

Mass Approval For The Leave Workflow Data - PT_ARQ_REQUEST_EXECUTE

When there is a requirement for approving the mass approvals for the leave request workflow , then use the below function module PT_ARQ_REQUEST_EXECUTE to approve it.

Before running the functional module check the record status in the table PTREQ_HEADER with field status. It has the status 'SENT' .


im_request_id = 'E079F211C65FEFF188150050569A609B' "PTREQ_HEADER-REQUEST_ID
im_pernr = '00000001'
im_modus = 'R'
ex_messages = EX_MESSAGES
ex_commands = EX_COMMANDS

After running this function module the status become 'APPROVED' in the table PTREQ_HEADER , and if u check in the workflow the workflow would be completed. for detailed data run the report RPTARQDBVIEW.

SAP - All About SAP Scripts / Layout Sets / Forms

If the user wants to print documents such as invoices, purchase order, all such documents are printed with the use of forms. SAP allows the user to define these forms by using layout sets. SAP script is the tool used to create the layout set.

In order to print the document, the SAP system runs a program that collects the data for the document and feeds it into the layout set. This is called as Print Program.

SAP Provides a standard layout set for every printable document and usually there is no need to create layout sets as such. User just modifies the existing layout sets as per requirement of client. Following are some standard layout sets provided by SAP:

RVORDER 01 Sales order confirmation
RVDELNOTE Picking List
RVPICKSIN Picking List
RVINVOICE 01 Invoice
MEDRUCK Purchase Order
F110_PRENUM_CHCK Pre-numbered check

Usually you don’t create layout sets, instead, you copy the existing layout sets with some modification to the existing layout sets. SAP doesn’t allow you to modify the layout sets. You need to copy the existing layout set to your own layout set and then do all the modification.

Procedure to copy the existing layout sets:

Tools  Word processing  Layout sets.
Utilities  Copy from client
• Enter the name of the layout set in layout name.
• Enter target layout set name
• Click execute

The SAP standard layout set uses D German as the original language. In order to modify the copied layout set, the original language of the set must be changed to the language in which you are working.

To convert language:
Utilities – Convert original language
Click OK.
Layout Set

Layout set is used to design the document. Layout set on its own does not contain any data. The selection of data for the document is done through the print program i.e. the print program selects the data from database table and feeds it to the layout set. The document is printed after the print program gets executed.

A layouts set consist of following components:
• Header
• Paragraph
• Character String
• Windows
• Pages
• Page Window

Header: The header consists administrative information for the layout sets and default settings for the various other components of the layout sets like page, paragraph. You give all the administrative information for the header when you create the layout set, while all default settings are specified when all the components are created.

Paragraphs: A Paragraph contains all the information needed to format a paragraph of text and font. Tabs are important for paragraphs. Specifying the list of tabs is the way to create columns for outputting line items of a document.

Character string: is used to override paragraph settings for specific words in a paragraph. For example you might want to use Bold for a single word but not the entire paragraph. The only important thing that is defined with the character string is the font.

Windows: A window mainly contains the SAP scripts text and the variable to be printed. There is one special window, MAIN, which contains the output of the line item of a document and is created by the system. The window can be of type VAR or CONST except for the MAIN. But in the present version, SAP system does not distinguish between these two types. The content of variable window is regenerated on every page. The content of a constant window is generated once at the beginning and later printed on every page.

Printing a company logo:

There are two ways to print a company logo:
1. The logo can be included in the layout set.
2. It can be a macro on PCL – 5 printers.

Including a logo in the layout sets:

• Create logo with a graphics program and save it as tiff file.
• From editor run the program RSTXLDMC.

Parameters to be passed are:

• File name
• File type
• BMON – For a black and white image.
• BCOL – For a color image.
• Text name – The standard text in layout set

This text can be included in a layout set by including . Using PCL – 5 printers, can also print the logo. In R3, the printer types are IIPLJIIID, IIPLJ4, LX4039 and SM120XXS.


All script control commands are entered in the SAP Script editor.

• All commands are indicated by /: in the tag column.
• Only one control command is allowed per line.
• Lines with control commands are not affected by the editor formatting.
• If control command is unknown or incorrect, command line is treated as comment line.

ADDRESS: This command formats and address according to the postal standards of the country.

/: Address
/: Title ‘Company’
/: Name ‘Intelligroup’
/: Street ‘115’
/: P.O. BOX ` `
/: Postcode
/: City
/: Region
/: Country
/: End Address

BOTTOM-ENDBOTTOM: For the Main window you can determine lines, which are always output automatically at the bottom of that window. This is called footer text.

BOX, POSITION, & SIZE: These commands are used for drawing boxes and are used only during creating output.
/: BOX [Xpos] [Ypos] [Width] [Height] [Frame] [Intensive]

X & Y – Upper left corner of the box.
Width – Width of the box
Ht – Height of the box
Frame – Thickness of the box (Default is full black)

Units used for Width, Height and Thickness are TW, PT, IN, CM, CH, LN.



/: POSITION [X Origin] [Y Origin] [Window] [Page]

X & Y - Sets the origin for x 7 y parameters for the box command.

Window - Sets the default values for the left and upper edges.

Pages - Sets the values for the left and upper edges of the current page.

Basically used to set default setting for the box command.
/: Position x Origin ‘1.5’ cm y origin ‘1’ cm



Sets width and height parameters for the box command.

CASE: It is similar to ABAP/4 editor command ‘CASE’ only symbol can be queried.
/: WHEN 1
/: WHEN 2

Values can be assigned to text symbol by DEFINE keyword. The assigned value may have a maximum 60 characters. It can also contain further symbols.

IF: With IF command you can define the lines that are output only under certain conditions.
/: IF &var& = ‘char val’

INCLUDE: Contents of another text can be included in text by INCLUDE command. The contents are copied only at the time of the output formatting. You can also specify language and the paragraph irrespective of the language in which the calling text is created. The language which is used in include test is used for output.


NEW–PAGE: SAP Script automatically carries out a page break if window MAIN of one page is filled with NEW-PAGE command. You can face page break at any point. The current page is completed and the text in the following line is written on new page. If no name is defined, then, the next page attributes from page setup is taken.


NEW–WINDOW: You can have 99 MAIN windows on one page. If MAIN window is filled, then the next MAIN window is accessed automatically. With NEW-WINDOW command, you can call next main window even if the current MAIN window is not yet completely filled.

PROTECT: You can determine that a paragraph must not be separated by a page break. The lines in this command are printed together on one page. If the space is enough on current page, then all the lines are printed on current page. If, however the space is not sufficient the PROTECT command works as a ‘NEW-PAGE’.


SET COUNTRY: Some field types are formatted country – specifically. E.G. date. Normally the display types are defined in the user master record with the control command set country, an alternative to that in the user master record can be chosen.

Standard display of date can be changed
e.g. SET DATE MASK = ‘MM DDDD (Day in full) yyyy’

You can switch back to default display of date by
/: SET DATE MASK = ‘ ‘

SET TIME MASK: Standard display of time can be changed

TOP-ENDTOP: For main window, you can determine lines, which are always O/P automatically at the top of the window.