Hi,
How to create a subroutine in the program. I had written the program and i had written perform statement. Now i want to create subroutine in the program. what is the command we use for that.
This is my program.
REPORT ZAC_TAB23.
TYPES:
BEGIN OF TY_KNA1,
KUNNR TYPE KNA1-KUNNR,
LAND1 TYPE KNA1-LAND1,
NAME1 TYPE KNA1-NAME1,
ORT01 TYPE KNA1-ORT01,
END OF TY_KNA1,
BEGIN OF TY_VBAK,
VBELN TYPE VBAK-VBELN,
AUDAT TYPE VBAK-AUDAT,
AUART TYPE VBAK-AUART,
NETWR TYPE VBAK-NETWR,
END OF TY_VBAK,
BEGIN OF TY_VBAP,
POSNR TYPE VBAP-POSNR,
MATNR TYPE VBAP-MATNR,
ARKTX TYPE VBAP-ARKTX,
NETPR TYPE VBAP-NETPR,
NETWR TYPE VBAP-NETWR,
END OF TY_VBAP.
DATA:
ST_KNA1 TYPE TY_KNA1,
IT_KNA1 TYPE TABLE OF TY_KNA1,
ST_VBAK TYPE TY_VBAK,
IT_VBAK TYPE TABLE OF TY_VBAK,
ST_VBAP TYPE TY_VBAP,
IT_VBAP TYPE TABLE OF TY_VBAP.
S E L E C T O P T I O N S
SELECT-OPTIONS:
SKUNNR FOR ST_KNA1-KUNNR.
S T A R T O F S E L E C T I O N.
START-OF-SELECTION.
PERFORM GET CUSTDATA.
ENDFORM. "
Now iam getting the error that custdat is not able to interpret.
what is the command we use to create a
FORM CUSTDATA (Subroutine) in the end.