Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ERR: SIMPLE REPORT

vallamuthu_madheswaran2
Active Contributor
0 Kudos

hai friends

i got an error on the following report. please mention how to rectify the error

thanks & regards

vallamuthu

REPORT ZREP_PURCHASE_ORDER .

TABLES: EKKO, EKPO.

DATA: BEGIN OF IT_PURORDER,

EBELN LIKE EKKO-EBELN, "STO NUMBER

BEDAT LIKE EKKO-BEDAT, "DOCUMENT DATE

BSART LIKE EKKO-BSART, "DOCUMENT TYPE STO/PO.

LIFNR LIKE EKKO-LIFNR, "VENDOR NAME

WERKS LIKE EKPO-WERKS, "SUPPLYING PLANT

END OF IT_PURORDER.

SELECT-OPTIONS

S_EBELN FOR EKKO-EBELN.

START-OF-SELECTION.

SELECT ABEDAT ABSART ALIFNR BWERKS

FROM EKKO AS A INNER JOIN EKPO AS B ON AEBELN = BEBELN

INTO ( IT_PURORDER-BEDAT, IT_PURORDER-BSART,

IT_PURORDER-LIFNR, IT_PURORDER-WERKS )

WHERE A~EBELN = S_EBELN.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Vallamuthu,

Welcome to SDN...........

Change the code as follows.

SELECT ABEDAT ABSART ALIFNR BWERKS

FROM EKKO AS A INNER JOIN EKPO AS B ON AEBELN = BEBELN

INTO <b>CORRESPONDING FIELDS OF IT_PURORDER</b>

WHERE <b>A~EBELN IN S_EBELN.</b>

Thanks,

Vinay

8 REPLIES 8

Former Member
0 Kudos

Hi Vallamuthu,

In the where condition

WHERE A~EBELN IN S_EBELN.

Send the error you are getting if this will not work.

Former Member
0 Kudos

You are using SELECT-OPTIONS.

WHERE A~EBELN <b>IN</b> S_EBELN.

Regards,

Ravi

Note : Please close the thread if the issue is resolved

Former Member
0 Kudos

Hi Vallamuthu,

Welcome to SDN...........

Change the code as follows.

SELECT ABEDAT ABSART ALIFNR BWERKS

FROM EKKO AS A INNER JOIN EKPO AS B ON AEBELN = BEBELN

INTO <b>CORRESPONDING FIELDS OF IT_PURORDER</b>

WHERE <b>A~EBELN IN S_EBELN.</b>

Thanks,

Vinay

aris_hidalgo
Contributor
0 Kudos

your select-option. Please change it to IN in your select statement.

Regards!

Message was edited by: viraylab

Former Member
0 Kudos

SELECT AEBELN ABEDAT ABSART ALIFNR B~WERKS

FROM EKKO AS A INNER JOIN EKPO AS B ON AEBELN = BEBELN

INTO TABLE ITAB WHERE <b>A~EBELN IN S_EBELN</b>.

Former Member
0 Kudos

hi vallamuthu,

I dont know what is the error you are getting?

but there is correction...

SELECT ABEDAT ABSART ALIFNR BWERKS

FROM EKKO AS A INNER JOIN EKPO AS B ON AEBELN = BEBELN

INTO ( IT_PURORDER-BEDAT, IT_PURORDER-BSART,

IT_PURORDER-LIFNR, IT_PURORDER-WERKS )

WHERE A~EBELN <b>IN</b> S_EBELN.

hope this helps,

do reward if it helps,

priya.

Former Member
0 Kudos

1. There should be no space between the "(" and the "IT_PURORDER-BEDAT" and between the ")" and IT_PURORDER-WERKS.

2. AEBELN = S_EBELN should be AEBELN IN S_EBELN

3. Your program will still have an error because IT_PURORDER is not a table with header line.

- better declare it as an internal table and use into corresponding fields

Former Member
0 Kudos

you can do it this way...

TABLES: ekko, ekpo.

types: BEGIN OF it_purorder,

ebeln LIKE ekko-ebeln, "STO NUMBER

bedat LIKE ekko-bedat, "DOCUMENT DATE

bsart LIKE ekko-bsart, "DOCUMENT TYPE STO/PO.

lifnr LIKE ekko-lifnr, "VENDOR NAME

werks LIKE ekpo-werks, "SUPPLYING PLANT

END OF it_purorder.

data: it type table of it_purorder,

wa type it_purorder.

SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.

START-OF-SELECTION.

SELECT ekkobedat ekkobsart

ekkolifnr ekpowerks

FROM ekko

INNER JOIN ekpo

ON ekkoebeln EQ ekpoebeln

INTO corresponding fields of table it

WHERE ekko~ebeln = s_ebeln.