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.
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 successfully:
6: Post-processing is required
8: Transport carried out with an error [individual object could not be transported successfully]
ex: objects could not be overwritten
Transport termination:
12 and greater: transport was terminated
SAP – ABAP – gui – hiding selection components
If you want to make your reports more functional you can start controling the properties of different components based on selections that are performed by the user.
For instance in this post I’ll show you a quick example of how to hide a on-screen component based on user selection.
PARAMETER: cb_a AS CHECKBOX DEFAULT 'X'
USER-COMMAND batch MODIF ID ida,
cb_bAS CHECKBOX DEFAULT 'X'
USER-COMMAND batch MODIF ID idb.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'IDA' AND cb_b NE 'X'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'IDB' AND cb_a NE 'X'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
This example will hide each of the check boxes depending on the selection of the other check-box. If both are selected then both are visible, if one is un-checked then the other is hidden.
The active attribute controls the visibility of a particular screen component. Explicitly: 0 = hidden, 1 = visible.