Run Time Error GETWA_NOT_ASSIGNED while DTP Load
Symptom:
While running DTP load, load fails with short dump-

In the DTP monitor, below error is shown

Error message:
Dump: Internal session terminated with runtime error GETWA_NOT_ASSIGNED (see ST22)
Cause:
There is error in transformation routines. You can check the dump in ST22 and see the information on where the error is occuring.
Once you have identified, check the code for example in start routine.
Below is one such start routine which will throw the dump when DTP executes-
———————some code above—————————
FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE _ty_s_SC_1.
DATA: GIT_ORDER TYPE STANDARD TABLE OF TY_VBAP,
WA_ORDER LIKE LINE OF GIT_ORDER.
IF LINES( SOURCE_PACKAGE ) GT 0.
SELECT
orderid
item
FROM /BIC/AYSALES
INTO TABLE git_order
FOR ALL ENTRIES IN SOURCE_PACKAGE
WHERE orderid = SOURCE_PACKAGE-sales_order.
ENDIF.
SORT GIT_ORDER BY orderid. DELETE ADJACENT DUPLICATES FROM GIT_ORDER COMPARING orderid, item. LOOP AT GIT_ORDER INTO WA_ORDER. MOVE-CORRESPONDING WA_ORDER TO <SOURCE_FIELDS>. APPEND <SOURCE_FIELDS> TO SOURCE_PACKAGE. ENDLOOP.
——————some code below————————–
Here, the field symbol is not assigned yet and it was called in the loop (see loop statement in bold above)
Thus the system will throw dump at below line:
–> MOVE-CORRESPONDING WA_ORDER TO <SOURCE_FIELDS>.
Solution:
You need to place a check before calling field symbols.
or you need to assign field symbol before addressing it.
LOOP AT GIT_ORDER ASSIGNING <SOURCE_FIELDS>.
IF SY-SUBRC = 0.
APPEND <SOURCE_FIELDS> TO SOURCE_PACKAGE.
ENDLOOP
OR
IF <source_fields> IS ASSIGNED.
LOOP AT GIT_ORDER INTO WA_ORDER.
MOVE-CORRESPONDING WA_ORDER TO <SOURCE_FIELDS>.
IF SY-SUBRC = 0.
APPEND <SOURCE_FIELDS> TO SOURCE_PACKAGE.
ENDLOOP.
UNASSIGN <source_fields>.
ENDIF.
According to SAP
- GETWA_NOT_ASSIGNED error occurs if
- a field symbol is called before it has been set with ASSIGN, or
- a field symbol is called that points to a deleted row in an internal table or
- a field symbol is addressed that was previously reset using UNASSIGN, or that pointed to a local field that no longer exists, or
- a parameter of a global function interface is address, although the corresponding function module is not active (is not in the list of active calls). The list of active calls can be taken from the short dump.