SAP Function Modules

FCOM_EXP_ACTQTY_FORUSER SAP Function module - get activitiy quantities per user







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

Associated Function Group: FCOM_EXP_ACTIVITY_PLANNING
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM FCOM_EXP_ACTQTY_FORUSER - FCOM EXP ACTQTY FORUSER





CALL FUNCTION 'FCOM_EXP_ACTQTY_FORUSER' "get activitiy quantities per user
  EXPORTING
    uname =                     " sy-uname      User Name
    fisc_year =                 " tka07-gjahr   Fiscal Year
    version =                   " tka09-versn   Version
*   rfc_dest =                  " rfcdest       Logical Destination (Specified in Function Call)
*   scenario =                  " fpb_exp_scenario  Planning Scenario
*   instance =                  " fpb_exp_instance  Express Planning Instance
*   wrttp_ext =                 " fpb_exp_wrttp_ext  Value Type for External Use, Is Converted to WRTTP
    obj_sel =                   " fpb_exp_obj_sel  Element Select.: Relationship Personalization/Parameter
*   dialog =                    " fpb_dialogid  Personalization Dialog
*   lagru =                     " setid         Activity Type Group
*   lstar_from =                " lstar         Activity Type
*   lstar_to =                  " lstar         Activity Type
*   refkap_fisc_year =          " tka07-gjahr   Fiscal Year
*   refkap_version =            " tka09-versn   Version
*   refkap_wrttp_ext =          " fpb_exp_wrttp_ext  Value Type for External Use, Is Converted to WRTTP
*   refplan_fisc_year =         " tka07-gjahr   Fiscal Year
*   refplan_version =           " tka09-versn   Version
*   refplan_wrttp_ext =         " fpb_exp_wrttp_ext  Value Type for External Use, Is Converted to WRTTP
  IMPORTING
    perfrom_input =             " cobk-perab    From Period
    perto_input =               " cobk-perbi    To period
    percurr =                   " cobk-perab    From Period
    kokrs =                     " kokrs         Controlling Area
    refkap_wrttp_int =          " co_wrttp      Value Type
    refkap_wrttp_ext_txt =      " texts         Description of agreement
    refplan_wrttp_int =         " co_wrttp      Value Type
    refplan_wrttp_ext_txt =     " texts         Description of agreement
    return_code =               " fcom_plan_kstar_ext-flag  Character Field Length 1
  TABLES
    kostl_inp =                 " fcom_s_exp_kostl  EXP: Übergabe Kostenstellenliste
    order_type =                " sel_aufart    Auftragsarten
    message_return =            " bapireturn1   Meldungen
*   dis_data =                  " fcom_exp_dis  Structure for capacity of activity types
*   kap_data =                  " fcom_exp_kap  table for capacity
*   lst_data =                  " fcom_exp_lst  strucutre for lst per acticity
*   lstar_infos =               " fcom_exp_lstar_infos  informations regarding activity types
    .  "  FCOM_EXP_ACTQTY_FORUSER

ABAP code example for Function Module FCOM_EXP_ACTQTY_FORUSER





The ABAP code below is a full code listing to execute function module FCOM_EXP_ACTQTY_FORUSER 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_perfrom_input  TYPE COBK-PERAB ,
ld_perto_input  TYPE COBK-PERBI ,
ld_percurr  TYPE COBK-PERAB ,
ld_kokrs  TYPE KOKRS ,
ld_refkap_wrttp_int  TYPE CO_WRTTP ,
ld_refkap_wrttp_ext_txt  TYPE TEXTS ,
ld_refplan_wrttp_int  TYPE CO_WRTTP ,
ld_refplan_wrttp_ext_txt  TYPE TEXTS ,
ld_return_code  TYPE FCOM_PLAN_KSTAR_EXT-FLAG ,
it_kostl_inp  TYPE STANDARD TABLE OF FCOM_S_EXP_KOSTL,"TABLES PARAM
wa_kostl_inp  LIKE LINE OF it_kostl_inp ,
it_order_type  TYPE STANDARD TABLE OF SEL_AUFART,"TABLES PARAM
wa_order_type  LIKE LINE OF it_order_type ,
it_message_return  TYPE STANDARD TABLE OF BAPIRETURN1,"TABLES PARAM
wa_message_return  LIKE LINE OF it_message_return ,
it_dis_data  TYPE STANDARD TABLE OF FCOM_EXP_DIS,"TABLES PARAM
wa_dis_data  LIKE LINE OF it_dis_data ,
it_kap_data  TYPE STANDARD TABLE OF FCOM_EXP_KAP,"TABLES PARAM
wa_kap_data  LIKE LINE OF it_kap_data ,
it_lst_data  TYPE STANDARD TABLE OF FCOM_EXP_LST,"TABLES PARAM
wa_lst_data  LIKE LINE OF it_lst_data ,
it_lstar_infos  TYPE STANDARD TABLE OF FCOM_EXP_LSTAR_INFOS,"TABLES PARAM
wa_lstar_infos  LIKE LINE OF it_lstar_infos .

