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: 

regarding invoice

Former Member
0 Kudos

Hi,

In my scenario,

in first radiobutton.

1.i want the details of GR and INVOICE processed.

the o/p are

a.GR document number

b.GR date

c.GR quantity

d.Delivery note

e.INVOICE document number

f.INVOICE date

g.INVOICE quantity.

in second radiobutton.

2.I want the detail of GR processed but INVOICE not processed.

a.GR document number

b.GR date

c.GR quantity

d.Delivery note

I GOT THE OUTPUT OF FIRST RADIOBUTTON.

BUT FOR SECOND RADIOBUTTON I DIDNT GET THE OUTPUT.PLS HELP ME FOR THE CONDITION.

FOR INVOICE I TOOK RSEG AND RBKP TABLE

1 ACCEPTED SOLUTION

Former Member
0 Kudos

can u show the purticular code for it. so that it will provide the more clear picture of it.

7 REPLIES 7

Former Member
0 Kudos

can u show the purticular code for it. so that it will provide the more clear picture of it.

0 Kudos

This is the coding for both gr and invoice processed.

but i want invoice not processed but gr processed

DATA BKTXT(12).

SELECT * FROM ZGATEP INTO CORRESPONDING FIELDS OF TABLE ITAB2

WHERE ZDATE IN ZDATE

AND WERKS IN WERKS

AND GTEN IN GTEN.

LOOP AT ITAB2.

CLEAR BKTXT.

MOVE ITAB2-GTEN TO BKTXT.

SHIFT BKTXT LEFT DELETING LEADING '0'.

SELECT * FROM MKPF WHERE BKTXT = BKTXT.

  • AND BUDAT = ITAB1-DDATE.

IF SY-SUBRC EQ '0'.

SELECT * FROM MSEG WHERE WERKS IN WERKS

AND MBLNR = MKPF-MBLNR

AND MJAHR = MKPF-MJAHR

AND LIFNR = ITAB2-LIFNR

AND SHKZG = 'S'

AND BWART = '101'.

IF SY-SUBRC = '0'.

SELECT SINGLE * FROM RSEG WHERE EBELN = ITAB2-EBELN.

IF SY-SUBRC EQ '0'.

MOVE MKPF-MBLNR TO ITAB2-MBLNR.

MOVE MKPF-MJAHR TO ITAB2-MJAHR.

MOVE MKPF-XBLNR TO ITAB2-XBLNR.

MOVE RSEG-BELNR TO ITAB2-BELNR.

MOVE RSEG-BPMNG TO ITAB2-BPMNG.

ITAB2-BUKRS = MSEG-BUKRS.

ITAB2-WERKS = MSEG-WERKS.

ITAB2-BSTMG = MSEG-BSTMG.

ITAB2-MEINS = MSEG-MEINS.

ITAB2-EBELN = MSEG-EBELN.

MODIFY ITAB2.

MOVE-CORRESPONDING ITAB2 TO ITAB.

MOVE ITAB2-GTEN TO ITAB3-GTEN.

APPEND ITAB.

APPEND ITAB3.

CLEAR ITAB.

ENDIF.

ENDIF.

ENDSELECT.

ENDIF.

ENDSELECT.

ENDLOOP.

LOOP AT ITAB.

SELECT SINGLE BLDAT FROM RBKP INTO ITAB-BLDAT WHERE BELNR = ITAB-BELNR.

MODIFY ITAB.

ENDLOOP.

0 Kudos

Hi,

Try using the table EKBE where

1. VGABE = 1 : GR, BELNR = GR no, BWART = 101

2. VGABE = 2 : Invoice. BELNR = Invoice no. LFBNR = GR no.

It may help u....

0 Kudos

Hi,

Try to use the field from RSEG table having 2 fields :-

XRUEB(Indicator: Document is posted to a previous period) and WEREC(Clearing Indicator for GR/IR Posting for External Services)

and try to have the Purchase Order noo.. from the flow mention by Sukriti through EKBE Table.

Try to use select fields form the tables like MSEG,RSEG,RPKB as these are qutie heavy tables and they use to get fill with large amount on daliy basis which will lead to performance problem .

If u find any problem feel free to ask. i hope this will help u out.

Edited by: ricx .s on Mar 26, 2009 5:57 AM

0 Kudos

Hi,

i want that in which po the invoice is not procesed.

0 Kudos

select from EKBE where EKBE-EBELN = PO

and EKBE-EBELP = PO item

and EKBE-VGABE = 2

if not found then no invoice has been made for that PO item

0 Kudos

Hi,

yeah take that PO along with Belnr having 02 and check it further to Rseg for further details.is dere any doubt u have ,then do tell about it.