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: 

selction-screen - pushbuttons

Former Member
0 Kudos
195

hi all,

i want to create 5 push buttons in my selection-screen. but 5th push button is exceeding the limit of push button which is 83.

what should i do?

shweta gupta

10 REPLIES 10

Former Member
0 Kudos
142

can u clear ur question.

Former Member
0 Kudos
142

i want to create 5 push button on selection screen .each push button has text of 20 character . so when i am defining 5th push button , its exceeding the limit position of push button , which is 83. so how to create all 5 buttons with proper text.

shweta gupta

Former Member
0 Kudos
142

Hi,

Do you mean to say that no event is getting triggered when you press the button?

What type of error are you getting?

Regards,

Deepthi.

Former Member
0 Kudos
142

100(20) push_pro USER-COMMAND processed.

i am defining this in my program.and its giving error, 100(20) cant be defined.

shweta gupta

0 Kudos
142

When you press F1 on the word "Pushbutton" in your code, you can read the following:

You must specify the position of the output field using [/][pos](len). The syntax and meaning of [/][pos](len) are the same as when creating horizontal lines, although in this case, len defines the length of the pushbutton on the selection screen. If a pushbutton extends beyond position 83 or beyond the edge of a block with a frame, it is cut off at the right hand side.

Try creating a dynpro, of use less text on the buts.

Former Member
0 Kudos
142

Hi Shweta,

The maximul offset that you can specify is 83. Hence if you have 5 pushbuttons with a length of 20 each, then you need to put at least one or more pushbuttons on the next line.

You can do so by using the SELECTION-SCREEN SKIP. statement which will display the remaining pushbuttons on the next line, where you can start with the minimum offset of 1 again.

SELECTION-SCREEN:
    PUSHBUTTON 1(20)  but1 USER-COMMAND cli1,
    PUSHBUTTON 22(20) but2 USER-COMMAND cli2,
    PUSHBUTTON 44(20) but3 USER-COMMAND cli3,
    PUSHBUTTON 66(20) but4 USER-COMMAND cli4.

SELECTION-SCREEN SKIP.

SELECTION-SCREEN PUSHBUTTON 1(20) but5 USER-COMMAND cli5.

Try this piece of code and you can modify it as per your requirement.

Hope this was useful.

Regards,

Himanshu

0 Kudos
142

but i want all push buttons in one line.

0 Kudos
142

Hi;

just change the above code like this

selection-screen:
PUSHBUTTON 2(10) but1 USER-COMMAND cli1,
PUSHBUTTON 22(10) text-020 USER-COMMAND cli2,
PUSHBUTTON 42(10) text-020 USER-COMMAND cli3,
PUSHBUTTON 62(10) text-020 USER-COMMAND cli4,
PUSHBUTTON 82(10) text-020 USER-COMMAND cli5.

0 Kudos
142

Finding it kinda hard to put a 500 lb Gorilla in a 5 lb can huh?

Either you'll need to shorten the text to about 15 to get them all on one line, or create a PF Status and try to get more than 20 characters in that.

I did test using PF-STATUS and you can get 5 20 character buttons without Icons. I didn't test with icons.

This code will get you your customized PF Status.


INITIALIZATION.
  SET PF-STATUS 'YPTCGOOF'.

Edited by: Paul Chapman on Jan 27, 2009 9:23 AM

Former Member
0 Kudos
142

Hi shweta,

The offset can be up to two characters long only.

You can create the pushbuuton on the selection-screen:

selection-screen:

PUSHBUTTON 2(20) but1 USER-COMMAND cli1,

PUSHBUTTON 22(20) text-020 USER-COMMAND cli2,

PUSHBUTTON 42(20) text-020 USER-COMMAND cli3,

PUSHBUTTON 62(20) text-020 USER-COMMAND cli4,

PUSHBUTTON 82(20) text-020 USER-COMMAND cli5.

Regards,

sravanthi