cancel
Showing results for 
Search instead for 
Did you mean: 

short dump

Former Member
0 Kudos
201

Hi forum,

Pls help me out...I'm getting short dump if i execute this..

pls correct the code.......

REPORT ZPAY_REG NO STANDARD PAGE HEADING line-size 150 line-count

65(3).

TYPE-POOLS: slis.

TABLES:

payr,

t012,

t012k,

t51r5.

Data : begin of it occurs 0,

zbukr like payr-zbukr, "paying company code

hbkid like payr-hbkid, "house bank id

hktid like payr-hktid, "account id

bankl like t012-bankl, "bank key

bankn like t012k-bankn, "bank account

checf like payr-checf, "check number

waers like payr-waers, "currency

rwbtr like payr-rwbtr, "amount

bancd like payr-bancd, "check encashment date

vblnr like payr-vblnr, "payment document no

pernr like payr-pernr, "personnel number

voidr like payr-voidr, "void reason code

rzawe like payr-rzawe, "payment method

laufd like payr-laufd, "checks from payment run

empfg like payr-empfg, "payee code

gjahr like payr-gjahr, "fiscal year

duedt like t51r5-duedt, "due date

zaldt like payr-zaldt, "payment date

znme1 like payr-znme1, "payee name

rec_belnr like payr-rec_belnr, " voucher number

end of it.

*"Payment Register

*A listing of payments made by vendor for a specific payment run or

*group of runs. Data elements include but not limited to:

**• Payment date

*• Pay

*• Payment number

*• Payee name/number

*• Voucher number

*• Amount

*• Period from/to

*

*Frequency: Every payment run, ad hoc for a timeframe, monthly

DATA: it_fldcat TYPE slis_fieldcat_alv OCCURS 0,

wa_fldcat TYPE slis_fieldcat_alv.

DATA : it_sort TYPE slis_sortinfo_alv OCCURS 0,

wa_sort TYPE slis_sortinfo_alv.

DATA: it_events TYPE slis_t_event,

wa_events TYPE slis_alv_event.

"DATA : v_txt TYPE string.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS : s_zaldt FOR payr-zaldt, " payment date

s_vblnr FOR payr-vblnr, " payment document number

s_znme1 FOR payr-znme1, " payee name

s_rec FOR payr-rec_belnr, "voucher number

s_waers for payr-waers. "amount

  • s_duedt for t51r5-duedt. "due date

SELECTION-SCREEN END OF BLOCK b1.

SELECT a~zbukr

a~hbkid

a~hktid

a~checf

a~waers

a~rwbtr

a~bancd

a~vblnr

a~pernr

a~voidr

a~rzawe

a~laufd

a~empfg

a~gjahr

a~zaldt

a~znme1

a~rec_belnr

b~bankl

c~bankn

d~duedt

INTO CORRESPONDING FIELDS OF TABLE it

FROM payr AS a

INNER JOIN t012 AS b

ON ahbkid = bhbkid

inner join t012k as c

on bhbkid = chbkid

  • and on ahbkid = chbkid

inner join t51r5 as d

on cbukrs = dbukrs

  • and on awaers = dwaers

WHERE a~zaldt IN s_zaldt

AND a~vblnr IN s_vblnr

AND a~znme1 IN s_znme1

AND a~rec_belnr IN s_rec

AND a~waers IN s_waers.

loop at it.

write : / it-zbukr, it-hbkid, it-hktid, it-checf, it-waers, it-rwbtr,

it-bancd, it-vblnr, it-pernr, it-voidr, it-rzawe, it-laufd, it-empfg,

it-gjahr, it-zaldt, it-znme1, it-rec_belnr, it-bankl, it-bankn, it-duedt

.

endloop.

**--


show data--


CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' "Displaying data in grid format

EXPORTING

i_callback_program = sy-repid

it_fieldcat = it_fldcat "fieldcatalog

it_sort = it_sort[] "Sort

it_events = it_events

TABLES

t_outtab = it "internal table to output

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

" SHOW_DATA

PERFORM BUILD_FLDCAT.

&----


*& Form BUILD_FLDCAT

&----


FORM build_fldcat .

DEFINE bld_fcat. "Macro to create manual field catalog

