cancel
Showing results for 
Search instead for 
Did you mean: 

Sapscript Form closes prematurely

Former Member
0 Kudos

I copied and edited standard form PM_COMMON to accomodate requirement for custom Job Ticket.

However, when I set that in OIDF, the Job Ticket print fails (print or print preview).

I traced the problem to the standard program RIPRJT00.

it enters FORM print_paper, then to FORM main_print. Below is its source code


FORM main_print.
*... Workpaper is controlled at a HEADER LEVEL  (ORDERS)
*... Brief details from Order, detail opertion information
  PERFORM set_gv_arc_type_aufk USING caufvd-auart.          "n766146
*... and materials needed in Operation are listed
* start of node 766146:
* PERFORM OPEN_FORM  USING C_ARC_TYPE_AUFK "Archive link for order.
  PERFORM open_form  USING gv_arc_type_aufk "Archive link for order
* end of node 766146
                           caufvd-aufnr" order obj number as key
                           ' '.        " New form for each Order

" ... removed fragments for conciseness


  PERFORM operations_with_mat. " reservations are printed with Op.
  PERFORM end_of_report.               " Print end of report line
  PERFORM close_form.                  " Close the form.
  PERFORM unlock_and_log.              " Dequeue and Log print
ENDFORM.                    "MAIN_PRINT

Then it enters FORM operations_with_mat, then a call to function module WRITE_FORM. It fails in line 40 of the FM WRITE_FORM where it checks if the form is closed


40  if rstxc-tdclose = true.
41    call function 'SAPSCRIPT_MESSAGE_DEF'
42         exporting no = 443
43                   v1 = 'WRITE_FORM'.
44    perform exception.
45    message a443 with 'WRITE_FORM' raising unstarted.
46  endif.

I don't know how, but PERFORM operations_with_mat is between PERFORM open_form and PERFORM close_form.

Do you know any reasons why rstxc-tdclose would set to 'X'?

Edited by: Kyle Domingo on Mar 17, 2010 9:47 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member200754
Participant
0 Kudos

Did you problem ??

I got the same error. , please share if you done.

Thanks

TaiVo

Former Member
0 Kudos

not solved. marking as "answered" to be able to post other questions. thanks!

Former Member
0 Kudos

Hi

Did you adjust the window size after copying the standard script?? This seems to be an issue with formatting. So, check the formatting is perfect. Check If the window size is not more than size of the page,also check for overflow.

Also check,If there is any error in the script.

Vishwa.