‎2007 Mar 12 8:53 PM
Hi All...
could anyone help me with the following...?
Im trying to create a selection screen which consists of 2 radio buttons of the same group and a text box.
I want to put the selection screen within a frame with a title.
The two radio buttons are labeled as All and Employee respectively. The textbox is used to enter the employee id. The label of the textbox is Employee.
The Employee radio button and the textbox must be displayed on the same line.
Thanks in advance,
Adam
‎2007 Mar 12 9:06 PM
Hi,
Check this example..Hope this is what you want..
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE v_text.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_all RADIOBUTTON GROUP g1 USER-COMMAND usr.
SELECTION-SCREEN COMMENT 3(10) v_text3 FOR FIELD p_emp.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_emp RADIOBUTTON GROUP g1.
SELECTION-SCREEN COMMENT 3(10) v_text1 FOR FIELD p_emp.
SELECTION-SCREEN COMMENT 16(10) v_text2 FOR FIELD p_employ.
PARAMETERS: p_employ(10).
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
v_text = 'Details'.
v_text1 = 'Employee'.
v_text2 = 'Employee'.
v_text3 = 'All'.
AT SELECTION-SCREEN OUTPUT.
IF p_all = 'X'.
LOOP AT SCREEN.
IF screen-name = 'P_EMPLOY'.
screen-input = 0.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Thanks
Naren
‎2007 Mar 12 9:06 PM
Hi,
Check this example..Hope this is what you want..
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE v_text.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_all RADIOBUTTON GROUP g1 USER-COMMAND usr.
SELECTION-SCREEN COMMENT 3(10) v_text3 FOR FIELD p_emp.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: p_emp RADIOBUTTON GROUP g1.
SELECTION-SCREEN COMMENT 3(10) v_text1 FOR FIELD p_emp.
SELECTION-SCREEN COMMENT 16(10) v_text2 FOR FIELD p_employ.
PARAMETERS: p_employ(10).
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
v_text = 'Details'.
v_text1 = 'Employee'.
v_text2 = 'Employee'.
v_text3 = 'All'.
AT SELECTION-SCREEN OUTPUT.
IF p_all = 'X'.
LOOP AT SCREEN.
IF screen-name = 'P_EMPLOY'.
screen-input = 0.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
Thanks
Naren
‎2007 Mar 12 9:10 PM
Hi,
Please try this.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: P_RAD1 RADIOBUTTON GROUP GRP1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(20) TEXT-001.
PARAMETERS: P_RAD2 RADIOBUTTON GROUP GRP1.
SELECTION-SCREEN COMMENT 30(20) TEXT-002.
SELECTION-SCREEN END OF LINE.
Regards,
Ferry Lianto
‎2007 Mar 12 9:38 PM
Wow, thanks to both of you guys, that will certainly help, Ill get back to this thread once i test the code in SAP Frontend, I have lost my password and will have to wait till tomorrow to request a new one from our sys admin...but Ill reward you both anyway for helping me out ...
Regards,
Adam
‎2007 Mar 16 11:14 AM
This should be enuf
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: P_radio1 RADIOBUTTON GROUP GRP1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(20) TEXT-XXX.(Enter u'r comment)
PARAMETERS: P_radio2 RADIOBUTTON GROUP GRP1.
SELECTION-SCREEN COMMENT 30(20) TEXT-XXX.(Enter u'r comment).
SELECTION-SCREEN END OF LINE.
Hope this solves your problem
PS : Please reward points if solution is helpful
‎2007 Mar 21 2:44 PM
OK I have created the tables and joined them, now i just need to select records from them...
Im trying to user array for selection of records from the tables (joined) into the internal table.
When ALL radio buttion is selected, all records from joined tables are displayed
When EMPLOYEE radio button is selected, check whether the user has entered values in the Employee text box
If the text box is unfilled, the information message needs to be displayed requesting the user to enter values in the textbox
How do i accomplish this?
Message was edited by:
Adam Pholo
‎2007 Mar 22 3:16 AM
Add this code.
TABLES: sscrfields.
AT SELECTION-SCREEN.
IF sscrfields-ucomm= 'ONLI'.
IF p_emp = 'X'.
IF p_pernr IS INITIAL.
CLEAR sscrfields-ucomm.
MESSAGE i000 WITH 'Please Enter Employee Number'.
ENDIF.
ENDIF.
ENDIF.
‎2007 Mar 22 6:22 AM
Thanks a lot for your feedback..
The sscrfields table, is it an ABAP internal table or what...?
by the way...
I want to display the list within a looping structure...
I have a primary key which is emp_id, if its content changes, I want to display employee id, and on a new line at position 12 and length 50 display first name and last name.
The remaining data I want to display at line 13...
Thanks
‎2007 Mar 22 4:31 PM
The error message that i get is "Relational operation ONLI not supported", how do i solve this??
‎2007 Mar 22 5:41 PM
Hi Adam!
I could identify three questions in your above two replies. I will answer them one after the other.
1. The message you are getting is due to the mistake you are making in the ABAP editor. you have not given a space after the words - "IF sscrfields-ucomm" , as indicated in the code given by Srinivas. So, just modify that line as:
IF sscrfields-ucomm = 'ONLI'.
2. 'sscrfields' is a pre-defined system table.
3. The third part of your question is not so clear to me. Do you mean to ask that you want to display the contents of an internal table you have obtained in your program?
Feel free to ask any queries...
Allot points, if my answers have helped you
Regards.
‎2007 Mar 23 12:58 AM
Hi...thanks for clarity on 'ONLI'
as for the third question, yes i want to display the list of an internal table...Say i have already created the list and its primary key is emp_id, when i change the contents of the primary key field (which is emp_id, entering a new id),I want to display employee id, and on a new line at position 12 and length 50 display first name and last name.
Hope this is clear enough...?!
‎2007 Mar 23 11:50 AM
‎2007 Mar 23 3:38 PM
You have to do something like this. Check the help on the key words used here.
SORT itab BY employeenumber.
LOOP AT itab.
AT NEW employeenumber.
WRITE:/ itab-employeenumber, itab-employeename.
ENDAT.
WRITE:/ itab-field1..... all other fields.
ENDLOOP.
‎2007 Mar 23 7:01 PM
thanks for your help guys, i appreciate it more than any words could say
I have rewarded point btw...
‎2007 Mar 21 2:53 PM
Some modifications (enhancements) have been made to the program.
‎2007 Mar 21 11:18 PM