11-25-2011 6:05 PM
i had implement the badi now i want to set cursor on particular field...as set cursor field is not working in badi ...pls help in same
11-26-2011 4:24 AM
11-26-2011 4:49 AM
11-26-2011 5:08 AM
Hi Vinay,
Can you check this wiki from Khandelwal.Please paste your code what you developed in that badi.
[Cursor Position|http://wiki.sdn.sap.com/wiki/display/Snippets/AutomaticcalculationofPOCandsettingtheuserstatusRCOGinCJ20nTCode]
Regards,
Madhu.
11-26-2011 5:40 AM
IF im_projectdefinition-scope ne 'IV' .
IF im_projectdefinition-vkorg eq ' '
.
MESSAGE 'Sales Organizationy' TYPE 'E'.
11-26-2011 5:49 AM
11-26-2011 6:05 AM
hi Madhu..thanks for ur help and for ur fast reply... in had implemented zproject_definition badi to tcode cj20n of ps....the above message is the code...now i want to set cursor on field proj-vkorg of tab control of tcode cj20n after message display
method IF_EX_PROJECTDEF_UPDATE~AT_SAVE.
IF im_projectdefinition-scope ne 'IV' .
IF im_projectdefinition-vkorg eq ' '
.
MESSAGE 'Sales Organization , Distr. Channel , Division , DIP Profile of Sales Pricing is Mandatory' TYPE 'E'.
set CURSOR field 'PROJ-VKORG'.
MESSAGE E000(zmessageofcj20n).
ENDIF.
ENDIF.
endmethod.
Edited by: vinay singh on Nov 26, 2011 7:05 AM
11-26-2011 6:41 AM
11-26-2011 9:05 AM
yes badi is triggering when save button is click
Edited by: vinay singh on Nov 26, 2011 1:57 PM
11-27-2011 5:30 AM
I believe you are using BADI PROJECTDEF_UPDATE methode AT_SAVE
and triggering message , As mentioned in the BADI Documenation you are raising the exception as well .If you are doing this and still not getting what you want please let us know .
Further notes
Note that no system messages can be sent in the methods. The only exception is the method AT_SAVE. In this method a system message can be triggered, but only if the exception ERROR_WITH_MESSAGE is triggered simulataneously. Also note that the command 'commit work' cannot be carried out in the methods as this would lead to data inconsistencies in the database.
Thanks,
Anjaneya .
11-28-2011 10:02 AM
showing messing is not the issue....problem is there are different tab i want to be on sales organization when it show message...but now cursor is not at saleorganization
11-28-2011 10:07 AM
I believe that the whole screen might be grayed out and since you are having error message the first fiels ready for input will be the first Errored out field in Chain End chain of screen logic ...Can you debug and see how SAP is placing the cursor and why on another tab ?
11-28-2011 11:21 AM
thanks for reply...yes whole screen is gray....
after execution of this MESSAGE ' DIP Profile of Sales Pricing is Mandatory' TYPE 'E'. line the gray screen display
Edited by: vinay singh on Nov 28, 2011 12:22 PM