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

Help with vt02

Former Member
0 Likes
2,607

Hi experts,

I am trying to update shipment in vt02 with events, but getting the message 'VT02 is old!' and hence not able to update it.

Can anybody throw some input on this on how to update shipment through vt02 transaction (or any other transaction)?

That will be really helpful!

Thank you.

Message was edited by:

Krishen

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,309

Hi Krishen,

As Rob's suggested, it is missing ok code for save.

Try to add this.

...

perform bdc_field using 'BDC_OKCODE' 'SICH'.

perform bdc_transaction using 'VT02'.

or

...

perform bdc_field using 'BDC_OKCODE' 'MM_SICH'.

perform bdc_transaction using 'VT02'.

Regards,

Ferry Lianto

20 REPLIES 20
Read only

Former Member
0 Likes
2,309

Check my answer in your other post.

If you are going with this post, then please close the other one.

rob

Read only

Former Member
0 Likes
2,309

Hi Krishen,

Please try this FM SD_SHIPMENTS_SAVE which used to save shipment in VT02/VT02N.

Regards,

Ferry Lianto

Read only

0 Likes
2,309

Hi Ferry,

thanks for your input.

Rob's response seem to already solved the problem!

kind regards

Read only

0 Likes
2,309

I tried BDC recording. But even in it, it is till not saving it !!

Is there anyway we can force it to save it?

Thanks.

Read only

0 Likes
2,309

I think it would be best if you posted the code you generated.

Rob

Read only

0 Likes
2,309

Hi Rob!

This is what I generated from the recording after I saved the shipment in vt02. Looks like even BDC is not caring about saving it!

report ZTEST

no standard page heading line-size 255.

include bdcrecx1.

start-of-selection.

perform open_group.

perform bdc_dynpro using 'SAPMV56A' '0011'.

perform bdc_field using 'BDC_CURSOR'

'VTTK-TKNUM'.

perform bdc_field using 'BDC_OKCODE'

'=UETP'.

perform bdc_field using 'VTTK-TKNUM'

'400000231'.

perform bdc_dynpro using 'SAPMSSY0' '0120'.

perform bdc_field using 'BDC_OKCODE'

'=TKTE'.

perform bdc_dynpro using 'SAPLV51T' '0300'.

perform bdc_field using 'BDC_OKCODE'

'=SICH'.

perform bdc_field using 'BDC_CURSOR'

'ITSEGDIAE-TIME_TST03(05)'.

perform bdc_field using 'ITSEGDIAE-TIME_TST03(05)'

'01/15/2007 00:00'.

perform bdc_transaction using 'VT02'.

perform close_group.

Thank you,

Kind regards

Read only

0 Likes
2,309

It doesn't look as if you are pressing the "SAVE" button. Are you?

Rob

Read only

0 Likes
2,309

I am pressing it. But it is not recording that part I guess.

Thanks.

Read only

0 Likes
2,309

Try adding it to the generated code.

Rob

Read only

0 Likes
2,309

Probably by doing something like:


perform bdc_field using 'BDC_OKCODE' '/11'.

Rob

Read only

Former Member
0 Likes
2,310

Hi Krishen,

As Rob's suggested, it is missing ok code for save.

Try to add this.

...

perform bdc_field using 'BDC_OKCODE' 'SICH'.

perform bdc_transaction using 'VT02'.

or

...

perform bdc_field using 'BDC_OKCODE' 'MM_SICH'.

perform bdc_transaction using 'VT02'.

Regards,

Ferry Lianto

Read only

0 Likes
2,309

Nope friends, its not working. I tried adding, but it is neglecting that.

Regards.

Read only

0 Likes
2,309

Try changing the last few lines:


perform bdc_dynpro using 'SAPLV51T' '0300'.
perform bdc_field  using 'BDC_CURSOR' 'ITSEGDIAE-TIME_TST03(05)'.
perform bdc_field  using 'ITSEGDIAE-TIME_TST03(05)' '01/15/2007 00:00'.
perform bdc_field  using 'BDC_OKCODE' '/11'.
perform bdc_transaction using 'VT02'.

Rob

Read only

0 Likes
2,309

Tried it. But it does n't seem to work.

Thank you.

Read only

0 Likes
2,309

Are you getting any sort of message?

Rob

Read only

0 Likes
2,309

I was going in mode 'A' and debugging...

After the bdc, it says status message 'savings not necessary, no changes are made'.

Thanks.

Read only

0 Likes
2,309

Well, I've seen this before; you are changing a shipment. If you don't make any changes, it won't save. Make sure one of your fields you are changing is different from the value on the database.

So I think this means that your code is actually working.

Rob

Message was edited by:

Rob Burbank

Read only

0 Likes
2,309

The transactions VT01, VT02, and VT03 are old and have been replaced with new transactions VT01n, VT02n, and VT03n as of Release 4.6A.

Only use VT01, VT02 and VT03 for batch input.

Read only

Former Member
0 Likes
2,309

Hi Krishen,

Please check this sample codes and it works.


  ...

  PERFORM BDC_DYNPRO USING 'SAPMV56A'   '0011'.
  PERFORM BDC_FIELD  USING 'BDC_CURSOR' 'VTTK-TKNUM'.
  PERFORM BDC_FIELD  USING 'BDC_OKCODE' '=UETP'.
  PERFORM BDC_FIELD  USING 'VTTK-TKNUM' '1047'.

  PERFORM BDC_DYNPRO USING 'SAPMSSY0'   '0120'.
  PERFORM BDC_FIELD  USING 'BDC_OKCODE' '=TKTE'.
                                                                        
  PERFORM BDC_DYNPRO USING 'SAPLV51T'   '0300'.
  PERFORM BDC_FIELD  USING 'BDC_OKCODE' '=%INS'.
  PERFORM BDC_FIELD  USING 'BDC_CURSOR' 'ITSEGDIAE-EVEN_TXT(01)'.
                                                                        
  PERFORM BDC_DYNPRO USING 'SAPMSSY0'   '0120'.
  PERFORM BDC_FIELD  USING 'BDC_CURSOR' '04/08'.
  PERFORM BDC_FIELD  USING 'BDC_OKCODE'  '=PICK'.

  PERFORM BDC_DYNPRO USING 'SAPLV51T'   '0300'.
  PERFORM BDC_FIELD  USING 'BDC_OKCODE' '=SICH'.
  PERFORM BDC_FIELD  USING 'BDC_CURSOR' 'ITSEGDIAE-TIME_TST04(01)'.
  PERFORM BDC_FIELD  USING 'ITSEGDIAE-TIME_TST01(01)'
                           '15.01.2007'.
  PERFORM BDC_FIELD  USING 'ITSEGDIAE-TIME_TST02(01)'
                           '15.01.2007'.
  PERFORM BDC_FIELD  USING 'ITSEGDIAE-TIME_TST03(01)'
                           '15.01.2007'.
  PERFORM BDC_FIELD  USING 'ITSEGDIAE-TIME_TST04(01)'
                           '15.01.2007'.

  CALL TRANSACTION 'VT02' USING BDCDATA
                          MODE  'A'
                          MESSAGES INTO MESSTAB.

Regards,

Ferry Lianto

Read only

0 Likes
2,309

thanks for the help. it seems to be working for some cases but not for some cases. I am looking into it.

Rob and Ferry, really appreciate for sticking on it!