ABAP: check if a function module exists programmatically

If you need to check if a function module within your program try running the following function: RH_FUNCTION_EXIST.
Continue Reading →

SAP tp: return codes

For each step that takes place within the tp command there could be 8 different possible return codes [0, 4, 6, 8, 12, 13, 14, 16]. The meaning for each of those codes is as follows: Transport imported successfully: 0: Transport successful 4: Warning occurred Transport did not import
Continue Reading →

SAP: STMS transport stuck

When coming across a situation where thetransprts are stalling/hanging in the STMS queue there are a few things that you can do: The fist and most obvious course of action is to contact your Basis support team. Given that you are reading this article you probably wanted or were forced
Continue Reading →

SAP: Check the Passwords of Standard Users in All Clients

A quick way to check the status of all the standard users in your SAP system is to run a program RSUSR003.
Continue Reading →

SAP: throw validation message on a webDynpro screen

Here’s some code that would allow you to throw a exception message [say for validating purposes]. data: lr_api_controller  type ref to if_wd_controller, lr_message_manager type ref to if_wd_message_manager. lr_api_controller ?= wd_this->wd_get_api( ). lr_message_manager =
Continue Reading →

ABAP cancelling an SD Billing Document

If you have access to a billing document number try executing the following function: DATA: l_rtrn TYPE bapireturn1 OCCURS 0. DATA: l_succ TYPE bapivbrksuccess OCCURS 0. CALL FUNCTION 'BAPI_BILLINGDOC_CANCEL1' EXPORTING billingdocument = * testrun = * no_commit = billingdate
Continue Reading →

ABAP: execute OS level command

There are many things that one can do to execute a command in an Operating System from an ABAP report.  I’ll explain one method that one can take to accomplish this. Using transactions SM49 and SM69 set up and test a new OS command that you wish to execute.  For the purposes of
Continue Reading →

ABAP: load file using pop-up window

When writing a program the simplest way to load a file from your client PC in to the server SAP syste is through a use of a regular text box.  But if you want to get a little fancier try using the following function: data: l_select TYPE sapb-sappfad. CALL FUNCTION 'WS_FILENAME_GE
Continue Reading →

FM: SAPGUI_PROGRESS_INDICATOR

A usefull little function that will allow you to display a status update on the bottom left corner of the screen when running your reports. call function 'SAPGUI_PROGRESS_INDICATOR' EXPORTING percentage = 0 text = STATUS_TEXT. Note: anything lower then 0 will be rounded up t
Continue Reading →

ABAP: Hello World

One of the first and most well known attempts to tackle any programming language is to write a ‘Hello World’ application. Lets begin by creating a new program Z_HELLO_WORLD. Note: use transaction SE38 to gain access to ABAP editor.  Every program written in ABAP has to beg
Continue Reading →