Application Development and Automation 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: 
Read only

LINE ITEM PROBLEM

Former Member
0 Likes
408

hi experts !

There is a Program for displaying domestic sales figures as per

customer/document type/profit centre wise..

input data for report is

Company code

DOCUMENT TYPE

START DATE & END DATE

FINANCIAL YEAR.

problem is in date when i entered D3 in document type its showing only one line item for a particular document no (FB03) leaving 1st line item in invoice , but when i enter multiple selectios e.g d1, d2 , d3 it shows all line items and showing correct data. can anybody help me why its showing incorrect data for only one specific doc.no.

i have checked fb03 and its showing correct 2 line items in invoice .

CODE FOR DATA IS

FORM FORM_COLLECT_BKPF.

clear IT_BKPF .

SELECT BUKRS BELNR GJAHR BLDAT BUDAT BLART XBLNR BKTXT USNAM CPUDT

CPUTM FROM BKPF

INTO CORRESPONDING FIELDS OF TABLE IT_BKPF

WHERE BUKRS = PR_BUKRS

AND GJAHR = PR_GJAHR

AND BLART IN SO_BLART

AND BUDAT IN SO_BUDAT

AND XREVERSAL = ''

AND BSTAT = ''.

IF IT_BKPF[] IS INITIAL.

MESSAGE E000(ZMSG) WITH 'No records found'.

ENDIF.

ENDFORM.

FORM FORM_COLLECT_BSEG .

*clear IT_BKPF .

SELECT BUKRS BELNR GJAHR HKONT BUZEI DMBTR KUNNR LIFNR BSCHL KOART MENGE

MWSKZ MWSTS PRCTR FROM BSEG INTO CORRESPONDING FIELDS OF TABLE

IT_BSEG

FOR ALL ENTRIES IN IT_BKPF

WHERE

BELNR = IT_BKPF-BELNR AND

BUKRS = PR_BUKRS AND

GJAHR = PR_GJAHR.

ENDFORM.

2 REPLIES 2
Read only

Former Member
0 Likes
387

hi,

I also faced the same problem, if u r using 4.6,

<b>then instead of IN ,try with</b> <b>BETWEEN</b>

ex :<b> BLART BETWEEN SO_BLART-LOW AND SO_BLART-HIGH.</b>

reply back..

With Rgds,

S.Barani

Read only

0 Likes
387

HI!

THANKS

WE R USING 4.7 VERSION.

AND WHEN I USE THIS ''BLART BETWEEN SO_BLART-LOW AND SO_BLART-HIGH'' IT IS NOT SHOWING ANY DATA. I THINK SOME FIELD SHOULD BE ADDED .

PLZ HELP ME IN THIS.