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 is not considering vendor given in the selection screen

Former Member
0 Kudos

I have created one report......

In that Selection screen is like below...

Company code

Plant

Material

Date

Vendor

Season

I have given all the data .............but if i have specified vendor also in some cases all vendors are diplaying........

What may be the reason........In some cases its considering vendor and displaying correct......

But in some cases its displaying all the vendors data irrespective of which is given in selection screen

14 REPLIES 14

Former Member
0 Kudos

hi,

if you are using for all enteries then check whether the internal table is initial or not.

if you could send your code would be more helpful.

regards,

sakshi.

0 Kudos

Hi,

I have checked whetehr whether table is not initial also.

my code is

{SORT IT_EKPO BY EBELN EBELP.

IF NOT IT_EKPO IS INITIAL.

*Condition Record Transaction data

SELECT KNUMV

KPOSN

KSCHL

KBETR

KWERT

INTO TABLE IT_KONV FROM KONV

FOR ALL ENTRIES IN IT_EKPO

WHERE KNUMV = IT_EKPO-KNUMV.

sort it_konv by knumv kposn.

*GRN DETAILS

SELECT EBELN

EBELP

VGABE

GJAHR

BELNR

BEWTP

BWART

BUDAT

MENGE

DMBTR

SHKZG

LFBNR

MATNR

WERKS

CHARG

INTO TABLE IT_EKBE

FROM EKBE FOR ALL ENTRIES IN IT_EKPO

WHERE EBELN = IT_EKPO-EBELN AND

EBELP = IT_EKPO-EBELP AND

VGABE = '1' AND

BUDAT IN S_BUDAT AND

MATNR = IT_EKPO-MATNR AND

BEWTP = 'E' .

SORT IT_EKBE ASCENDING BY EBELN EBELP VGABE BWART .

IF P_SEASON <> SPACE.

DELETE IT_EKBE WHERE CHARG+0(1) <> P_SEASON.

ENDIF.

LOOP AT IT_EKBE INTO WA_EKBE.

IF WA_EKBE-SHKZG = 'H'.

WA_EKBE-MENGE = ( 0 - WA_EKBE-MENGE ).

WA_EKBE-DMBTR = ( 0 - WA_EKBE-DMBTR ).

ENDIF.

MODIFY IT_EKBE FROM WA_EKBE INDEX SY-TABIX.

ENDLOOP.

SORT IT_EKBE BY EBELN EBELP VGABE BWART .

LOOP AT IT_EKBE INTO WA_EKBE.

AT END OF EBELP.

SUM.

APPEND WA_EKBE TO IT_EKBEF.

CLEAR : WA_EKBE.

ENDAT.

ENDLOOP.

*Invoice details

SELECT EBELN

EBELP

VGABE

GJAHR

BELNR

BEWTP

BWART

BUDAT

MENGE

DMBTR

SHKZG

LFBNR

MATNR

WERKS

CHARG

INTO TABLE IT_EKBE1

FROM EKBE FOR ALL ENTRIES IN IT_EKBE

WHERE EBELN = IT_EKBE-EBELN AND

EBELP = IT_EKBE-EBELP AND

LFBNR = IT_EKBE-BELNR AND

VGABE in ('2', '3') .

SORT IT_EKBE1 ASCENDING BY EBELN EBELP VGABE BWART .

LOOP AT IT_EKBE1 INTO WA_EKBE1.

IF WA_EKBE1-SHKZG = 'H'.

WA_EKBE1-MENGE = ( 0 - WA_EKBE1-MENGE ).

WA_EKBE1-DMBTR = ( 0 - WA_EKBE1-DMBTR ).

ENDIF.

MODIFY IT_EKBE1 FROM WA_EKBE1 INDEX SY-TABIX.

ENDLOOP.

SORT IT_EKBE1 BY EBELN EBELP VGABE BWART .

LOOP AT IT_EKBE1 INTO WA_EKBE1.

AT END OF EBELP.

SUM.

APPEND WA_EKBE1 TO IT_EKBE1F.

CLEAR : WA_EKBE1.

ENDAT.

ENDLOOP.

***************************************************

****************IR Other Amount*****************

SELECT EBELN

EBELP

VGABE

BELNR

MENGE

DMBTR

SHKZG

XBLNR

KSCHL

INTO TABLE IT_EKBZ2

FROM EKBZ FOR ALL ENTRIES IN IT_EKBE

WHERE EBELN = IT_EKBE-EBELN AND

EBELP = IT_EKBE-EBELP AND

VGABE IN ('2' , '3') AND

KSCHL IN ('ZFRS', 'ZS01' , 'ZCL0' , 'ZCMP' , 'ZCOM').

SORT IT_EKBZ2 BY EBELN EBELP VGABE BELNR.

LOOP AT IT_EKBZ2 INTO WA_EKBZ2.

IF WA_EKBZ1-SHKZG = 'S'.

WA_EKBZ2-MENGE = ( 0 - WA_EKBZ2-MENGE ).

WA_EKBZ2-DMBTR = ( 0 - WA_EKBZ2-DMBTR ).

MODIFY IT_EKBZ2 FROM WA_EKBZ2 INDEX SY-TABIX.

ENDIF.

ENDLOOP.

***************************************************

ENDIF.

ENDFORM. " GET_DATA

&----


*& Form DETAILED_DATA

&----


  • text

----


FORM DETAILED_DATA.

LOOP AT IT_EKPO INTO WA_EKPO.

WA_FINAL-WERKS = WA_EKPO-WERKS.

WA_FINAL-EBELN = WA_EKPO-EBELN.

WA_FINAL-EBELP = WA_EKPO-EBELP.

WA_FINAL-MATNR = WA_EKPO-MATNR.

WA_FINAL-KNUMV = WA_EKPO-KNUMV.

*GR-based invoice verification

SELECT SINGLE WEBRE FROM EKPO INTO

WA_FINAL-WEBRE WHERE EBELN = WA_FINAL-EBELN AND

EBELP = WA_FINAL-EBELP.

  • GRN Qty

SORT IT_EKBEF BY EBELN EBELP.

READ TABLE IT_EKBEF INTO WA_EKBEF

WITH KEY EBELN = WA_FINAL-EBELN

EBELP = WA_FINAL-EBELP BINARY SEARCH.

IF SY-SUBRC = 0.

WA_FINAL-MENGE = WA_EKBEF-MENGE.

ENDIF.

                  • Gross Price******

IF WA_FINAL-WEBRE <> SPACE.

READ TABLE IT_EKBE1F INTO WA_EKBE1F

WITH KEY EBELN = WA_FINAL-EBELN

EBELP = WA_FINAL-EBELP BINARY SEARCH.

IF SY-SUBRC = 0.

WA_FINAL-KWERT1 = WA_EKBE1F-DMBTR.

ENDIF.

ELSEIF WA_FINAL-WEBRE = SPACE..

REFRESH IT_EKBET.

REFRESH IT_EKBETF.

SELECT EBELN

EBELP

VGABE

GJAHR

BELNR

BEWTP

BWART

BUDAT

MENGE

DMBTR

SHKZG

LFBNR

MATNR

WERKS

CHARG

INTO TABLE IT_EKBET

FROM EKBE

WHERE EBELN = WA_FINAL-EBELN AND

EBELP = WA_FINAL-EBELP AND

VGABE in ('2', '3') .

SORT IT_EKBET ASCENDING BY EBELN EBELP VGABE BWART .

LOOP AT IT_EKBET INTO WA_EKBET.

IF WA_EKBET-SHKZG = 'H'.

WA_EKBET-MENGE = ( 0 - WA_EKBET-MENGE ).

WA_EKBET-DMBTR = ( 0 - WA_EKBET-DMBTR ).

ENDIF.

MODIFY IT_EKBET FROM WA_EKBET INDEX SY-TABIX.

ENDLOOP.

SORT IT_EKBET BY EBELN EBELP VGABE BWART .

LOOP AT IT_EKBET INTO WA_EKBET.

AT END OF EBELP.

SUM.

APPEND WA_EKBET TO IT_EKBETF.

CLEAR : WA_EKBET.

ENDAT.

ENDLOOP.

READ TABLE IT_EKBETF INTO WA_EKBETF

WITH KEY EBELN = WA_FINAL-EBELN

EBELP = WA_FINAL-EBELP BINARY SEARCH.

IF SY-SUBRC = 0.

WA_FINAL-KWERT1 = WA_EKBETF-DMBTR.

ENDIF.

}

