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

radiobutton code

Former Member
0 Likes
1,936

this  is my code  but some problem are occured to output

my requirement is related to radiobutton code

  1. Pending for Release ( where C&C is not released i.e. VEHREL is blank)   (r_pen buttton)
  2. Released ( C&C released cases i.e. VEHREL = ‘X’)  (r_rel)
  3. All (both cases)    ( r_all )

Based on the above selection, fetch records from the table ZEXPORT_INVOICE and display.

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------my code :=

IF R_ALL IS INITIAL .

     DELETE IT_ZEXPORT_INVOICE  WHERE VEHREL IS  INITIAL

                                OR   VEHREL = 'X'.

   ENDIF .

  this

     IF R_PEN = 'X'.

      DELETE IT_FINAL  WHERE VEHREL IS NOT  INITIAL .

     ELSEIF R_REL = 'X'.

       DELETE IT_FINAL WHERE   VEHREL IS INITIAL .

**                           OR DOCNUM IS NOT INITIAL ).

     ENDIF .

plz helpme

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,898

Hi,

Based on the above selection, fetch records from the table ZEXPORT_INVOICE and display

are you fetching all records using select * and deleting based on condition? If so then select only records that matches the condition in radiobutton by providing the condition in where clause of the select statement. Instead of deleting records.

thanks,

17 REPLIES 17
Read only

vinoth_aruldass
Contributor
0 Likes
1,898

hi,

IF R_ALL = 'X' . note here you have to click X

*     DELETE IT_ZEXPORT_INVOICE  WHERE VEHREL IS  INITIAL

*                               OR   VEHREL = 'X'.

*here you have to use refresh

IT_ZEXPORT.

*because in the internal table you are trying to delete all the variables write?.

*if VEHREL is intial or not intial means all the entries in it_zexport right?

*hope you get from this

   ENDIF .

  this

     IF R_PEN = 'X'.

      DELETE IT_FINAL  WHERE VEHREL IS NOT  INITIAL .

     ELSEIF R_REL = 'X'.

       DELETE IT_FINAL WHERE   VEHREL IS INITIAL .

**                           OR DOCNUM IS NOT INITIAL ).

     ENDIF .

Read only

0 Likes
1,898

if i pressed refresh then all data vanish

Read only

Former Member
0 Likes
1,898

Hi,

In the first case

IF R_ALL IS INITIAL .

     DELETE IT_ZEXPORT_INVOICE  WHERE VEHREL IS  INITIAL

                                OR   VEHREL = 'X'.

   ENDIF .

it must be IF R_ALL = 'X'.  right if user selected last radiobutton.

the other conditions looks ok.

are else what problem you are getting?

thanks.

Read only

0 Likes
1,898

your r_all condition is satisfied

but i want when i press r_pen (pending ) then in output screeen field vehrel is blank

when i pressed r_rel (release )then in veherl data wii be displayed  that is veherl = 'x' .

Read only

0 Likes
1,898

Hi,

you are doing correct except IF R_ALL = 'X'. at a time only one radiobutton will be selected right.

when all is selected you will delete the entry from the table what ever the case of vehrel may be.

in other cases you will specifically check for vehrel.....

please change the first if check and it will work fine.

thanks.

Read only

0 Likes
1,898

but at time i pressed only one radiobutton

its not cheak box

Read only

rajeevgoswami1
Participant
0 Likes
1,898

Is all 3 radio buttons belongs to same group ?

if yes then you are checking the condition

IF R_ALL IS INITIAL . instead of this use condition

IF R_ALL = 'X' , because when r_pen or r_rel button is selected then this r_all will be intial and will delete the records.

Read only

0 Likes
1,898

but i want when i press r_pen (pending ) then in output screeen field vehrel is blank

when i pressed r_rel (release )then in veherl data wii be displayed  that is veherl = 'x'

i think u see my incorrect code

Read only

Former Member
0 Likes
1,898

Hello Sachin,

Your logic would be like below

IF R_PEN = 'X'

      DELETE IT_FINAL  WHERE VEHREL IS NOT  INITIAL .

ELSEIF R_REL = 'X'.

       DELETE IT_FINAL WHERE   VEHREL IS INITIAL .

ELSEIF R_ALL = 'X' ( below logic only when Vehrel has entries other than space or 'X' otherwise you can straight away refresh it_final )

     Delete it_final where ( vehrel eq space or vehrel eq 'X' ).

ENDIF .

Regards,

Deepti

Read only

0 Likes
1,898

code not working

Read only

0 Likes
1,898

What issue you are facing? Can you describe in detail.

I assumed that all the 3 radio buttons are declare for same Group.

You need r_all = 'X' rather than R_ALL is initial.

Its better you paste your code for data extraction from table also for more visibility.

Regards,

Deepti

Read only

0 Likes
1,898

i want when i press r_pen (pending ) then in output screeen field vehrel is blank

when i pressed r_rel (release )then in veherl data wii be displayed  that is veherl = 'x' .and when i pressed r_all then i show both record

Read only

0 Likes
1,898

thanks for ur kind support

IF R_PEN = 'X'.

      SELECT * FROM ZEXPORT_INVOICE INTO TABLE IT_ZEXPORT_INVOICE WHERE VEHREL EQ SPACE .

ELSEIF R_REL = 'X'.

SELECT * FROM ZEXPORT_INVOICE INTO TABLE IT_ZEXPORT_INVOICE WHERE VEHREL EQ 'x'.

ELSEIF R_ALL = 'X'

SELECT * FROM ZEXPORT_INVOICE INTO TABLE IT_ZEXPORT_INVOICE WHERE VEHREL EQ SPACE OR VEHREL EQ 'x'.

ENDIF .

this is the right code  once again thanks

Read only

Former Member
0 Likes
1,899

Hi,

Based on the above selection, fetch records from the table ZEXPORT_INVOICE and display

are you fetching all records using select * and deleting based on condition? If so then select only records that matches the condition in radiobutton by providing the condition in where clause of the select statement. Instead of deleting records.

thanks,

Read only

0 Likes
1,898

hi

can u give me the code bz i cant understand what you say

but in case i use select statement

Read only

0 Likes
1,898

Hi

IF R_PEN = 'X'

      SELECT * FROM ZEXPORT_INVOICE INTO TABLE IT_ZEXPORT_INVOICE WHERE VEHREL EQ SPACE .

ELSEIF R_REL = 'X'.

SELECT * FROM ZEXPORT_INVOICE INTO TABLE IT_ZEXPORT_INVOICE WHERE VEHREL EQ 'x'.

ELSEIF R_ALL = 'X'

SELECT * FROM ZEXPORT_INVOICE INTO TABLE IT_ZEXPORT_INVOICE WHERE VEHREL EQ SPACE OR VEHREL EQ 'x'.

ENDIF .

this should work. or incase you want to delete already selected entries in it_zexport_invoice then do the reverse conditoning or this.

thanks,

Read only

0 Likes
1,898

HI

THE CODE IS WORKING

THANKS FOR UR KIND SUPPORT

CAN U GIVE ME YOUR GMAIL ID

BZ IN FUTURE IF I ANY DOUBT THEN I ASK YOU

OR GIVE ME UR DETAIL ON MY PERSONAL MAIL

mahajansachin111@gmail.com

once again thanks hope so u reply me