SAP Function Modules

SAPSCRIPT_SEARCH_GRAPHIC SAP Function module







SAPSCRIPT_SEARCH_GRAPHIC is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name SAPSCRIPT_SEARCH_GRAPHIC into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: STXBITMAPS
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM SAPSCRIPT_SEARCH_GRAPHIC - SAPSCRIPT SEARCH GRAPHIC





CALL FUNCTION 'SAPSCRIPT_SEARCH_GRAPHIC' "
* CHANGING
*   objecttype = 'TEXT'         " c
*   textobject =                " stxh-tdobject
*   textname =                  " stxh-tdname
*   textid =                    " stxh-tdid
*   textspras =                 " stxh-tdspras
*   grobject =                  " stxbitmaps-tdobject
*   grname =                    " stxbitmaps-tdname
*   grid =                      " stxbitmaps-tdid
*   grtype =                    " stxbitmaps-tdbtype
  EXCEPTIONS
    ILLEGAL_OBJECTTYPE = 1      "
    NOTHING_FOUND = 2           "
    CANCELED = 3                "
    INTERNAL_ERROR = 4          "
    .  "  SAPSCRIPT_SEARCH_GRAPHIC

ABAP code example for Function Module SAPSCRIPT_SEARCH_GRAPHIC





The ABAP code below is a full code listing to execute function module SAPSCRIPT_SEARCH_GRAPHIC including all data declarations. The code uses 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 original method of declaring data variables up front. 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).


DATA(ld_objecttype) = 'Check type of data required'.

SELECT single TDOBJECT
FROM STXH
INTO @DATA(ld_textobject).


SELECT single TDNAME
FROM STXH
INTO @DATA(ld_textname).


SELECT single TDID
FROM STXH
INTO @DATA(ld_textid).


SELECT single TDSPRAS
FROM STXH
INTO @DATA(ld_textspras).


SELECT single TDOBJECT
FROM STXBITMAPS
INTO @DATA(ld_grobject).


SELECT single TDNAME
FROM STXBITMAPS
INTO @DATA(ld_grname).


SELECT single TDID
FROM STXBITMAPS
INTO @DATA(ld_grid).


SELECT single TDBTYPE
FROM STXBITMAPS
INTO @DATA(ld_grtype).
. CALL FUNCTION 'SAPSCRIPT_SEARCH_GRAPHIC' * CHANGING * objecttype = ld_objecttype * textobject = ld_textobject * textname = ld_textname * textid = ld_textid * textspras = ld_textspras * grobject = ld_grobject * grname = ld_grname * grid = ld_grid * grtype = ld_grtype EXCEPTIONS ILLEGAL_OBJECTTYPE = 1 NOTHING_FOUND = 2 CANCELED = 3 INTERNAL_ERROR = 4 . " SAPSCRIPT_SEARCH_GRAPHIC
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_objecttype  TYPE C ,
ld_textobject  TYPE STXH-TDOBJECT ,
ld_textname  TYPE STXH-TDNAME ,
ld_textid  TYPE STXH-TDID ,
ld_textspras  TYPE STXH-TDSPRAS ,
ld_grobject  TYPE STXBITMAPS-TDOBJECT ,
ld_grname  TYPE STXBITMAPS-TDNAME ,
ld_grid  TYPE STXBITMAPS-TDID ,
ld_grtype  TYPE STXBITMAPS-TDBTYPE .

ld_objecttype = 'Check type of data required'.

SELECT single TDOBJECT
FROM STXH
INTO ld_textobject.


SELECT single TDNAME
FROM STXH
INTO ld_textname.


SELECT single TDID
FROM STXH
INTO ld_textid.


SELECT single TDSPRAS
FROM STXH
INTO ld_textspras.


SELECT single TDOBJECT
FROM STXBITMAPS
INTO ld_grobject.


SELECT single TDNAME
FROM STXBITMAPS
INTO ld_grname.


SELECT single TDID
FROM STXBITMAPS
INTO ld_grid.


SELECT single TDBTYPE
FROM STXBITMAPS
INTO ld_grtype.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name SAPSCRIPT_SEARCH_GRAPHIC or its description.