Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

new sapscript for VT02N

former_member182371
Active Contributor
0 Likes
1,043

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
921

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,

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

5 REPLIES 5
Read only

Former Member
0 Likes
922

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

Read only

former_member182371
Active Contributor
0 Likes
921

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.

Read only

0 Likes
921

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

Read only

former_member182371
Active Contributor
0 Likes
921

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

Read only

former_member182371
Active Contributor
0 Likes
921

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.