SAP Function Modules

CV100_ORIGINAL_SEARCH_IN_DRAW SAP Function module







CV100_ORIGINAL_SEARCH_IN_DRAW 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 CV100_ORIGINAL_SEARCH_IN_DRAW into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM CV100_ORIGINAL_SEARCH_IN_DRAW - CV100 ORIGINAL SEARCH IN DRAW





CALL FUNCTION 'CV100_ORIGINAL_SEARCH_IN_DRAW' "
  EXPORTING
*   dappl =                     " draw-dappl    Application
*   sdttrg =                    " draw-dttrg    Name of Data Carrier
    max_rows =                  " i             Max. No. of Hits
  TABLES
    tdraw =                     " draw          Document Info Record
    ranges_dappl =              " cv100_rangesappl  Range Table for Workstation Application
    ranges_dttrg =              " cv100_rangesdttrg  Range Table for Data Carrier
    ranges_filename =           " cv100_rangesfilename  Range Table for File Names
    stdokar =                   " cv100_rangesdokar  Selection Structure: Document Type
    stdoknr =                   " cv100_rangesdoknr  Selection Structure: Document Number
    stdokvr =                   " cv100_rangesdokvr  Selection Structure: Document Version
    stdoktl =                   " cv100_rangesdoktl  Selection Structure: Part Document
  EXCEPTIONS
    NO_RESULT = 1               "
    BAD_QUERY = 2               "               No Selection Criteria Exist
    .  "  CV100_ORIGINAL_SEARCH_IN_DRAW

ABAP code example for Function Module CV100_ORIGINAL_SEARCH_IN_DRAW





The ABAP code below is a full code listing to execute function module CV100_ORIGINAL_SEARCH_IN_DRAW 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:
it_tdraw  TYPE STANDARD TABLE OF DRAW,"TABLES PARAM
wa_tdraw  LIKE LINE OF it_tdraw ,
it_ranges_dappl  TYPE STANDARD TABLE OF CV100_RANGESAPPL,"TABLES PARAM
wa_ranges_dappl  LIKE LINE OF it_ranges_dappl ,
it_ranges_dttrg  TYPE STANDARD TABLE OF CV100_RANGESDTTRG,"TABLES PARAM
wa_ranges_dttrg  LIKE LINE OF it_ranges_dttrg ,
it_ranges_filename  TYPE STANDARD TABLE OF CV100_RANGESFILENAME,"TABLES PARAM
wa_ranges_filename  LIKE LINE OF it_ranges_filename ,
it_stdokar  TYPE STANDARD TABLE OF CV100_RANGESDOKAR,"TABLES PARAM
wa_stdokar  LIKE LINE OF it_stdokar ,
it_stdoknr  TYPE STANDARD TABLE OF CV100_RANGESDOKNR,"TABLES PARAM
wa_stdoknr  LIKE LINE OF it_stdoknr ,
it_stdokvr  TYPE STANDARD TABLE OF CV100_RANGESDOKVR,"TABLES PARAM
wa_stdokvr  LIKE LINE OF it_stdokvr ,
it_stdoktl  TYPE STANDARD TABLE OF CV100_RANGESDOKTL,"TABLES PARAM
wa_stdoktl  LIKE LINE OF it_stdoktl .


SELECT single DAPPL
FROM DRAW
INTO @DATA(ld_dappl).


SELECT single DTTRG
FROM DRAW
INTO @DATA(ld_sdttrg).

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

"populate fields of struture and append to itab
append wa_tdraw to it_tdraw.

"populate fields of struture and append to itab
append wa_ranges_dappl to it_ranges_dappl.

"populate fields of struture and append to itab
append wa_ranges_dttrg to it_ranges_dttrg.

"populate fields of struture and append to itab
append wa_ranges_filename to it_ranges_filename.

"populate fields of struture and append to itab
append wa_stdokar to it_stdokar.

"populate fields of struture and append to itab
append wa_stdoknr to it_stdoknr.

"populate fields of struture and append to itab
append wa_stdokvr to it_stdokvr.

"populate fields of struture and append to itab
append wa_stdoktl to it_stdoktl. . CALL FUNCTION 'CV100_ORIGINAL_SEARCH_IN_DRAW' EXPORTING * dappl = ld_dappl * sdttrg = ld_sdttrg max_rows = ld_max_rows TABLES tdraw = it_tdraw ranges_dappl = it_ranges_dappl ranges_dttrg = it_ranges_dttrg ranges_filename = it_ranges_filename stdokar = it_stdokar stdoknr = it_stdoknr stdokvr = it_stdokvr stdoktl = it_stdoktl EXCEPTIONS NO_RESULT = 1 BAD_QUERY = 2 . " CV100_ORIGINAL_SEARCH_IN_DRAW
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 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_dappl  TYPE DRAW-DAPPL ,
it_tdraw  TYPE STANDARD TABLE OF DRAW ,
wa_tdraw  LIKE LINE OF it_tdraw,
ld_sdttrg  TYPE DRAW-DTTRG ,
it_ranges_dappl  TYPE STANDARD TABLE OF CV100_RANGESAPPL ,
wa_ranges_dappl  LIKE LINE OF it_ranges_dappl,
ld_max_rows  TYPE I ,
it_ranges_dttrg  TYPE STANDARD TABLE OF CV100_RANGESDTTRG ,
wa_ranges_dttrg  LIKE LINE OF it_ranges_dttrg,
it_ranges_filename  TYPE STANDARD TABLE OF CV100_RANGESFILENAME ,
wa_ranges_filename  LIKE LINE OF it_ranges_filename,
it_stdokar  TYPE STANDARD TABLE OF CV100_RANGESDOKAR ,
wa_stdokar  LIKE LINE OF it_stdokar,
it_stdoknr  TYPE STANDARD TABLE OF CV100_RANGESDOKNR ,
wa_stdoknr  LIKE LINE OF it_stdoknr,
it_stdokvr  TYPE STANDARD TABLE OF CV100_RANGESDOKVR ,
wa_stdokvr  LIKE LINE OF it_stdokvr,
it_stdoktl  TYPE STANDARD TABLE OF CV100_RANGESDOKTL ,
wa_stdoktl  LIKE LINE OF it_stdoktl.


SELECT single DAPPL
FROM DRAW
INTO ld_dappl.


"populate fields of struture and append to itab
append wa_tdraw to it_tdraw.

SELECT single DTTRG
FROM DRAW
INTO ld_sdttrg.


"populate fields of struture and append to itab
append wa_ranges_dappl to it_ranges_dappl.
ld_max_rows = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ranges_dttrg to it_ranges_dttrg.

"populate fields of struture and append to itab
append wa_ranges_filename to it_ranges_filename.

"populate fields of struture and append to itab
append wa_stdokar to it_stdokar.

"populate fields of struture and append to itab
append wa_stdoknr to it_stdoknr.

"populate fields of struture and append to itab
append wa_stdokvr to it_stdokvr.

"populate fields of struture and append to itab
append wa_stdoktl to it_stdoktl.

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 CV100_ORIGINAL_SEARCH_IN_DRAW or its description.