SAP FORMPAINTER_ADJUST_TO_GRID Function Module for









FORMPAINTER_ADJUST_TO_GRID is a standard formpainter adjust to grid SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for formpainter adjust to grid FM, simply by entering the name FORMPAINTER_ADJUST_TO_GRID into the relevant SAP transaction such as SE37 or SE38.

Function Group: CNFP
Program Name: SAPLCNFP
Main Program:
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function FORMPAINTER_ADJUST_TO_GRID pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'FORMPAINTER_ADJUST_TO_GRID'"
EXPORTING
WINDOW = "
LPI = "
* NO_FLUSH = ' ' "
PAGE = "
UNIT_LEFT = "
UNIT_TOP = "
WIDTH = "
UNIT_WIDTH = "
HEIGHT = "
UNIT_HEIGHT = "
CPI = "

CHANGING
LEFT = "
TOP = "

EXCEPTIONS
WINDOW_NOT_FOUND = 1 CONTROL_ERROR = 2
.



IMPORTING Parameters details for FORMPAINTER_ADJUST_TO_GRID

WINDOW -

Data type: ITCTH-TDWINDOW
Optional: No
Call by Reference: No ( called with pass by value option)

LPI -

Data type: ITCTA-TDLPI
Optional: No
Call by Reference: No ( called with pass by value option)

NO_FLUSH -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAGE -

Data type: ITCTH-TDPAGE
Optional: No
Call by Reference: No ( called with pass by value option)

UNIT_LEFT -

Data type: ITCTH-TDWLEFTU
Optional: No
Call by Reference: No ( called with pass by value option)

UNIT_TOP -

Data type: ITCTH-TDWTOPU
Optional: No
Call by Reference: No ( called with pass by value option)

WIDTH -

Data type: ITCTH-TDWWIDTH
Optional: No
Call by Reference: No ( called with pass by value option)

UNIT_WIDTH -

Data type: ITCTH-TDWWIDTHU
Optional: No
Call by Reference: No ( called with pass by value option)

HEIGHT -

Data type: ITCTH-TDWHEIGHT
Optional: No
Call by Reference: No ( called with pass by value option)

UNIT_HEIGHT -

Data type: ITCTH-TDWHEIGHTU
Optional: No
Call by Reference: No ( called with pass by value option)

CPI -

Data type: ITCTA-TDCPI
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for FORMPAINTER_ADJUST_TO_GRID

LEFT -

Data type: ITCTH-TDWLEFT
Optional: No
Call by Reference: No ( called with pass by value option)

TOP -

Data type: ITCTH-TDWTOP
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

WINDOW_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CONTROL_ERROR -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for FORMPAINTER_ADJUST_TO_GRID Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_left  TYPE ITCTH-TDWLEFT, "   
lv_window  TYPE ITCTH-TDWINDOW, "   
lv_window_not_found  TYPE ITCTH, "   
lv_lpi  TYPE ITCTA-TDLPI, "   
lv_no_flush  TYPE C, "   SPACE
lv_top  TYPE ITCTH-TDWTOP, "   
lv_page  TYPE ITCTH-TDPAGE, "   
lv_control_error  TYPE ITCTH, "   
lv_unit_left  TYPE ITCTH-TDWLEFTU, "   
lv_unit_top  TYPE ITCTH-TDWTOPU, "   
lv_width  TYPE ITCTH-TDWWIDTH, "   
lv_unit_width  TYPE ITCTH-TDWWIDTHU, "   
lv_height  TYPE ITCTH-TDWHEIGHT, "   
lv_unit_height  TYPE ITCTH-TDWHEIGHTU, "   
lv_cpi  TYPE ITCTA-TDCPI. "   

  CALL FUNCTION 'FORMPAINTER_ADJUST_TO_GRID'  "
    EXPORTING
         WINDOW = lv_window
         LPI = lv_lpi
         NO_FLUSH = lv_no_flush
         PAGE = lv_page
         UNIT_LEFT = lv_unit_left
         UNIT_TOP = lv_unit_top
         WIDTH = lv_width
         UNIT_WIDTH = lv_unit_width
         HEIGHT = lv_height
         UNIT_HEIGHT = lv_unit_height
         CPI = lv_cpi
    CHANGING
         LEFT = lv_left
         TOP = lv_top
    EXCEPTIONS
        WINDOW_NOT_FOUND = 1
        CONTROL_ERROR = 2
. " FORMPAINTER_ADJUST_TO_GRID




ABAP code using 7.40 inline data declarations to call FM FORMPAINTER_ADJUST_TO_GRID

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single TDWLEFT FROM ITCTH INTO @DATA(ld_left).
 
"SELECT single TDWINDOW FROM ITCTH INTO @DATA(ld_window).
 
 
"SELECT single TDLPI FROM ITCTA INTO @DATA(ld_lpi).
 
DATA(ld_no_flush) = ' '.
 
"SELECT single TDWTOP FROM ITCTH INTO @DATA(ld_top).
 
"SELECT single TDPAGE FROM ITCTH INTO @DATA(ld_page).
 
 
"SELECT single TDWLEFTU FROM ITCTH INTO @DATA(ld_unit_left).
 
"SELECT single TDWTOPU FROM ITCTH INTO @DATA(ld_unit_top).
 
"SELECT single TDWWIDTH FROM ITCTH INTO @DATA(ld_width).
 
"SELECT single TDWWIDTHU FROM ITCTH INTO @DATA(ld_unit_width).
 
"SELECT single TDWHEIGHT FROM ITCTH INTO @DATA(ld_height).
 
"SELECT single TDWHEIGHTU FROM ITCTH INTO @DATA(ld_unit_height).
 
"SELECT single TDCPI FROM ITCTA INTO @DATA(ld_cpi).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!