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: 

Preview invoice in ABAPcode

0 Kudos
622

Hi,

In a report we can click on a invoicenumber(SD) (hotspot) which leads us to tcode VF03-Display billing document. This is quite simple en works ofcourse fine.

However the requirement is not to show VF03 but to display the invoice in print-preview mode. In VF03 we can do this through menu: issue output to - screen.

Is it possible to ABAP (function module perhaps) to show invoice directly in printpreviewmode.

Bert

1 ACCEPTED SOLUTION

Former Member
0 Kudos
224

You can use the FM RV_MESSAGE_DIALOG, it's the same fm called by VF02/3

4 REPLIES 4

Former Member
0 Kudos
224

Hi Bert,

did you try this with BDCs.

Deepak

Former Member
0 Kudos
224

Hi Bert,

Get the entry for the table NAST for your selected invoice #. Now call the sub routine EINZELNACHRICHT_SCREEN from the program RSNAST00 to show the print preview of the invioce.

Here is the sample code. I have hardcoded some values (invoice #/Output type/Partner type/Partner# --> These entries should be from the NAST table).

REPORT ZZEXCEL.

TABLES : NAST.

DATA L_RCOD TYPE SY-SUBRC.

SELECT SINGLE * FROM NAST WHERE

KAPPL = 'V3' AND

OBJKY = '0090000001' AND

KSCHL = 'RD00' AND

SPRAS = 'E' AND

PARNR = '0001000001' AND

PARVW = 'RE' AND

ERDAT = '20030414' AND

ERUHR = '173509'.

NAST-TDARMOD = '1'.

PERFORM EINZELNACHRICHT_SCREEN(RSNAST00) USING L_RCOD.

WRITE: L_RCOD.

LEt me know , if u need any clearifications.

Best Regards,

Vijay

Former Member
0 Kudos
225

You can use the FM RV_MESSAGE_DIALOG, it's the same fm called by VF02/3

0 Kudos
224

Thanks a lot for your answers. Saved me a lot of time !