Smart Forms in SAP ABAP

Sommario:

Anonim

SAP Smart Forms viene utilizzato per creare e gestire moduli per la stampa di massa nei sistemi SAP. Come supporto di output, SAP Smart Forms supporta una stampante, un fax, e-mail o Internet (utilizzando l'output XML generato).
SAP ha introdotto SmartForms nel 1998 per superare i limiti degli script SAP. Gli SmartForm sono più facili da sviluppare, mantenere e trasportare rispetto a SAP Script.

In questo tutorial imparerai:

  • Confronto tra Smart Form e SapScripts
  • Vantaggi di Smart Forms
  • Architettura di SAP Smart Form
  • Guida Smartforms
  • Windows in Smart Forms
  • Flusso di programmazione Smart Forms

Confronto tra Smart Form e SapScripts

  • I formati di pagina multipli sono possibili in SmartForms, il che non è il caso di SAPScripts
  • È possibile avere uno SmartForm senza una finestra principale.
  • Le routine possono essere scritte nello strumento SmartForms.
  • SmartForms genera un modulo funzione quando attivato.
  • Le etichette non possono essere create in SmartForms.

Vantaggi di Smart Forms

  • Aiutano ad adattare i moduli senza alcuna conoscenza di programmazione grazie all'interfaccia utente interamente grafica
  • Quando si attiva lo smart form, il sistema genera automaticamente il modulo funzionale e durante il runtime.
  • Per apportare modifiche dobbiamo usare il Drag & Drop, Cut & Paste. Queste azioni non includono la scrittura di linee di codifica o l'utilizzo di un linguaggio di script.
  • Possiamo inserire tabelle statiche e dinamiche. Questi includono gli avanzamenti riga nelle singole celle della tabella, l'attivazione di eventi per le intestazioni di tabella e i totali parziali e l'ordinamento dei dati prima dell'output.
  • I moduli intelligenti consentono all'utente di includere grafici, che possono essere visualizzati come parte del modulo o come grafica di sfondo. Durante la stampa l'utente può sopprimere la grafica di sfondo come e quando necessario.
  • La pubblicazione sul Web è possibile utilizzando l'output XML generato

Architettura di SAP Smart Form

Guida Smartforms

Esaminiamolo nel sistema SAP-

  1. Immettere SMARTFORM della transazione nella casella del codice della transazione.
  2. Nella schermata successiva, inserisci un nome per il modulo e fai clic su crea

La schermata successiva è divisa in tre sezioni:

La finestra di navigazione è composta da nodi e sottonodi. Contengono tutti gli elementi (testo, finestra, ecc.) Che appartengono ai moduli sap

  • La finestra di manutenzione mostra gli attributi degli elementi
  • La finestra della stampante per moduli mostra il layout della pagina

Ogni volta che creiamo smart form, SAP crea / genera un modulo funzionale. A differenza di SAPscripts, SAP FORMS ti consente di cambiare lingua.
Nella finestra di navigazione troverai
le dichiarazioni dei dati globali : i dati qui definiti possono essere utilizzati in tutto lo smartform per scopi di codifica.
Interfaccia modulo : qui vengono definiti tutti i dati che verranno passati allo smartform dal programma di stampa.

Fare clic con il pulsante destro del mouse sulle pagine consentirà la creazione di una nuova pagina, finestra, grafica o indirizzo.

La stampa avverrà sulla base del campo "pagina successiva".
Ma l'elaborazione avverrà secondo la sequenza nella finestra di navigazione!


For background picture and graphics you can pick up either black and white or color bitmap images and are stored in the form of standard texts. You may take a detour from the smartform screen and open Form Graphics screen. Transaction code: Se78

Setting in the Graphics in Smart Form Window-

Windows in Smart Forms


There are two types of Windows

  1. Main
  2. Secondary

Important Points to Note

  • You cannot have more than 1 main window in a page. You can have multiple secondary windows
  • Whatever you print in secondary window… it has to be static. (If u have 20 lines in a PO and there is page constraint the lines get carried forward to next page in the main window. i.e. In a predecessor and successor type of content, they will be printed in sequence in main window. This is not allowed in Secondary windows.


Inside the main window we can add text as introduction to customize the form output.

The Output options on each window determine the Line size, Width, Colors and background to be put.

Smartforms gives the option of giving the address number which is maintained in the central address management. The address will be directly taken from ADRC table and will be populated in the form.

The two different editors are available in Smartforms viz. Normal Editor

and the Graphics Editor.

This setting can be changed using the Configure editor in Utilities.

In Table painter, you can draw the format as per client requirement (e.g. Heading, Sub Heading, Item, Sub Total, Grand Total etc.)
You can use the table layout to determine:

  • The number of lines and cells
  • The height of each line
  • The width of each cell
  • The alignment of the table in the window


The Table shows the different line types which will be used in the table. The Line types define the size of each cell and the number of cells in each line.

Smart Forms Programming Flow

When an SAP Smart Form template is created, a user creates the form layout, defines the required fields, conditions, and special programming instructions in the Smart Form template using the Smart Form Builder.
After the form design is complete, the form needs to be activated before it can be tested or accessed by the print programs.Activating the form initiates the generation of a function module that handles all of the form's processing.
This function module interacts with the application program/print program to create the output in the user-defined output media for the specified device.
In case of smart forms, we use 2 function modules for the processing of the smart form. To the first function module , we pass the name of the smart form as the import parameter. This then returns the name of the dynamically generated function module which will actually call the smartform.
The smartform name can be passed on to the function Module - 'SSF_FUNCTION_MODULE_NAME'

This will return the Function module name of the smartform which is referenced.

The Print program will be calling the FM 'SSF_FUNCTION_MODULE_NAME' to get the Function module name at Runtime. Therafter it will call the Function module thus obtained to execute the smartform.

Templates

Il modello può essere utilizzato quando si conosce la dimensione esatta dell'output o l'output è in un formato fisso.
Es. Modulo fiscale / assegni / modulo aereo / biglietto ferroviario: tutti questi utilizzano modelli.
La differenza tra tabella e modello è che in una tabella l'altezza cambia dinamicamente. Chiamiamo una riga una "linea" nel modello.


Stili SMART

Uno stile intelligente contiene:

  • Dati di intestazione contenenti i valori predefiniti di uno stile avanzato
  • Formati di paragrafo inclusi rientri e spaziatura, attributi dei caratteri, tabulazioni, struttura e numerazione
  • Formati di caratteri inclusi effetti (apice, pedice), codice a barre e attributi dei caratteri
  • Colori e sottolineature per un paragrafo o un formato di carattere

Puoi utilizzare la transazione "smartforms" / "smartstyles" per creare uno stile intelligente.

Questo è tutto per questo tutorial