Category Archive Blog

EXIT at check/save on purchase order (ME21n/ME22n)

Exit triggered at check, and before SAVE on ME21n/ME22n : EXIT_SAPMM06E_012.
Exit triggered after save on ME21n/ME22n : EXIT_SAPMM06E_013.

Search tag: sauvegarder, commande, achat, PO, PReq, requisition

Change paragraph text width

Convert table text to another lenght :


  CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
    EXPORTING
      line_width_src              = 79
      line_width_dst              = 255
    TABLES
      content_in                  = li_input_text_79
      content_out                 = li_input_text_whished_at_255
    EXCEPTIONS
      err_line_width_src_too_long = 1
      err_line_width_dst_too_long = 2
      err_conv_failed             = 3
      OTHERS                      = 4.

 

Convert string char to table :


  CALL FUNCTION 'SO_STRING_TO_TAB'
    EXPORTING
      content_str = lw_string
    TABLES
      content_tab = li_input_text_whished_at_255.

 

Search tag: convert, conversion, text, texte

 

Test/Play with regular expressions (regex)

Launch program : DEMO_REGEX_TOY.

Read More

Convert date to local timezone

Check code example below :


  DATA : lw_timestamp     TYPE timestamp,
         lw_date_syst     TYPE datum,
         lw_time_syst     TYPE uzeit,
         lw_date_local    TYPE datum,
         lw_time_local    TYPE uzeit,
         lw_syst_timezone TYPE tznzone.

  " Retrieve system timezone
  " ------------------------
  SELECT SINGLE tzonesys
       FROM ttzcu
       INTO lw_syst_timezone.

  " Convert date / time to system timestamp
  " ---------------------------------------
  CONVERT DATE lw_date_syst
          TIME lw_time_syst
          DAYLIGHT SAVING TIME 'X'           " Manage summer/winter time
          INTO TIME STAMP lw_timestamp
          TIME ZONE lw_syst_timezone.

  " Convert timestamp to local date/time
  " ------------------------------------
  CONVERT TIME STAMP lw_timestamp TIME ZONE sy-zonlo
  INTO DATE lw_date_local
       TIME lw_time_local.

Search tag: fuseau horaire, heure, convertir,

Edit Transport Orders status & properties

To edit transport orders or tasks status & properties, use program : RDDIT076.

⚠️ This program no more exists on last S4 SAP version.

Search tag: TO, OT, e070, e071, release, derelease, task

Set or change/delete user preference on ALV export

Use program : SALV_BS_ADMIN_MAINTAIN.

Convert text in UTF-8

When opening data in UTF-8, the transfered text must also be converted to UTF-8.
Check method described :
https://archive.sap.com/discussions/thread/1401493
Read More

Debugger shortcut to debug popup

Use the file below to trigger the debugger.
For instance in popups, it is not possible to write /h as transaction to debug. Use file below.
Drag the file and drop it in the SAP windows where you want to trigger the debugger.

Download file here : Debugger.sap (ZIP file).
Read More

List clients available in a system

Use transaction SCC4.
 

Search tag: mandant, mandants, liste

 

Transactions SAP SD (with French translations)

SD = Sales and distribution (Vente et distribution)
ADV = Administration Des Ventes

Commandes clients (commandes de vente): sales order
VA01 – créer une commande client standard – create sales order
VA02 – modifier commande client, annulation de la commande – change sales order
VA03 – afficher commande client – display sales order
VA05 – liste des commandes client – list of sales orders
V.02 – commande client : commandes incomplètes – incomplete SD documents

Read More