0 Kudos

hi,

where have you selected data for vendor depending on the value of your select option,

regards,

sakshi

Former Member
0 Kudos

Check whether you have used Paramter/Select-option.

It makes a differnce when used in select query.

If parameter is used, when it is not filled it will search for Vendor = blank.

Reply me back with the query.

0 Kudos

I have used select option only not parameter

0 Kudos

Vendors have the conversion exits associated. If the vendor starts with a number or is numeric, you have to use the conversion exit. You might be lucky if its alpha numeric.

Vikranth

0 Kudos

Hi Judith,

I couldn't resist the temptation of asking you. Were you my onsite team lead in any one of the projects in the past organizations ? Sorry if thats not you !!

Vikranth

0 Kudos

Hi,

No i am not.

My vendor is IO0000026

Still i need to use conversion exits???

Because i dont have the problem of inserting zeros.....

0 Kudos

Hi,

No i am not.

My vendor is IO0000026

Still i need to use conversion exits???

Because i dont have the problem of inserting zeros.....

0 Kudos

Hello,

I dont think its a problem with the conversion exits as you are able to display all the vendors, where as you wont get any vendor if its a problem with conversion exits

Please post your code in a readable format with proper tags to check your program.

Vikranth

0 Kudos

Pls tell me how to post the code in readable format

former_member1245113
Active Contributor
0 Kudos

Hi Deepthi,

You need to use Fm CONVERSION_EXIT_ALPHA_INPUT to convert so that correct data gets picked.

if above doesnt work use / CONVERSION_EXIT_ALPHA_OUTPUT

For Example p_lifnr values is '0000012345' then you will get correct value on the other hand

if you enter p_lifnr value as '12345' then at the data element level there is ALFA function module provided for this, explcit conversion is required for this to convert it to '0000012345'.

This is the case with many Data Elements like AUFNR etc Just double click the Domain you can find this info at Definition Level,

Hope this serves your purpose.

Cheerz

Ram

0 Kudos

My problem is not with zeros.....

Vendor is IO0000026

Along with that what all the vendors are present i mean depending on other fields given in selection screen are displaying........

I wanted specifically only vendor details given in selection screen......but alll are displaying

0 Kudos

Hello Deepthi,

As you might be aware that we have a limitation on the maximum number of characters in the block. Either post the relevant section of the code or split it across multiple posts.

The code you have pasted is unreadable.

BR,

Suhas