Convert internal date to output format according user’s config

Use FM CONVERT_DATE_TO_EXTERNAL to convert data from internal format, to user format.

FORM convert_date_format
    USING
      value(p_internal_format)  TYPE datum
    CHANGING
      p_external_format  TYPE char10.
 CLEAR p_external_format.
 CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
   EXPORTING
     date_internal            = p_internal_format
   IMPORTING
     date_external            = p_external_format
   EXCEPTIONS
     date_internal_is_invalid = 1
     others                   = 2.
 IF sy-subrc <> 0.
     MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
   ENDIF.
 ENDFORM.

Program RSSTATUS – Identify Application Component of Object

Have you ever opened a SAP incident, and wondered why it took so long for the first reply? One of the reasons is that if you send your request to the wrong support group, in other words, set application component that has nothing to do with the object you’re reporting an issue, it will definitely slow down the support process. If you don’t have idea how to check the software component of a program or transaction you’re referring to, try using program RSSTATUS.

Routine to get table line type dynamically

DATA: tabledescr         TYPE REF TO cl_abap_tabledescr,
      structuredescr     TYPE REF TO CL_ABAP_DATADESCR.
 
tabledescr ?= cl_abap_tabledescr=>describe_by_data( table_type ).
 
call method tabledescr->GET_TABLE_LINE_TYPE
     receiving P_DESCR_REF = structuredescr.

ASSERT structuredescr->absolute_name(6) = '\TYPE='.
structure_name = structuredescr->absolute_name+6(30).

SAP ERP ABAP: Keyboard Shortcut Tips

CTRL+D                 Duplicate line
CTRL+Y                 Select text
CTRL+K                 Change case of selected text
CTRL+U                 Uppercase letters
CTRL+<                 Comment
CTRL+>                 Uncomment
CTRL+SPACE       Activate autocomplete

Mass Upload in infotype 0128 (Notifications)

For mass upload in infotype 0128 (Notifications)

  • Subtype 1, use transactio PA70
  • Subtype 2, use SAP standard program RPU12800 as a model

Report RPL12800 lists personnel numbers containing data in infotype 0128.