wa_fldcat-col_pos = &1.

wa_fldcat-fieldname = &2.

wa_fldcat-outputlen = &3.

wa_fldcat-seltext_s = &4.

wa_fldcat-ddictxt = &5.

append wa_fldcat to it_fldcat.

clear wa_fldcat.

END-OF-DEFINITION.

bld_fcat 1 'zbukr' 4 'Payee Company Code' 'L'.

bld_fcat 2 'hbkid' 5 'Short Key for a house bank' 'L'.

bld_fcat 3 'hktid' 5 'ID for account details' 'L'.

bld_fcat 4 'checf' 13 'Check number from' 'L'.

bld_fcat 5 'waers' 5 'Currency Key' 'L'.

bld_fcat 6 'rwbtr' 13 'Amount paid in tha payment currency' 'L'.

bld_fcat 7 'bancd' 8 'Check encashment date' 'L'.

bld_fcat 8 'vblnr' 10 'Document number of the payment document' 'L'.

bld_fcat 9 'pernr' 8 'Personnel number' 'L'.

bld_fcat 10 'voidr' 2 'Check region code' 'L'.

bld_fcat 11 'rzawe' 1 'payment method' 'L'.

bld_fcat 12 'laufd' 8 'Date on which the program is to be run' 'L'.

bld_fcat 13 'empfg' 16 'Payee code' 'L'.

bld_fcat 14 'gjahr' 4 'Fiscal Year' 'L'.

bld_fcat 15 'zaldt' 8 'Probable payment date' 'L'.

bld_fcat 16 'znme1' 35 'Payee Name' 'L'.

bld_fcat 17 'rec_belnr' 10 'Accounting Document Number Ref to Vocher Number' 'L'.

bld_fcat 18 'bankl' 15 'Bank key' 'L'.

bld_fcat 19 'bankn' 18 'Bank account number' 'L'.

bld_fcat 20 'duedt' 8 'Due Date' 'L'.

  • LOOP AT it_fldcat INTO wa_fldcat.

*

  • IF wa_fldcat-fieldname = 'LIFNR'.

  • wa_fldcat-key = 'X'.

  • ELSEIF wa_fldcat-fieldname = 'DMBTR'.

  • wa_fldcat-do_sum = 'X'.

  • ELSEIF wa_fldcat-fieldname = 'WRBTR'.

  • wa_fldcat-do_sum = 'X'.

  • ENDIF.

*

  • MODIFY it_fldcat FROM wa_fldcat.

  • CLEAR wa_fldcat.

  • ENDLOOP.

ENDFORM.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Mahathi,

Please check the below code which is corrected.

&----


*& Report ZPAY_REG *

*& *

&----


*& *

*& *

&----


REPORT ZPAY_REG NO STANDARD PAGE HEADING line-size 150 line-count

65(3).

TYPE-POOLS: slis.

TABLES:

payr,

t012,

t012k,

t51r5.

DATA : BEGIN OF it OCCURS 0,

zbukr LIKE payr-zbukr, "paying company code

hbkid LIKE payr-hbkid, "house bank id

hktid LIKE payr-hktid, "account id

bankl LIKE t012-bankl, "bank key

bankn LIKE t012k-bankn, "bank account

checf LIKE payr-checf, "check number

waers LIKE payr-waers, "currency

rwbtr LIKE payr-rwbtr, "amount

bancd LIKE payr-bancd, "check encashment date

vblnr LIKE payr-vblnr, "payment document no

pernr LIKE payr-pernr, "personnel number

voidr LIKE payr-voidr, "void reason code

rzawe LIKE payr-rzawe, "payment method

laufd LIKE payr-laufd, "checks from payment run

empfg LIKE payr-empfg, "payee code

gjahr LIKE payr-gjahr, "fiscal year

duedt LIKE t51r5-duedt, "due date

zaldt LIKE payr-zaldt, "payment date

znme1 LIKE payr-znme1, "payee name

rec_belnr LIKE payr-rec_belnr, " voucher number

END OF it.

*"Payment Register

*A listing of payments made by vendor for a specific payment run or

*group of runs. Data elements include but not limited to:

**• Payment date

*• Pay

*• Payment number

*• Payee name/number

