SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software SAP ABAP Programming and HANA Database Tutorials
Development resources, articles, tutorials, code samples and tools and downloads for ASP.Net, SQL Server, R Script, Windows, Windows Phone, AWS, SAP HANA and ABAP, like SAP UI5, Screen Personas, etc.

Install SAP Free

How to Use Form Routines in SAP Smartforms Documents

Creating Form Routines in SAP Smartform documents help ABAP developers who are working with SAP Smartforms documents keep their ABAP codes clean and create reusable form routines that can be called within Smartforms.

In this SAP Smartforms tutorial, I'll demonstrate how to create a sample Form Routine and how to call it from Initialization code block.

On the Global Data, add the following line to define gs_vbrk global variable.


Go to Form Routines tab, add the following form routine code block.

FORM get_vbrk_data
  USING cs_bil_number TYPE VBELN
    CHANGING cs_vbrk TYPE vbrk.

  WHERE vbeln = cs_bil_number.


On the Initialization tab, add the following code which will call and populate gs_vbrk variable structure.
Of course, gs_vbrk should be defined among Input Parameters and Output Parameters of Initialization code block.
And is_bil_invoice-hd_gen should be defined in the Input Parameters of Initialization code section.

* Populate internal VBRK structure variable
PERFORM get_vbrk_data
  USING is_bil_invoice-hd_gen-bil_number
    CHANGING gs_vbrk.

SAP Resources

SAP Tutorial

SAP Forums

SAP Tools

SAP Transaction Codes Table

Meetup Sunumu 1 meetup

Copyright © 2004 - 2020 Eralper YILMAZ. All rights reserved.
Community Server by Telligent Systems