on 03-26-2015 8:56 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.