Selct Options in Module Pool screen.......
Hi Gurus,
We know the way to get the Select options on the Module -Pool screen as follows....
Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
I have tried the same as a test run for the FM. .but not returning meaningfull range......
Can any 1 clerify where the code containing the FM has to be included in the Screen flow (inside PAI, PBO or else) to get the range which can further be used inside the code for database selections or else..... .
Secondly, how is the inserted icon populated and used while coding........????
Thanks And Regards,
Abhi........
Hi
Please find the below code u will get select options
dont create any screen fitst jus type of prog is 'M' and create a tcode with 100 screen
than execute u will get select options
TABLES:VBAP.
SELECTION-SCREEN BEGIN OF SCREEN 100 .
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS S_VBELN FOR VBAP-VBELN.
PARAMETER P_WERKS LIKE VBAP-WERKS.
SELECT-OPTIONS S_ERDAT FOR VBAP-ERDAT.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN END OF SCREEN 100.
Regards
Surendra
Similar Messages
-
Getting select options in module pool screen
hi experts,
can any one suggest me how to provide select options in module pool screen.
thank you,
regards
vijayHi,
Take two fields on screen first for low value and other for high value (say vbeln_low and vbeln_high) also design a button next to the high textbox for select-option button used to display popup.
Using these two input fields append a range (say r_vbeln for vbap-vbeln) for the field to be used (either in query or anywhere).
ranges : r_vbeln for vbap-vbeln.
IF NOT vbeln_high IS INITIAL.
IF NOT vbeln_low LE vbeln_high.
MESSAGE e899 WITH text-007. "high value is smaller than low value
ENDIF.
ENDIF.
r_vbeln-sign = 'I'.
r_vbeln-low = vbeln_low.
IF vbeln_high IS INITIAL.
r_vbeln-option = 'EQ'. "if user takes only a singlr value
ELSE.
r_vbeln-option = 'BT'. "if user takes both low & high value
r_vbeln-high = vbeln_high.
ENDIF.
APPEND r_vbeln. "append range
CLEAR r_vbeln.
On the button click call this FM to call a popup for select-options.
DATA : tab TYPE rstabfield.
tab-tablename = 'VBAP'.
tab-fieldname = 'VBELN'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
title = text-002
text = ' '
signed = 'X'
* lower_case = ' '
* no_interval_check = ' '
* just_display = ' '
* just_incl = ' '
* excluded_options =
* description =
* help_field =
* search_help =
tab_and_field = tab
TABLES
range = r_vbeln
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
OTHERS = 5.
IF sy-subrc EQ 2.
MESSAGE s899 WITH text-003. "no value selected
ELSEIF sy-subrc <> 0 AND sy-subrc <> 2.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
This whole code will append your range r_vbeln to be used in program.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir -
How to creat select-option on module pool screen???
Hi All,
please tell me how to creat select-option on module pool screen???
Regards
DeepakHi Deepak Kumar Sharma,
There are Two ways to achieve it...
1) How to create a select-options in a module pool screen.
Method 1
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This call subscreen statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2
a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
struc_tab_and_field-fieldname = con_cust. " 'KUNNR'
struc_tab_and_field-tablename = con_kna1. " 'KNA1'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = ' '
text = g_titl1 " 'Customers'
tab_and_field = struc_tab_and_field
TABLES
RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
Read the very first entry of the range table and pass it to
dynpro screen field
READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
Also have a look on below threads
how to make select option in module pool
select option in module pool program
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7 -
Select Option on Module Pool screen
How to display select options on Module Pool screen ?
Via the search functionality, you will find something like :
SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
SELECT-OPTIONS: S_CARRID FOR SPFLI-CARRID,
S_CONNID FOR SPFLI-CONNID.
SELECTION-SCREEN END OF SCREEN 101.
and to use a CALL SELECTION-SCREEN xxxx in your module pool.
regards,
Hans -
Display Select option in module pool screen
What are the Function modules used to display Select option type fields in a module pool screen?
hi,
You can use the SELECT-OPTIONS statement to place a group of fields on the screen that allows users
to enter complex selections. The selection may be a single value, or any form of interval
Selection ranges are stored in programs using an internal table.
The ABAP statement SELECT-OPTIONS <selname> FOR <field> declares an internal table called
<selname>, containing four fields - SIGN, OPTION, LOW, and HIGH. The fields LOW and HIGH have
the same type as the field <field>.
The SIGN field can take the value 'I' (for inclusive) or 'E' (for exclusive).
The OPTION field can contain relational operators (EQ, NE, LE, LT, GE, GT), pattern operators (CP,NP), and operators that allow you to enter intervals (BT, NB).
SELECTION-SCREEN BEGIN OF BLOCK conn WITH FRAME TITLE text-001.
PARAMETERS pa_car LIKE wa_sflight-carrid OBLIGATORY.
SELECT-OPTIONS: so_car FOR wa_sflight-carrid,
SELECTION-SCREEN END OF BLOCK conn.
Hope this helps, Do reward. -
How to create select-options on module pool screen
Hi all
I want get a range of values from the user from the module pool screen.
Is there any element available on module pool screen like select options on the selection screen of reports.
reply me ASAS.
Thanks.hi krishna
actually I want to display the details of PO numbers from 45000100 to 45000150. user will enter this range on the module pool screen just as we enter on the selection screen of report. My question is do we have a button like select-option on the module pool screen.
Plz . reply me ASAP.
Thanks. -
Provide print option on module pool screen
Experts,
There is a urgent requirement where in I have to provide PRINT option just as in standard SAP screens, on to my module pool screen, ie I need to provide a option in the menu of the module-pool screen,up on selecting it should work as in the standard SAP-screen print option.
Correct answers will be promptly rewarded.
Regards,
Ram.Hi,
Enable the print function from Menu painter and code the printing functionality.
For coding the print functionality refer to the link :
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba5ef35c111d1829f0000e829fbfe/content.htm
Thanx & Rgds. -
Problem in creating a Select-option im a module pool screen
I've been searching how to do a select option in a module pool screen, I've found this neat tutorial http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html
but I'm having trouble to replicate it...
I've created this conde in my TOP include
SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN END OF SCREEN 201.
and this is my screen flow code
PROCESS BEFORE OUTPUT.
MODULE status_0100.
MODULE pbo_200.
PROCESS AFTER INPUT.
MODULE pai.
MODULE user_command_0200.
in the screen 200 I have a subscreen area named subs
but when I do this:
MODULE pbo_200 OUTPUT.
CALL subscreen subs including sy-repid '0201'.
ENDMODULE. " pbo_200 OUTPUT
it doesn't "compile"
it gives me this error:
""." or "ID ... FIELD ..." expected after "SUBSCREEN"."
what am I missing? it seems its not recognising the "CALL SUBSCREEN" command...you can't use CALL SUBSCREEN... in any ABAP section. It is reserved to dynpro flow logic. Just add it after PROCESS BEFORE OUTPUT (and also after PROCESS AFTER INPUT).
-
Hi all,
I have created a select options, for a screen field in a module pool.
When the user enters more than one value in this field, the icon multiple selection options should turn green , as happens in selection screen field.
Kindly help me regarding this.
Regards
RajCheck this thread - it explains same functionality with example in detail.
selection option on module pool screen? -
How to make select option in module pool
Hello,
Can anybody tell me how to create a select option in module pool screen..?
thanksEasiest way is to create a subscreen and embed this in your dynpro.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
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.
* Screen screen 100 with 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.
Regards,
Rich Heilman -
Multiple Select option in Module pool
Hi,
I wanna add a field for 'Delivery number' in the screen of a mod pool prgm.I created a subscreen area in the main screen and did the coding needed.now the problem i am having is if i giv a single value in the from field or values in the 'From' and 'To' field its not taken to the program,i saw it while debugging. but if i enter the values in the multiple selection option its taken to the program.That means from screen its not going to the program where as from the multiple select option its taken to the program,What may be the propblem.
Regards in Advance,
NitinHi,
Have you used the select-options in the subscreen or you have placed the multiple option manually?
Either way, please check the two methods, it may solve your problem.
Create a SELECT-OPTIONS in module pool screen using two methods as shown.
Method 1
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This CALL SUBSCREEN statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2
a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
struc_tab_and_field-fieldname = con_cust. " 'KUNNR'
struc_tab_and_field-tablename = con_kna1. " 'KNA1'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING*
TITLE = ' '
text = g_titl1 " 'Customers'
tab_and_field = struc_tab_and_field
TABLES
RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
Read the very first entry of the range table and pass it to dynpro screen field
READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
Regards -
Variants for module pool screena
Hi,
I tried creating a variant for module pool screen by using the FM : RS_CREATE_VARIANT.
For this i created a dummy report which has the same parameters as the fields in the screen.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = gc_dummy_rep
variant = 'variant5'
MOVE_OR_WRITE = 'W'
NO_IMPORT = ' '
EXECUTE_DIRECT = ' '
IMPORTING
SP =
tables
L_PARAMS =
L_PARAMS_NONV =
L_SELOP =
L_SELOP_NONV =
valutab = lt_params
OBJECTS =
FREE_SELECTIONS_DESC =
FREE_SELECTIONS_VALUE =
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 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.
but when i try to retrieve the values stored in the variant using FM : RS_VARIANT_CONTENTS.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = gc_dummy_rep
variant = 'variant5'
MOVE_OR_WRITE = 'W'
NO_IMPORT = ' '
EXECUTE_DIRECT = ' '
IMPORTING
SP =
tables
L_PARAMS =
L_PARAMS_NONV =
L_SELOP =
L_SELOP_NONV =
valutab = lt_params
OBJECTS =
FREE_SELECTIONS_DESC =
FREE_SELECTIONS_VALUE =
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 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.
I get an error message : variant5 not found.
is there anything that i miss here?
or is the way i use to create variant for module pool screen not right?
Regards,
KaminiHi,
To avail save variant option in module pool screen,
1. You need to create a data base table similar to INDX table with the fields RELID, VARI_NAME
PROG_NAME
UNAME
SRTF2, MEMORYID, CLUSTR, CLUSID. And the remaining fields can be anything.
2. Enable the Save button in the Function keys part of GUI Status. And Add a push button for Get variant.
3. When Save button clicked call a screen with a single field for variant (let us say g_var). After g_var entered, in the PAI of the initial screen export all the screen values to the created database index using the statement .
EXPORT: g_characteristics_tab TO DATABASE zav0257(ch) ID g_var,
s_auart TO DATABASE zav0257(au) ID g_var.
So that the values will be exported to database.
Then update the fields(VARI_NAME,PROG_NAME,UNAME) of the database table using modify from work area.
So that you will have the history of variance existence.
4. Next time , when the user clicks on Get Variant option, call another screen to enter the variant name. Then import the values for that variant from the memory id in the database table.
It worked for me. -
Selection-options on a module pool screen
Hi all,
How to define a field as selection-options on a module pool screen.
Thanks,
ChuongHi Chuong,
You will need to define the screen as a selection screen..
Else, you can define a subscreen area in your screen, define a subscreen as selection screen and call that screen here..
Thanks and Best Regards,
Vikas Bittera. -
Select-option field on module pool screen
hi all,
Can anyone pls let me know, how to design and use a field like a select-option field on a Module-pool screen i.e. how can i get that multiple selections tab after the high field of the select-options.
thanks in advance,
vinnyAll you need to do is define your selection screen and then embed it in a subscreen area of your dynpro(screen). Here is a sample program.
report zrich_0006 .
tables: mara.
* Custom Selection Screen 1010
<b>selection-screen begin of screen 1010 as subscreen.</b>
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.
<b>* Screen screen 100 with 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.</b>
Regards,
Rich Heilman -
Displaying MIR4 attachment list TIF image in module pool screen
Hi All,
I have a screen with a custom container and I tried to call a TIF image from MIR4 which is in attachment list(which is stored in archived link).
I need a function module to display this image in my Module pool screen using the container.
I tried using below code
* Create controls
CREATE OBJECT container_1
EXPORTING
container_name = 'CONTAINER'.
* create object container_2
* exporting container_name = 'PICTURE_CONTROL_2'.
CREATE OBJECT PICTURE_CONTROL_1
EXPORTING
parent = container_1.
* CREATE OBJECT PICTURE_CONTROL_2 exporting parent = container_2.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
EXPORTING
* URL = 'SAPR3://984BE16932C81EE3B2AA1E3B0D12C6FF'
* URL = 'file://E:\Personal\New_Passport4.jpg'
* URL = 'SAPR3://984BE16932C81EE3B2BDF8E44B035648.TIF'
*URL = 'SAPR3://SAPR3CMS/get/100/Z1/984BE16932C81EE3B2BDF8E44B035648//.TIF'.
URL = 'SAPR3://WebRepository/0020698212/DEMOWORD97SAPLOGO?Version=00000'
IMPORTING
RESULT = lv_result.
CALL METHOD PICTURE_CONTROL_1->set_display_mode
EXPORTING
display_mode = PICTURE_CONTROL_1->display_mode_fit_center.
But I am able to display this URL = 'SAPR3://WebRepository/0020698212/DEMOWORD97SAPLOGO?Version=00000' and not able to display my archive link image which is in TIF.
note: Display image of Arc.link Doc.type ZBUSI_TIF (doc.class TIF)
Please help me on this.
Thanks
Geetha CharanHi sai,
Please refer th procedure.
For the select-options you might have defined a selection screen.
Next you can fetch the entire data that you wanted to display in a module pool into an internal table.
you can call the screen you defined for o/p upon the selection.
Then, You define a screen XXXX and a table control in the scree, and in the PAI module of the screen
you write a chain end chain processing in which you can display the contents of your internal table.
OR
if you want the selection also to be in the module pool, then for displaying the O/P you can definr a sub-screen of the initial screen and you can call that sub-screen on selcting, which can be done with a function code.
Hope this helps
Maybe you are looking for
-
How do I format the internal HD on an iMac
I tried to install Lion on iMac 2004 (2008) Now the HD has a problem. I won't unmount via Disk Utility. The partition with the system shows a circle with a slash through it. The Mac will boot into other systems on both the internal and external drive
-
I want to tranfer all my data from my old macbook to new macbook air
i want to tranfer all my data from my old macbook to new macbook air
-
Greater than equal symbol are coming across as question mark
Hi: Greater than equal symbols and Less than equal symbols are coming across as question marks in Jasper Reports. Do you have any suggestions of how to solve this?
-
Why can't I see airport extreme or express on computer
Why won't airport extreme (part of a time capsule) respind when I turn it on after being off for a few days? Airport express too.
-
can you please tell me how do I find the file information on a document I have open in preview. I cant work out how to see the path?? and there doesnt seem to be a 'get info' or "show file in finder option" ? thanks