09-14-2010 10:16 AM
Hi experts,
I have to check the some mandotory pricing conditions in sales order, if that conditions are not exist in sales order then i need to show the information message as well as i need to update it in incompletion log of sales order. (incopletion log we can see on menu bar 'EDIT' or ctrl+F8 on main screen of VA01). So that user can save the sales order but it will be in incomplete status.
I have completed it upto showing the information message using user exit 'MV45AFZZ', but after this i don't know how to update it in incompletion log of sales order for pricing. I tried to update in tables VBUK-UVPRS, but i am not getting the desired result.
Please anyone can tell me how to update it. In which user exit i can update the incompletion log.
Thanks and Regards,
Vicky.
09-14-2010 10:38 AM
09-14-2010 11:23 AM
Hi Vinod,
Thanks for your reply. I have checked all the settings in OVA2 all are ok. So i tried to append the structure XVBUV but i don't know which field to change and what should be the value of that filed. I tried to change the MSGKZ with W, T and U values, but
it is not updating in the incompletion log. Please can you tell me more specificaly which filed and what vlue i have to update.
Thanks and Regards,
Vicky.
09-14-2010 11:41 AM
Hi,
No Need to pass value to MSGKZ. You append the record in internal table XVBUV with required data like
VBELN ( Order Number),
POSNR ( Line item number),
TABNAME ( Table Name : VBAP),
FDNAME (Document field name : PRSOK for pricing),
FEHGR (Incompletion procedure - Get from Funtional consultant),
STATG (Status group - Get from Functional Consultant),
FCODE (Screen : PKON for pricing)
Regards
Vinod
09-14-2010 12:30 PM
Hi Vinod,
I tried the thing u have suggested. it is working fine, but when i am opening the same order in VA02 that time the incompletion log
is not comming, and it is showing the message that 'document is complete'. Can you tell me how to save it in some database table so that every time i should get that error untill and unless i correct it.
Thanks and regards,
Vicky.
09-14-2010 12:36 PM
Hi,
Check whether the entry inserted in XVBUV has been updated in table VBUV. If no, Then pass "I" to XVBUV-UPDKZ while inserting the record in Userexit.
Regards
Vinod
09-14-2010 1:12 PM
Hi Vinod,
Thanks for reply. You are right there is no entry for that order in VBUV table. So while inserting values in the table i have given the XVBUV-UPDKZ = 'I', but after giving this also it is not updating in the table. i checked for other standard things it is updating. Can you please help me to sort out this problem.
Thanks and Regards,
Vicky.
09-15-2010 5:14 AM
Hi,
I have tested the same and working fine. The problem may be with the values which you are updating. Can you post the relevant code portion used for updating the internal table structure XVBUV?
Regards
Vinod
09-15-2010 7:37 AM
Hi Vinod,
I am sending you my code please check it,
if TKOMK-SPART = 10.
if XKOMV is not INITIAL.
clear v_JEXP.
READ TABLE XKOMV with key kschl = 'JEXP'.
if sy-subrc = 0.
check XKOMV-kwert = 0.
message i003(ZT) with 'Value should not be 0 for conditioin type JEXP'.
v_JEXP = 'X'.
else.
message i003(ZT) with 'Maintain the mandatory Conditioin type JEXP'.
v_JEXP = 'X'.
endif.
if v_JEXP = 'X'.
XVBUV-MANDT = sy-mandt.
XVBUV-POSNR = '000010'.
XVBUV-TBNAM = 'VBAP'.
XVBUV-FDNAM = 'PRSOK'.
XVBUV-FEHGR = 20.
XVBUV-STATG = '06'.
XVBUV-FCODE = 'PKON'.
XVBUV-SORTF = 9999.
XVBUV-LFDNR = 0000.
XVBUV-UPDKZ = 'I'.
append XVBUV.
endif.
endif.
endif.
Please suggest something to solve this.
Thanks and Regards,
Vicky.
09-15-2010 7:48 AM
Hi,
You have to pass order number in the structure field XVBUV-VBELN along with other fields.
XVBUV-VBELN = vbak-vbeln.
Regards
Vinod
09-15-2010 7:56 AM
Hi Vinod,
In user exit "MV45AFZB", form-routine "USEREXIT_CHECK_VBAP" the VBAK-VBELN is blank.
Regards,
Vicky.
Edited by: vicky on Sep 15, 2010 12:31 PM
09-15-2010 8:12 AM
Hi,
Try to create order with some incomplete data as per the incompletion procedure & in the user-exit check how the Order number is populated in XVBUV structure. Similar way you have to do for the record inserted for custom validation.
I am not able to simulate the scenario as the Order Type which I use is having external Number range and hence VBAK-VBELN is always having value while creating the order.
Regards
Vinod
11-11-2010 9:23 AM
Hi,
I have a similar problem while updating incompletion log using this user exit.
I am not able to capture the sales order number to update VBUV.
Is your problem solved?
Regards,
Chandra