cancel
Showing results for 
Search instead for 
Did you mean: 

Getting details like PO No., GRN No. by giving invoice number

Former Member
0 Kudos

Hi ABAP guru's,

I am a new member of this community. I have been asked to design a layout for printing Vendor Invoice using SapScript. Their requirement is that if they provide invoce number in the input box they should get the following details on the form.

details :

1) Invoice no. 2) Invoice document No. 3) GR No. 4) PO No. 5) PO date

6) Vendor invoice date .

Please,

I need your help for accomplishing the above task. I am using my own print program.I need the code to display the above items on the forms.

Plz help me. It is urgent.

thanks,

Salman

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Yes, it is possible to do... Try to do your coding and consult us if you got stuck anywhere. We will try to help you out.

Good Luck!!

Reward for my time..

Regards,

Sai

Answers (3)

Answers (3)

Former Member
0 Kudos

HI ANJI,

Let me explain you in steps.We run transaction mir4 and give the ivoice no and press enter. Then we press the button with text " follow on document" then a small window opens with the title " documents in accounting". There the number (10 digit number) just below the "doc.number" heading is required.

thanks.

Salman.

Former Member
0 Kudos

HI ANJI,

I HAVE GOT THE FIELDS FOR GRNo, PO , ETC. BUT I WAS STUCK IN THE INVOICE DOCUMENT NO. (DOCNR) I AM NOT ABLE TO GET THE CORRECT TABLE TO ESTABLISH RELATION BETWEEN INVOICE NO AND INVOICE DOCUMENT NO (DOCNR). PLZ HELP.

TAHNKS,

SALMAN.

Former Member
0 Kudos

Hi

With respect to What functionality you need this Invoice Doc No?

I mean with respect to profict center accounting or w.r.t to some other area in FI-CO ?

any how check the tables which are linked with EBELN and EBLP fields for the DOCNR in the following tables

JVP01

GLPCA

GLSPC

or do one thing

enter the data element DOCNR in SE11 and use where used list in Tables

in that list search one by one where you get related data for EBELN and EBELP fields

Or if little more functionality is known it is easy to find the correct table.

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

Hi

Use the Vendor Invoice Tables <b>RBKP (header) RSEG (item)</b> for your requirement

take ESEG-BELNR as selection screen field

And you will get the entire data by joining these two tables like Vendor(LIFNR), Inv Number(BELNR),POno(EBELN), Item no(EBELP), Invoice date(RBKP-BUDAT)etc

Take the PO date from EKKO/EKPO tables using above PO no and Item no

and similarly pass the above RSEG- EBELN and EBELP fields to MSEG and Take the GR no and its details

It is easy to fetch the above data

1.Join RBKP and RSEG data and fetch into ITAB

2.for all entries in ITAB fetch data from EKKO and EKPO tables into ITAB1

3. Fora llentries of ITAB1 fetch data from MSEG table

and design the script/smartform and display above fields data

<b>Reward points for useful Answers</b>

Regards

Anji