‎2007 Jan 11 2:57 PM
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
‎2007 Jan 11 4:33 PM
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
‎2007 Jan 11 2:59 PM
Check my answer in your other post.
If you are going with this post, then please close the other one.
rob
‎2007 Jan 11 3:09 PM
Hi Krishen,
Please try this FM SD_SHIPMENTS_SAVE which used to save shipment in VT02/VT02N.
Regards,
Ferry Lianto
‎2007 Jan 11 3:11 PM
Hi Ferry,
thanks for your input.
Rob's response seem to already solved the problem!
kind regards
‎2007 Jan 11 3:50 PM
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.
‎2007 Jan 11 3:51 PM
I think it would be best if you posted the code you generated.
Rob
‎2007 Jan 11 3:59 PM
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
‎2007 Jan 11 4:16 PM
It doesn't look as if you are pressing the "SAVE" button. Are you?
Rob
‎2007 Jan 11 4:18 PM
I am pressing it. But it is not recording that part I guess.
Thanks.
‎2007 Jan 11 4:20 PM
‎2007 Jan 11 4:28 PM
Probably by doing something like:
perform bdc_field using 'BDC_OKCODE' '/11'.
Rob
‎2007 Jan 11 4:33 PM
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
‎2007 Jan 11 4:43 PM
Nope friends, its not working. I tried adding, but it is neglecting that.
Regards.
‎2007 Jan 11 4:50 PM
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
‎2007 Jan 11 5:01 PM
‎2007 Jan 11 5:08 PM
‎2007 Jan 11 5:40 PM
I was going in mode 'A' and debugging...
After the bdc, it says status message 'savings not necessary, no changes are made'.
Thanks.
‎2007 Jan 11 6:08 PM
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
‎2007 Jan 11 9:56 PM
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.
‎2007 Jan 11 5:46 PM
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
‎2007 Jan 11 8:22 PM
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!