Skip to Content
0
Former Member
Jul 30, 2007 at 11:41 AM

hI

14 Views

Hi,

Iam getting the error at the block letters. Plz let me what is correct syntax.

PROGRAM ZMP_TAB2.

TYPES:

BEGIN OF TY_KNA1,

KUNNR TYPE KNA1-KUNNR,

LAND1 TYPE KNA1-LAND1,

NAME1 TYPE KNA1-NAME1,

ORT01 TYPE KNA1-ORT01,

TELF1 TYPE KNA1-TELF1,

END OF TY_KNA1.

DATA:

ST_KNA1 TYPE TY_KNA1.

&----


*& Module USER_COMMAND_9001 INPUT

&----


  • text

----


MODULE USER_COMMAND_9001 INPUT.

CASE SY-UCOMM.

WHEN 'EXIT'.

LEAVE PROGRAM.

WHEN 'INSERT'.

<b>MOVE CORRESPONDING FIELDS FROM ST_KNA1 TO KNA1.</b>

INSERT KNA1.

IF SY-SUBRC EQ 0.

MESSAGE S000(0) WITH 'CUSTOMER RECORD INSERTED'.

ELSE.

MESSAGE E000(0) WITH 'CUSTOMER RECORD NOT INSERTED'.

ENDIF.

CLEAR ST_KNA1.

WHEN 'DISPLAY'.

SELECT SINGLE * KUNNR LAND1 NAME1 ORT01 TELF1 FROM KNA1 INTO ST_KNA1

WHERE KUNNR EQ ST_KNA1-KUNNR.

IF SY-SUBRC NE 0.

MESSAGE I000(0) WITH ' INVALID CUSTOMER NUMBER'.

ENDIF.

ENDCASE.

ENDMODULE. " USER_COMMAND_9001 INPUT