*• Voucher number

*• Amount

*• Period from/to

*

*Frequency: Every payment run, ad hoc for a timeframe, monthly

DATA: it_fldcat TYPE slis_fieldcat_alv OCCURS 0,

wa_fldcat TYPE slis_fieldcat_alv.

DATA : it_sort TYPE slis_sortinfo_alv OCCURS 0,

wa_sort TYPE slis_sortinfo_alv.

DATA: it_events TYPE slis_t_event,

wa_events TYPE slis_alv_event.

"DATA : v_txt TYPE string.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS : s_zaldt FOR payr-zaldt, " payment date

s_vblnr FOR payr-vblnr, " payment document number

s_znme1 FOR payr-znme1, " payee name

s_rec FOR payr-rec_belnr, "voucher number

s_waers FOR payr-waers, "amount

s_duedt FOR t51r5-duedt. "due date

SELECTION-SCREEN END OF BLOCK b1.

SELECT a~zbukr

a~hbkid

a~hktid

a~checf

a~waers

a~rwbtr

a~bancd

a~vblnr

a~pernr

a~voidr

a~rzawe

a~laufd

a~empfg

a~gjahr

a~zaldt

a~znme1

a~rec_belnr

b~bankl

c~bankn

d~duedt

INTO CORRESPONDING FIELDS OF TABLE it

FROM payr AS a

INNER JOIN t012 AS b

ON ahbkid = bhbkid

INNER JOIN t012k AS c

ON bhbkid = chbkid

AND ahbkid = chbkid

INNER JOIN t51r5 AS d

ON cbukrs = dbukrs

AND awaers = dwaers

WHERE a~zaldt IN s_zaldt

AND a~vblnr IN s_vblnr

AND a~znme1 IN s_znme1

AND a~rec_belnr IN s_rec

AND a~waers IN s_waers.

*LOOP AT it.

  • WRITE : / it-zbukr, it-hbkid, it-hktid, it-checf, it-waers, it-rwbtr,

  • it-bancd, it-vblnr, it-pernr, it-voidr, it-rzawe, it-laufd, it-empfg,

*it-gjahr, it-zaldt, it-znme1, it-rec_belnr, it-bankl, it-bankn,

*it-duedt

  • .

*ENDLOOP.

*--


show data--


" SHOW_DATA

PERFORM build_fldcat.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' "Displaying data in grid format

EXPORTING

i_callback_program = sy-repid

it_fieldcat = it_fldcat[] "fieldcatalog

it_sort = it_sort[] "Sort

it_events = it_events

TABLES

t_outtab = it "internal table to output

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc = 0.

  • MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

  • WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

*&----


*& Form BUILD_FLDCAT

*&----


FORM build_fldcat .

DEFINE bld_fcat. "Macro to create manual field catalog

wa_fldcat-col_pos = &1.

wa_fldcat-fieldname = &2.

wa_fldcat-outputlen = &3.

wa_fldcat-seltext_s = &4.

wa_fldcat-ddictxt = &5.

append wa_fldcat to it_fldcat.

clear wa_fldcat.

END-OF-DEFINITION.

bld_fcat 1 'zbukr' 4 'Payee Company Code' 'L'.

bld_fcat 2 'hbkid' 5 'Short Key for a house bank' 'L'.

bld_fcat 3 'hktid' 5 'ID for account details' 'L'.

bld_fcat 4 'checf' 13 'Check number from' 'L'.

bld_fcat 5 'waers' 5 'Currency Key' 'L'.

bld_fcat 6 'rwbtr' 13 'Amount paid in tha payment currency' 'L'.

bld_fcat 7 'bancd' 8 'Check encashment date' 'L'.

bld_fcat 8 'vblnr' 10 'Document number of the payment document' 'L'.

bld_fcat 9 'pernr' 8 'Personnel number' 'L'.

bld_fcat 10 'voidr' 2 'Check region code' 'L'.

bld_fcat 11 'rzawe' 1 'payment method' 'L'.

bld_fcat 12 'laufd' 8 'Date on which the program is to be run' 'L'.

bld_fcat 13 'empfg' 16 'Payee code' 'L'.

bld_fcat 14 'gjahr' 4 'Fiscal Year' 'L'.

