Regarding dropdown box on selection screen
Hi Abapers,
I am facing a problem in handling dropdown box. please suggest . My Problem description below.
There is one Text field and other is one dropdown box on the selection screen.
Now When user enter the Prod Order number and press enter then automatically all the serial number will get appended into the dropdown box which are related to the Prod Order.
Now suppose if the user only Press F8 not Enter Button then that case It doesn't contain the serial number information.
<b>Now I want to handle it in selection screen.. Please suggest how to check the dropdown box if the dropdown box is not selected then Return to the selection screen..</b>
Please suggest me...........Very urgent.
Hello,
*& Report DEMO_DROPDOWN_LIST_BOX *
REPORT demo_dropdown_list_box.
*& Global Declarations *
* Screen Interfaces
TABLES sdyn_conn.
DATA ok_code TYPE sy-ucomm.
* Global data
TYPES: BEGIN OF type_carrid,
carrid type spfli-carrid,
carrname type scarr-carrname,
END OF type_carrid.
DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.
*& Processing Blocks called by the Runtime Environment *
* Event Block START-OF-SELECTION
START-OF-SELECTION.
CALL SCREEN 100.
* Dialog Module PBO
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
* Dialog Modules PAI
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE.
* Dialog Module POV
MODULE create_dropdown_box INPUT.
SELECT carrid carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDMODULE.
Regards,
Deepu.K
Similar Messages
-
Regarding text box in selection screen
Hi all,
Can i know how we can implement a text with scroll bars so that user can enter a data of about 2000 characters with paragraph indent. also this needs to be done on the selection screen of PNP logical database.
Please let me know if this can be done.
Thanks.
Harshad.Hi Harshad,
[text box in the selection screen|Text box on selection screen]
Thanks! -
How to create application toolbar in modal dialog box in selection-screen
Hi Experts,
how to create application toolbar in modal dialog box in selection-screen?
Regards,
SwapnikaHi,
Check the following link regarding Model dialog box and appication toolbar
http://help.sap.com/saphelp_nw70/helpdata/en/d1/801b84454211d189710000e8322d00/frameset.htm
It helps in solving your problem.
Thanks.
Ramya. -
How to create list box in selection screen
Hi Experts,
I want to create 2 list boxes, each one is having 5 fields. suggest me the logic.
Thanks.
TonyHi,
Below is the link to help you.
[List Box in Selection Screen;
Or here is the sample code.
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
PARAMETERS: ps_parm(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
name = 'PS_PARM'.
value-key = 'scooby1'. APPEND value TO list.
value-key = 'tweety2'. APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
Hope it will help you. Please revert back in case of any query.
Regards
Natasha Garg
Edited by: Natasha Garg on Jan 8, 2009 6:28 AM -
Parallel text box in selection screen
Hi all,
Can anyone please tell me that how can i create parallel text boxes in selection screen?
Exa : Company code <Input box> Date <Input box>
Pers No. <Input box> Cust No. <Input box>
Regards.hi,
Use COMMENT and POSITION statements in selcection-screen to achieve the same. -
Option ( Radio button or check box) on selection - screen , to go to CNR2
<b>Subject - Option ( Radio button or check box) on selection - screen , to go to Tcode CNR2</b>
Hi all,
I have developed a report , which has a selection screen with one select-option , where i enter employee number and two radio buttons , one is for all workcentres and other one for active workcentre. so when i enter employee number and choose either of the radio button i wil get the output properly. the output displays , employee no, employee name , work centre and project of that employee . an employee may have many workcentres and a corresponding project for that work centre.
Now the Problem is , from the same report i need to add a option on the selection -screen , ( plz tell me whether to use radio button or check box and if it is radio button should i use it seperately or group it in the above two buttons.) .
so that when user selects the option , the control should go to transaction code CNR2, from where i can enter workcentre and in the next screen i have HR assigntment tab , after choosing that it will dsplay persons linked to the workcentre and there is a delete icon , from where i can delete the person.
The only thing is now to move / Navigate to the screen or go to transaction code CNR2 from the report or from the selection screen.
Your valuable Inputs are awaited, PLz do lemme know
Thanks in advance ,
regards,
ShujaShuja,
A radio button nor a checkbox should be used for navigation. I would suggest a COMMAND BUTTON.
Something like this:
Report ZZZZZZ.
TABLES: sscrfields.
SELECTION-SCREEN BEGIN OF BLOCK ONE WITH FRAME TITLE TEXT-001.
selection-screen: PUSHBUTTON /10(20) but1 USER-COMMAND cli1.
SELECTION-SCREEN END OF BLOCK ONE.
initialization.
but1 = 'Button Text Goes Here'.
AT SELECTION-SCREEN.
CASE sscrfields.
WHEN 'CLI1'.
call transaction 'CNR2'.
start-of-selection.
Your code here -
F1 help for Check Box on Selection-Screen
Hi Friends,
I want to attach F1 help for a check box on selection-screen. Though I have checked SDN community for this but did not get any relevant answer.
so, please give me correct example if someone has done similar.
Regards
PradeepPradeep,
I think this fucntion module needs to be used DD_SHLP_CALL_FROM_DYNP.If possibe try to screen debug using /H before pressing f1 for a field.
K.Kiran. -
Diplay Text in Text Box in selection Screen
Hi Experts i want to display text in text box in selection screen like
Personnal Number
Display in text box and disable................please help me
Edited by: BFawad26 on Jun 21, 2010 9:46 AMHi,
You mean to say parameter in selection screen
Just press F1 on parameter you will get all the option available for the parameter
for defaulting text just give your text in DEFAULT option for the parametr
And for disabling this checkbox you can explore the LOOP AT SCREEN concept
In at selection screen output event you can modify the selection screen.just give one modif id for your
paramete and use this at selection screen output event , loop at screen and modify screen with the screen input = 0
for ur parameter.
Thanx
Edited by: PawanG on Jun 21, 2010 9:51 AM -
How can we use list box on selection screen
hi, howe can we use list box on selection screen and how can we populate the dat ainto the list box and how can we retrive data based on list box from ther database.
thanks in advance
rajuUse the VRM_SET_VALUES function module.
DATA: list TYPE vrm_values,
value LIKE LINE OF list.
AT SELECTION SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
name = 'P_OBJECT'.
CLEAR list.
REFRESH list.
CLEAR value.
value-key = '1'.
value-text = 'Development Class'.
APPEND value TO list.
CLEAR value.
value-key = '2'.
value-text = 'Program'.
APPEND value TO list.
CLEAR value.
value-key = '3'.
value-text = 'Function Module'.
APPEND value TO list.
CLEAR value.
value-key = '4'.
value-text = 'Database Table'.
APPEND value TO list.
CLEAR value.
value-key = '5'.
value-text = 'Structure'.
APPEND value TO list.
CLEAR value.
value-key = '6'.
value-text = 'View'.
APPEND value TO list.
CLEAR value.
value-key = '7'.
value-text = 'Data Element'.
APPEND value TO list.
CLEAR value.
value-key = '8'.
value-text = 'Table Type'.
APPEND value TO list.
CLEAR value.
value-key = '9'.
value-text = 'Class / Interface'.
APPEND value TO list.
CLEAR value.
value-key = '10'.
value-text = 'Type Group'.
APPEND value TO list.
CLEAR value.
value-key = '11'.
value-text = 'Domain'.
APPEND value TO list.
CLEAR value.
value-key = '12'.
value-text = 'Search Help'.
APPEND value TO list.
CLEAR value.
value-key = '13'.
value-text = 'Lock Object'.
APPEND value TO list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
Display month and year in dropdown list on selection screen
Hi
Can anyone tell me how to display months and year in a dropdown list on a selection screen?
also please tell me how to get the first and the last dates upon selecting the month and year on the dropdown list.
Month: January Year:2007 .
After selecting the required month and year, the first date and last date i.e '01.01.2007 - 31.01.2007' should be displayed on the right side.
Reward Points assured..
thanks,
ChetanHi..,
<b>
Just copy, paste and execute this program !!</b>
type-pools: vrm.
parameters : p_month(2) type n as listbox visible length 10,
p_year(4) type n as listbox visible length 10.
DATA : W_DATE type d, w_ldate type d.
initialization.
perform user_drop_down_list_fordt.
perform user_drop_down_list_foryr.
start-of-selection.
concatenate p_year p_month '01' into w_date.
call function 'BKK_GET_MONTH_LASTDAY'
exporting
i_date = w_date
IMPORTING
E_DATE = w_ldate
write /: w_date,w_ldate.
build user_drop_down_list
form user_drop_down_list_fordt.
data: name type vrm_id,
list type vrm_values,
value like line of list.
data: t_months type t247 occurs 0 with header line.
clear list. refresh list.
name = 'P_MONTH'.
select * into table t_months
from t247 where spras eq 'EN'.
sort t_months ascending by mnr.
loop at t_months.
clear value.
value-key = t_months-mnr.
value-text = t_months-ltx.
append value to list.
endloop.
Set the values
call function 'VRM_SET_VALUES'
exporting
id = name
values = list.
endform.
for year...
form user_drop_down_list_foryr.
data: name type vrm_id,
list type vrm_values,
value like line of list.
clear list. refresh list.
name = 'P_YEAR'.
do 9999 times.
clear value.
value-key = sy-index.
append value to list.
enddo.
Set the values
call function 'VRM_SET_VALUES'
exporting
id = name
values = list.
endform.
<b>
Hope this solves ur problem..</b>
regards,
sai ramesh -
My requirement is get the box for my selection screen.Please help me out its urgent for me.
My requirement is follows.
BOX display the 4 following criteria as ENGK transaction (including value help):
- Legal regulation VBEX-GEGRU (single value)
- License type VBEX-GEART (single value)
- Internal License Number VBEX- GENNR
- External License Number EMBK-EXGEN
(end of box)
Tanx & regards,
Santosh.You mean.... something like this?
selection-screen begin of block b1 with frame title text-001 .
parameter: p_gegru type VBEX-GEGRU.
parameter: p_geart type VBEX-GEART.
parameter: p_gennr type VBEX-GENNR.
parameter: p_exgen type EMBK-EXGEN.
selection-screen end of block b1.
Regards,
Rich Heilman -
How to put drop down box in selection screen
Hi all,
I have to create a selection screen.
in that i have to use a drop down box for the text box.
how to do that.
thanking u.
with regards,
giri.HI
Check thi ssample code -
REPORT ZTESTPRG.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
NAME = 'PS_PARM'.
VALUE-KEY = '1'.
VALUE-TEXT = 'LINE 1'.
APPEND VALUE TO LIST. VALUE-KEY = '2'.
VALUE-TEXT = 'LINE 2'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
START-OF-SELECTION.
WRITE: / 'PARAMETER:', PS_PARM.
Hope this helps.
OR
You can use the F4 function module or use a List box
see the sample codes
See the following ex:
TYPES: BEGIN OF TY_MBLNR,
MBLNR LIKE MKPF-MBLNR,
END OF TY_MBLNR.
DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
data: it_ret like ddshretval occurs 0 with header line.
At selection-screen on value-request for s_mat-low.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_mat-low.
ENDIF.
Go through the test program.
REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
LIST BOX
Input : p_char = 'J'.
Press: enter
List Box of Month = January, June , July.
REPORT ZLIST_VALUES.
TYPE-POOLS vrm.
tables:
spfli.
parameters: p_char type c.
parameters:
p_month(12) as listbox visible length 20,
p_year as listbox visible length 20 .
DATA:
t_table TYPE STANDARD TABLE OF vrm_value,
t_table1 TYPE STANDARD TABLE OF vrm_value,
vrm_values1 LIKE LINE OF t_table.
DATA:
t_year TYPE STANDARD TABLE OF vrm_value.
data: w_year(4) type n value '2000'.
at selection-screen output.
vrm_values1-key = 'a'.
vrm_values1-text = 'January'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'p'.
vrm_values1-text = 'February'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'q'.
vrm_values1-text = 'March'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'r'.
vrm_values1-text = 'April'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 's'.
vrm_values1-text = 'May'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 't'.
vrm_values1-text = 'June'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'u'.
vrm_values1-text = 'July'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'v'.
vrm_values1-text = 'August'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'w'.
vrm_values1-text = 'September'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'x'.
vrm_values1-text = 'October'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'y'.
vrm_values1-text = 'November'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'z'.
vrm_values1-text = 'December'.
APPEND vrm_values1 TO t_table.
t_table1[] = t_table.
delete t_table1 where text+0(1) <> p_char.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'p_month'
values = t_table1
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
do 10 times.
add 1 to w_year.
vrm_values1-key = sy-index.
vrm_values1-text = w_year.
APPEND vrm_values1 TO t_year.
enddo.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'p_year'
values = t_year
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
start-of-selection.
write: p_month. -
Hanling List box in Selection screen
Hi,
i have a requirement as ,
i have one selection screen with two blocks
in one block i have warehouse no input field
in another blocke i have list box for barcodes.
1.i need to get barcode for the entered warehouse no from custome barcodes table.
2.If i select any barcode from the list box that has to be filled into that barcode parameter.
i have achieved first thing.
I need ur suggestions for the second one
Thanks & Regards
EswarOne more thing here i am populating the list box with all the barcodes present in the custom table.
-
Long Text box in Selection Screen
Hi,
How to create a long text box in the selection screen.
Is there any example/demo program in standard??
Regards
Jiku.erm, what do you want to achieve with this?
should your users be able to search for long texts?
That will probably fail since there are differences between the input and the long text you are searching for.
Or do you have users making no faults? -
Adding check box in selection screen
Hi all,
I have to add a check box to the previous report, I need to fetch the data based on the checkbox. Please tell me how to proceed further with flag set.
Thanx and Regards,
Line.Hi..
1) do u want this? if checkbox is not checked then no data is read from database and if checked then only data wil be fetched -
tables pa0001.
parameters p_check as checkbox.
data: begin of itab occurs 0.
include structure pa0001.
data end of itab.
start-of-selection.
if p_check = 'X'.
perform read_data.
endif.
if itab[] is not initial.
loop at itab.
write:/ itab-pernr.
endloop.
else.
write: 'No data fetched from database,may be u need to check the Checkbox'.
endif.
*& Form read_data
text
--> p1 text
<-- p2 text
FORM read_data .
select * from pa0001 into table itab up to 20 rows.
ENDFORM. " read_data
2) Adding fields based on Chekbox -
parameters: p_check AS CHECKBOX MODIF ID ABC USER-COMMAND CH.
parameters: p_pernr like pa0001-pernr modif ID ABD,
P_DATE LIKE PA0001-BEGDA MODIF ID ABD.
Check sy-ucomm = 'CH'.
AT SELECTION-SCREEN OUTPUT.
loop at screen.
if p_CHECK = 'X'.
if screen-group1 = 'ABD'.
SCREEN-ACTIVE = '1'.
MODIFY SCREEN.
ENDIF.
ELSE.
if screen-group1 = 'ABD'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Maybe you are looking for
-
Hi everyone, I have been trying to get this GUI built from the ground up and I have encountered a problem with the GridBag(exception error that the fields being added can not be done. Also, my method main seems to be off track, I have a working progr
-
JDK 1.5 parser & parser properties listing..
Hi. I'd like to know, which parser is bundled with JDK1.5. Is it still Crimson? Also, i am trying to get properties of GNU JAXP dom implementation. Something I am doing wrong, because my app only says, that it supports only Core and XML - modules, an
-
Exit Code: 7 Please see specific errors below for troubleshooting. For example, ERROR: -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 3 error(s) ----------- Payload: Adobe Photoshop Lightroo
-
Hi Expert, I'm an ABAPer, With T-Code: OBBH I have implemented an enhancement for F-65, F-63, F-02 and so on. But I found out only F-02 is working , I need a solution, although the my side's FI consultant have read the SAP note 158739 but it can
-
Audio faults survey - please read and respond, thankyou.
I have posted a thread on the 17" forum to see exactly what faults people have, and how many are having then. Please reply to http://discussions.apple.com/thread.jspa?threadID=309592 Thankyou. If we know more specifics we can improve our chances of g