Skip to Content

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

inner joins it is comming incorrect where condition

Hi,

can any one help me inner joins it is comming incorrect where condition

REPORT ZJSUTEST1 .

INFOTYPES: 0006,

0001.

DATA : BEGIN OF ITAB occurs 0,

PERNR LIKE PA0006-PERNR,

begda like pa0006-begda,

endda like pa0006-endda,

SUBTY LIKE PA0006-SUBTY,

LAND1 LIKE PA0006-LAND1,

TELNR LIKE PA0006-TELNR,

STATE LIKE PA0006-STATE,

PAYARA LIKE PA0001-ABKRS,

COMCODE LIKE PA0001-BUKRS,

name like pa0001-ename,

END OF ITAB.

PARAMETERS : P_PERNR LIKE PA0006-PERNR,

P_BEGDA LIKE PA0006-BEGDA,

P_ENDDA LIKE PA0006-ENDDA,

P_COMCOD LIKE PA0001-BUKRS,

P_PAYARA LIKE PA0001-ABKRS.

START-OF-SELECTION.

SELECT APERNR ABEGDA AENDDA ASUBTY ALAND1 ATELNR ASTATE BPAYARA BCOMCODE Bname

INTO CORRESPONDING FIELDS OF TABLE itab

FROM PA0006 AS A

INNER JOIN PA0001 AS B

WHERE A~PERNR = p_PERNR .

LOOP AT ITAB.

WRITE : / ITAB-PERNR,

ITAB-BEGDA,

ITAB-ENDDA,

ITAB-NAME,

ITAB-SUBTY,

ITAB-LAND1,

ITAB-PAYARA,

ITAB-PAYARA,

ITAB-COMCODE.

ENDLOOP.

Thanks & Regards

Kavitha

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