2007 Jan 18 8:19 AM
Hi,
the print program i´using is Z_RVADRT01 (copy of RVADTR01)
and the sapscript form is Z_SD_SHIPMENT (copy of SD_SHIPMENT).
In the Z print program i use the following code to get the simulated
price:
CALL FUNCTION 'SD_SCD_COST_INFO_SHIPMENT'
EXPORTING
i_shipment_data = l_shipment_data
i_opt_dialog = false
I_OPT_BATCH_MODE = 'X'
i_opt_sim = 3
IMPORTING
E_RESULT = l_result
E_RESULT_WAERS = l_result_waers
E_ERRORS_OCCURED = l_errors_occurred.
Note here that we´re in batch mode(I_OPT_BATCH_MODE = 'X')
In IMG i believe i´ve assigned correctly the message class
to the print program, routine and sapscript form.
When i display a message already created there´s no problem ...
but when i use transaction VT02N and generate a new message by
saving, the flow of the program does not pass through
Z print program thus losing the data i´m interested in.
Why is this happening?
Best regards.
2007 Jan 18 8:26 AM
Hi,
DId you change the Form name in NACE?
Probably you forgot to change the Z form name in NACE and it holds the standard form still.
Regards
Subramanian
Hi,
the print program i´using is Z_RVADRT01 (copy of RVADTR01)
and the sapscript form is Z_SD_SHIPMENT (copy of SD_SHIPMENT).
In the Z print program i use the following code to get the simulated
price:
CALL FUNCTION 'SD_SCD_COST_INFO_SHIPMENT'
EXPORTING
i_shipment_data = l_shipment_data
i_opt_dialog = false
I_OPT_BATCH_MODE = 'X'
i_opt_sim = 3
IMPORTING
E_RESULT = l_result
E_RESULT_WAERS = l_result_waers
E_ERRORS_OCCURED = l_errors_occurred.
Note here that we´re in batch mode(I_OPT_BATCH_MODE = 'X')
In IMG i believe i´ve assigned correctly the message class
to the print program, routine and sapscript form.
When i display a message already created there´s no problem ...
but when i use transaction VT02N and generate a new message by
saving, the flow of the program does not pass through
Z print program thus losing the data i´m interested in.
Why is this happening?
Best regards.
2007 Jan 18 8:26 AM
Hi,
DId you change the Form name in NACE?
Probably you forgot to change the Z form name in NACE and it holds the standard form still.
Regards
Subramanian
2007 Jan 18 8:35 AM
Hi,
ive checked it and the form name in NACE it´sOK.
When i save in a new message in VT02N flow of the
program passes through and SAPDV70A and SAPMV56A.
Best regards.
2007 Jan 18 8:50 AM
Hi,
in program Z_RVADRT01, in the entry routine defined in NACE, add this:
data:
wait type flag value 'X'.
while wait is not initial.
endwhile.
Save document to create message. Transaction SM50 should show the process for Z_RVADRT01. Put program into debug mode from SM50. Clear field wait and step through code to see what's happening.
If you don't see the process, something may be wrong with NACE.
Regards,
Clemens
2007 Jan 18 8:58 AM
Hi,
when i click save for creating a new message in VT02N i´m in a update task (LUW).
in the flow of the print program i use the following fm:
CALL FUNCTION 'SD_SCD_COST_INFO_SHIPMENT'
EXPORTING
i_shipment_data = l_shipment_data
i_opt_dialog = false
I_OPT_BATCH_MODE = 'X'
i_opt_sim = 3
IMPORTING
E_RESULT = l_result
E_RESULT_WAERS = l_result_waers
E_ERRORS_OCCURED = l_errors_occurred.
This fm creates a new update task (LUW).
is this the reason for my not being able to debugg the print program?
Best regards
2007 Jan 18 9:10 AM
Hi Clemens,
thanks for the tip.
<u>The problem lies in here</u>:
<b>PERFORM SCD_COST_INFO_INTERFACE_FILL in program SAPMV56A
USING vttkvb-tknum
CHANGING l_shipment_data</b>.
CALL FUNCTION 'SD_SCD_COST_INFO_SHIPMENT'
EXPORTING
i_shipment_data = l_shipment_data
i_opt_dialog = false
I_OPT_BATCH_MODE = 'X'
i_opt_sim = 3
IMPORTING
E_RESULT = l_result
E_RESULT_WAERS = l_result_waers
E_ERRORS_OCCURED = l_errors_occurred.
The flow of the program passes through the Z print program but the sentence
<b>PERFORM SCD_COST_INFO_INTERFACE_FILL ....</b>
<u>does not populate "l_shipment_data".</u>
Why does it work for display sapscript from screen but not when i save a new message?
Best regards.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |