Field offsets: After I call an SAP BAPI function that returns a stucture, I want to know the correct offsets of the fields I require. Where do I find these offsets?

You may use symbolic field names, e.g.


If you prefer to work with field offsets, you may use the following trick: clear the whole structure, put an "X" into the field the offset of which you want to know, and use the

"-stringlength" function. Example:

Set V[pld] "X"


Set V[offset] "&V[pld]" -stringlength

Message "&V[offset]"

For non-Unicode SAP systems an alternative way is described in our Tips&Tricks No. 17, but it does not work for Unicode systems.