cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer Routine Error

Former Member
0 Kudos

Hello Everyone,

I am getting the following error in the Transfer routine of InfoObject ZOBJ.

W:A USING reference parameter should not be used. Instead, define the parameter as a USING-VALUE(...) or CHANGING parameter.

The code is:

IF TRAN_STRUCTURE-ZZF = 'AAA'.

TRAN_STRUCTURE-ALTKT = TRAN_STRUCTURE-BELNR.

****The error points to the above line. *********

ENDIF.

RESULT = TRAN_STRUCTURE-ALTKT.

Note: 1. ZZOBJ is mapped to ALTKT.

2. ALTKT and BELNR have asme data type and length.

3. ZZF is an appended field to the DS.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

GFV
Active Contributor
0 Kudos

Hi,

the error is because you are trying to modify TRAN_STRUCTURE-ALTKT. Don't know if I understood right the logic you are tring to implement but the right code should be the following:

IF TRAN_STRUCTURE-ZZF = 'AAA'.

RESULT = TRAN_STRUCTURE-BELNR.

ELSE.

RESULT = TRAN_STRUCTURE-ALTKT.

ENDIF.

Hope it helps

GFV

Former Member
0 Kudos

Hi GFV,

Actually, i am trying to copy the contents of field BELNR to ALTKT if the condition -TRAN_STRUCTURE-ZZF = 'AAA'---- is true.

Thanks.

GFV
Active Contributor
0 Kudos

You can write a routine like:

IF TRAN_STRUCTURE-ZZF = 'AAA'.

RESULT = TRAN_STRUCTURE-ALTKT.

ENDIF.

to trasfer the value to the InfoObject associated to BELNR ... This won't modify TRAN_STRUCTURE-BELNR

If you want to influence TRAN_STRUCTURE values work in the Start Routine ...

Hope it helps

GFV

Answers (1)

Answers (1)

former_member184494
Active Contributor
0 Kudos

Choose a routine for ALTKT and do the above code change as suggested and do not assign BELNR to ALTKT and use the result instead.

Also check if the tran_structure fields are correctly called.

Arun