Application Development and Automation 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: 
Read only

set cursor in badi

Vinay3
Participant
0 Likes
1,818

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

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
Read only

madhu_vadlamani
Active Contributor
0 Likes
1,573

Hi Vinay,

For which badi you are using that.

Regards,

Madhu.

Read only

0 Likes
1,573

project_definition of ps cj20n

Read only

0 Likes
1,573

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.

Read only

0 Likes
1,573

IF im_projectdefinition-scope ne 'IV' .

IF im_projectdefinition-vkorg eq ' '

.

MESSAGE 'Sales Organizationy' TYPE 'E'.

Read only

0 Likes
1,573

Hi Vinay,

I did not understand this.

Regards,

Madhu.

Read only

0 Likes
1,573

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

Read only

0 Likes
1,573

Hi Vinay,

Is that badi triggering .

Regards,

Madhu.

Read only

0 Likes
1,573

yes badi is triggering when save button is click

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

Read only

0 Likes
1,573

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 .

Read only

0 Likes
1,573

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

Read only

0 Likes
1,573

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 ?

Read only

0 Likes
1,573

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