Category Archive Tips’n trick

Reverse sorting of an internal table

Use method CL_RS_DATA=>SWITCH_ORDER( ) :


CALL METHOD cl_rs_data=>switch_order( CHANGING c_t_data = lt_my_table ).

Check if BADI is implemented

Transaction SE18, enter your BADI name and go to
Enhancement Implementation –> Overview :

Adobe form, count number of elements in a subform with JS

The goal here is to define of there are data into the table, if not, we hide the subform. That means, we hide the whole table (border and header line).
There are several ways to proceed, this is one :

Table from context is binded like :

  • TABLE_TEXT_HEADER_PO binded with $.TABLE_HEADER
  • LINE_TEXT_HEADER_PO binded with $.DATA[*] (repeat subform for each data item is ticked)
  • HEADER_PO_TEXT binded with $.TEXT_CONTENT
Read More

Merge PDF files with ABAP

If you want to merge PDF files on SAP server, you will need a third party software installed on SAP Server.
Here is one solution with PDF ToolKit :

Read More

Re-init buffers

In transaction code input field : /$sync
(to be done in transaction SESSION_MANAGER).

This re-init all buffers, useful when developping ALV layouts.

Use with caution as it will decrease SAP response time after refreshing the buffers.

Search tag : clear buffer, cache

Sapscript – Copy a SAPSCRIPT

In transaction SE71 on an existing SAPSCRIPT :

TRANSLATE and code inspector

By using TRANSLATE key word, you can have in code inspector, or extended check issues/warnings, the error : “Dangerous use of translate in multilingual system”.

To avoid that :


* Set locale for given language (needed for upper-case translation)
  SET LOCALE LANGUAGE sy-langu.

* Translate to upper-case
  TRANSLATE  TO UPPER CASE.