cancel
Showing results for 
Search instead for 
Did you mean: 

Error 101 using fp_job_open, fp_job_close in a function module

Former Member
0 Kudos

I have earlier made a program generating a pdf used for printing. Used fp_job_open -> Call function xxx -> fp_job_close. This program works fine.

Now I want to make a function module to generate this pdf for higher reusability, but when I call my generated FM its return sy-subrc = 1, sy-msgno = 101, sy-msgid = fprunx. This error means "Job already open".

I tried to comment out the call to the fp_job_open and fp_job_close, but then I have no possibility to mark the ls_outputparams-getpdf = 'X' and ls_outputparams-nodialog = 'X'.

Any ideas anyone?

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos

Do you try to merge several forms in one PDF?

You must use this sequence without any possible change (doesn't work like SAPscript forms and Smart Forms):

1) FP_FUNCTION_MODULE_NAME to retrieve xxxx function module name

2) FP_JOB_OPEN

3) xxxx

4) FP_JOB_CLOSE

You cannot call xxxx several times between open and close.

Make sure the previous FP_JOB_CLOSE was successful.

Former Member
0 Kudos

Thanks for answer Sandra, but:

No, I dont try to merge severeals pdf.

I used the sequence as you suggested. This works fine when used in a program, but when I copy the code inside a function module this error is generated.

Edited by: Dag-Egil Bull Sletholt on Jan 10, 2010 5:05 PM

Sandra_Rossi
Active Contributor
0 Kudos

Could you log out and log in, and tell us whether the error happens again the first time?

Do you use SE37 for testing? Then see Note 858325 - Message "Job already started" when you display PDF forms

Answers (2)

Answers (2)

kesavadas_thekkillath
Active Contributor
0 Kudos

Please check this link

Former Member
0 Kudos

Thanks! I think the note 858325 describe my problem. I will check it out immediate.

Sandra_Rossi
Active Contributor
0 Kudos

Good. Next time, please search SAP notes and forum (I found it easily, it was the only note with "FPRUNX 101"). We assume that you searched (as explained in forum rules).

Former Member
0 Kudos

I guess i am guilty. Sorry! (I did search a lot, but not with the keyword fprunx, but I should)

Sandra_Rossi
Active Contributor
0 Kudos

The guilt goes first to my temper...

Former Member
0 Kudos

No problem.

And I can confirm that the procedure described in the note did solve my problem. Now I am able to generate a pdf inside the function module as I wanted. A small program thats call the FM is the solution for test case.

kesavadas_thekkillath
Active Contributor
0 Kudos

PLease Ignore .

Edited by: Keshav.T on Jan 10, 2010 9:39 PM