2005 Aug 25 8:48 AM
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
2005 Aug 25 9:48 AM
You can use the FM RV_MESSAGE_DIALOG, it's the same fm called by VF02/3
2005 Aug 25 9:26 AM
2005 Aug 25 9:42 AM
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
2005 Aug 25 9:48 AM
You can use the FM RV_MESSAGE_DIALOG, it's the same fm called by VF02/3
2005 Aug 25 11:11 AM