SAP Function Modules

DD_SHLP_EXPAND SAP Function module - DD: Expand/compress search helps







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

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


Pattern for FM DD_SHLP_EXPAND - DD SHLP EXPAND





CALL FUNCTION 'DD_SHLP_EXPAND' "DD: Expand/compress search helps
* EXPORTING
*   mode = 1                    " ddrefstruc-mode
*   prid = 0                    " sy-tabix      Log ID
*   with_subshlps = ' '         " ddrefstruc-bool
*   with_parameters = ' '       " ddbool_d
*   with_appends = ' '          " ddbool_d
*   shlpname =                  "
  IMPORTING
    rc =                        " sy-subrc
  TABLES
    dd31v_tab =                 " dd31v         Included search helps
*   dd33v_tab =                 " dd33v
*   dd32p_tab =                 " dd32p
*   not_expandable =            " dd31v
*   appends =                   " dd31v
*   dd30v_sub =                 " dd30v
*   dd31v_sub =                 " dd31v
*   dd32p_sub =                 " dd32p
*   dd33v_sub =                 " dd33v
  EXCEPTIONS
    ILLEGAL_VALUE = 1           "               Illegal Value of an Input Parameter
    OP_FAILURE = 2              "               Internal error occurred
    .  "  DD_SHLP_EXPAND

ABAP code example for Function Module DD_SHLP_EXPAND





The ABAP code below is a full code listing to execute function module DD_SHLP_EXPAND 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_rc  TYPE SY-SUBRC ,
it_dd31v_tab  TYPE STANDARD TABLE OF DD31V,"TABLES PARAM
wa_dd31v_tab  LIKE LINE OF it_dd31v_tab ,
it_dd33v_tab  TYPE STANDARD TABLE OF DD33V,"TABLES PARAM
wa_dd33v_tab  LIKE LINE OF it_dd33v_tab ,
it_dd32p_tab  TYPE STANDARD TABLE OF DD32P,"TABLES PARAM
wa_dd32p_tab  LIKE LINE OF it_dd32p_tab ,
it_not_expandable  TYPE STANDARD TABLE OF DD31V,"TABLES PARAM
wa_not_expandable  LIKE LINE OF it_not_expandable ,
it_appends  TYPE STANDARD TABLE OF DD31V,"TABLES PARAM
wa_appends  LIKE LINE OF it_appends ,
it_dd30v_sub  TYPE STANDARD TABLE OF DD30V,"TABLES PARAM
wa_dd30v_sub  LIKE LINE OF it_dd30v_sub ,
it_dd31v_sub  TYPE STANDARD TABLE OF DD31V,"TABLES PARAM
wa_dd31v_sub  LIKE LINE OF it_dd31v_sub ,
it_dd32p_sub  TYPE STANDARD TABLE OF DD32P,"TABLES PARAM
wa_dd32p_sub  LIKE LINE OF it_dd32p_sub ,
it_dd33v_sub  TYPE STANDARD TABLE OF DD33V,"TABLES PARAM
wa_dd33v_sub  LIKE LINE OF it_dd33v_sub .


DATA(ld_mode) = 123
DATA(ld_prid) = '123 '.

DATA(ld_with_subshlps) = some text here
DATA(ld_with_parameters) = '123 '.
DATA(ld_with_appends) = '123 '.
DATA(ld_shlpname) = 'some text here'.

"populate fields of struture and append to itab
append wa_dd31v_tab to it_dd31v_tab.

"populate fields of struture and append to itab
append wa_dd33v_tab to it_dd33v_tab.

"populate fields of struture and append to itab
append wa_dd32p_tab to it_dd32p_tab.

"populate fields of struture and append to itab
append wa_not_expandable to it_not_expandable.

"populate fields of struture and append to itab
append wa_appends to it_appends.

"populate fields of struture and append to itab
append wa_dd30v_sub to it_dd30v_sub.

