User Tools

Site Tools


abap:coding_tips

This is an old revision of the document!


ABAP tips & tricks

Récupérer une variable d'un autre programme

FIELD-SYMBOLS <fs> TYPE ANY.
* Pour une variable quelconque
ASSIGN ('(PROG)VAR') TO <fs>.
* Pour un contenu de table
ASSIGN ('(PROG)TABLE[]') TO <fs>.
* Il est évidemment possible de variabiliser :
DATA : var_name TYPE (30)C.
IF cond1.
  var_name = '(PROGX)VAR1'.
ELSE.
  var_name = '(PROGY)VAR2'.
ENDIF.
ASSIGN (var_name) TO <fs>.
abap/coding_tips.1412179105.txt.gz · Last modified: 2014/10/01 17:58 by ginko