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: 

extracting spool no in ME21N

former_member216668
Participant
0 Kudos

Hi Guys,

I have a requirement of saving a PO as a pdf locally while it is created and being saved, i used the BADI ME_PURCHDOC_POSTED and method POSTED to achieve this.

But when i open the PDF , i find that it saves the PO which was created earlier. Like for example PO421 is saved while 422 is created, This is due to the spool number in TSP01 is not updated till this save action is over. so it is picking up the last spool no and converting it into PDF.

I need to eliminate this and i need to know if i can find a spool no before it is updated in TSP01 or is their any other BADI which runs right immediately after the save option so that i can take the latest spool no.

All suggestions are greatly appreciated and rewarded.

Regards,

K

3 REPLIES 3

former_member223537
Active Contributor
0 Kudos

Hi Ken,

Please check BADI ME_PROCESS_PO_CUST & method CLOSE.

Best regards,

Prashant

Former Member
0 Kudos

Hi Ken,

How are you creating the spool?

I'm assuming it is created via a smartform/sapscript program associated with an output type?

If that is the case you could perform your PDF processing within the program associated with the output type. The spool id is returned to you when you call a smartform in the job_output_info parameter.

Is that of any help or are you creating the spool via another means?

Regards,

Darren

0 Kudos

Hi Daren.

Where do I find this program?

Is the "form entry" program?

I get the spool in the TS01?

tks