2009 Jan 27 11:44 AM
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
2009 Jan 27 11:48 AM
2009 Jan 27 11:52 AM
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
2009 Jan 27 11:52 AM
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.
2009 Jan 27 11:56 AM
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
2009 Jan 27 12:15 PM
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.
2009 Jan 27 12:16 PM
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
2009 Jan 27 1:40 PM
2009 Jan 27 2:00 PM
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.
2009 Jan 27 2:16 PM
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
2009 Jan 27 12:29 PM
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