As a beginner, I have created a subroutine and want to use in another program by calling value.
Please advice the code Am i right here ..
FORM ZX using P .
IF zemp BETWEEN '00000001' AND '00088888'.
SELECT SINGLE * FROM P100 WHERE pernr = zemp
AND subty = 'A'
desig = P100-desig_desc.
P = desig.
ELSE.
SELECT SINGLE * FROM pa9308 WHERE pernr = zemp
AND begda LE sy-datum
AND endda GE sy-datum.
desig = p200-desig.
P = desig.
ENDIF.
ENDFORM. " ZX
Please advise the above code for subroutine is fine .or advise the same...
After that i have used the above subroutine in below form in another prog
PERFORM zx(zprogrma) using P.
Please advise how to pass a value here in subroutine.
Regards
Ahmad