How to have a form in a external ABAP include change this

Question: I have the following scenario in a ABAP - ZXATUP01


REPORT ZXATUP01.

....

SELECT * INTO IREC FROM TCURR.

PERFORM USERFORM.
....
ENDSELECT.



What I want to do is within the SELECT .. ENDSELECT I want to call a FROM USERFORM which is in another INCLUDE ZXTAP02.

In USERFORM I want change the value of IREC.

Can you please provide me a code sample how I can do it. I am doing almost the same thing as a USER-EXIT without complicating and making it a USEREXIT please explain with a Sample code how I can do it.

Thanks
SR

Answer:
To access a form in another program use the syntax:

REPORT ZXATUP01.

....

SELECT * INTO IREC FROM TCURR.

PERFORM USERFORM USING IREC.
....
ENDSELECT.

*In the other Program

FORM USERFORM USING LREC LIKE TCURR.

*Change LREC here.

ENDFORM.



KRK
Copyright ?2007 - 2008 www.jt77.com