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: 

Report

Former Member
0 Kudos

Hi

The below report is to display G/L Account with material doc.no .the output fields are belnr,budat,bldat,blart,dmbtr,menge,matnr,shkzg,kostl.

but i am not getting the last four fields in the output .

TYPES : BEGIN OF TY_BSIS,

BUKRS TYPE BSIS-BUKRS, "COMPANY CODE

HKONT TYPE BSIS-HKONT, "GENERAL LEDGER ACCOUNT

GJAHR TYPE BSIS-GJAHR, "FISCAL YEAR

BELNR TYPE BSIS-BELNR, "ACCOUNTING DOCUMENT NO

BUDAT TYPE BSIS-BUDAT, "POSTING DATE IN THEDOCUMENT

BLART TYPE BSIS-BLART, "DOCUMENT TYPE

SHKZG TYPE BSIS-SHKZG, "DEBIT/CREDIT INDICATOR

DMBTR TYPE BSIS-DMBTR, "AMOUNT IN LOCAL CURRENCY

KOSTL TYPE BSIS-KOSTL, "COST CENTER

END OF TY_BSIS,

BEGIN OF TY_BSIM,

MATNR TYPE BSIM-MATNR,

BELNR TYPE BSIM-BELNR,

MENGE TYPE BSIM-MENGE,

END OF TY_BSIM,

BEGIN OF TY_FINAL,

BUKRS TYPE BSIS-BUKRS,

HKONT TYPE BSIS-HKONT,

GJAHR TYPE BSIS-GJAHR,

dmbtr type bsis-dmbtr,

BELNR TYPE BSIM-BELNR,

shkzg type bsis-shkzg,

KOSTL TYPE BSIS-KOSTL,

MATNR TYPE BSIM-MATNR,

MENGE TYPE BSIM-MENGE,

budat type bsim-budat,

blart type bsim-blart,

END OF TY_FINAL.

*DATA: W_BSIS TYPE TY_BSIS,

  • W_BSIM TYPE TY_BSIM,

  • W_FINAL TYPE TY_FINAL,

**********SELECT OPTIONS**********

data: it_BSIm type standard table of TY_BSIm with header line.

DATA: it_bsis TYPE STANDARD TABLE OF ty_bsis WITH HEADER LINE ,

it_final TYPE STANDARD TABLE OF ty_final WITH HEADER LINE,

w_bsis type ty_bsis,

w_bsim type ty_bsim,

w_final type ty_final.

**********SELECT OPTIONS**********

SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS: S_ACCNT FOR w_bsis-hkont,

S_CODE FOR W_BSIS-BUKRS,

S_FYEAR FOR W_BSIS-GJAHR,

S_DCTYPE FOR W_BSIS-BLART,

S_PSDT FOR W_BSIS-BUDAT.

SELECTION-SCREEN END OF BLOCK B1 .

**********SELECT OPTIONS**********

select * from bsis into corresponding fields of table it_bsis where

hkont in s_accnt and

bukrs in s_code .

if it_bsis[] is not initial .

select * from bsim into corresponding fields of table it_bsim

for all entries in it_bsis

where belnr = it_bsis-belnr .

endif.

LOOP AT IT_BSIS INTO W_BSIS.

READ TABLE IT_BSIS INTO W_BSIS WITH KEY BELNR = W_BSIS-BELNR.

W_FINAL-BUKRS = W_BSIS-BUKRS.

W_FINAL-HKONT = W_BSIS-HKONT.

W_FINAL-GJAHR = W_BSIS-GJAHR.

W_FINAL-BELNR = W_BSIS-BELNR.

W_FINAL-SHKZG = W_BSIS-SHKZG.

W_FINAL-DMBTR = W_BSIS-DMBTR.

W_FINAL-BLART = W_BSIS-BLART.

READ TABLE IT_BSIM INTO W_BSIM WITH KEY BELNR = W_BSIS-BELNR .

W_FINAL-MATNR = W_BSIM-MATNR.

W_FINAL-BELNR = W_BSIM-BELNR.

W_FINAL-MENGE = W_BSIM-MENGE.

APPEND W_FINAL TO IT_FINAL.

ENDLOOP.

with regards .

4 REPLIES 4

Former Member
0 Kudos

Hi,

Please check whether the data is available in the table or not. If the table has the data then try in debugging to see what you are getting and what not?

Hope this helps.

Thanks,

Srinivasa

Message was edited by:

Srinivasa Bhanuprasad Moningi

Former Member
0 Kudos

If you mean you can not see last 4 fileds in the report output screen, it may be problem of line-size.

try to debug the program and see whether you have all the values in your internal table?

Thanks

Pavan

Former Member
0 Kudos

Hi,

Remove * and into corresponding in the select queries, Specify the field names which you have declared in types.

Regards,

Satish

former_member195698
Active Contributor
0 Kudos

kostl - -You are not moving this to the final table so you are not getting this field

menge,matnr,shkzg - - Is the data present in the table BSIM ?

Or

As told by satish the issue might be with the width

Regards,

Abhishek