Calling a Selection Screen from a Function Module/Method
Hi,
I would like to call a selection screen from a function module or method. I understand it is not possible by the definition. Are there any alternative options as I am looking for the Variants Save option on the screen. Any thoughts?
Thanks
Raghav
Since i don't know your exact requirements (standard SAP selection screen? your own selection screen?) the onl;y thing i can come up with is:
1. in your function pool create your own screen with a subscreen area
2. create your own selection screen as a subscreen.
3. include the selection subscreen in the first screen
4. call the first screen in your function.
Similar Messages
-
Can we call a selection screen from List output
Hi Folks,
Can we call a selection screen from the list output?
I mean for ex:-
i am getting the data from MAKT and displaying it in the list output having a button EMAIL.
When I press that button it should call a selection screen asking the user to enter EMAIL id .
Thanks,
K.Kiran.Hi
U can create a dynpro as SELECTION SCREEN and call it using CALL SELECTION-SCREEN statament:
SELECTION-SCREEN BEGIN OF SCREEN 100.
PARAMETERS: P_MAIL(80) TYPE C.
SELECTION-SCREEN END OF SCREEN 100.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'MAIL'.
CALL SELECTION-SCREEN 100.
IF SY-SUBRC = 0. "User press F8
ELSE.
" User press exit or back
ENDIF.
U can use the addition STARTING AT ..... ENDING AT ..... if you need to show the selection-screen as popup
Max -
How to call a WD Application from a function module?
Hi Folks,
I have a requirement in my project to call my web dynpro application from a function module .
Can someone help me out with this , some example or docs would be of great help .
Regards
Abhishek SahaiHi,
why you want to have a FM to call the Application. If it is called also, do you want to display the applicaiton output to user.
Do you use this FM inside any class or WD compoent or what.
There is a class CL_WD_UTILITIES=>CONSTRUCT_WD_URL where an Application is generated but you need to have the windoe manager to show this application.
Can you elaborate more on your requriement.
Regards,
Lekha.
Edited by: Lekha on Sep 29, 2009 4:09 PM -
How to call dynamic selection screen from another report
hi,
i have transaction ZFAGLL03.
it has got standard selection screen.. and dynamic selection screen...
i am calling this transaction from another report, now how do i display this dynamic selection screen.....Try following code and see if it helps:
TYPE-POOLS : rsds.
TABLES:tgsb.
DATA: trange TYPE rsds_trange,
trange_line
LIKE LINE OF trange,
trange_frange_t_line
LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line
LIKE LINE OF trange_frange_t_line-selopt_t,
trange_line1
LIKE LINE OF trange,
trange_frange_t_line1
LIKE LINE OF trange_line-frange_t,
trange_frange_t_selopt_t_line1
LIKE LINE OF trange_frange_t_line-selopt_t,
texpr TYPE rsds_texpr.
DATA: seltab TYPE TABLE OF rsparams WITH HEADER LINE,seltex TYPE rsds_texpr.
SELECT-OPTIONS:so_gsber FOR tgsb-gsber.
LOOP AT so_gsber.
trange_line-tablename = 'FAGLFLEXA_FS'.
trange_frange_t_line-fieldname = 'RBUSA'.
MOVE-CORRESPONDING so_gsber TO trange_frange_t_selopt_t_line.
APPEND trange_frange_t_selopt_t_line
TO trange_frange_t_line-selopt_t.
ENDLOOP.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = texpr.
submit FAGL_ACCOUNT_ITEMS_GL with FREE SELECTIONS texpr AND RETURN . -
Reg: calling selection screen from the second list
Hi all,
How can we call the selection screen from the second screen.
Can any one help me to solve this problem.HI RJ,
Try .....
case sy-ucomm.
WHEN '&F03'.
LEAVE TO SCREEN '0'.
endcase.
after the FM for grid-display
i m using the same .....
i hav selection-screen..then alv grid screen 1 then again another screen with alv grid display..
bt in my code for first alv grid ...i m using REUSE_ALV_GRID_DISPLAY_LVC
as
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS'(303)
i_callback_user_command = 'USER_COMMAND'(304)
i_grid_title = 'Reconcilation Report'(305)
is_layout_lvc = it_layout
it_fieldcat_lvc = gt_fieldcat3[]
TABLES
t_outtab = gt_msg[].
here i musing set_pf_status to add one pushbutton to the screen. in ur case u can avoid that...
after that
*& Form set_pf_status
text
-->EXTAB text
FORM set_pf_status USING extab TYPE slis_t_extab. "#EC NEEDED
SET PF-STATUS 'STANDARD_FULLSCREEN'.
*get back to Selection Screen
case sy-ucomm.
WHEN '&F03'(328).
LEAVE TO SCREEN '0'.
endcase.
ENDFORM. "set_pf_status
its working for me..
Thnx
Rohit...
Edited by: Rohit Kumar on Oct 29, 2008 3:20 PM -
Problem in creating selection screen from screen painter
hi ,
i am working with screens i have created a screen and in that wehn i click report button it has to ask for select options for dates.from there i will write a select quesry based on selection dates ...how to call a selection screen from screen.i created an include and in that include i used select options.but it is showing error message .guide me how to do it ?Hi..
Here for your problem,
I have created a button with function code 'CLICK' in screen no 1000.
when I click on the button I am capturing the ok_code and displaying the selection screen.
ok_code = sy-ucomm.
case:ok_code.
when 'CLICK'.
SELECTION-SCREEN BEGIN OF SCREEN 500 TITLE title.
SELECT-OPTIONS: P_DATE for sy-datum.
SELECTION-SCREEN END OF SCREEN 500.
title = 'Input Date'.
CALL SELECTION-SCREEN '0500'.
endcase.
You can also have them as subscreen by providing the required parameters in the selection screen.
Hope this solves your problem.
Warm Regards,
Bhuvaneswari. -
Can I call a selection-screen that is in another function group?
I am writing a function module in function group ZFG_A.
There exists a Dypro 9001 that exists in function group ZFG_B.
How can I call the dynpro 9001 from my function in ZFG_A?
This is not OO so I am not sure how to qualify the 9001? Such as ZFG_B=>9001
call selection-screen 9001 starting at 5 5
ending at 70 15.
I get compile errors on the selection-screen variables because they are not found.
Thank you,
OlivierIts not at all possible to call a screen of different program from other program.
But u can copy the screen using a FM called 'RS_SCRP_COPY' or 'RS_SCREEN_COPY'. In the former u can copy the screen with out popup but u have to specify the SOURCE program name and screen number and TARGET program name and screen no.
In the later u ll get the popup similar to when u copy a screen in SE51.In the popup as u know u have to enter source name and screen no. and target program name and screen no.
Thanks & Regards
Santhosh -
Calling custom screen inside a function module
This is regarding calling a screen as a pop up from a function module.How do I capture the values that would be entered in the fields of that pop up screen?Do I use ABAP memory or SAP memory or is there any other alternative?Please suggest.
Hi savitha,
When you create the Custom Screen, you can attach that custom screen to the main program of the function module itslef.
The TOP Include variables can be used as screen fields and hence you don't need to store the data entered in the screen, anywhere else.
The data will be readily available in the global variables itself in the whole function group..
Thanks and Regards,
Kunjal Patel -
Calling java APIs from a function module
Hi,
Can someone tell me whether it is possible to call Java APIs from a function module in SAP system?
Thanks in advance,
VineethaHi,
I guess you have changed the properties of screen only.
I assume you have made a Ztransaction Code.
When you define a transaction code, you need to specify a screen number for radio option program and screen and you need to specify a screen and not subscreen.( I think so!!)
You changed only the code without changing the transaction code properties.
Therefore, i think u r getting a dump.
If you want to call your subscreen, call it in some screen and then call that screen using your transaction code properties.
To include a subscreen screen in the subscreen area of the main screen and call its PBO flow logic, use the following statement in the PBO event of the main screen:
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN <area> INCLUDING <prog> <dynp>.
To call the PAI flow logic of the subscreen screen, use the following statement in the PAI flow logic of the main screen:
PROCESS AFTER INPUT.
CALL SUBSCREEN <area>.
Refer:
http://help.sap.com/saphelp_webas630/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
Regards,
Tanveer.
Please mark helpful answers.
Message was edited by: Tanveer Shaikh
Message was edited by: Tanveer Shaikh -
Getting values from a function module called in a WDA method
Friends,
I am trying to execute a function module from WDA.
I have created a service call for the function module. The function module takes values from the user, looks up the corresponding values of another field and returns the values in an internal table.
I am using the "Method Call in Used Controller" of WD Code wizard to call the function module.
When the event handler method containing the call to the function module is executed, nothing happens.
I am not sure how to pass values to the function module and to get the return values from the function module.
I am new to using function modules from WDA. Please help me out.
Thanks and Regards.Rashmi,
Is the function module intended to collect input data from the UI and process it? - Yes
If yes, then the input (importing parameter) to the Function Module is a table of values (which should be ideally from the context mapped to the Table UI Element). - The importing parameter is a single value NOT a table and is mapped to the view context.
Now this table UI Element is bound to the view controller context , which in turn is mapped to the component controller context. And you are indeed being able to read the value of this internal table in the component controller method where the function module is being called by means of get_static_attributes_table (Is this right? - Yes, I am able to read the table of values that is passed from the component controller view to form view context by using get_static_attributes_table.
Or are you being able to read it in the event handler method of the view controller and not being able to read it in the component controller method) -
The function module takes a single value as import parameter and returns a table of values as return value.
It works fine when no importing parameter is being used and returns the table of values that is getting passed from component controller context to form view context when i am able to read it using get_static_attributes_table.
Now the question is: how to pass the import parameter value to the function module. I assumed since the importing parameter is a context node (like the return values are), i should set the value ( captured when the user enters the value in the form) to the importing parameter context attribute using set_attribute method. Since it is mapped to the component controller context, i assumed it will get passed and the method will take it as input parameter.
Let me know if my assumptions are correct regarding passing the import parameters and what is missing here.
Thanks and Regards. -
Call report selection screen in module pool program with tab strip control
Hi,
Could anyone explain in detail to call report selection screen in module pool program with tab strip control.
Thanks
ManoHi,
Refer std program:
demo_sel_screen_in_tabstrip.
demo_sel_screen_with_tabstrip.
Call your program with SUBMIT stmt form module program.
Reward points if this Helps.
Manish -
Calling selection screen from another selecton screen.
Hi guys,
I want to call default selection screen of one program from default selection screen of another program.
Is that possible . would appreciate some helpful answers.
Thanks,
Venkat.it is possiable.
1.submit
2. call transcation t_code.
Syntax
SUBMIT <prog>.
For more information about the SUBMIT statement, see Calling Executable Programs (Reports)
Assume the following simple report:
REPORT ZDYN3.
WRITE / 'Dynamic Program!'.
The following executable program (report) starts, modifies, and restarts ZDYN3:
REPORT ZMASTER1.
DATA CODE(72) OCCURS 10.
DATA LIN TYPE I.
READ REPORT 'ZDYN3' INTO CODE.
SUBMIT ZDYN3 AND RETURN.
DESCRIBE TABLE CODE LINES LIN.
MODIFY CODE INDEX LIN FROM
'WRITE / ''Dynamic Program Changed!''.'.
INSERT REPORT 'ZDYN3' FROM CODE.
SUBMIT ZDYN3.
The output of this program is displayed on two subsequent output screens. The first screen displays:
Dynamic Program!
The second screen displays:
Dynamic Program Changed !
When you use the SUBMIT statement, all modifications made to a program during runtime take immediate effect before they are submitted. In the above example, ZDYN3 is submitted from ZMASTER1 first in its original and then in its modified form, generating different results.
This is not the case if you change the codes of include programs or subroutines dynamically.
Assume the following include program:
INCLUDE ZINCLUD1.
WRITE / 'Original INCLUDE program!'.
and an executable program (report) for modifying and including it:
REPORT ZMASTER2.
DATA CODE(72) OCCURS 10.
DATA LIN TYPE I.
READ REPORT 'ZINCLUD1' INTO CODE.
DESCRIBE TABLE CODE LINES LIN.
MODIFY CODE INDEX LIN FROM
'WRITE / ''Changed INCLUDE program!''.'.
INSERT REPORT 'ZINCLUD1' FROM CODE.
INCLUDE ZINCLUD1.
If you run ZMASTER2, the source code of include program ZINCLUD1 is changed and replaced in the system. However, the last line of ZMASTER2 executes the older version since the runtime object of ZMASTER2 is generated before ZINCLUD1 is modified. Only when ZMASTER2 is run a second time, does the system determine that ZINCLUD1 has been changed. Exactly the same is true if you dynamically modify the source code of a subroutine and call it from within the same program.
One way to solve this problem is to use the INCLUDE statement within an external subroutine that is called by the program. This allows you to create or modify include programs or subroutines and use the updated versions directly in the same program.
Assume the following include program:
INCLUDE ZINCLUD1.
WRITE / 'Original INCLUDE program!'.
and an external subroutine:
PROGRAM ZFORM1.
FORM SUB1.
INCLUDE ZINCLUD1.
ENDFORM.
The following program reads the include program, modifies it, enters it back into the system, and calls the subroutine.
REPORT ZMASTER3.
DATA CODE(72) OCCURS 10.
READ REPORT 'ZINCLUD1' INTO CODE.
APPEND 'WRITE / ''Extension of INCLUDE program!''.' TO CODE.
INSERT REPORT 'ZINCLUD1' FROM CODE.
PERFORM SUB1(ZFORM1).
This produces the following output:
Original INCLUDE program!
Extension of INCLUDE program!
In this case, the updated version of the include program is used in the subroutine because its time stamp is checked when the subroutine is called, and not when the calling program is generated. -
F4 help in the selection screen from a int table
I collected the datas from the function module. and the internal table is populated.
the internal table contains manny fields.
among these fields i need to take only one field and this field value to be used for F4 help in the selection screen ( not a dynpro)
for example : in the selection screen
I have to select the PO.
based on the user i have filtered the PO. (determined dynamically by using the user name this i have done it)
then i have to assign the PO the selection screen.
which FM will be better to use for this type of scenario and help me out with some example codes particularly for my req
ThanksHi ,
use the FM 'F4IF_INT_TABLE_VALUE_REQUEST'
This example is for search help for material type .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_mtart-low .
select all material types you want to display in search help into table i_mtart.
PERFORM select_material_type.
PERFORM help_material_type.
*& Form help_material_type
text
--> p1 text
<-- p2 text
FORM help_material_type .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'MTART'
PVALKEY = ' '
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'S_MTART-LOW'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = i_mtart
FIELD_TAB =
RETURN_TAB =
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.
ENDFORM. " help_material_type
Regards,
Balaji. -
How to call a sub screen from abap report
Hellow friends,
how to call sub screen 1001 prog name SAPLMGD1
and main program SAPLMGMM screen 4000 of tcode MM02.
i need to call the sub screen from abap reportHi Rajesh,
You can use FM MATERIAL_MAINTAIN_DIALOGUE to go to subcreen MRP1 in MM02.
Please check this sample code from other thread and enter 'MRP 1' for p_dytxt.
REPORT zsritest.
TABLES mara.
DATA: lv_bilds LIKE t133a-bilds,
ls_t130m LIKE t130m,
ls_rmmg1 LIKE rmmg1,
lwa_view TYPE mbildtab,
lwa_auswg TYPE mgauswg,
lt_views TYPE STANDARD TABLE OF mbildtab INITIAL SIZE 0,
lt_auswg TYPE STANDARD TABLE OF mgauswg INITIAL SIZE 0.
PARAMETERS: p_matnr LIKE mara-matnr,
p_werks LIKE marc-werks,
p_dytxt LIKE mbildtab-dytxt.
SELECT SINGLE * FROM mara WHERE matnr EQ p_matnr.
CHECK sy-subrc EQ 0.
CALL FUNCTION 'T130M_SINGLE_READ'
EXPORTING
tcode = 'MM02'
kzrfb = 'X'
IMPORTING
wt130m = ls_t130m
EXCEPTIONS
not_found = 1
wrong_call = 2
OTHERS = 3.
CALL FUNCTION 'BILDSEQUENZ_IDENTIFY'
EXPORTING
branche = mara-mbrsh
materialart = mara-mtart
tcode_ref = ls_t130m-trref
* KZRFB = ' '
IMPORTING
bildsequenz = lv_bilds
* KZ_BILDS_CHANGED =
EXCEPTIONS
wrong_call = 1
not_found = 2
OTHERS = 3.
CALL FUNCTION 'SELECTION_VIEWS_FIND'
EXPORTING
bildsequenz = lv_bilds
pflegestatus = mara-pstat
TABLES
bildtab = lt_views[]
EXCEPTIONS
call_wrong = 1
empty_selection = 2
OTHERS = 3.
ls_rmmg1-matnr = mara-matnr.
ls_rmmg1-werks = p_werks.
READ TABLE lt_views INTO lwa_view WITH KEY dytxt = p_dytxt.
CHECK sy-subrc EQ 0.
lwa_auswg-auswg = lwa_view-auswg.
APPEND lwa_auswg TO lt_auswg.
CALL FUNCTION 'MATERIAL_MAINTAIN_DIALOGUE'
EXPORTING
irmmg1 = ls_rmmg1
* IRMMG1_REF = ' '
KZ_EIN_DARK = 'X'
t_tcode = 'MM02'
* FLG_MATNR_RES = ' '
p_pstat = mara-pstat
* FLG_STAT_ALL = ' '
* CALL_MODE2 = ' '
* IMPORTING
* MATERIAL_NO =
* UPDATE_OK =
TABLES
iauswg = lt_auswg[]
EXCEPTIONS
no_authority = 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.
Regards,
Ferry Lianto -
How to call a Search help in a function module?
Hi Experts,
I am a novice to ABAP, I am working on search helps. My requirement is to call a search help in a function module.
Can anyone please throw some light on this.
Any inputs will be helpful.
Thanks,
Amitayes you can do that..
in side the source code ..
write the select statement according to requirement and pass the internal table to below function moduel and return field to yor help field..
call the below fm inside the function module..
'POPUP_WITH_TABLE_DISPLAY' or 'REUSE_ALV_POPUP_TO_SELECT'
see the sample code...
FUNCTION Z_MFG_PLANTS_F4 .
"*"Local Interface:
" IMPORTING
" REFERENCE(W_WERKS) TYPE WERKS OPTIONAL
" IMPORTING
" REFERENCE(W_MATNR) TYPE MANTR OPTIONAL
Alv popup display
DATA : gc_selfield TYPE slis_selfield,
gt_fieldcat_drd TYPE slis_t_fieldcat_alv WITH HEADER LINE.
p_werks = W_WERKS.
data : begin of t_marc occurs 0,
werks type werks,
matnr type matnr,
end of t_marc
select matnr werks from marc into table t_marc where werks = p_werks.
IF t_disp[] IS NOT INITIAL.
gt_fieldcat_drd-seltext_m = 'Material'.
gt_fieldcat_drd-fieldname = 'MATNR'.
APPEND gt_fieldcat_drd.
CLEAR : gt_fieldcat_drd.
gt_fieldcat_drd-seltext_m = 'WERKS'.
gt_fieldcat_drd-fieldname = ''WERKS'.
APPEND gt_fieldcat_drd.
CLEAR : gt_fieldcat_drd.
Allow the user to select the required plant
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
i_title = 'Material Selection for Plant'
i_selection = 'X'
i_screen_start_column = 5
i_screen_start_line = 5
i_screen_end_column = 70
i_screen_end_line = 20
i_tabname = 'T_MARC'
it_fieldcat = gt_fieldcat_drd[]
IMPORTING
es_selfield = gc_selfield
TABLES
t_outtab = t_MARC
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc 0.
ENDIF.
READ TABLE t_MARC INDEX gc_selfield-tabindex.
IF sy-subrc = 0.
w_matnr = t_matnr-matnr.
ENDIF.
ENDIF.
ENDFUNCTION.
rgrds,
Shweta
Maybe you are looking for
-
Where is the Print Settings Dialog?
Hello everyone, I was trying to print sheet music from my Sibelius application. It would not print the final bar. I changed the black ink on my Canon i850 and updated the driver. Still the final bar would not print. I posted my issue on the Sibelius
-
Dear all, We are suddenly facing a problem in the PRD system. There user are getting the below error and if they restart there system than it is solved Load balancing error 88: Cannot connect to message server (rc=9) few days back We have upgrad
-
Looking for SFX template: 35mm viewfinder
Does anyone know if there are some cool 35mm viewfinder type templates already built and available for FCP? I'm trying to build one now in Photoshop...it is VERY slow going because I'm such a NEWB to Photoshop.... I'd like to use the effect for video
-
Mobile Me, Entourage and Hotmail??!?
Forgive me if this has been answered, but I've got Entourage on my MacBook and I have my hotmail acct. downloaded through that, now I've got my iPhone and MobileMe and I don't know how to sync my mail through that...I do have the free version of hotm
-
Hyperlink a customer field on the sourcing screen
Does the capability exist to hyperlink a customer field that will appear on a web template? For this example I need to hyperlink a customer field on the sourcing cockpit screen. There is a customer field called prev PO. This field should hyperlink