on 08-06-2008 6:37 AM
Hi,
I have a requirement like if there is already an entry in NAST table with o/p type ZURD and printer name USJC-PM03,then an error message has to be displayed like 'This Output already printed in USJC-PM03,Change the printer name 'USJC-PM03' to 'LOCL' and then print' on the vf03 screen.
But even if I change the printer name from 'USJC-PM03' to 'LOCL',it is showing the same error message.This message should not be shown.
I have used the following code in the program.
lf_formname = tnapr-sform.
determine print data
PERFORM set_print_data_to_read USING lf_formname
CHANGING ls_print_data_to_read
cf_retcode.
IF cf_retcode = 0.
select print data
PERFORM get_data USING ls_print_data_to_read
CHANGING ls_addr_key
ls_dlv-land
ls_bil_invoice
cf_retcode.
ENDIF.
IF sy-tcode = C_VF03.
SELECT SINGLE * FROM tnapr WHERE kschl = 'ZURD'
AND nacha = 1
AND kappl = 'V3'.
SELECT count(*)
FROM NAST
INTO lv_count
WHERE objky = ls_bil_invoice-hd_gen-bil_number
AND kappl = c_v3
AND kschl = c_ZURD
AND ldest = c_PM03.
IF LV_COUNT GE 1.
Message e000(zup) with text-001 text-002 text-003.
ELSE.
determine smartform function module for invoice
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING formname = lf_formname
variant = ' '
direct_call = ' '
IMPORTING fm_name = lf_fm_name
EXCEPTIONS no_form = 1
no_function_module = 2
OTHERS = 3.
call smartform invoice
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_appl_obj =
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
user_settings = space
is_bil_invoice = ls_bil_invoice
is_nast = nast
is_repeat = repeat
importing document_output_info =
*Uncomented the line to get the spool id or OTF formatted data -
*NY047532
IMPORTING
job_output_info = w_job
NY047532
job_output_options =
EXCEPTIONS formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
ENDIF.
ENDIF.
When should be done for the error message not to be shown when the printer name is 'LOCL'.
Hi,
I have changed the printer name to LOCL using print options tab from the pop up shown in vf03 transaction.But even then it is showing the error message.This message should not be shown anymore.Is there any other way to change the printer name?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here my requirement is first the user has to check the nast table if there is any entry with o/p type ZURD and printer 'USJC-PM03' .If there is an entry then an error message 'This Output already printed in USJC-PM03,Change the printer name 'USJC-PM03' to 'LOCL' and then print' has to be displayed.
Then if i close this popup window which is showing error message and change the printer name from 'USJC-PM03' to 'LOCL', and click on execute button,the printer name is not getting changed and still the error message is getting displayed.How to remove this error message?
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.