Selection screen as subscreen in module pool main screen
hello
i having problem with a module pool and a selection screen subscreen , i have my main screen 100 in my module pool
i create a sub screen area , then in my top include i define a seleccion screen as subscreen 150
i define some paramets and select-options ( for the select-options feature is because i choose use the subscreen )
so far here is OK , the problem is when i fill the subscreen data and press a pushbutton define in the main screen ( 100 )
the field are getting cleared ( BTW i call the subscreen in the PBO of the main screen ( 100 ) using call SUBSCREEN SUB_AREA INCLUDING SY-REPID '150'. ) so my question is how i can do for save the data filled in the subscreen ?
thanks
i find the solution of my own question:
in the first line of the PAI event of the main screen ( where you call the subscreen ) need add 'call subscreen SUB_AREA_NAME_HERE.
Similar Messages
-
Select-option on subscreen for Module pool
Hi all,
I need to add some elements on standard screen of a standard transaction. Everything works fine, but the problem starts when I want to add select-option. It is displayed, but when I press on Multiple selection button no action occurs, no window appears...I simplified the case and created test program with test screen and also I get the same behaviour. Anyone had similiar problem?
Thnak you in advance for help,
AnnaI donot know how u have created the select-option. but u can try these 2 methods to create it. And I have checked that both of them work fine.
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.
Regards,
Joy. -
SELECT-OPTIONS in Module Pool Sub-Screen
Hi,
I have been working on a Module-Pool Development, in the header portion of the Screen, I have provided a Selection-Screen as a Sub-Screen because the requirement specifies to display a SELECT-OPTION in the Header Area.
Now the problem is that, when working with the Screen, as soon as I press <ENTER> the Main Screen re-calls the Selection-Screen in the Sub-Screen area and all the entries made in the Selection-Screen are reset/erased.
Kindly provide a solution either to stop the <ENTER> action to re-call the sub-screen. Or on any alternate method(s) to provide a SELECT-OPTION on a Module Pool based Screen UI.
MAIN SCREEN Code:
* PROCESS BEFORE OUTPUT
PROCESS BEFORE OUTPUT.
*~ Set PF-STATUS and TiTLE for Screen 100
MODULE status_0100.
*~ Call the Subscreen Dynamically
CALL SUBSCREEN subscr1 INCLUDING sy-cprog gv_dynnr1.
CALL SUBSCREEN subscr2 INCLUDING sy-cprog gv_dynnr2.
* PROCESS AFTER INPUT
PROCESS AFTER INPUT.
*~ Handle the Exit Commands of Screen 100
MODULE user_command_0100 AT EXIT-COMMAND.
*~ Handle the User Command(s) for screen 100
MODULE user_action_0100.
CALL SUBSCREEN subscr1.
CALL SUBSCREEN subscr2.
So whenever <ENTER> is pressed, the PBO re-calls:
CALL SUBSCREEN subscr1 INCLUDING sy-cprog gv_dynnr1.
and the Selection-Screen is reset.
Regards,
Nishant Nayyar.Haii Nishant,
This problem was earlier solved by one of the members and after going through it i have now created a select-option in the Subscreen. Just create two input fields, name them as if they were low and high (for convinience as in case of select-option).
U now need to create a table of type rstabfield.
Ex: gt_rstab_bukrs type rstabfield.
Now create a button and assign a Fcode for it. When you click on this button then u need to implement the ranges functionality as in select-option. For that use the following function module:
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = ' '
TEXT = ''
SIGNED = 'X'
SEARCH_HELP = 'H_T001'
TAB_AND_FIELD = gt_rstab_bukrs
TABLES
RANGE = rg_bukrs1.
Hope it helps.
Best Regards,
rama -
How to hide subscreen in module pool
hello expert.
i created one Box, and inside box i created one subscreen in Module pool ->layout.and two radio button out side of the Box.
if i select 2nd radio button , want to hide subscreen.
how to hide subscreen. could you please send me the solution asap , it's urgent.
i written below code but not working.
LOOP AT SCREEN.
IF rad2 Eq 'X'
IF SCREEN-NAME = 'SUB1' .
SCREEN-INPUT = 0.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
Regards
srinivasexample:
BOX1
MATNR [ ] (Normal screen)
BOX2
BOM [ BOM-OW] TO [BOM-HIGH] (subscreen)
BOX3
radio buttons
push button
selection screnn etc..
if i selection 2nd radio button i will get.
BOX1
MATNR [ ] (Normal screen)
BOX2
empty
BOX3
radio buttons
push button
selection screnn etc..
my requirement is:
BOX1
MATNR [ ] (Normal screen)
BOX3
radio buttons
push button
selection screnn etc.. -
How to call table control in subscreen in module pool program
Hi all,
I have req,need call table control in subscreen,but have done but when scroll bar value getting changed ,
please guide how to do it.if its possable send the code.
regards
santoshHi,
The navigation happens like this.
Consider you have a main screen and 2 subscreens.
When you click or do some event in the Subscreen 2 (lets say this is the one that has the table control), this will first trigger PAI of the Main Screen. In the flow logic of the Main screen, you would have written call subscreen <subscreen area1> and call subscreen <subscreen area2>.
Now the subscreens get triggered based on the order in which you have written in the flow logic.
So, here the modules before the first call subscreen statement in the Main Screen PAI is all executed. Now, it goes to the subscreen on which you have triggered an event and executes the modules in the subscreen.
This is how the execution goes when you have subscreens.
So there is no problem with the navigation. You only have to worry about the screen where you have the table control. Just debug and find where data is getting changed or duplicated. -
Calling a module pool program screen to an executable program
Hi gurus,
I have created a executable program to use selection-screen and want to see my output in module pool program where I have designed table control according to my requirement.
How can I call the module-pool program screen from an executable program?
Any help?
Regards
MacHi Mac,
I think you can proceed with a report program alone . There you create a screen with the table control to populate your result.
In the report program, after getting values for internal table for your display, just call the said screen.
i.e.
CALL SCREEN <screen number>.
Hope this may help you.
Regards,
Smart Varghese -
How to Add F4 Help To a Screen Field In a Module Pool Program
Hi Friends,
1. How to Add F4 Help To a Screen Field In a Module Pool Program?
2. How to select a single cell in ALV report output for interactive reporting ?
Kindly give code example.
regards,
PradeepHi,
Try using the fm 'F4IF_INT_TABLE_VALUE_REQUEST'.
Refer the link below for selecting single cell.
alv
Reward points if useful.
Regards
Rose -
How many screens are there in module pool
hi gurus
can anyone suggest me
how many screens are there in module pool
thank you
regards
kals.see this link for better understanding of dialog programming/module pool programming.
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9ce935c111d1829f0000e829fbfe/content.htm
see this
Check the below link:
http://wiki.ittoolbox.com/index.php/FAQ:What_is_module_pool_program_in_abap%3F
http://help.sap.com/saphelp_46c/helpdata/en/35/26b1aaafab52b9e10000009b38f974/content.htm
http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.sap-img.com/
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
You can also check the transaction ABAPDOCU which gives you lot of sample programs.
Also you can see the below examples...
Go to se38 and give demodynpro and press F4.
YOu will get a list of demo module pool programs.
One more T-Code is ABAPDOCU.
YOu can find more examples there.
See the prgrams:
DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
http://www.geocities.com/ZSAPcHAT
http://www.allsaplinks.com/files/using_table_in_screen.pdf
Regards.
Chandru -
Is possible to change the color in a module-pool with screen-color??
How to do this?? There is an example?
Thanks for atention.
JNilsonHi NIlson,
Only possible color in Screens is BLUE , This is to the best of my knowledge
Re: Color for I/O field in module pool
if you want the Colors in table control then Go for ALV Grid
http://wiki.sdn.sap.com/wiki/display/Snippets/ALVGRIDCOMPLETEEXAMPLEWITHTOOLBARBUTTONSUSINGCLASS.
in PBO
loop at screen.
if screen-name = 'FIELD_NAME'.
SCREEN-INTENSIFIED = 1. " Whatever the value we pass here it will return only BLUE Color
MODIFY SCREEN.
endloop.
Regards
Ram -
Selection screen regeneration issue in Module pool
Hi experts,
I have designed a module pool in which i have included a selection screen as sub screen , and for the scenario i need to give custom f4 help for the selection field for that i have included logic ,My issue is when ever i am changing other code in the programs (other screen logic) the selection screen is reverting back to normal ...again i have to do the flow logic and screen change of selection screen.
Suggest me how i can avoid this .
Regards,
Siva Prasad.and for the scenario i need to give custom f4 help for the selection field for that i have included logic
was the error, use some AT SELECTION-SCREEN ON VALUE-REQUEST FOR {para|selcrit-low|selcrit-high} or PARAMETERS/SELECT-OPTIONS MATCHCODE OBJECT search_help statement, and your problem will vanish... (Edition of a generated object is hardly ever a good idea and never good practice)
Regards,
Raymond -
Calling subscreen in module pool
Hi friends,
I am trying to call sub-screen in module pool.
but it is giving me an error as "." or "ID ... FIELD ..." expected after "SUBSCREEN".
i am using followning statement
CALL SUBSCREEN SUB INCLUDING SY-REPID '0101'.
OR
CALL SUBSCREEN SUB. (SUB is screen i have created in layout).
I tried it a lot, but not able to solve it.
Kindly help me.Hi Kiran,
<li>Subscreen concept is like this. You have one main screen. You want another screen which has to be displayed on main screen when you run main screen.
<li>First we need to create subscreen area on main screen. Goto layout and click subscreen element and place on main screen and name to that subscreen area as SUB.
<li>Now create another screen type subscreen. place fields on that and write logic.
<li> Check REPORT demo_dynpro_subscreens.
Thanks
venkat.O -
Conditional call to a subscreen in module pool program.
Hi,
Could anybody please let me know how i will be able to call a subscreen conditionally in a module pool program?
Example: I have to call a subscreen XXXX if a FLAG = X. How will I achieve this?
I tried to write the below code in PAI
if flag = 'X'.
call subscreen XXXX.
endif.
This produced an error.
Regards,
SmitheshHi
In TOP Include
data repid type sy-repid,
dynnr type sy-dynnr.
In PBO of main screen
module status_100. " First Call This Module to provide the SubScreen Number to below Code
call subscreen sub including repid dynnr. " This serves the purpose of calling subscreen based on condition
in Program.
module status_100.
repid = sy-repid.
if your_condition = 'X'. " This also can be implemented in any PAI logi as its purpose is just to pass a value to DYNNR
dynnr = '200'. " The SUB Screen Number you want to pass
else.
dynnr = '300'. " Dummy Sub Screen Screen or any other (Make Sure these are of SUB SCREEN type )
endif.
endmodule
Cheerz
Ram -
Hi,Iam new to module pool.My requirement is to display data on the same screen in table control when the end user clicks on a pushbutton.For that I have created a work area in the main screen.I have created a subscreen with the table control I want data I want.But it is getting displayed immediately when the first screen is getting displayed.It should get displayed when user clicks on a pushbutton.
I think my question is clear,if not PLZ tell me where to clarify.Hi,
i got a solution for your problem and i tried it and is successful, i hope this wil resolve your problem.
as you said when you execute the transaction the table control wil be displayed, but for that you creat one more empty subscreen and make it default subscreen.
then you assign your subscreen with table control to be called when pushbutton is pressed.
DATA: NUMBER(3) TYPE N VALUE '300'. "empty subscreen
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
CALL SUBSCREEN AREA INCLUDING SY-REPID NUMBER.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
CALL SUBSCREEN AREA.
in report program.
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'DISPLAY'.
NUMBER = '200'. "subscreen with table control
WHEN 'BACK'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
regards,
prakash reddy .s -
How to write select options with extension in module pool program
hi,
M having the following fields through screen painter.
1. sales offfice
2.sales district
3.customer no
for those three fields no extension is not provided and no search help is there.
i want write seletion options to get extension in that module pool
screen.
plese send coding for me , please let me know how to get that
select options with the above all three fields.
Thanks & Regards
RajiCheck it
In top include
DATA: number(4) TYPE n VALUE '9005',
PROCESS BEFORE OUTPUT.
MODULE status_9001.
CALL SUBSCREEN AREA1 INCLUDING SY-REPID number.
PROCESS AFTER INPUT.
MODULE user_command_9001.
CALL SUBSCREEN AREA1.
*& Module status_9001 OUTPUT
text
MODULE status_9001 OUTPUT.
SELECTION-SCREEN BEGIN OF SCREEN 9005 AS SUBSCREEN.
PARAMETER pa_bukrs TYPE t001-bukrs.
select-options matnr for wa_matnr.
SELECTION-SCREEN END OF SCREEN 9005.
ENDMODULE. " status_9001 OUTPUT -
Getting error while calling a subscreen in module pool program
HI ALL,
ACTUALLY I'M GETTING A SYNTAX ERROR WHILE I'M CALLING A SUBSCREEN
IN A MODULE POOL PROGRAM IN PAI MODULE
THE ERROR IS AS FOLLOW
"." or "ID ... FIELD ..." expected after "SUBSCREEN"
CAN ANYBODY PLS HELP ME.
REGARDS
ANDREWSHI MAX ,
THE CODE IS AS FOLLOWS:
*& Report ZTABSTRIP_PS
REPORT ZTABSTRIP_PS.
type-pools : vrm.
DATA:number1 type I,
number2 type I,
result type I,
ok_code like SY-UCOMM,
employee1 type c,
ABAP(19) type c,
SALES(19) type c,
HR(19) type c,
MM(19) type c,
employee type c.
emp type c.
CONTROLS tabstrip TYPE TABSTRIP.
CALL SCREEN 100.
call screen 110.
call screen 130.
call screen 120.
call screen 140.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'STATUS'.
SET TITLEBAR 'TITLE'.
CASE OK_CODE.
WHEN 'BACK' or 'EXIT' or 'DELETE'.
leave program.
WHEN 'SAVE'.
MESSAGE 'please choose a valid function' TYPE 'I'.
WHEN 'BACK'.
leave PROGRAM.
when 'EXIT' or 'DELETE'.
leave to screen 0.
WHEN 'SAVE'.
MESSAGE 'please choose a valid function' TYPE 'I'.
endcase.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
when 'TAB1'.
tabstrip-activetab = 'TAB1'.
when 'TAB2'.
tabstrip-activetab = 'TAB2'.
result = number1 + number2.
when 'TAB3'.
tabstrip-activetab = 'TAB3'.
SET TITLEBAR 'TITLE1'.
when 'TAB4'.
tabstrip-activetab = 'TAB4'.
if employee = 'NEERAJ'.
ABAP = 'NEERAJ'.
elseif employee = 'UMESH'.
SALES = 'UMESH'.
ELSEIF employee = 'RAM'.
HR = 'RAM'.
elseif employee = 'ANIL'.
MM = 'ANIL'.
endif.
employee = employee.
WHEN 'BACK'.
leave PROGRAM.
when 'EXIT' or 'DELETE'.
leave to screen 0.
WHEN 'SAVE'.
MESSAGE 'please choose a valid function' TYPE 'I'.
ENDCASE.
WHEN 'BACK' or 'EXIT' or 'DELETE'.
leave program .
WHEN 'SAVE'.
MESSAGE 'please choose a valid function' TYPE 'I'.
endcase.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0110 OUTPUT
text
**MODULE STATUS_0110 OUTPUT.
SET PF-STATUS 'STATUS1'.
SET TITLEBAR 'xxx'.
**case ok_code.
**WHEN 'back' or 'exit' or 'delete'.
leave PROGRAM.
WHEN 'save'.
MESSAGE 'please choose a valid function ' TYPE 'W'.
ENDCASE.
**ENDMODULE. " STATUS_0110 OUTPUT
*& Module USER_COMMAND_0110 INPUT
text
MODULE USER_COMMAND_0110 INPUT.
number1 = number1.
number2 = number2.
CLEAR NUMBER1.
CLEAR NUMBER2.
REFRESH NUMBER1.
REFRESH NUMBER2.
ENDMODULE. " USER_COMMAND_0110 INPUT
*& Module STATUS_0130 OUTPUT
text
MODULE STATUS_0130 OUTPUT.
SET PF-STATUS 'STATUS2'.
SET TITLEBAR 'xxx'.
RESULT = number1 + number2.
*CLEAR RESULT.
REFRESH RESULT.
ENDMODULE. " STATUS_0130 OUTPUT
*& Module STATUS_0120 OUTPUT
text
MODULE STATUS_0120 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list.
l_value-key = '1'.
l_value-text = 'ANIL'.
APPEND l_value TO li_list.
CLEAR l_value.
CLEAR li_list.
l_value-key = '2'.
l_value-text = 'RAM'.
APPEND l_value TO li_list.
CLEAR l_value.
CLEAR li_list.
l_value-key = '3'.
l_value-text = 'NEERAJ'.
APPEND l_value TO li_list.
CLEAR l_value.
CLEAR li_list.
l_value-key = '4'.
l_value-text = 'UMESH'.
APPEND l_value TO li_list.
CLEAR l_value.
CLEAR li_list.
l_name = 'employee'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = l_name
VALUES = li_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.
CLEAR li_list.
ENDMODULE. " STATUS_0120 OUTPUT
*& Module USER_COMMAND_0120 INPUT
text
MODULE USER_COMMAND_0120 INPUT.
INCLUDING sy-repid '140'.
employee1 = employee.
IF employee1 CS 'NEERAJ'.
call SUBSCREEN sub4 .
ABAP = 'NEERAJ'.
CLEAR ABAP.
ELSEIF employee1 CS 'UMESH'.
call SUBSCREEN sub4 .
SALES = 'UMESH'.
CLEAR SALES.
elseif employee1 CS 'RAM'.
call SUBSCREEN sub4 .
HR = 'RAM'.
CLEAR HR.
ELSEIF employee1 CS 'ANIL'.
call SUBSCREEN sub4 .
MM = 'ANIL'.
CLEAR MM.
endif.
ENDMODULE. " USER_COMMAND_0120 INPUT
*& Module STATUS_0140 OUTPUT
text
MODULE STATUS_0140 OUTPUT.
*CASE OK_CODE.
WHEN employee1 'NEERAJ'.
screen-active = 1.
ABAP = 'NEERAJ'.
WHEN employee1 = 'UMESH'.
screen-active = 1.
SALES = 'UMESH'.
WHEN employee1 = 'RAM'.
screen-active = 1.
HR = 'RAM'.
WHEN employee1 = 'ANIL'.
screen-active = 1.
MM = 'ANIL'.
endif.
*ENDCASE.
ENDMODULE. " STATUS_0140 OUTPUT
Maybe you are looking for
-
What are the settings for the "Default Client Settings"?
What are the settings for the "Default Client Settings"? I changed them instead of creating a new policy and would like to fix that. Thanks James A+, Network+, MCP
-
Spotlight does not open a finder window when i choose Show all in finder menu?
I have a significant number of files in my Macbook Air. A lot of them are research papers and medical literature. About a month ago I updated the operating system from snow Leopard to mountain Lion and I had no reasons to complain except a smaller ba
-
I don't know if my issue is a data connection issue or what, but, I use my GPS constantly during the summer months when my husband and I travel. I used the GPS and Cardio Trainer (which uses GPS to track your workout) on my Droid X without any probl
-
Hello, I have created a Captivate 8 responsive project. In this project I captured a software simulation. One of the software sim slides was captured as a video slide. How do I remove the video part of the slide w/o being prompted top delete the w
-
Problems searching with INPATH
hi, i want to search in a table by INPATH where i saved my xml files as blobs. searching with the contains query operator works fine, but the problem is, that i don't get any results if i try to search using INPATH in the contains query. do i need sp