Application Development and Automation 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: 
Read only

script

Former Member
0 Likes
503

hi gurus

may i know about scripts

what is script? and its purposes? types of scripts?

3 REPLIES 3
Read only

Former Member
0 Likes
481

Hi Mahesh,

SAPscript technology is based on a mainframe product from the 1980s, while Smart Forms have only been around since (roughly) 2001. With that sort of time gap, there are bound to be significant differences between the two tools. Client dependence is a fundamental one. Although SAPscript has had some incremental improvements over time, its forms have always been -- under the hood.

Scripts:

1.These are client dependent.

2.Multiple page formats are not possible.

3.main window is compulsory

4.Lables are used

5.Function module is not generated when activated.

SAP Scripts are the Layout Forms that you design and there are aviable in the client in which you have created them, for making them available you have to copy across the clients.

Because, Sapscripts are saved in ITF format as text in client dependant tables STXH and STXL. smartforms are not saved in client dependant tables and visible across clients.

SAPscript technology is based on a mainframe product from the 1980s, while Smart Forms have only been around since (roughly) 2001. With that sort of time gap, there are bound to be significant differences between the two tools. As you have noted correctly, client dependence is a fundamental one.

Although SAPscript has had some incremental improvements over time, its forms have always been -- under the hood -- relatively passive objects, with minimal embedded logic. These forms were designed to be driven and controlled by ABAP programs, much in the way ABAP programs read in database tables to produce reports; if you ever download a SAPscript form (e.g., via utility program RSTXSCRP), and look at the portable text file it produces you'll see what I mean. Many text objects (e.g., invoice header texts) are bound directly to documents which are client-dependent, so it makes sense for these text objects to also be client-dependent. From a complexity standpoint, SAPscript forms are close enough to these text objects where I can see how it made sense at the time to make them client-dependent too.

Conversely, a Smart Form is significantly more robust and complex. For instance, it can contain program nodes and nested tables with patterns. When a Smart Form is compiled, it generates an ABAP function module – and these are always client-independent. This is appropriate, given that this form has more in common with an ABAP program than its predecessor. For instance, when a print program calls a Smart Form, the form itself takes over to produce output, without any further direction from the print program. In fact, the join is so seamless that I often find myself using a Smart Form's Initialization section for logic to handle any data gathering not handled by the print program. I would never even think to attempt this with SAPscript.

I suspect several factors figured into SAP's decision to make Smart Forms client-independent, including customer feedback. There are significant advantages to client-independence. For instance, a change made in one development client happens immediately across all development clients. Among other things, this means we don't have to waste time figuring which client contains the most recent version -- they all do! In addition, transporting Smart Forms is easier, since we can safely bundle them together in the same transport as their client-independent print programs (no worry about mixing client-dependent and independent objects).

kindly reward if found helpful.

cheers,

Hema.

Read only

Former Member
0 Likes
481

SAP script is the SAP System's own text-processing system

It looks and feels a lot like other leading text-processing systems

It is used to print preformatted text in preformatted forms

SAP script is tightly integrated into the SAP System

SAP script comprises of five main components

An editor for entering and editing the lines of a text

Styles and layout sets for print layout. These are created independent of the individual texts using the corresponding maintenance transactions and are allocated to the texts later

The composer is a central output module. The SAP script composer is invisible to the outside

A programming interface that allows you to include SAP script components into your own application programs and to control the output of layout sets from within the programs

Several database tables for storing texts, styles and layout sets

To output documents using the programming interface, R/3 application programs need so-called layout sets (a kind of form)

In SAP script a layout set describes the layout of the individual print pages and uses text elements to supply definable output blocks, which a print program can call.

A layout set can be defined as a page design for a document

Usually a SAPscript form consists of the following objects:

Header Data

Paragraph and Character Formats

Windows and Text Elements

Pages

Page Windows

The execution of script is done through an ABAP program, which is referred as Print Program. Each print program should have an ENTRY form , which will be called from customization.

For a standard configuration we can see the form name (script name), print program name and output type in the table TNAPR

The print program uses the Form control functions to call the script

SAP script does not maintain any versions. So when modifying the SAP script , ensure that the changes are well documented in script. This applies to the standard texts too.

The output of the form will differ when viewed on the screen and on the printer. So always test the output of the script on the printer.

P.S:- Award points if u find this useful