SAP Function Modules

FAVOS_EVENT_ADD_TO_USER_SHELF SAP Function module - Transmit External Event to Create a Favorite in the Folder







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

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


Pattern for FM FAVOS_EVENT_ADD_TO_USER_SHELF - FAVOS EVENT ADD TO USER SHELF





CALL FUNCTION 'FAVOS_EVENT_ADD_TO_USER_SHELF' "Transmit External Event to Create a Favorite in the Folder
  EXPORTING
*   user_name = SY-UNAME        " sy-uname
    target_id =                 " smen_buffc-parent_id
    reporttype =                " smen_buffc-reporttype
*   report_name =               " smen_buffc-report
*   sap_guid =                  " smen_buffc-sap_guid
*   text =                      " smensaplnt-text
*   first_node = 'X'            " smensaplng-customized
*   url = SPACE                 " smen_buffi-url
*   book_info = SPACE           " smen_buffc-book_info
*   x_pos = SPACE               " smen_buffc-x_pos
*   y_pos = SPACE               " smen_buffc-y_pos
*   target_syst = SPACE         " rfcdes-rfcdest
*   pers_mini =                 " smensaplng-customized  Customized ('C') or standard menu ('S') flag
*   pers_win =                  " smensaplng-customized  Customized ('C') or standard menu ('S') flag
  IMPORTING
    new_id =                    " smen_buffc-object_id
  TABLES
    user_shelf =                " smen_buffc
*   user_links =                " smen_buffi
    .  "  FAVOS_EVENT_ADD_TO_USER_SHELF

ABAP code example for Function Module FAVOS_EVENT_ADD_TO_USER_SHELF





The ABAP code below is a full code listing to execute function module FAVOS_EVENT_ADD_TO_USER_SHELF 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_new_id  TYPE SMEN_BUFFC-OBJECT_ID ,
it_user_shelf  TYPE STANDARD TABLE OF SMEN_BUFFC,"TABLES PARAM
wa_user_shelf  LIKE LINE OF it_user_shelf ,
it_user_links  TYPE STANDARD TABLE OF SMEN_BUFFI,"TABLES PARAM
wa_user_links  LIKE LINE OF it_user_links .

DATA(ld_user_name) = 'some text here'.

SELECT single PARENT_ID
FROM SMEN_BUFFC
INTO @DATA(ld_target_id).


SELECT single REPORTTYPE
FROM SMEN_BUFFC
INTO @DATA(ld_reporttype).


SELECT single REPORT
FROM SMEN_BUFFC
INTO @DATA(ld_report_name).


SELECT single SAP_GUID
FROM SMEN_BUFFC
INTO @DATA(ld_sap_guid).


DATA(ld_text) = some text here

DATA(ld_first_node) = some text here

SELECT single URL
FROM SMEN_BUFFI
INTO @DATA(ld_url).


SELECT single BOOK_INFO
FROM SMEN_BUFFC
INTO @DATA(ld_book_info).


SELECT single X_POS
FROM SMEN_BUFFC
INTO @DATA(ld_x_pos).


SELECT single Y_POS
FROM SMEN_BUFFC
INTO @DATA(ld_y_pos).


SELECT single RFCDEST
FROM RFCDES
INTO @DATA(ld_target_syst).


DATA(ld_pers_mini) = some text here

DATA(ld_pers_win) = some text here

"populate fields of struture and append to itab
append wa_user_shelf to it_user_shelf.

"populate fields of struture and append to itab
append wa_user_links to it_user_links. . CALL FUNCTION 'FAVOS_EVENT_ADD_TO_USER_SHELF' EXPORTING * user_name = ld_user_name target_id = ld_target_id reporttype = ld_reporttype * report_name = ld_report_name * sap_guid = ld_sap_guid * text = ld_text * first_node = ld_first_node * url = ld_url * book_info = ld_book_info * x_pos = ld_x_pos * y_pos = ld_y_pos * target_syst = ld_target_syst * pers_mini = ld_pers_mini * pers_win = ld_pers_win IMPORTING new_id = ld_new_id TABLES user_shelf = it_user_shelf * user_links = it_user_links . " FAVOS_EVENT_ADD_TO_USER_SHELF
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_new_id  TYPE SMEN_BUFFC-OBJECT_ID ,
ld_user_name  TYPE SY-UNAME ,
it_user_shelf  TYPE STANDARD TABLE OF SMEN_BUFFC ,
wa_user_shelf  LIKE LINE OF it_user_shelf,
ld_target_id  TYPE SMEN_BUFFC-PARENT_ID ,
it_user_links  TYPE STANDARD TABLE OF SMEN_BUFFI ,
wa_user_links  LIKE LINE OF it_user_links,
ld_reporttype  TYPE SMEN_BUFFC-REPORTTYPE ,
ld_report_name  TYPE SMEN_BUFFC-REPORT ,
ld_sap_guid  TYPE SMEN_BUFFC-SAP_GUID ,
ld_text  TYPE SMENSAPLNT-TEXT ,
ld_first_node  TYPE SMENSAPLNG-CUSTOMIZED ,
ld_url  TYPE SMEN_BUFFI-URL ,
ld_book_info  TYPE SMEN_BUFFC-BOOK_INFO ,
ld_x_pos  TYPE SMEN_BUFFC-X_POS ,
ld_y_pos  TYPE SMEN_BUFFC-Y_POS ,
ld_target_syst  TYPE RFCDES-RFCDEST ,
ld_pers_mini  TYPE SMENSAPLNG-CUSTOMIZED ,
ld_pers_win  TYPE SMENSAPLNG-CUSTOMIZED .

ld_user_name = 'some text here'.

"populate fields of struture and append to itab
append wa_user_shelf to it_user_shelf.

SELECT single PARENT_ID
FROM SMEN_BUFFC
INTO ld_target_id.


"populate fields of struture and append to itab
append wa_user_links to it_user_links.

SELECT single REPORTTYPE
FROM SMEN_BUFFC
INTO ld_reporttype.


SELECT single REPORT
FROM SMEN_BUFFC
INTO ld_report_name.


SELECT single SAP_GUID
FROM SMEN_BUFFC
INTO ld_sap_guid.


ld_text = some text here

ld_first_node = some text here

SELECT single URL
FROM SMEN_BUFFI
INTO ld_url.


SELECT single BOOK_INFO
FROM SMEN_BUFFC
INTO ld_book_info.


SELECT single X_POS
FROM SMEN_BUFFC
INTO ld_x_pos.


SELECT single Y_POS
FROM SMEN_BUFFC
INTO ld_y_pos.


SELECT single RFCDEST
FROM RFCDES
INTO ld_target_syst.


ld_pers_mini = some text here

ld_pers_win = 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 FAVOS_EVENT_ADD_TO_USER_SHELF or its description.