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

button focus

Former Member
0 Likes
634

Hi there. I've got few components in the screen, and I'd like to set focus on one of them after entering the screen. How can I do this? Greetings. P.

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
610

hi Piotr,

I think you have to use the SET CURSOR ... statement. More info in SAPhelp!

hope this helps

ec

4 REPLIES 4
Read only

JozsefSzikszai
Active Contributor
0 Likes
611

hi Piotr,

I think you have to use the SET CURSOR ... statement. More info in SAPhelp!

hope this helps

ec

Read only

Former Member
0 Likes
610

hi,

Can u please explain it clearly.

Regards,

Arunsri

Read only

Former Member
0 Likes
610

What is your component developed on? Module pool or WebDynpro? If you developed it in WebDynpro and want to have a particular view as the default view, then you can go to the window list, select the view that you want to be the default, right click on it and then set it as default.

Read only

Former Member
0 Likes
610

Hai.

check this.

1) Call Screen: Calling a single screen can be used for embedding a screen sequence. If you want to prevent the called screen from covering the current screen completely (say u want 2 display both screen) you can use the CALL SCREEN statement with the STARTING AT and ENDING AT

CALL SCREEN 200

If we write this statement in screen 100 ,it will goto screen 200 and it will retain screen 100(ie u can come back)

and moreover u have options using this

CALL SCREEN 200 STARTING AT x1 y1 ENDING AT x2 y2

2) If we use set screen first the processing blocks in the present screen will be executed and control goes to the screen which is called.

in this control remains in that calling screen only, it doesnt come back to our screen.

3)In screen 100,we call screen 200.The PBO and PAI of screen 200 is processed.Now in screen 200,if we use leave to screen 100,the processing starts from screen 100 after the call screen 200 statement.The PBO and the PAI of screen 100 need not be processed again from the beginning in this case.

4) That is if we use leave to screen,the control goes back to the screen from which the present screen was called and continues with the processing.

SET SCREEN 200

1) With the above statement , it will goto screen 200 and screen 100 no more remains

2) Screen No 0 : This special screen number causes the screen to jump back to the calling screen.

set screen 0 used to go back to the previous screen.

With SET SCREEN the current screen simply specifies the next screen in the chain , control branches to this next screen as sonn as th e current screen has been processed .Return from next screen to current screen is not automatic .It does not interrupt processing of the current screen.If we want to branch to the next screen without finishing the current one ,use LEAVE SCREEN.

With CALL SCREEN , the current (calling) chain is suspended , and a next screen (screen chain) is called .The called can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0 .Sometime we might want to let an user call a pop up screen from the main application screen to let him enter secondary information.After they have completed their enteries, the users should be able to close the popup and return directly to the place where they left off in the main screen.Here comes CALL SCREEN into picture .This statement lets us insert such a sequence intp the current one

check the example code.

DATA: gd_fcurr TYPE tcurr-fcurr,

gd_tcurr TYPE tcurr-tcurr,

gd_date TYPE sy-datum,

gd_value TYPE i.

gd_fcurr = 'EUR'.

gd_tcurr = 'GBP'.

gd_date = sy-datum.

gd_value = 10.

PERFORM currency_conversion USING gd_fcurr

gd_tcurr

gd_date

CHANGING gd_value.

  • Convert value to Currency value

&----


*& Form currency_conversion

&----


  • text

----


  • -->P_GD_FCURR text

  • -->P_GD_TCURR text

  • -->P_GD_DATE text

  • <--P_GD_VALUE text

----


FORM currency_conversion USING p_fcurr

p_tcurr

p_date

CHANGING p_value.

DATA: t_er TYPE tcurr-ukurs,

t_ff TYPE tcurr-ffact,

t_lf TYPE tcurr-tfact,

t_vfd TYPE datum,

ld_erate(12) TYPE c.

CALL FUNCTION 'READ_EXCHANGE_RATE'

EXPORTING

  • CLIENT = SY-MANDT

date = p_date

foreign_currency = p_fcurr

local_currency = p_tcurr

TYPE_OF_RATE = 'M'

  • EXACT_DATE = ' '

IMPORTING

exchange_rate = t_er

foreign_factor = t_ff

local_factor = t_lf

valid_from_date = t_vfd

  • DERIVED_RATE_TYPE =

  • FIXED_RATE =

  • OLDEST_RATE_FROM =

EXCEPTIONS

no_rate_found = 1

no_factors_found = 2

no_spread_found = 3

derived_2_times = 4

overflow = 5

zero_rate = 6

OTHERS = 7

.

IF sy-subrc EQ 0.

ld_erate = t_er / ( t_ff / t_lf ).

p_value = p_value * ld_erate.

ENDIF.

ENDFORM. " currency_conversion

See the below link for explanation and a Program

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/fmCurrencyConversion&

regards.

sowjanya.b