bld_fcat 15 'zaldt' 8 'Probable payment date' 'L'.

bld_fcat 16 'znme1' 35 'Payee Name' 'L'.

bld_fcat 17 'rec_belnr' 10 'Account DocuNumberRef to Vocher Number' 'L'.

bld_fcat 18 'bankl' 15 'Bank key' 'L'.

bld_fcat 19 'bankn' 18 'Bank account number' 'L'.

bld_fcat 20 'duedt' 8 'Due Date' 'L'.

LOOP AT it_fldcat INTO wa_fldcat.

*

IF wa_fldcat-fieldname = 'LIFNR'.

wa_fldcat-key = 'X'.

ELSEIF wa_fldcat-fieldname = 'DMBTR'.

wa_fldcat-do_sum = 'X'.

ELSEIF wa_fldcat-fieldname = 'WRBTR'.

wa_fldcat-do_sum = 'X'.

ENDIF.

*

MODIFY it_fldcat FROM wa_fldcat.

CLEAR wa_fldcat.

ENDLOOP.

ENDFORM. "build_fldcat

Please reward points if it is answered and close the thread.

Regards,

Hari

Former Member
0 Kudos

hi,

i noted following problems in u r code

1) On shouldn't be their after AND

2) u r not retreiveing all fields from the corresponding table which u r using in inner join

3) The relationship between table is not correct. because of that data is not comeing into internal table.

The relation ship between the tables are

payr-zbukr = t012-bukrs

payr-hbkid = t012-hbkid

t012-bukrs = t012k-bukrs

t012-hbkid = t012k-hbid1

t012k-bukrs = t51r5-bukrs

regards,

pavan

Edited by: pavan kumar pisipati on Dec 27, 2007 7:10 AM

Former Member
0 Kudos

hi mahathi,

TYPE-POOLS: slis.

TABLES:

payr,

t012,

t012k,

t51r5.

Data : begin of it occurs 0,

zbukr like payr-zbukr, "paying company code

hbkid like payr-hbkid, "house bank id

hktid like payr-hktid, "account id

bankl like t012-bankl, "bank key

bankn like t012k-bankn, "bank account

checf like payr-checf, "check number

waers like payr-waers, "currency

rwbtr like payr-rwbtr, "amount

bancd like payr-bancd, "check encashment date

vblnr like payr-vblnr, "payment document no

pernr like payr-pernr, "personnel number

voidr like payr-voidr, "void reason code

rzawe like payr-rzawe, "payment method

laufd like payr-laufd, "checks from payment run

empfg like payr-empfg, "payee code

gjahr like payr-gjahr, "fiscal year

duedt like t51r5-duedt, "due date

zaldt like payr-zaldt, "payment date

znme1 like payr-znme1, "payee name

rec_belnr like payr-rec_belnr, " voucher number

end of it.

*"Payment Register

*A listing of payments made by vendor for a specific payment run or

*group of runs. Data elements include but not limited to:

**• Payment date

*• Pay

*• Payment number

*• Payee name/number

*• Voucher number

*• Amount

*• Period from/to

*

*Frequency: Every payment run, ad hoc for a timeframe, monthly

DATA: it_fldcat TYPE slis_fieldcat_alv OCCURS 0,

wa_fldcat TYPE slis_fieldcat_alv.

DATA : it_sort TYPE slis_sortinfo_alv OCCURS 0,

wa_sort TYPE slis_sortinfo_alv.

DATA: it_events TYPE slis_t_event,

wa_events TYPE slis_alv_event.

"DATA : v_txt TYPE string.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS : s_zaldt FOR payr-zaldt, " payment date

s_vblnr FOR payr-vblnr, " payment document number

s_znme1 FOR payr-znme1, " payee name

s_rec FOR payr-rec_belnr, "voucher number

s_waers for payr-waers,"amount

s_duedt for t51r5-duedt. "due date

SELECTION-SCREEN END OF BLOCK b1.

SELECT a~zbukr

a~hbkid

a~hktid

a~checf

a~waers

a~rwbtr

a~bancd

a~vblnr

a~pernr

a~voidr

a~rzawe

a~laufd

a~empfg

a~gjahr

a~zaldt

a~znme1

