Skip to Content
0
Former Member
Nov 29, 2005 at 10:52 PM

function 'ME_PRINT_PO' - Can you get the Spool No ?

412 Views

Hi,

I have the report shown below , which is used to Print a purchase document, but I also need access to the Spool no, which it echoes as a message, is there a way to get it back in my program.

TYPES:

*- Tabelle der Aenderungsbescheibungen -


*

BEGIN OF meein_XAEND.

include structure cdshw.

types: EBELP LIKE EKPO-EBELP,

ZEKKN LIKE EKKN-ZEKKN,

ETENR LIKE EKET-ETENR,

CTXNR LIKE T166C-CTXNR,

ROUNR LIKE T166C-ROUNR,

INSERT,

FLAG_ADRNR,

END OF meein_XAEND,

*- Tabelle der Textänderungen -


*

BEGIN OF meein_XAETX,

EBELP LIKE EKPO-EBELP,

TEXTART LIKE CDSHW-TEXTART,

CHNGIND LIKE CDSHW-CHNGIND,

END OF meein_XAETX.

types: meein_xaend_itab type meein_xaend occurs 0.

*----


*

*- Interface of printing modules

*----


*

types: BEGIN OF MEEIN_PURCHASE_DOC_PRINT,

XEKKO LIKE EKKO,

XPEKKO LIKE PEKKO,

XEKPA like msgpa occurs 0,

XEKPO LIKE EKPO OCCURS 0,

XPEKPO LIKE PEKPO OCCURS 0,

XEKET LIKE EKET OCCURS 0,

Xekkn like ekkn occurs 0,

Xekek like ekek occurs 0,

Xekeh like ekeh occurs 0,

XAEND type meein_xaend occurs 0,

xtkomv type komv occurs 0,

  • XAETX TYPE MEEIN_xaetx occurs 0,

END OF MEEIN_PURCHASE_DOC_PRINT.

data: l_druvo like t166k-druvo,

l_nast like nast,

l_from_memory,

l_doc type meein_purchase_doc_print,

p_nast TYPE nast,

ent_retco type sysubrc,

ent_screen type char1.

TABLES: NAST, "Messages

*NAST, "Messages

TNAPR, "Programs & Forms

  • ITCPO, "Communicationarea for Spool

ARC_PARAMS, "Archive parameters

TOA_DARA. "Archive parameters

  • ADDR_KEY. "Adressnumber for ADDRESS

  • clear ent_retco.

p_nast-mandt = 800.

p_nast-kappl = 'EF'.

p_nast-objky = '4500006302'.

p_nast-kschl = 'NEU'.

p_nast-spras = 'E'.

p_nast-parnr = '0000001000'.

p_nast-parvw = 'LF'.

p_nast-erdat = '20050228'.

p_nast-eruhr = 212836.

p_nast-adrnr = ''.

p_nast-nacha = '1'.

p_nast-anzal = 1.

p_nast-vsztp = '4'.

p_nast-vsdat = ''.

p_nast-vsura = ''.

p_nast-vsurb = ''.

p_nast-manue = 'X'.

p_nast-datvr = ''.

p_nast-uhrvr = ''.

p_nast-datre = ''.

p_nast-usnam = 'STHAKER'.

p_nast-vstat = '1'.

p_nast-aktiv = ''.

p_nast-tcode = ''.

p_nast-ldest = 'LOCL'.

p_nast-dsnam = ''.

p_nast-dsuf1 = ''.

p_nast-dsuf2 = ''.

p_nast-dimme = 'X'.

p_nast-delet = ''. " ST WAS X 29/11/05

p_nast-telfx = ''.

p_nast-telx1 = ''.

p_nast-teltx = ''.

p_nast-aende = ''.

p_nast-repet = ''.

p_nast-repid = ''.

p_nast-pfld1 = ''.

p_nast-pfld2 = ''.

p_nast-pfld3 = ''.

p_nast-pfld4 = ''.

p_nast-pfld5 = ''.

p_nast-pmid1 = ''.

p_nast-pmid2 = ''.

p_nast-pmid3 = ''.

p_nast-pmid4 = ''.

p_nast-pmid5 = ''.

p_nast-tdname = ''.

p_nast-tdid = ''.

p_nast-tdspras = ''.

p_nast-edikey = ''.

p_nast-editrans = ''.

p_nast-snddr = ''.

p_nast-sndex = ''.

p_nast-sndcp = ''.

p_nast-sndbc = ''.

p_nast-forfb = ''.

p_nast-prifb = ''.

p_nast-acall = ''.

p_nast-objac = ''.

p_nast-objrr = ''.

p_nast-objrn = ''.

p_nast-outfl = ''.

p_nast-objsns = ''.

p_nast-objpri = ''.

p_nast-objcp = ''.

p_nast-nauto = 'X'.

p_nast-tdreceiver = 'STHAKER'.

p_nast-tddivision = ''.

p_nast-tdocover = ''.

p_nast-tdcovtitle = 'L'.

p_nast-tdautority = ''.

p_nast-tdarmod = '1'.

p_nast-optarcnr = ''.

p_nast-cmfpnr = ''.

p_nast-usrnam = ''.

p_nast-event = ''.

p_nast-sort1 = ''.

p_nast-sort2 = ''.

p_nast-sort3 = ''.

p_nast-objtype = 'BUS2012'.

p_nast-tdschedule = ''.

p_nast-tland = ''.

if p_nast-aende eq space.

l_druvo = '1'.

else.

l_druvo = '2'.

endif.

nast = p_nast.

call function 'ME_READ_PO_FOR_PRINTING'

exporting

ix_nast = nast

ix_screen = ent_screen

importing

ex_retco = ent_retco

ex_nast = l_nast

doc = l_doc

changing

cx_druvo = l_druvo

cx_from_memory = l_from_memory.

check ent_retco eq 0.

call function 'ME_PRINT_PO'

exporting

ix_nast = l_nast

ix_druvo = l_druvo

doc = l_doc

ix_screen = ent_screen

ix_from_memory = l_from_memory

ix_toa_dara = toa_dara

ix_arc_params = arc_params

ix_fonam = tnapr-fonam "HW 214570

importing

ex_retco = ent_retco.