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: 

set cursor in badi

Vinay3
Participant
0 Kudos

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

12 REPLIES 12

madhu_vadlamani
Active Contributor
0 Kudos

Hi Vinay,

For which badi you are using that.

Regards,

Madhu.

0 Kudos

project_definition of ps cj20n

0 Kudos

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.

0 Kudos

IF im_projectdefinition-scope ne 'IV' .

IF im_projectdefinition-vkorg eq ' '

.

MESSAGE 'Sales Organizationy' TYPE 'E'.

0 Kudos

Hi Vinay,

I did not understand this.

Regards,

Madhu.

0 Kudos

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

0 Kudos

Hi Vinay,

Is that badi triggering .

Regards,

Madhu.

0 Kudos

yes badi is triggering when save button is click

Edited by: vinay singh on Nov 26, 2011 1:57 PM

0 Kudos

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 .

0 Kudos

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

0 Kudos

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 ?

0 Kudos

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