Show TOC

REQ_TYPE( ) Locate this document in the navigation structure

Semantics

Returns the type of the current request entry point, such as transaction, HTTP request, or SUBMIT <report>.

Two different granularities of request entry points are to be considered. The first one is the request-based request entry point, which identifies…

  • Every first request of a new logon session (for example: HTTP request, RFC, batch job, or update task)
  • Every new transaction in an already existing logon session.

The second is the roll-area (internal session) - based request entry point, which identifies…

  • All request-based requests AND
  • The submitted reports therein (using the ABAP statement SUBMIT <report>)

Return value

ABAP type: C with length of string given below:

TA Transaction
RFC

Remote function call

SUBM Submit report
URL

HTTP request

BTC

Batch job

UPD Update task
<NO_TYPE>

Unknown request type

Argument

This built-in function can have only one argument of ABAP type C with length = 1.

The argument may contain the values ‘Q’ or ‘R‘, with the following meaning :

‘Q’ : determines the request type of the request-based request

‘R’ : determines the request type of the roll-area-based request

If a value other than ‘Q’ or ‘R‘ is specified, the default value ‘R‘ is taken.

If no argument is supplied, the default value ‘R’ is taken as well.

If an argument type other than ABAP type C with length = 1 is specified, the string ’<INVALID_SYMBOL>’ is returned by the function.

For better code readability, usage of the built-in constants CtxRoll (value ‘R‘ ) and CtxReq (value ‘Q‘ ) is recommended:

req_type( CtxRoll ) or req_type( CtxReq )

Note that these constants are defined in the scope of the parameter list of built-in functions that are used in dynamic logpoints only. This means they are not valid inside standard ABAP code, nor can they be used as normal variables in the condition, in the key definition, or in the field values of dynamic logpoints (outside the parameter list of built-in functions).