"populate fields of struture and append to itab
append wa_dd31v_sub to it_dd31v_sub.

"populate fields of struture and append to itab
append wa_dd32p_sub to it_dd32p_sub.

"populate fields of struture and append to itab
append wa_dd33v_sub to it_dd33v_sub. . CALL FUNCTION 'DD_SHLP_EXPAND' * EXPORTING * mode = ld_mode * prid = ld_prid * with_subshlps = ld_with_subshlps * with_parameters = ld_with_parameters * with_appends = ld_with_appends * shlpname = ld_shlpname IMPORTING rc = ld_rc TABLES dd31v_tab = it_dd31v_tab * dd33v_tab = it_dd33v_tab * dd32p_tab = it_dd32p_tab * not_expandable = it_not_expandable * appends = it_appends * dd30v_sub = it_dd30v_sub * dd31v_sub = it_dd31v_sub * dd32p_sub = it_dd32p_sub * dd33v_sub = it_dd33v_sub EXCEPTIONS ILLEGAL_VALUE = 1 OP_FAILURE = 2 . " DD_SHLP_EXPAND
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 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_rc  TYPE SY-SUBRC ,
ld_mode  TYPE DDREFSTRUC-MODE ,
it_dd31v_tab  TYPE STANDARD TABLE OF DD31V ,
wa_dd31v_tab  LIKE LINE OF it_dd31v_tab,
ld_prid  TYPE SY-TABIX ,
it_dd33v_tab  TYPE STANDARD TABLE OF DD33V ,
wa_dd33v_tab  LIKE LINE OF it_dd33v_tab,
ld_with_subshlps  TYPE DDREFSTRUC-BOOL ,
it_dd32p_tab  TYPE STANDARD TABLE OF DD32P ,
wa_dd32p_tab  LIKE LINE OF it_dd32p_tab,
ld_with_parameters  TYPE DDBOOL_D ,
it_not_expandable  TYPE STANDARD TABLE OF DD31V ,
wa_not_expandable  LIKE LINE OF it_not_expandable,
ld_with_appends  TYPE DDBOOL_D ,
it_appends  TYPE STANDARD TABLE OF DD31V ,
wa_appends  LIKE LINE OF it_appends,
ld_shlpname  TYPE STRING ,
it_dd30v_sub  TYPE STANDARD TABLE OF DD30V ,
wa_dd30v_sub  LIKE LINE OF it_dd30v_sub,
it_dd31v_sub  TYPE STANDARD TABLE OF DD31V ,
wa_dd31v_sub  LIKE LINE OF it_dd31v_sub,
it_dd32p_sub  TYPE STANDARD TABLE OF DD32P ,
wa_dd32p_sub  LIKE LINE OF it_dd32p_sub,
it_dd33v_sub  TYPE STANDARD TABLE OF DD33V ,
wa_dd33v_sub  LIKE LINE OF it_dd33v_sub.


ld_mode = 123

"populate fields of struture and append to itab
append wa_dd31v_tab to it_dd31v_tab.
ld_prid = '123 '.

"populate fields of struture and append to itab
append wa_dd33v_tab to it_dd33v_tab.

ld_with_subshlps = some text here

"populate fields of struture and append to itab
append wa_dd32p_tab to it_dd32p_tab.
ld_with_parameters = '123 '.

"populate fields of struture and append to itab
append wa_not_expandable to it_not_expandable.
ld_with_appends = '123 '.

"populate fields of struture and append to itab
append wa_appends to it_appends.
ld_shlpname = 'some text here'.

"populate fields of struture and append to itab
append wa_dd30v_sub to it_dd30v_sub.

"populate fields of struture and append to itab
append wa_dd31v_sub to it_dd31v_sub.

"populate fields of struture and append to itab
append wa_dd32p_sub to it_dd32p_sub.

"populate fields of struture and append to itab
append wa_dd33v_sub to it_dd33v_sub.

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