Skip to Content
0
Former Member
Jun 25, 2008 at 06:41 AM

output change due to code change

12 Views

Hi,

I tried to change some code for performance imp. But the o/p is getting wrong. Kindly suggest where i made mistake

Code before change:

SELECT * FROM pb4001 WHERE

begda EQ yesterday

ORDER BY pernr DESCENDING.

wa_appl-applnr = pb4001-pernr. " application nr

wa_appl-matnr = pb4001-pernr. " match nr = application nr

wa_appl-appl_begda = pb4001-begda. " date of applicataion

wa_appl-mat_begda = pb4001-begda. " date of application

wa_appl-mark = 'A'. " A = applicant

Code after change:

Select pernr begda from pb4001 into table it_pb4001

where begda EQ yesterday.

Sort it_pb4001 descending by pernr.

wa_appl-applnr = it_pb4001-pernr. " application nr

wa_appl-matnr = it_pb4001-pernr. " match nr = application nr

wa_appl-appl_begda = it_pb4001-begda. " date of applicataion

wa_appl-mat_begda = it_pb4001-begda. " date of application

wa_appl-mark = 'A'. " A = applicant