DATA(ld_uname) = 'some text here'.

SELECT single GJAHR
FROM TKA07
INTO @DATA(ld_fisc_year).


SELECT single VERSN
FROM TKA09
INTO @DATA(ld_version).

DATA(ld_rfc_dest) = 'some text here'.
DATA(ld_scenario) = 'some text here'.
DATA(ld_instance) = 'some text here'.
DATA(ld_wrttp_ext) = 'some text here'.
DATA(ld_obj_sel) = 'some text here'.
DATA(ld_dialog) = 'some text here'.
DATA(ld_lagru) = 'some text here'.
DATA(ld_lstar_from) = 'some text here'.
DATA(ld_lstar_to) = 'some text here'.

SELECT single GJAHR
FROM TKA07
INTO @DATA(ld_refkap_fisc_year).


SELECT single VERSN
FROM TKA09
INTO @DATA(ld_refkap_version).

DATA(ld_refkap_wrttp_ext) = 'some text here'.

SELECT single GJAHR
FROM TKA07
INTO @DATA(ld_refplan_fisc_year).


SELECT single VERSN
FROM TKA09
INTO @DATA(ld_refplan_version).

DATA(ld_refplan_wrttp_ext) = 'some text here'.

"populate fields of struture and append to itab
append wa_kostl_inp to it_kostl_inp.

"populate fields of struture and append to itab
append wa_order_type to it_order_type.

"populate fields of struture and append to itab
append wa_message_return to it_message_return.

"populate fields of struture and append to itab
append wa_dis_data to it_dis_data.

"populate fields of struture and append to itab
append wa_kap_data to it_kap_data.

"populate fields of struture and append to itab
append wa_lst_data to it_lst_data.

