SAP Function Modules

TM_FLOWTYPE_SELECT SAP Function module - Determine Desired Flow Type According to Assignm. to Trans. Type and Cat







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

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


Pattern for FM TM_FLOWTYPE_SELECT - TM FLOWTYPE SELECT





CALL FUNCTION 'TM_FLOWTYPE_SELECT' "Determine Desired Flow Type According to Assignm. to Trans. Type and Categ
  EXPORTING
    application =               " at13-rantyp   Application
    flowtype_internal =         " at19-sbktyp   Flow Category
    producttype =               " at13-sgsart   Product type
    dealtype =                  " at13-sfhaart  Transaction type
*   selection = SPACE           "               Selection by user necessary?
*   take_first = SPACE          "               Erste gefundene Bewegungsart verwenden?
    message_cancel_id =         "               Message ID for cancellation
    message_cancel_no =         "               Message number for cancellation
    message_select_id =         "               Message ID for selection request
    message_select_no =         "               Message number for selection request
  IMPORTING
    flowtype =                  " at13-sfhazba  Selected Flow Type
    .  "  TM_FLOWTYPE_SELECT

ABAP code example for Function Module TM_FLOWTYPE_SELECT





The ABAP code below is a full code listing to execute function module TM_FLOWTYPE_SELECT 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_flowtype  TYPE AT13-SFHAZBA .


SELECT single RANTYP
FROM AT13
INTO @DATA(ld_application).


SELECT single SBKTYP
FROM AT19
INTO @DATA(ld_flowtype_internal).


SELECT single SGSART
FROM AT13
INTO @DATA(ld_producttype).


SELECT single SFHAART
FROM AT13
INTO @DATA(ld_dealtype).

DATA(ld_selection) = 'some text here'.
DATA(ld_take_first) = 'some text here'.
DATA(ld_message_cancel_id) = 'some text here'.
DATA(ld_message_cancel_no) = 'some text here'.
DATA(ld_message_select_id) = 'some text here'.
DATA(ld_message_select_no) = 'some text here'. . CALL FUNCTION 'TM_FLOWTYPE_SELECT' EXPORTING application = ld_application flowtype_internal = ld_flowtype_internal producttype = ld_producttype dealtype = ld_dealtype * selection = ld_selection * take_first = ld_take_first message_cancel_id = ld_message_cancel_id message_cancel_no = ld_message_cancel_no message_select_id = ld_message_select_id message_select_no = ld_message_select_no IMPORTING flowtype = ld_flowtype . " TM_FLOWTYPE_SELECT
IF SY-SUBRC EQ 0. "All OK 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_flowtype  TYPE AT13-SFHAZBA ,
ld_application  TYPE AT13-RANTYP ,
ld_flowtype_internal  TYPE AT19-SBKTYP ,
ld_producttype  TYPE AT13-SGSART ,
ld_dealtype  TYPE AT13-SFHAART ,
ld_selection  TYPE STRING ,
ld_take_first  TYPE STRING ,
ld_message_cancel_id  TYPE STRING ,
ld_message_cancel_no  TYPE STRING ,
ld_message_select_id  TYPE STRING ,
ld_message_select_no  TYPE STRING .


SELECT single RANTYP
FROM AT13
INTO ld_application.


SELECT single SBKTYP
FROM AT19
INTO ld_flowtype_internal.


SELECT single SGSART
FROM AT13
INTO ld_producttype.


SELECT single SFHAART
FROM AT13
INTO ld_dealtype.

ld_selection = 'some text here'.
ld_take_first = 'some text here'.
ld_message_cancel_id = 'some text here'.
ld_message_cancel_no = 'some text here'.
ld_message_select_id = 'some text here'.
ld_message_select_no = 'some text here'.

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