‎2007 May 15 8:46 AM
Hi,
I copied the SAP query to Normal report .
Now i want to modify the program.
In the selection screen there are 5 radio buttons i want to show only one.
How i can restrict the radio buttons.
regards,
vijay
‎2007 May 15 8:49 AM
Hello,
U must show atleast 2 radio buttons.
For the rest use condition like this :-
Selection-screen.
if 1 = 2.
Parameters: R3 radiobutton group g1,
r4 radiobutton group g1.
etc.
endif.
Hope this helps.
Regards,
Deepu.K
‎2007 May 15 8:49 AM
Hello,
U must show atleast 2 radio buttons.
For the rest use condition like this :-
Selection-screen.
if 1 = 2.
Parameters: R3 radiobutton group g1,
r4 radiobutton group g1.
etc.
endif.
Hope this helps.
Regards,
Deepu.K
‎2007 May 15 8:57 AM
well if you copied the report, you are free to modify your copy.
why dont you just delete them from code?
‎2007 May 15 9:00 AM
Sorry for interrupting
No offense meant, but this is the first time I have seen a declaration enclosed inside an IF condition...
<i>Quoted...</i>
Selection-screen.
if 1 = 2.
Parameters: R3 radiobutton group g1,
r4 radiobutton group g1.
etc.
endif.
<i>Endquote...</i>You think it'll work ?
Regards,
Dushyant Shetty
‎2007 May 15 9:10 AM
aye it WILL work
but still it´s modifying the code, and if you do so, you´d better comment em out than doing THIS, but still it will work.
Message was edited by:
Florian Kemmer
‎2007 May 15 9:12 AM
Hello Dushyant Shetty,
Thanks for raising this.
I was wrong. I tried in a test program and that doesn't work.
I apologize.
Sorry for my wrong post.
Regards,
Deepu.K
‎2007 May 15 9:17 AM
Hi Florian and Deepu,
I guess this code needs to be tried out...(it doesn't work...)
In ABAP, all declarations are pre-emptive, even if you place a declaration at the end of your program, during program generation the compiler reorganizes the Declarations(DATA, TYPES, CLASS, TABLES, PARAMETERS, SELECT-OPTIONS etc.) to the top of the program, well before any executable code is processed, even an IF condition...
Run the code Deepu has submitted to understand my point...
But sincere apologies for moving this discussion off-topic !!
Happy ABAPing !
Dushyant Shetty
‎2007 May 15 9:28 AM
Hello Dushayant,
U r right dude.The code doesn't work.
Instead I tried this .It works :-
PARAMETERS: r1 radiobutton group g1,
r2 radiobutton group g1.
AT SELECTION-SCREEN Output.
LOOP AT SCREEN .
IF screen-name = 'R1'.
screen-active = 0.
MODIFY SCREEN .
ENDIF.
IF screen-name = 'R2'.
screen-active = 0.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
Once again sorry for my wrong post.
Regards,
Deepu.K
‎2007 May 15 10:00 AM
hmmm seems you are right dudes, tho i thought i had something similar done before.
Perhaps i should recheck my old program and see what i did at least its running productive sind 6 month and no error messages reached me.
But yeah from the logical point of view in ABAP i should NOT work. And thats why you need that bloody generic concept of ABAP.
in my eyes a language should offer a developer to allocate memory where and WHEN he needs it and not THAT restrictive
Message was edited by:
Florian Kemmer
‎2007 May 15 8:58 AM
If you can edit the code, look for the PARAMETERS: declaration for the radio buttons you wish to hide,
For instance, if you don't want spreadsheet(Excel ) functionality, disable the radio button by commenting out the following pair of lines...
*parameters: %excel radiobutton group func modif id old.
*selection-screen: comment 34(26) text-f60 for field %excel modif id old,
Remember to comment both lines or else the label will remain on screen
Then, add this code below the comments(IMPORTANT).
DATA: %excel.Hope this helps,
Dushyant Shetty