Category Archive Blog

Display SAP popup Installed software

On the lastest SAP versions, it is no longer possible to reach the popup with the component version in the SAP Logon menu. To get this popup, launch module function (SE37) OCS_UI_DISPLAY_PATCH_LEVEL.

Activate scripting (VBS scripts)

On server side: to activate the scripting, go to transaction RZ11, and set parameter name sapgui/user_scripting.
And update the value to TRUE.
Cf details : https://help.sap.com/docs/intelligent-robotic-process-automation/desktop-studio-developer-guide/enabling-scripting-on-server-side?locale=en-US

Table type for VTWEG field

This post just to save time, instead of doing where-used on VTWEG field…

Type table of VTWEG : TDT_VTWEG => line type VTWEG

Type table of VTWEG : TMS_T_VTWEG_RANGE => line type TABLE_LINE

Type range of VTWEG : RANGE_VTWEG_TAB
Warning, this uses structure in package not maintained, it generates ATC check errors, see note 2469385 ❗.

Search tag : type de table

Link check boxes and label in selection screen

You add a check box in your selection screen, want to display long text close to your check box (text longer than the standard selection text), use the synthax below, with FOR FIELD to link the added text to your check box :


SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_chkbx  TYPE abap_bool AS CHECKBOX DEFAULT abap_true.
SELECTION-SCREEN COMMENT 02(77) text-001 FOR FIELD p_chkbx.
SELECTION-SCREEN END OF LINE.

Read More

Delete file on AL11 directory

Use the function module (SE37) EPS_DELETE_FILE :

Search tag : Supprimer, fichier, remove

Popup to select a range of date

Use FM RSPC_POPUP_DATE_SELECTION :

Constants for message types

Instead of declaring constants in reports to manage message types, save time and use attributes of interface IF_XO_CONST_MESSAGE  :


IF_XO_CONST_MESSAGE=>ABORT     " TYPE BAPI_MTYPE  'A'
IF_XO_CONST_MESSAGE=>ERROR     " TYPE BAPI_MTYPE  'E'
IF_XO_CONST_MESSAGE=>EXIT      " TYPE BAPI_MTYPE  'X'
IF_XO_CONST_MESSAGE=>INFO      " TYPE BAPI_MTYPE  'I'
IF_XO_CONST_MESSAGE=>SUCCESS   " TYPE BAPI_MTYPE  'S'
IF_XO_CONST_MESSAGE=>WARNING   " TYPE BAPI_MTYPE  'W'

Constants for range management

Instead of declaring constants in reports to manage ranges, save time and use attributes of interface IF_FSBP_CONST_RANGE :


IF_FSBP_CONST_RANGE=>OPTION_BETWEEN.              " Type DDOPTION    'BT'
IF_FSBP_CONST_RANGE=>OPTION_CONTAINS_PATTERN.     " Type DDOPTION    'CP'
IF_FSBP_CONST_RANGE=>OPTION_EQUAL.                " Type DDOPTION    'EQ'
IF_FSBP_CONST_RANGE=>OPTION_GREATER.              " Type DDOPTION    'GT'
IF_FSBP_CONST_RANGE=>OPTION_GREATER_EQUAL.        " Type DDOPTION    'GE'
IF_FSBP_CONST_RANGE=>OPTION_LESS.                 " Type DDOPTION    'LT'
IF_FSBP_CONST_RANGE=>OPTION_LESS_EQUAL.           " Type DDOPTION    'LE'
IF_FSBP_CONST_RANGE=>OPTION_NOT_BETWEEN.          " Type DDOPTION    'NB'
IF_FSBP_CONST_RANGE=>OPTION_NOT_CONTAINS_PATTERN. " Type DDOPTION    'NP'
IF_FSBP_CONST_RANGE=>OPTION_NOT_EQUAL.            " Type DDOPTION    'NE'
IF_FSBP_CONST_RANGE=>SIGN_EXCLUDE.                " Type DDSIGN      'E'
IF_FSBP_CONST_RANGE=>SIGN_INCLUDE.                " Type DDSIGN      'I'