Skip to Content
0
Former Member
Jul 19, 2007 at 09:42 AM

SY-LISEL

450 Views

Hi,

In my program i had wrote sy-lisel. still when iam double clicking it is not taking that line. plz let me know.

also i wrote no stamdard page heading, but that appears in the output.

This is my program.

REPORT ZAC_TAB23. "LINE-SIZE" 180,

"LINE-COUNT" 26(2),

"NO STANDARD PAGE HEADING".

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.

  • T O P O F P A G E

TOP-OF-PAGE.

WRITE:/1 'CUSTOMER NUMBER', 12'CUSTOMER NAME',42 'CITY',62 'COUNTRY'.

ULINE.

  • S T A R T O F S E L E C T I O N.

START-OF-SELECTION.

PERFORM GET_CUSTDATA.

IF IT_KNA1 IS NOT INITIAL.

LOOP AT IT_KNA1 INTO ST_KNA1.

WRITE:/ ST_KNA1-KUNNR,ST_KNA1-LAND1,ST_KNA1-NAME1,ST_KNA1-ORT01.

ENDLOOP.

ELSE.

WRITE:/ 'NO RECORDS FOUND'.

ENDIF.

  • AT LINE SELECTION.

AT LINE-SELECTION.

CASE SY-LSIND.

WHEN 1.

SELECT VBELN AUDAT AUART NETWR FROM VBAK

INTO TABLE IT_VBAK

WHERE KUNNR EQ ST_KNA1-KUNNR.

IF SY-SUBRC EQ 0.

LOOP AT IT_VBAK INTO ST_VBAK.

WRITE:/ ST_VBAK-VBELN,ST_VBAK-AUDAT,ST_VBAK-AUART,ST_VBAK-NETWR.

WRITE:/ SY-LISEL.

ENDLOOP.

ELSE.

MESSAGE S000(0) WITH 'NO RECORDS FOUND FOR CUSTOMER'.

ENDIF.

WHEN 2.

SELECT POSNR MATNR ARKTX NETPR NETWR FROM VBAP

INTO TABLE IT_VBAP.

IF SY-SUBRC EQ 0.

LOOP AT IT_VBAP INTO ST_VBAP.

WRITE:/ ST_VBAP-POSNR,ST_VBAP-MATNR,ST_VBAP-ARKTX,ST_VBAP-NETPR,ST_VBAP-NETWR.

ENDLOOP.

ELSE.

MESSAGE S000(0) WITH 'NO RECORDS FOUND FOR CUSTOMER'.

ENDIF.

ENDCASE.

INCLUDE ZAC_TAB23_GET_CUSTDATAF01.

&----


*& Form GET_CUSTDATA

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM GET_CUSTDATA .

SELECT KUNNR LAND1 NAME1 ORT01 FROM KNA1

INTO TABLE IT_KNA1

WHERE KUNNR IN SKUNNR.

ENDFORM. " GET_CUSTDATA