SAP Function Modules

SF_SO_UPDATE SAP Function module - SAPfind: Update SHL object in SAPoffice file







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

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


Pattern for FM SF_SO_UPDATE - SF SO UPDATE





CALL FUNCTION 'SF_SO_UPDATE' "SAPfind: Update SHL object in SAPoffice file
  EXPORTING
    desc_flag =                 " rsfin-bool    Flag for existence of descriptors
    fol_id =                    " soodk         ID of folder where object lies
*   forwarder = SPACE           " soud-usrnam
    object_fl_change =          " sofm1         File information for object
    object_hd_change =          " sood1         Header data of object
    obj_id =                    " soodk         ID of object
    scrhead =                   " thead         SAPscript text header
    shell_class =               " tfit-shclass  Information class to which folder
  TABLES
    shldes =                    " soli          List of descriptors
    shltxt =                    " tline         Contents of object
  EXCEPTIONS
    ACTIVE_USER_NOT_EXIST = 1   "               Active user is not a SAPoffice use
    COMPONENT_NOT_AVAILABLE = 2  "              SAPoffice component is not availab
    FOLDER_NOT_EXIST = 3        "               Folder does not exist
    INTERN_ERROR = 4            "               Internal error
    NO_AUTHORIZATION = 5        "               No authorization for this object/f
    SUBSTITUTE_NOT_ACTIVE = 6   "               Substitute inactive/not defined
    TEXT_NOT_FOUND = 7          "               Object does not exist
    .  "  SF_SO_UPDATE

ABAP code example for Function Module SF_SO_UPDATE





The ABAP code below is a full code listing to execute function module SF_SO_UPDATE 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:
it_shldes  TYPE STANDARD TABLE OF SOLI,"TABLES PARAM
wa_shldes  LIKE LINE OF it_shldes ,
it_shltxt  TYPE STANDARD TABLE OF TLINE,"TABLES PARAM
wa_shltxt  LIKE LINE OF it_shltxt .


DATA(ld_desc_flag) = some text here
DATA(ld_fol_id) = 'Check type of data required'.

SELECT single USRNAM
FROM SOUD
INTO @DATA(ld_forwarder).

DATA(ld_object_fl_change) = 'Check type of data required'.
DATA(ld_object_hd_change) = 'Check type of data required'.
DATA(ld_obj_id) = 'Check type of data required'.
DATA(ld_scrhead) = 'Check type of data required'.

SELECT single SHCLASS
FROM TFIT
INTO @DATA(ld_shell_class).


"populate fields of struture and append to itab
append wa_shldes to it_shldes.

"populate fields of struture and append to itab
append wa_shltxt to it_shltxt. . CALL FUNCTION 'SF_SO_UPDATE' EXPORTING desc_flag = ld_desc_flag fol_id = ld_fol_id * forwarder = ld_forwarder object_fl_change = ld_object_fl_change object_hd_change = ld_object_hd_change obj_id = ld_obj_id scrhead = ld_scrhead shell_class = ld_shell_class TABLES shldes = it_shldes shltxt = it_shltxt EXCEPTIONS ACTIVE_USER_NOT_EXIST = 1 COMPONENT_NOT_AVAILABLE = 2 FOLDER_NOT_EXIST = 3 INTERN_ERROR = 4 NO_AUTHORIZATION = 5 SUBSTITUTE_NOT_ACTIVE = 6 TEXT_NOT_FOUND = 7 . " SF_SO_UPDATE
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 ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "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_desc_flag  TYPE RSFIN-BOOL ,
it_shldes  TYPE STANDARD TABLE OF SOLI ,
wa_shldes  LIKE LINE OF it_shldes,
ld_fol_id  TYPE SOODK ,
it_shltxt  TYPE STANDARD TABLE OF TLINE ,
wa_shltxt  LIKE LINE OF it_shltxt,
ld_forwarder  TYPE SOUD-USRNAM ,
ld_object_fl_change  TYPE SOFM1 ,
ld_object_hd_change  TYPE SOOD1 ,
ld_obj_id  TYPE SOODK ,
ld_scrhead  TYPE THEAD ,
ld_shell_class  TYPE TFIT-SHCLASS .


ld_desc_flag = some text here

"populate fields of struture and append to itab
append wa_shldes to it_shldes.
ld_fol_id = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_shltxt to it_shltxt.

SELECT single USRNAM
FROM SOUD
INTO ld_forwarder.

ld_object_fl_change = 'Check type of data required'.
ld_object_hd_change = 'Check type of data required'.
ld_obj_id = 'Check type of data required'.
ld_scrhead = 'Check type of data required'.

SELECT single SHCLASS
FROM TFIT
INTO ld_shell_class.

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