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

sap query problem

Former Member
0 Likes
949

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
925

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

9 REPLIES 9
Read only

Former Member
0 Likes
926

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

Read only

0 Likes
925

well if you copied the report, you are free to modify your copy.

why dont you just delete them from code?

Read only

0 Likes
925

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

Read only

0 Likes
925

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

Read only

0 Likes
925

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

Read only

0 Likes
925

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

Read only

0 Likes
925

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

Read only

0 Likes
925

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

Read only

dustyplanet
Active Participant
0 Likes
925

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