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.

    "&V[pld](BAPI_MBEW_GA-CURR_PLAN_PRICE)"

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[pld](BAPI_MBEW_GA-CURR_PLAN_PRICE) "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.