"populate fields of struture and append to itab
append wa_lstar_infos to it_lstar_infos. . CALL FUNCTION 'FCOM_EXP_ACTQTY_FORUSER' EXPORTING uname = ld_uname fisc_year = ld_fisc_year version = ld_version * rfc_dest = ld_rfc_dest * scenario = ld_scenario * instance = ld_instance * wrttp_ext = ld_wrttp_ext obj_sel = ld_obj_sel * dialog = ld_dialog * lagru = ld_lagru * lstar_from = ld_lstar_from * lstar_to = ld_lstar_to * refkap_fisc_year = ld_refkap_fisc_year * refkap_version = ld_refkap_version * refkap_wrttp_ext = ld_refkap_wrttp_ext * refplan_fisc_year = ld_refplan_fisc_year * refplan_version = ld_refplan_version * refplan_wrttp_ext = ld_refplan_wrttp_ext IMPORTING perfrom_input = ld_perfrom_input perto_input = ld_perto_input percurr = ld_percurr kokrs = ld_kokrs refkap_wrttp_int = ld_refkap_wrttp_int refkap_wrttp_ext_txt = ld_refkap_wrttp_ext_txt refplan_wrttp_int = ld_refplan_wrttp_int refplan_wrttp_ext_txt = ld_refplan_wrttp_ext_txt return_code = ld_return_code TABLES kostl_inp = it_kostl_inp order_type = it_order_type message_return = it_message_return * dis_data = it_dis_data * kap_data = it_kap_data * lst_data = it_lst_data * lstar_infos = it_lstar_infos . " FCOM_EXP_ACTQTY_FORUSER
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_perfrom_input  TYPE COBK-PERAB ,
ld_uname  TYPE SY-UNAME ,
it_kostl_inp  TYPE STANDARD TABLE OF FCOM_S_EXP_KOSTL ,
wa_kostl_inp  LIKE LINE OF it_kostl_inp,
ld_perto_input  TYPE COBK-PERBI ,
ld_fisc_year  TYPE TKA07-GJAHR ,
it_order_type  TYPE STANDARD TABLE OF SEL_AUFART ,
wa_order_type  LIKE LINE OF it_order_type,
ld_percurr  TYPE COBK-PERAB ,
ld_version  TYPE TKA09-VERSN ,
it_message_return  TYPE STANDARD TABLE OF BAPIRETURN1 ,
wa_message_return  LIKE LINE OF it_message_return,
ld_kokrs  TYPE KOKRS ,
ld_rfc_dest  TYPE RFCDEST ,
it_dis_data  TYPE STANDARD TABLE OF FCOM_EXP_DIS ,
wa_dis_data  LIKE LINE OF it_dis_data,
ld_refkap_wrttp_int  TYPE CO_WRTTP ,
ld_scenario  TYPE FPB_EXP_SCENARIO ,
it_kap_data  TYPE STANDARD TABLE OF FCOM_EXP_KAP ,
wa_kap_data  LIKE LINE OF it_kap_data,
ld_refkap_wrttp_ext_txt  TYPE TEXTS ,
it_lst_data  TYPE STANDARD TABLE OF FCOM_EXP_LST ,
wa_lst_data  LIKE LINE OF it_lst_data,
ld_instance  TYPE FPB_EXP_INSTANCE ,
ld_refplan_wrttp_int  TYPE CO_WRTTP ,
it_lstar_infos  TYPE STANDARD TABLE OF FCOM_EXP_LSTAR_INFOS ,
wa_lstar_infos  LIKE LINE OF it_lstar_infos,
ld_wrttp_ext  TYPE FPB_EXP_WRTTP_EXT ,
ld_obj_sel  TYPE FPB_EXP_OBJ_SEL ,
ld_refplan_wrttp_ext_txt  TYPE TEXTS ,
ld_dialog  TYPE FPB_DIALOGID ,
ld_return_code  TYPE FCOM_PLAN_KSTAR_EXT-FLAG ,
ld_lagru  TYPE SETID ,
ld_lstar_from  TYPE LSTAR ,
ld_lstar_to  TYPE LSTAR ,
ld_refkap_fisc_year  TYPE TKA07-GJAHR ,
ld_refkap_version  TYPE TKA09-VERSN ,
ld_refkap_wrttp_ext  TYPE FPB_EXP_WRTTP_EXT ,
ld_refplan_fisc_year  TYPE TKA07-GJAHR ,
ld_refplan_version  TYPE TKA09-VERSN ,
ld_refplan_wrttp_ext  TYPE FPB_EXP_WRTTP_EXT .

ld_uname = 'some text here'.

"populate fields of struture and append to itab
append wa_kostl_inp to it_kostl_inp.

SELECT single GJAHR
FROM TKA07
INTO ld_fisc_year.


"populate fields of struture and append to itab
append wa_order_type to it_order_type.

SELECT single VERSN
FROM TKA09
INTO ld_version.


"populate fields of struture and append to itab
append wa_message_return to it_message_return.
ld_rfc_dest = 'some text here'.

"populate fields of struture and append to itab
append wa_dis_data to it_dis_data.
ld_scenario = 'some text here'.

"populate fields of struture and append to itab
append wa_kap_data to it_kap_data.

"populate fields of struture and append to itab
append wa_lst_data to it_lst_data.
ld_instance = 'some text here'.

"populate fields of struture and append to itab
append wa_lstar_infos to it_lstar_infos.
ld_wrttp_ext = 'some text here'.
ld_obj_sel = 'some text here'.
ld_dialog = 'some text here'.
ld_lagru = 'some text here'.
ld_lstar_from = 'some text here'.
ld_lstar_to = 'some text here'.

SELECT single GJAHR
FROM TKA07
INTO ld_refkap_fisc_year.


SELECT single VERSN
FROM TKA09
INTO ld_refkap_version.

ld_refkap_wrttp_ext = 'some text here'.

SELECT single GJAHR
FROM TKA07
INTO ld_refplan_fisc_year.


SELECT single VERSN
FROM TKA09
INTO ld_refplan_version.

ld_refplan_wrttp_ext = '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 FCOM_EXP_ACTQTY_FORUSER or its description.