Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

REPORT

HI

This is lalitha

in the below program i got an error

please solve .

NO STANDARD PAGE HEADING

LINE-SIZE 250

LINE-COUNT 30(3) .

**********DECLARATION OF USER DEFINED STRUCTURES********

TYPES: BEGIN OF TY_LFA1,

MANDT TYPE LFA1-MANDT,

LIFNR TYPE LFA1-LIFNR,

ADRNR TYPE LFA1-ADRNR,

END OF TY_LFA1,

BEGIN OF TY_ADRC,

ADDRNUMBER TYPE ADRC-ADDRNUMBER,

NAME1 TYPE ADRC-NAME1,

CITY1 TYPE ADRC-CITY1,

POST_CODE1 TYPE ADRC-POST_CODE1,

STREET TYPE ADRC-STREET,

HOUSE_NUM1 TYPE ADRC-HOUSE_NUM1,

COUNTRY TYPE ADRC-COUNTRY,

REGION TYPE ADRC-REGION,

END OF TY_ADRC,

BEGIN OF TY_T005T,

MANDT TYPE T005T-MANDT,

SPRAS TYPE T005T-SPRAS,

LAND1 TYPE T005T-LAND1,

NATIO TYPE T005T-NATIO ,

END OF TY_T005T,

BEGIN OF TY_LFBK,

LIFNR TYPE LFBK-LIFNR,

BANKS TYPE LFBK-BANKS,

BANKN TYPE LFBK-BANKN

,

END OF TY_LFBK,

BEGIN OF TY_FINAL,

LIFNR TYPE LFA1-LIFNR,

LAND1 TYPE LFA1-LAND1,

NAME1 TYPE ADRC-NAME1,

NAME2 TYPE ADRC-NAME2,

CITY1 TYPE ADRC-CITY1,

CITY2 TYPE ADRC-CITY2,

POST_CODE1 TYPE ADRC-POST_CODE1,

STREET TYPE ADRC-STREET,

HOUSE_NUM1 TYPE ADRC-HOUSE_NUM1,

COUNTRY TYPE ADRC-COUNTRY,

REGION TYPE ADRC-REGION,

TEL_NUMBER TYPE ADRC-TEL_NUMBER,

BANKS TYPE LFBK-BANKS,

BANKN TYPE LFBK-BANKN,

NATIO TYPE T005T-NATIO,

END OF TY_FINAL.

**DECLARATION OF INTERNAL TABLES*********

DATA: IT_LFA1 TYPE STANDARD TABLE OF TY_LFA1,

IT_ADRC TYPE STANDARD TABLE OF TY_ADRC,

IT_T005 TYPE STANDARD TABLE OF TY_T005T,

IT_LIFNR TYPE STANDARD TABLE OF TY_LFA1,

IT_FINAL TYPE STANDARD TABLE OF TY_FINAL.

************selecion screen**********

SELECT-OPTIONS: S_ACNO FOR it_lfa1-lifnr.

********AT SELECTION-SCREEN*********

AT SELECTION-SCREEN.

IF IT_LFA1 IS NOT INITIAL.

SELECT SINGLE LIFNR

FROM LFA1

INTO LFA1-LIFNR

WHERE LIFNR IN S_VENDORNO.

IF SY-SUBRC <> 0 .

MESSAGE E005(ZLALI_MSG) .

ENDIF.

ENDIF.

****TOP-OF-PAGE********

TOP-OF-PAGE.

ULINE.

WRITE: /5 'VENDOR AC',

10 'NAME1',

25 'CITY',

35 'CITY POSTAL_CODE',

50 'STREET',

65 'HOUSE NO',

80 'COUNTRY',

90 'REGION' ,

100 'BANK AC NO'.

ULINE .

********END-OF-PAGE*********

END-OF-PAGE.

ULINE.

WRITE: /100 'END-OF-PAGE' , SY_PAGNO .

ULINE.

*******START-OF-SELECTION*******

START-OF-SELECTION .

*******DATA EXTRACTION*********

SELECT MANDT

LIFNR

ADRNR

FROM LFA1

INTO CORRESPONDING FIELDS OF TABLE IT_LFA1

WHERE LIFNR IN S_VENDORNO .

IF IT_LFA1 IS NOT INITIAL.

SELECT ADDRNUMBER

NAME1

CITY1

POST CODE1

STREET

HOUSE_NUM1

COUNTRY

REGION

FROM ADRC

INTO TABLE IT_ADRC

FOR ALL ENTRIES IN IT_LFA1

WHERE ADDRNUM = IT_LFA10-ADRNR

ENDIF .

SELECT MANDT

SPRAS

LAND1

LANDX

NATIO

FROM T005T

INTO TABLE IT_T005T FOR ALL ENTRIES IN IT_LFA1

WHERE MANDT = IT_LFA1-MANDT.

SELECT LIFNR

BANKS

BANKN

FROM LFBK

INTO TABLE IT_LFBK FOR ALL ENTRIES IN IT_LFA1

WHERE LIFNR = IT_LFA1-LIFNR .

ENDIF .

LOOP AT IT_LFA1 .

MOVE CORRESPONDING IT_LFA1 TO IT_FINAL .

LOOP AT IT_ADRC WHERE ADDRNUM = IT_LFA1-ADRNR.

MOVE CORRESPONDING IT_ADRC INTO IT_FINAL/

ENDLOOP.

LOOP AT IT_T005T WHERE MANDT = IT_LFA1-MANDT.

MOVE-CORRESPONDING IT_T005T INTO IT_FINAL.

LOOP AT IT_LFBK WHERE LIFNR = IT_LFA1-LIFNR

MOVE CORRESPONDING IT_LFBK INTO IT_FINAL .

APPEND IT_FINAL .

ENDLOOP .

LOOP AT IT_FINAL .

WRITE: /5 LIFNR,

10 NAME1,

25 CITY,

35 POST_CODE1,

50 STREET,

65 HOUSE_NUM1,

80 COUNTRY,

90 REGION',

100 LAND,

110 BANKN .

ENDLOOP .

ULINE .

In selection sceen

i got an error that " The field is unknown but there is a field with the similar name IT_LFA1 .

If i correct it to IT_LFA1

i am getting an error that

"it_lfa1 is a table without headerline and therefore has no component called "LILFNR" .

How can i sove this error?

with regards.

Former Member
Not what you were looking for? View more on this topic or Ask a question