cancel
Showing results for 
Search instead for 
Did you mean: 

Basic finish time update in notification order IW34

Former Member
0 Kudos

Hi All,

I am creating notification using IW51 and after that I am creating notification order using IW34 tcode.

The order is creating successfully but Basic finish time(AFKO-GLUZP) is updating with '000000' instead of '240000'.

This is not happening when I create order manually this is only happening when I create orders using BDC.

The finish time is not visible in my order screen so standard is automatically setting up this one.

So I would like to check the finish time(CAUFVD-GLUZP) is zero I would like to set it to '240000' while saving the order or ..which userexit /badi i have to use to set this basic finish time.

I got one function module exit IWO10012 but it's not triggering while creating the IW34 order.

Could any one let me know how I can achieve this. Is there any exit I can change the value for basic finish time. Which enhancement approach is best in this case.

I appreciate your help on this.

Thanks,

SaraSAP

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Sanjana,

Here is how this exit IWO10012 works

You should bear in mind the following points for this user-exit to trigger:

1. This user-exit should be part of a project created through CMOD (I believe you should have already done it)

2. This user-exit as its name suggests, triggers when you select some Priority value in the Order Header.

See the code I used in the include ZXWOCU09 of the above exit.

IF CAUFVD_IMP-PRIOK = '1'.
   GSTRP = SY-DATUM.
   GSUZP = SY-UZEIT.
   GLTRP = GSTRP + 1.
   GLUZP = '240000'.
ENDIF.

And see what this gives as soon as I select the Priority no.1 in the Order header (IW34).

Similarly you can have different value sets for these fields (GSTRP, GSUZP, GLTRP and GLUZP) for other Priority values.

Hope this resolves your issue.

KJogeswaraRao

Former Member
0 Kudos

Thanks Jogeswara Rao...But My Issue is Priority field is not required in my case..Is there any other place that I can set the Basic finish date..other than this exit before saving the order.

Thanks,

Sanjana.

jogeswararao_kavala
Active Contributor
0 Kudos

I'm afraid it is 'No'. You need to get into the standard program of IW31 / IW34, find a suitable enhancement spot and write your Code. If you are an ABAPer it should be easy for you, in the other case you need to take help of an ABAPer.

KJogeswaraRao

Former Member
0 Kudos

Hi JogeswaraRao,

I tried writing the code in EXIT_SAPLCOIH_009 of IWO10009 (at save). I have written the below code to update the time.


IF caufvd_imp-auart = 'ZM04'.

     IF caufvd_imp-gluzp = '000000'.

       caufvd_imp-gluzp = '240000'.

       CALL FUNCTION 'CO_IH_SET_HEADER'

         EXPORTING

           caufvd_imp = caufvd_imp.

endif.

it's updating my time but I read in below thread to use below statement along with that.

  perform caufv_upd(SAPLCOBH) using caufvd_imp.

Do we really require to use this as it's already working with my code. my other question is I am updating with CO_IH_SET_HEADER  do we face any Issue if we use this function to update the header..at the save..?

I hope it updated only changed fields.

I appreciate your feedback on this.

Thanks,

Sanjana.

jogeswararao_kavala
Active Contributor
0 Kudos

There should be no need to anything else, if your job is done with fm CO_IH_SET_HEADER as you mentioned.  But for me this FM is not changing anything in Order.

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Sanjana,


This is the code which is working for me.

IF CAUFVD_IMP-GLUZP = '000000'.
   CAUFVD_IMP-GLUZP = '240000'.

   CALL FUNCTION 'CO_IH_SET_HEADER'
     EXPORTING
       CAUFVD_IMP = CAUFVD_IMP.

   PERFORM HEADER_UPDATE(SAPLCOIH).
ENDIF.

Test well in Development clients 100,220 etc before you adapt it.

KJogeswaraRao

Answers (0)