Select option in dialog, in a table control
Hi Friends,
My need is creating dynamic select options in a table control in dialog screen. How can I do my desire?
Thanks.
Hi,
You can make use of
FREE_SELECTIONS_INIT
and
FREE_SELECTIONS_DIALOG
Please see the documentation
a®s
Similar Messages
-
Select-option in module pool with table Control
HI,
How to use the select-option in Module Pool and how Can i use the Table control in it.
Can any body give me some Clues.
with rgds
RanjithHi ..
PBO.
LOOP at <table contriol>
module --- Inside the module
DATA: g_uti TYPE REF TO cl_fobu_input_util.
if rollname <> space.
CREATE OBJECT g_uti
EXPORTING typename =rollname.
*....convert to external pattern
CALL METHOD g_util->output_convert
EXPORTING
field_value_int = p_value " This is Tablecontrol-low
IMPORTING
field_value_ext = p_value. " Retrun value for Low
ENDLOOP.
lly you have code in PAI
DATA: g_util_1 TYPE REF TO cl_fobu_input_util.
if rollname <> space.
CREATE OBJECT g_util_1
EXPORTING typename = rollname.
*....convert to internal pattern
CALL METHOD g_util_1->input_convert
EXPORTING
field_value_ext = p_value
IMPORTING
field_value_int_c = p_value.
The above code should be written for tablecontrol-high aswell..
you can also refer: Inlcude LSE16NF10 line no 341 & 434 (SE16n)
Nag -
Select option in Dialog program screen
Hi friends,
do we have any way to get a select option displayed in dialog programming ?
or
create a screen field with the properties of a select option in dialog screen ?
or
any standard function module to support this scenario ?
Thanks and Regards
Sakthi.Hi,
i don't know you checked it or not, but i am able to do it, i send the screen shot also to you check it..
it is possible,with some coding also check it once...
REPORT ZTEST_SCREEN .
DATA : BEGIN OF IT_DYNPFIELDS OCCURS 3.
INCLUDE STRUCTURE DYNPREAD.
DATA : END OF IT_DYNPFIELDS.
DATA: TEST(10) TYPE C.
RANGES: R_UNAME FOR SY-UNAME.
DATA: V_USERNAME LIKE SY-UNAME.
DATA : V_PROG LIKE D020S-PROG VALUE 'ZTEST_SCREEN',
V_DNUM LIKE D020S-DNUM VALUE '0100'.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'TEST'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module GET_CURSOR_USERNAME INPUT
* text
MODULE GET_CURSOR_USERNAME INPUT.
REFRESH IT_DYNPFIELDS.
CLEAR IT_DYNPFIELDS.
MOVE 'V_USERNAME' TO IT_DYNPFIELDS-FIELDNAME.
APPEND IT_DYNPFIELDS.
CLEAR IT_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = V_PROG
DYNUMB = V_DNUM
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = IT_DYNPFIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
IF SY-SUBRC = 0.
READ TABLE IT_DYNPFIELDS WITH KEY FIELDNAME = 'V_USERNAME'.
IF SY-SUBRC = 0.
V_USERNAME = IT_DYNPFIELDS-FIELDVALUE.
ENDIF.
ENDIF.
PERFORM GET_MULTIPLE.
ENDMODULE. " GET_CURSOR_USERNAME INPUT
*& Form GET_MULTIPLE
* text
* --> p1 text
* <-- p2 text
FORM GET_MULTIPLE .
* Dynamically holding Field name
FIELD-SYMBOLS: <FST> TYPE STANDARD TABLE.
IF R_UNAME[] IS INITIAL.
IF NOT V_USERNAME IS INITIAL.
R_UNAME-SIGN = 'I'.
R_UNAME-OPTION = 'EQ'.
R_UNAME-LOW = V_USERNAME.
APPEND R_UNAME.
CLEAR R_UNAME.
ENDIF.
ENDIF.
ASSIGN R_UNAME[] TO <FST>.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = 'Select Multiple Value'(059)
TEXT = 'Finish Group'(058)
SIGNED = 'X'
LOWER_CASE = ' '
NO_INTERVAL_CHECK = 'X'
JUST_DISPLAY = ' '
JUST_INCL = 'X'
TABLES
RANGE = <FST>
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
READ TABLE R_UNAME INDEX 1.
IF SY-SUBRC = 0.
V_USERNAME = R_UNAME-LOW.
ENDIF.
ENDIF.
ENDFORM. " GET_MULTIPLE
Flow loogic....
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
PROCESS ON VALUE-REQUEST.
*- To capture the cursor and for f4
FIELD V_USERNAME MODULE GET_CURSOR_USERNAME.
in screen i have one field v_username
for that field do this
<b>double click on field which you want to make it as select option, it will display the attributes screen, in that click on program attributes button , now go to poss. entries in the dropdown choose 1 show at selection.</b>
Regards
vijay -
Select-Option in Dialog programming
Hi Experts,
Can we use select-options in Dialog programming?
If yes, Please help me, how to do that?
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:27 PMHi Asrar,
Definitely you can use select-options in dialog programming.
You can do this using Subscreen.
define this scubscreen in top include.
selection-screen : begin of screen 100 as subscreen.
select-option : kunnr for kna1-kunnr.
selection-screen : end of screen 100.
in screen 200 where this selection screen appears, create a subscreen area 'SSA'.
Process on output. "200 screen.
call subscreen SSA including sy-repid '100'.
other modules
Process on input. "200 screen.
call subscreen SSA.
other modules
now you can access kunnr like other screen 200 objects.
<REMOVED BY MODERATOR>
Regards
Megha
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:27 PM -
Select all and deselect all in table control
Hi experts,
I want to make the select all and deselect all options in my table control.
But i can't able to do that one. Kindly suggest me how to do that one.
one more thing, if i select some rows in the table control, and press save it should be saved in some other table. how can i implement that one.
Waiting for ur reply.
Regards...
Arun.Hi Arun,
In the context node that you bind to the table, set the cardinality as 0..n and selection as 0..n. In the UI element Table, set the property selectionMode as 'multi'. Then a toggle button for select/deselect all will appear automatically in your table. You can see it in the top left corner.
For your second question, after selecting the elemets and pressing 'save', in your event handler, do a get_selected_elements( ) on your node. This will return you a set of context elements. Loop through each element and do a get_static_attributes to get the rows. Then you can append these rows to another internal table and bind it to the context. Bind your second table to this node. If the two tables are in different views, the context nodes need to be present in the component controller and mapped to the views.
Hope this helps.
Regards
Nithya -
File format in pop up dialog box in table control
Hi All,
I am using a popup dialog box on user command click in table control. I have to fix the file format to '.CSV' format only from the selection, how to fix this. The FM is 'KD_GET_FILENAME_ON_F4'. Is there any other FM ?
Regards
GajendraHi,
To implement general checks in SRM,you can use BADI "BBP_DOC_CHECK_BADI".But the messages will not come in form of POP UPS.To display messages in the form of Pop up ,you need to implement both the BADI's BBP_DOC_CHANGE_BADI and BBP_DOC_CHECK_BADI.
For sample code,refer the foll link:
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/srm/bbp_doc_check_badi-CheckPurchasingDocument&
BR,
Disha.
DO reward points for useful answers. -
Select-options in Dialog Programming
Hi,
I am designing a custom dialog programming screen.
I want to create a filed on thescreen which can allow the range of values to be entered like select-options in a report.
How do I create a field which can accept range of values in dialog programming?
Thanks,
Ashok.Hi,
In your selection screen program, Use Export command
Export r_Purchase_Order To Memory Id 'PO'.
Export r_Po_Item To Memory Id 'POITEM'.
Export r_Plant To Memory Id 'PLANT'.
Export r_Vendor To Memory Id 'VENDOR'.
Export r_Material To Memory Id 'MATNR'.
Export r_Batch To Memory Id 'BATCH'.
Export r_Arrival_Date To Memory Id 'ADATE'.
Export r_Arrival_Time To Memory Id 'ATIME'.
Export r_Delivery_No To Memory Id 'DEL'.
Export r_Reference_No To Memory Id 'REF'.
Export r_User To Memory Id 'USER'.
Export t_Display_Data To Memory Id 'DISPDAT'.
In your Module pool program, Use Import Command
When c_Ok_0100_Execute.
IMPORT r_Purchase_Order From Memory Id 'PO'.
IMPORT r_Po_Item From Memory Id 'POITEM'.
Import r_Plant From Memory Id 'PLANT'.
Import r_Vendor From Memory Id 'VENDOR'.
Import r_Material From Memory Id 'MATNR'.
Import r_Batch From Memory Id 'BATCH'.
Import r_Arrival_Date From Memory Id 'ADATE'.
Import r_Arrival_Time From Memory Id 'ATIME'.
Import r_Delivery_No From Memory Id 'DEL'.
Import r_Reference_No From Memory Id 'REF'.
Import r_User From Memory Id 'USER'.
Import t_Display_Data From Memory Id 'DISPDAT'.
Thanks -
Hi,
I'm developing a dialog programming. 1st screen is the selection screen, i need to code the input for Parameter -> Material number , Select-option -> Plant. Problem hits on select option Plant.
If we code via normal type 1 executable program, i just need code like -> Select-options: S_PLANT for mara-werks. Since right now im in dialog programming then i need to code my own LOW and HIGH value. I have done that. But i need to code in the Multiple selection/Extension button that next to HIGH.
Do u guys know is there any FM that helping to create Multiple selection/Extension button? Like standard once click on it, it contains single value, ranges, exclude single value, exclude ranges...
Please comment.Hi,
1. Create the subscreen using the selection screen
2. Create the subscreen area in the Dialog program
3. Call this subscreen created in point 1 in the subscreen area of dialog programing.
selection-screen : begin of screen 0050 as subscreen.
select-option : s_pernr for pa0000-pernr.
selection-screen : end of screen 0050.
start-of-selection
call screen 100.
in PBO
call subscreen <subscreen area>including sy-repid '0050'.
in PAI
call subscreen <subscreen area> . -
Select-Options in dialog program
Hi there,
I'm using a selection-screen in a dialog program, I declared it in the TOP.
Selection-screens
SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
parameters: p_lifnr type lfa1-lifnr obligatory ,
p_werks type t001w-werks obligatory .
SELECT-OPTIONS:
s_licha FOR zbrtconsig-licha.
SELECTION-SCREEN END OF SCREEN 101.
I have to use the event at selection-screen on value-request for s_licha-low, and I need the values from the fields p_lifnr and p_werks. the problem is:
If I only fill the fields p_lifnr, p_werks and click on F4 for s_licha, the values of p_lifnr and p_werks are not updated, they are empty. Only wether I do an Enter this fields is updated.
Thanks,
Alexandre NogueiraHi,
i am not clear about your problem, please expalin it clearly.
use FM : DYNP_VALUES_UPDATE to update screen fields.
use FM : DYNP_VALUES_READ to read screen fields.
use SET /GET Parameter id's to set parameters
this FM will update the screen fields before to PBO event.
check this link for sample code :
Re: Issue Related to Module pool
Regards
Appana -
How to find the selected item in alv grid or table control
can any one tell me please
how to find the selected item in alv grid or table controlIn table control, If you goto screen painter and goto table control properties ( f2 ), there is one check-box w/selColumn check that and give column name. Then add that column to your internal table.
IN PAI
LOOP AT it_tkhdr.
FIELD it_tkhdr-sel_row
MODULE tab_tkhdr_mark ON REQUEST.
ENDLOOP.
MODULE tab_tkhdr_mark INPUT.
MODIFY it_tkhdr INDEX tc_tkhdr-current_line.
ENDMODULE. " tab_tkhdr_mark INPUT
here it_TKHDR is internal table sel_row is field for selection
After that, you can loop at it_tkhdr where sel_row is 'X' to get selected rows.
regards,
Gagan -
Append select options details in one intennal table
Hi
Here by i am selecting Specification data ESTRH-subid in selection screen using SELECT-OPTIONS
i.e SELECT-OPTIONS: s_specif FOR estrh-subid
I need to populate that SUBID details in one internal table, Please let me know procedure
and
I need to count no of recors selected in that selection, the reason is depends on number of records selected in selection screen, the program should run either foreground or back groud
MAdhuYou need something like this?
TABLES: vbak.
DATA: w_counter TYPE i.
TYPES: BEGIN OF ty_auart,
auart TYPE vbak-auart,
END OF ty_auart.
DATA: t_auart TYPE STANDARD TABLE OF ty_auart.
FIELD-SYMBOLS: <fs_auart> LIKE LINE OF t_auart.
SELECTION-SCREEN BEGIN OF BLOCK test.
SELECT-OPTIONS: r_auart FOR vbak-auart.
SELECTION-SCREEN END OF BLOCK test.
START-OF-SELECTION.
LOOP AT r_auart.
w_counter = w_counter + 1.
APPEND INITIAL LINE TO t_auart
ASSIGNING <fs_auart>.
<fs_auart>-auart = r_auart-low.
ENDLOOP.
Greetings,
Blag. -
Reading from select-options field into the internal table
Hi,
I have to read the low and high ranges from the select-options fields into a field in the internal table in order to update the same field in line item table. since the user may change the screen fields, i need to pass the values directly from the screen and store it in a variable in the internal table. Is there a way to pass both ranges, low and high to one variable which holds the entire range?
Thanks,
SruthyHi,
In the Selection screen you can directly read the field(Select-option)value using read statement as follows:
READ TABLE <SELECT-OPTIONS field name> [using index] INTO <work area>.
After reading you can directly access all the values as follows and can store them in the variables:
var1 = <work area>-LOW
var2 = <work area>-HIGH
var3 = <work area>-SIGN
var4 = <work area>-OPTION
as per your requirement.
I think this will help you.
<b>Kindly reward if helpful.</b>
Regards,
Shakuntala. -
Select options in dialog screen
Hi all,
I have used this logic in my program (ZSDIC001),
selection-screen begin of screen 1010 as subscreen.
selection-screen begin of block b1 with frame title text-001.
parameters: p_rad1 radiobutton group grp1 default 'X',
p_rad2 radiobutton group grp1,
p_rad3 radiobutton group grp1.
select-options: s_matnr for mara-matnr,
s_matkl for mara-matkl,
s_mtart for mara-mtart.
selection-screen end of block b1.
selection-screen end of screen 1010.
start-of-selection.
call screen 100.
*& Module STATUS_0100 OUTPUT
module status_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
endmodule.
*& Module USER_COMMAND_0100 INPUT
module user_command_0100 input.
endmodule.
create screen 100 and create a subscreen area called "subscreen_1010"
Screen Flow Logic follows
*process before output.
module status_0100.
call subscreen subscreen_1010 including sy-repid '1010'.
*process after input.
call subscreen subscreen_1010 .
module user_command_0100.
But i get this error,
Error when generating the selection screen "1010" of report "ZSDIC001".
Can anyone help me out to solve this problem.
Thanks,
Rajesh.I've copied your code and it generated fine without any error.
Possibly your subscreen container is to small.
Regards
Tobias -
I\
Moderator message : Search for available information, discussion locked.
Message was edited by: Vinod KumarHi,
You need to create table events to do so.
Refer blog
http://wiki.sdn.sap.com/wiki/display/ABAP/TABLE+MAINTENANCE+GENERATOR+and+ITS+EVENTS -
Variant for selection screen with the Table control entries in another Tab
Hi Guys,
The requirement is to create a variant for the two tabs on a selection screen.
First tab contains the select options and the second contains table control for making entries.
So will it be possible to create a variant when the user makes entries in the fields in one tab and the table on other tab?You wrote
Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
Regards,
Raymond
Maybe you are looking for
-
How do you write an import statement in a JSP? I did this but it isn't working... <%! import="java.util.Calendar" %> Thanks. P.S. - I got a dog on Saturday!
-
I don't want the cache and temp directory on my SSD and can't figure out how to relocate. I guess a person needs an IQ of 220 to use a computer in 2011.
-
Mac OS X - Scratches Discs!
Is anyone else having this problem? My new Mac OS X - desktop - is scratching discs. It is not how I pull the discs out. I am very careful. Apple has already replaced the superdrive twice now! And it is still scratching! The scratches are circular an
-
WL5.1sp8-NSAPI-IE-Status bar shows page is loading for minutes
I'm using WL5.1sp8, NES4.1sp6 on a Solaris 7 to deliver JSP pages over https. I notice that the status bar on the bottom line of IE5 (windows NT) indicates that the page is still loading for minutes, even though the page appears to be complete. What
-
On a parameter form, how would I enter in multiple parameters at reports runtime. In my query I have WHERE status IN (:p_status) I always get 0 records, no matter what punctuation I put in between the data on the Parameter form. What is the correct w