SAP GUI tips and tricks #1

Right-clicking on the SAPLogon icon in the system tray has at least two advantages:
  • to close all SAP GUI windows at once: choose "Exit SAP Logon". Warning: this will really close every window without asking. So if you are editing a program and haven't saved, you will lose your work.
  • you have a good overview of your SAP GUI windows grouped by system


FM for changing object directory entry

It is called TR_TADIR_INTERFACE. We used it for changing the source system of cross-transported objects (Parameter WI_TADIR_SRCSYSTEM), but you can use it to change just about everything (see parameters).

Debugging IS-U Billing

In transaction EA00 choose Settings-->General from the menu. Check Debugging on. Additional select-options appear on the screen. Fill in Breakpoint at.


Displaying a tree in a list

data: gt_mytree type snodetext occurs 0,
      gw_mytree type snodetext.

  gw_mytree-name = 'Verwendungsnachweis'(001).
  gw_mytree-tlevel = 1.
  APPEND gw_mytree TO gt_mytree.
* ... * Create the whole tree here by filling gt_mytree * ...
      nodetab                  = gt_mytree
     tree_failure             = 1
     id_not_found             = 2
     wrong_relationship       = 3
     OTHERS                   = 4.



Yummy FM for reading IS-U Master Data

You can get every possible data using just one function module called ISU_STRUCTURE_READ. The trick is, you have to place the table connections into tables parameter XT_PATH and fill the corresponding "kick-off" table parameter. Let's have an example. We want to have contract account, contract (billable service), and installation data to a specified BP.
data: xt_path type EFKKPATH occurs 0 with header line,
      iekun TYPE line of ISU01_EKUN_TAB occurs 0 with header line,
      ifkkvkp like FKKVKP1 occurs 0 with header line,
      iever like ever occurs 0 with header line,
      ieanl like v_eanl occurs 0 with header line.

refresh xt_path.

xt_path-tabfrom = 'EKUN'. xt_path-tabto = 'FKKVKP'.
append xt_path.
xt_path-tabfrom = 'FKKVKP'. xt_path-tabto = 'EVER'.
append xt_path.
xt_path-tabfrom = 'EVER'. xt_path-tabto = 'EANL'.
append xt_path.

iekun-partner = your business partner.
append iekun.

    X_AB = sy-datum
    X_BIS = sy-datum
    XT_PATH = xt_path
    T_EANL = ieanl
    T_EKUN = iekun
    T_EVER = iever
    T_FKKVKP = ifkkvkp
    OTHERS = 4.
Table connections also work the other way (e.g. from installation to BP). Check the possible connections in the source code of the FM. Form INIT_ALL, lines starting with MAC_LINK_APP.


Viewing all indexes of a database table AT ONCE

It's quite frustrating to have a look at the indexes in transaction SE11 especially if there are more than two of them. So instead of pressing the button Indexes... choose Utilities --> Database Object --> Display from the menu and scroll through the table fields.

Parsing XML (Releases 4.6C and up)

Finally I have found the way! Maybe it also works for Releases prior to 4.6C - give it a try.
  1. Copy Report BCCIIXMLT1
  2. (you can change the way of filling internal table xml_table if necessary)
  3. you don't need the part between
    *-- render the DOM back into an output stream/internal table
    *-- print the whole DOM tree as a list...
    Comment it out or simply delete it
  4. Rename form print_node to your liking e.g. process_node
  5. In your new form you need three extra variables:
    data: attribs type ref to IF_IXML_NAMED_NODE_MAP,
          attrib_node type ref to IF_IXML_NODE,
          attrib_value type string.
  6. After the lines:
    when if_ixml_node=>co_node_element.
      string = pNode->get_name( ).
    attribs = pNode->get_attributes( ).
    clear attrib_value.
    case string.
      when ''. "put your XML tag name here
        attrib_node = attribs->get_named_item(name = '' ). "put your XML attribute name here
        attrib_value = attrib_node->get_value( ).
  7. replace the write statements to whatever you need

Voila! That's it! It did work for me. (In my case the part of the program:

when if_ixml_node=>co_node_text.
has been never reached.)


BAPIs for changing IS-U master data

Recently I found some BAPIs for changing IS-U master data. Here you are:

  • BAPI_ISUPARTNER_CHANGE - Business Partner
  • BAPI_ISUACCOUNT_CHANGE - Contract Account
  • BAPI_ISUCONTRCT_CHANGEFROMDATA - Contract: well this one is a little tricky. Even some common fields are not included in the standard interface, you have to use EXTENSIONIN. Make sure you name the fields of your new append to BAPI_TE_EVER as in table EVER or else they won't be transferred.
  • BAPI_FUNCLOC_CHANGE - Device location
  • BAPI_EQUI_CHANGE - Equipment

I tried them all, they seem to work, but remember: I have only changed one single field with them - no complex operations.

Always put an 'X' into the corresponding field of the import parameter DATA_...X you want to change.



I try to post the problems (and hopefully their solution) I encounter during my daily work as an ABAP programmer. The basics: there are a couple of very good ABAP resources, check them out if you do not find an answer to your problem here: