Application Development 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: 

add Delivery Dates events (TSEGE table)

former_member582701
Contributor
0 Kudos

Hi,

I need to find any FM in order to create an event in an outbound delivery (VL02N-GoTo-Header-Dates).

I have found FM /SPE/TSEG_MOD_TIMESTAMP but it is not working. Do you know how to use this FM or another way to do that?

Thx,

Manel

1 ACCEPTED SOLUTION

Harsh_Bansal
Contributor
0 Kudos

Hi,

Use FM - TSEG_WRITE_UPD.

I have used this FM for same purpose it works perfectly fine..

If you need any clarification then let me know, I will guide you.

Regards,

Harsh Bansal

16 REPLIES 16

Harsh_Bansal
Contributor
0 Kudos

Hi,

Use FM - TSEG_WRITE_UPD.

I have used this FM for same purpose it works perfectly fine..

If you need any clarification then let me know, I will guide you.

Regards,

Harsh Bansal

0 Kudos

thx, it works

0 Kudos

My Pleasure.

Regards,

Harsh Bansal

0 Kudos

Hi Harsh,

Can you share how to fill the FM TSEG_WRITE_UPD?

Thank you.

Regards,

Aileen

0 Kudos

Hi, Did you ever resolve how to do this?

Thanks,

Jon

Former Member
0 Kudos

Hi Harsh,

Please can you share how to do this?

Thanks,

Jon

0 Kudos

Hello All,

I have recently used this FM, so I can share it for those who still want it on SCN :

When you have to create a new event, 2 entries need to be passed in tsege table.

First one with

                 wa_tsege-head_hdl = <likp-handle>.

                 wa_tsege-even = <EventName>.

                 wa_tsege-even_cnt = '0'.

                 wa_tsege-even_verty = '0'.

                 wa_tsege-even_vernu = '0'.

                 wa_tsege-even_sor = 870. (Starting number for sort index. Have to increased by 1 for every new event)

                 wa_tsege-even_zonto = <TimeZone>.

                 wa_tsege-even_tstto = <Blank>.

                 wa_tsege-even_zonfr = w_upd_date-zonfr.

                 wa_tsege-even_tstfr = <Blank>.

                 wa_tsege-diag_modif = 'I'.          (I- Insert , U-Update)

          INSERT wa_tsege INTO TABLE it_tsege.


Next Entry:

                 wa_tsege-head_hdl = <likp-handle>.

                 wa_tsege-even = <EventName>.

                 wa_tsege-even_cnt = '0'.

                 wa_tsege-even_verty = '1'.

                 wa_tsege-even_vernu = '0'.

                 wa_tsege-even_sor = 870. (Starting number for sort index. Have to increased by 1 for every new event)

                 wa_tsege-even_zonto = <TimeZone>.

                 wa_tsege-even_tstto = <Time>.

                 wa_tsege-even_zonfr = w_upd_date-zonfr.

                 wa_tsege-even_tstfr = <Time>.

                 wa_tsege-diag_modif = 'I'.          (I- Insert , U-Update)

          INSERT wa_tsege INTO TABLE it_tsege.


CALL FUNCTION 'TSEG_WRITE_UPD'

           EXPORTING

             it_tsegh = it_tsegh

             it_tsege = it_tsege.



-Rajat

0 Kudos

Thank you Rajat for your help.

I just have one question how you determined the event type if you have a delivery ?

I have event name 'Arrival at Customer' but for this again I have 5 events in TTSEGEVTY table?

Thanks in advance for your help.

Harish Bhatt

0 Kudos

Hello,

i am also looking to update the event in date tab of delivery order but not sure how to use the available FM's

/SPE/TSEG_MOD_TIMESTAMP - Insert/modify TSEG Timestamps


or the one given here TSEG_WRITE_UPD not sure how to use it to update the delivery order as it doesn't carry the delivery order number field.


Any help please.


Regards

Anand



0 Kudos

Hello Anand,

You have to call folowing FMs in given sequence :

  •   CALL FUNCTION 'TSEG_INIT'

        EXCEPTIONS

          fatal_error = 1

          OTHERS      = 2.

  • CALL FUNCTION 'TSEG_READ_MIGRATION'

        EXPORTING

          if_object                = f_c_head_obj "'WSHDRLIKP'

          is_object_wa         = ps_likp

          it_vtseg                 = ft_vsteg

        EXCEPTIONS

          customizing_inconsistent = 1

          fatal_error              = 2

          OTHERS                   = 3.

               Here in FT_VSTEG , you have to create event data, normally you can see the where use                of this FM. also PS_LIKP is type of LIKP.

  • CALL FUNCTION 'TSEG_DIALOG_DATA'

        EXPORTING

          if_handle      = f_handle "-handle

          if_dialog_view = 'STD'

          if_dialog_zone = f_tzone

        EXCEPTIONS

          fatal_error    = 4

          OTHERS         = 8.

          Here F_HANDLE , you get from the LIKP table. and F_TZONE is timezone (e.g. UTC)

  • CALL FUNCTION 'TSEG_MODIFY_TST'

        EXPORTING

          if_handle     = f_handle "-handle "

          if_time       = f_even "-even "

          if_even_cnt   = f_tsegevtcnt "

          if_even_verty = f_tsegvertyp

          if_even_vernu = f_tsegvernum

          if_time_tst   = f_timestamp

        IMPORTING

          ef_subrc      = lv_subrc

        EXCEPTIONS

          fatal_error   = 1

          OTHERS        = 2.

          Here all values are normally number. you can get hint froim TSEGE table.

  • CALL FUNCTION 'TSEG_WRITE'

        EXPORTING

          if_object    = f_c_head_obj "'WSHDRLIKP'

          is_object_wa = ps_likp

        EXCEPTIONS

          fatal_error  = 1

          no_events    = 2

          OTHERS       = 3.

I hope this will be helpful for you.

Cheers !

Harish Bhatt

0 Kudos

Hello Harish,

Thanks for replying back, can you help to know how do we call delivery number to update the event date/time information? As in the code mentioned by you I am unable to see the field for delivery number that has to be updated.

Regards

Anand

0 Kudos

Hello,

Delivery number and all delivery details from LIKP must be passed in PS_LIKP.

is_object_wa         = ps_likp

Thank you !

0 Kudos

Thanks alot.

0 Kudos

This message was moderated.

0 Kudos

HI Guys,

Requirement - I need to update only Begin Plan Dates, when I was using above code it is updating both begin plan and begin actual also.

Please help on this.

danielsonline
Discoverer
0 Kudos

This was my solution to solve this problem.

tseg-dates-implementation.txt

Use the function /SPE/TSEG_MOD_TIMESTAMP to create the event and TSEG_WRITE_UPD for add timestamp.