Skip to Content
0
Former Member
Nov 30, 2007 at 10:52 PM

FOX code question

22 Views

Hi

I have quick question about VARV, VARC and VARI statements in FOX code.

I have characteristics called PPN and it has three counding objects OBJ1, OBJ2 and OBJ3.

Now I have created a exit variable for PPN and that variable is multiple selection that gives me multiple values. Variable works OK.

I wish to use these values into the fox code so I am written following code to read each value .Name of the variable is ZCL_PN. For some reason it doesnot work

Can someone help to identify what is the issue?

Thanks

DATA PPN TYPE ZFCSTPPN.

DATA PPNVAR TYPE ZFCSTPPN.

DATA TOTALCOUNT TYPE F.

DATA COUNT TYPE F.

PPN = VARV(ZCL_PN).

TOTALCOUNT= VARC(ZCL_PN).

COUNT = 1.

DO .

IF COUNT < TOTALCOUNT.

PPNVAR = VARI( ZCL_PN, COUNT ).

FOREACH SORG,SCHN,PPN.

***LOGIC HERE

ENDFOR.

COUNT = COUNT + 1.

ENDIF.

ENDDO.