Skip to Content
author's profile photo Former Member
Former Member

Report

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 .

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 09:20 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 29, 2007 at 09:24 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 29, 2007 at 09:25 PM

    Hi,

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

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 29, 2007 at 09:51 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.