a~rec_belnr

b~bankl

c~bankn

d~duedt

INTO CORRESPONDING FIELDS OF TABLE it

FROM payr AS a

INNER JOIN t012 AS b

ON ahbkid = bhbkid

inner join t012k as c

on bhbkid = chbkid

and ahbkid = chbkid

inner join t51r5 as d

on cbukrs = dbukrs

and awaers = dwaers

WHERE a~zaldt IN s_zaldt

AND a~vblnr IN s_vblnr

AND a~znme1 IN s_znme1

AND a~rec_belnr IN s_rec

AND a~waers IN s_waers.

loop at it.

write : / it-zbukr, it-hbkid, it-hktid, it-checf, it-waers, it-rwbtr,

it-bancd, it-vblnr, it-pernr, it-voidr, it-rzawe, it-laufd, it-empfg,

it-gjahr, it-zaldt, it-znme1, it-rec_belnr, it-bankl, it-bankn, it-duedt

.

endloop.

**--


show data--


CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' "Displaying data in grid format

EXPORTING

i_callback_program = sy-repid

it_fieldcat = it_fldcat "fieldcatalog

it_sort = it_sort[] "Sort

it_events = it_events

TABLES

t_outtab = it "internal table to output

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc ne 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

" SHOW_DATA

PERFORM BUILD_FLDCAT.

*&----


*& Form BUILD_FLDCAT

*&----


FORM build_fldcat .

DEFINE bld_fcat. "Macro to create manual field catalog

wa_fldcat-col_pos = &1.

wa_fldcat-fieldname = &2.

wa_fldcat-outputlen = &3.

wa_fldcat-seltext_s = &4.

wa_fldcat-ddictxt = &5.

append wa_fldcat to it_fldcat.

clear wa_fldcat.

END-OF-DEFINITION.

bld_fcat 1 'zbukr' 4 'Payee Company Code' 'L'.

bld_fcat 2 'hbkid' 5 'Short Key for a house bank' 'L'.

bld_fcat 3 'hktid' 5 'ID for account details' 'L'.

bld_fcat 4 'checf' 13 'Check number from' 'L'.

bld_fcat 5 'waers' 5 'Currency Key' 'L'.

bld_fcat 6 'rwbtr' 13 'Amount paid in tha payment currency' 'L'.

bld_fcat 7 'bancd' 8 'Check encashment date' 'L'.

bld_fcat 8 'vblnr' 10 'Document number of the payment document' 'L'.

bld_fcat 9 'pernr' 8 'Personnel number' 'L'.

bld_fcat 10 'voidr' 2 'Check region code' 'L'.

bld_fcat 11 'rzawe' 1 'payment method' 'L'.

bld_fcat 12 'laufd' 8 'Date on which the program is to be run' 'L'.

bld_fcat 13 'empfg' 16 'Payee code' 'L'.

bld_fcat 14 'gjahr' 4 'Fiscal Year' 'L'.

bld_fcat 15 'zaldt' 8 'Probable payment date' 'L'.

bld_fcat 16 'znme1' 35 'Payee Name' 'L'.

bld_fcat 17 'rec_belnr' 10 'Accounting Document Number Ref to Vocher Number' 'L'.

bld_fcat 18 'bankl' 15 'Bank key' 'L'.

bld_fcat 19 'bankn' 18 'Bank account number' 'L'.

bld_fcat 20 'duedt' 8 'Due Date' 'L'.

LOOP AT it_fldcat INTO wa_fldcat.

*

IF wa_fldcat-fieldname = 'LIFNR'.

wa_fldcat-key = 'X'.

ELSEIF wa_fldcat-fieldname = 'DMBTR'.

wa_fldcat-do_sum = 'X'.

ELSEIF wa_fldcat-fieldname = 'WRBTR'.

wa_fldcat-do_sum = 'X'.

ENDIF.

*

MODIFY it_fldcat FROM wa_fldcat.

CLEAR wa_fldcat.

ENDLOOP.

ENDFORM.

check this code its working.

when u get dump

filed catlog its not found . it's means no value in the itab.

it's will help u .

kk.

former_member156446
Active Contributor
0 Kudos

hi Queen

what does the dump say ? look in ST22