ABAP – Load user-specific selection screen variant during program initialization

When user starts a program/report in SAPGUI, he want’s to have some speicific fields to be pre-filled with fixed values. This is true especially on more complex selection screens. So he must either create a transaction which executes the report with selected variant, or he can start the program directly and choose the variant on the selection screen manually.

But there’s also another option – load the variant dynamically by ABAP coding, during the INITIALIZATION event… Continue reading

ABAP – Additional button in the selection screen toolbar

SAPIn this short code snippet you can find out how to add additional buttons to the selection screen and trigger user-defined functions based on what user clicks on.

This specific example shows how to display current report’s documentation.

Note: The INFO button is added to the selection screen automatically once you maintain the report’s documentation, but the following code should serve as a reference on how a similar thing can be done manually. Continue reading

ABAP – Using dynamic variables in program selection screen variants

SAPI believe you once had to solve a requirement (if not, you’ll definitely receive one in future) where you had to design a SELECTION-SCREEN parameters which value has to be dynamically updated according to results of the program – eg. last processed IDOC number, Purchase/Sales Order number or just the last date when the report was executed. Continue reading