Quantcast
Channel: SCN : All Content - Output Management
Viewing all articles
Browse latest Browse all 1353

Sapscript Form closes prematurely

$
0
0

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


Viewing all articles
Browse latest Browse all 1353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>