‎2012 Nov 26 6:16 AM
this is my code but some problem are occured to output
my requirement is related to radiobutton code
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
‎2012 Nov 26 7:23 AM
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,
‎2012 Nov 26 6:27 AM
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 .
‎2012 Nov 26 6:43 AM
‎2012 Nov 26 6:29 AM
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.
‎2012 Nov 26 6:36 AM
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' .
‎2012 Nov 26 6:44 AM
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.
‎2012 Nov 26 6:58 AM
but at time i pressed only one radiobutton
its not cheak box
‎2012 Nov 26 6:30 AM
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.
‎2012 Nov 26 6:37 AM
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
‎2012 Nov 26 6:43 AM
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
‎2012 Nov 26 6:59 AM
‎2012 Nov 26 7:26 AM
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
‎2012 Nov 26 7:46 AM
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
‎2012 Nov 26 8:24 AM
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
‎2012 Nov 26 7:23 AM
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,
‎2012 Nov 26 7:47 AM
hi
can u give me the code bz i cant understand what you say
but in case i use select statement
‎2012 Nov 26 7:52 AM
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,
‎2012 Nov 26 8:07 AM
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
once again thanks hope so u reply me