SAP Function Modules

BBP_REQREQ_GETDETAIL SAP Function module







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

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


Pattern for FM BBP_REQREQ_GETDETAIL - BBP REQREQ GETDETAIL





CALL FUNCTION 'BBP_REQREQ_GETDETAIL' "
  EXPORTING
    reqno =                     " reqhead-reqno
*   with_enqueue = SPACE        " char1
*   with_deleteind_set = SPACE  " char1
  IMPORTING
    req_header =                " reqhead
    req_header_srv =            " reqheads
* TABLES
*   req_reference =             " reqref
*   req_line =                  " reqline
*   req_line_mat =              " reqlinema
*   req_line_srv =              " reqlinesr
*   req_text =                  " reqtext
*   req_acct =                  " reqacct
*   req_att =                   " reqatt
*   req_address =               " reqaddress
  EXCEPTIONS
    NOT_FOUND = 1               "
    FOREIGN_LOCK = 2            "
    NO_ENQUEUE_POSSIBLE = 3     "
    .  "  BBP_REQREQ_GETDETAIL

ABAP code example for Function Module BBP_REQREQ_GETDETAIL





The ABAP code below is a full code listing to execute function module BBP_REQREQ_GETDETAIL 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_req_header  TYPE REQHEAD ,
ld_req_header_srv  TYPE REQHEADS ,
it_req_reference  TYPE STANDARD TABLE OF REQREF,"TABLES PARAM
wa_req_reference  LIKE LINE OF it_req_reference ,
it_req_line  TYPE STANDARD TABLE OF REQLINE,"TABLES PARAM
wa_req_line  LIKE LINE OF it_req_line ,
it_req_line_mat  TYPE STANDARD TABLE OF REQLINEMA,"TABLES PARAM
wa_req_line_mat  LIKE LINE OF it_req_line_mat ,
it_req_line_srv  TYPE STANDARD TABLE OF REQLINESR,"TABLES PARAM
wa_req_line_srv  LIKE LINE OF it_req_line_srv ,
it_req_text  TYPE STANDARD TABLE OF REQTEXT,"TABLES PARAM
wa_req_text  LIKE LINE OF it_req_text ,
it_req_acct  TYPE STANDARD TABLE OF REQACCT,"TABLES PARAM
wa_req_acct  LIKE LINE OF it_req_acct ,
it_req_att  TYPE STANDARD TABLE OF REQATT,"TABLES PARAM
wa_req_att  LIKE LINE OF it_req_att ,
it_req_address  TYPE STANDARD TABLE OF REQADDRESS,"TABLES PARAM
wa_req_address  LIKE LINE OF it_req_address .


SELECT single REQNO
FROM REQHEAD
INTO @DATA(ld_reqno).

DATA(ld_with_enqueue) = 'Check type of data required'.
DATA(ld_with_deleteind_set) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_req_reference to it_req_reference.

"populate fields of struture and append to itab
append wa_req_line to it_req_line.

"populate fields of struture and append to itab
append wa_req_line_mat to it_req_line_mat.

"populate fields of struture and append to itab
append wa_req_line_srv to it_req_line_srv.

"populate fields of struture and append to itab
append wa_req_text to it_req_text.

"populate fields of struture and append to itab
append wa_req_acct to it_req_acct.

"populate fields of struture and append to itab
append wa_req_att to it_req_att.

"populate fields of struture and append to itab
append wa_req_address to it_req_address. . CALL FUNCTION 'BBP_REQREQ_GETDETAIL' EXPORTING reqno = ld_reqno * with_enqueue = ld_with_enqueue * with_deleteind_set = ld_with_deleteind_set IMPORTING req_header = ld_req_header req_header_srv = ld_req_header_srv * TABLES * req_reference = it_req_reference * req_line = it_req_line * req_line_mat = it_req_line_mat * req_line_srv = it_req_line_srv * req_text = it_req_text * req_acct = it_req_acct * req_att = it_req_att * req_address = it_req_address EXCEPTIONS NOT_FOUND = 1 FOREIGN_LOCK = 2 NO_ENQUEUE_POSSIBLE = 3 . " BBP_REQREQ_GETDETAIL
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 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_req_header  TYPE REQHEAD ,
ld_reqno  TYPE REQHEAD-REQNO ,
it_req_reference  TYPE STANDARD TABLE OF REQREF ,
wa_req_reference  LIKE LINE OF it_req_reference,
ld_req_header_srv  TYPE REQHEADS ,
ld_with_enqueue  TYPE CHAR1 ,
it_req_line  TYPE STANDARD TABLE OF REQLINE ,
wa_req_line  LIKE LINE OF it_req_line,
ld_with_deleteind_set  TYPE CHAR1 ,
it_req_line_mat  TYPE STANDARD TABLE OF REQLINEMA ,
wa_req_line_mat  LIKE LINE OF it_req_line_mat,
it_req_line_srv  TYPE STANDARD TABLE OF REQLINESR ,
wa_req_line_srv  LIKE LINE OF it_req_line_srv,
it_req_text  TYPE STANDARD TABLE OF REQTEXT ,
wa_req_text  LIKE LINE OF it_req_text,
it_req_acct  TYPE STANDARD TABLE OF REQACCT ,
wa_req_acct  LIKE LINE OF it_req_acct,
it_req_att  TYPE STANDARD TABLE OF REQATT ,
wa_req_att  LIKE LINE OF it_req_att,
it_req_address  TYPE STANDARD TABLE OF REQADDRESS ,
wa_req_address  LIKE LINE OF it_req_address.


SELECT single REQNO
FROM REQHEAD
INTO ld_reqno.


"populate fields of struture and append to itab
append wa_req_reference to it_req_reference.
ld_with_enqueue = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_req_line to it_req_line.
ld_with_deleteind_set = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_req_line_mat to it_req_line_mat.

"populate fields of struture and append to itab
append wa_req_line_srv to it_req_line_srv.

"populate fields of struture and append to itab
append wa_req_text to it_req_text.

"populate fields of struture and append to itab
append wa_req_acct to it_req_acct.

"populate fields of struture and append to itab
append wa_req_att to it_req_att.

"populate fields of struture and append to itab
append wa_req_address to it_req_address.

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