Problem in creating dynamic select-options creating from ';' seperated file
Hi all,
My requriement is selection screen fields will come from a flat file like below(first row is field names and remaining r field values)
For example for VBAK table
VBELN;VKORG;VTWEG;SPART
3999202;B227;BD;XX
file can be vary(number of fields) and based on table .
Please let me know how can i convert this file in to the selection-screen fields and how can i pass these values in the select statement WHERE condition....
Thank you very much,
Krishna D
Hi,
First Split the Data using Field Symbold.Because you don't know how many fields are there in the text file.
Pass the values to the below Syntax
SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE <node>.
declares a node <node> of a logical database for dynamic selections in the selection include.
You have an Example in the Below Link.
http://help.sap.com/SAPhelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/content.htm
Thanks,
Venkat.
Edited by: Venkatesh Kolluru on Mar 4, 2011 6:32 AM
Edited by: Venkatesh Kolluru on Mar 4, 2011 6:32 AM
Similar Messages
-
Problems creating dynamic selection screen
Hi all,
i'm trying to dynamically generate a selection screen and show it as subscreen using the two function modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG. I call the function modules in the PBO of the therefor defined subscreen. The FREE_SELECTIONS_DIALOG fm has the two import parameter "as_subscreen" and "as_window". If i use the "as_window" parameter the selection screen comes up as popup. If i use the "as_subscreen" parameter, i can't see anything in my defined subscreen.
Any suggestions ?
Thanks in Advance
DirkHi,
The above requirement is not possible without using logical database.
The reason is that the compiler identifies the below syntax only inside a LDB program .
SELECTION-SCREEN DYNAMIC SELECTIONS
FOR {NODE|TABLE} node [ID id].
The above syntax creates a subscreen container on the standard selection screen of the program during generation
and we are able to view the dynamic selections icon on the selection screen.
Hence it is not possible to use the FM 'FREE_SELECTIONS_DIALOG' as a subscreen without using a
logical database of the relevant table.
However if you dont want to create a new LDB for each table, there is a trick which needs to be performed
once in your SAP system and all custom programs can use this FM to create a dynamic selection screen
as a subscreen of the standard selection screen.
The prerequisite steps are as follows:
1: Create a dummy / test database table in SE11 with a single field i.e. for example mandt , matnr
2: Create a new logical database program for this table in SE36. Save and activate.
This will create dynamic selections for the fields of the table created in step 1.
Steps to be followed in the required custom ABAP program to create the dynamic selection screen as a subscreen.
A: Include the LDB program created in step 2, in the attributes of the custom ABAP program.
Now when you execute the program, you can see the dynamic selection icon for the dummy table created in step 1.
B: In your custom program we need to suppress the icon for 'Dynamic Selections' from the standard selection screen.
We need to perform this action, because the 'Dynamic Selections' icon always triggers a call to the
dynamic selection screen of the included LDB progam. ( In our case a dummy table created in step 1 ).
Whereas we want to trigger a call of the dynamic selection screen of our desired table.
Logic is as follows:
In 'AT SELECTION-SCREEN OUTPUT' event call the FM RS_SET_SELSCREEN_STATUS to exclude the fcode 'DYNS'.
C: Add a pushbutton / checkbox on your selection screen to trigger a call to the FM 'FREE_SELECTIONS_INIT' &
'FREE_SELECTIONS_DIALOG' in the 'AT SELECTION-SCREEN' event.
D: When the user clicks the pushbutton / checkbox for dynamic selections call the above 2 FM for the desired table
with the AS_SUBSCREEN flag of FREE_SELECTIONS_DIALOG = 'X'
Result: Your dynamic selections screen will be created as a subscreen of the standard selection screen and not as a pop-up.
Advantage: With the creation of the single custom table & LDB, you are now able to create dynamic selections as subscreen
in any program in the system. All we need to do is follow the steps A, B & C in each program.
Note: Your other restrictions with dynamic selection screen ie. submit in background , save as variant still remain and
you need to handle them accordingly.
let me know if you need sample code.
Regards,
Bhawit Kumar -
Getting content and address of select-options (created dynamically)
Hi guys,
Suppose I have a dynamically created select-options in a program
SELECT-OPTIONS it_ranges FOR ...
Let's say I can determine its name ( IT_RANGES ) only during program execution.
Now I know I can use field symbols to get its content like below:
FIELD-SYMBOLS: <fs>.
"here I will have content of the table in <FS>
ASSIGN ('IT_RANGES[]') TO <fs>.
...but I would like to know how can I get the content of this select-options table through date reference
TYPES: BEGIN OF t_ranges,
sign TYPE c,
option(2) TYPE c,
low TYPE i,
high TYPE i,
END OF t_ranges.
"let say tt_ranges is of the same type like IT_RANGES
TYPES: tt_ranges TYPE TABLE OF t_ranges.
DATA: ref TYPE REF TO data.
CREATE DATA ref TYPE tt_ranges.
The above will only create typed reference to table but I want it to point to my table IT_RANGES. The statement below don't work here.
GET REFERENCE OF ('IT_RANGES[]') INTO ref.
Is there any other way I can get (using data reference)?
1) address of this select-options table
2) content of this select-options table
Thanks for help in advance
M.
Edited by: Marcin Pciak on Nov 28, 2008 11:33 AMStatement CREATE DATA would only make sense when you are trying to create the dynamic select options. You can use the addition TYPE HANDLE in order to create the Range Table. Check method implementation CREATE_RANGE_TABLE in class CL_WDR_SELECT_OPTIONS.
Once the Select-option is created, you need to use the GET REFERENCE to get the data reference of the Select-options. We can't specify the dynamic reference with brackets in the GET REFERENCE statement. So, you need to use the field-symbols to do the dynamics.
DATA: ref TYPE REF TO data.
DATA: ref_fs TYPE REF TO data.
FIELD-SYMBOLS: <fs>.
DATA: w_range TYPE i.
SELECT-OPTIONS it_rang FOR w_range.
START-OF-SELECTION.
GET REFERENCE OF it_rang[] INTO ref.
ASSIGN ('IT_RANG[]') TO <fs>.
GET REFERENCE OF <fs> INTO ref_fs.
write: 'done'.
Regards,
Naimesh Patel -
How to create dynamic selection-screen
Hi all,
I want to create dynamic selection-screen.in that dynamic selectio-screen i want to display date fields based on table name given in the selection-screen.
Regards,
BillaHi Billa,
Look into the function group SSEL, this has some SAP standard functions to work with dynamic selection screens.
Below is sample FM, I wrote making use of standard FM from the above. This FM will take table name as input and will display a screen with all the fields within that table for selection. This can also be customized to restrict the fields for display.
Hope this helps,
Sumant.
FUNCTION y_ss_test_dynamic_selection.
""Local interface:
*" IMPORTING
*" REFERENCE(TABNAME) LIKE DD02L-TABNAME
*" EXPORTING
*" REFERENCE(DS_CLAUSES) TYPE RSDS_WHERE
*" EXCEPTIONS
*" TABLE_NOT_VALID
*" OTHER_ERROR
DATA texpr TYPE rsds_texpr.
DATA twhere TYPE rsds_twhere.
DATA trange TYPE rsds_trange.
DATA BEGIN OF qcat. "Selections View for
INCLUDE STRUCTURE rsdsqcat. "Free Selectoptions
DATA END OF qcat.
DATA BEGIN OF tabs OCCURS 10.
INCLUDE STRUCTURE rsdstabs.
DATA END OF tabs.
DATA BEGIN OF fields OCCURS 10.
INCLUDE STRUCTURE rsdsfields.
DATA END OF fields.
DATA BEGIN OF efields OCCURS 10.
INCLUDE STRUCTURE rsdsfields.
DATA END OF efields.
DATA selid LIKE rsdynsel-selid.
DATA actnum LIKE sy-tfill.
DATA title LIKE sy-title VALUE 'Selection Screen'.
DATA: maxnum LIKE sy-subrc VALUE '69'.
CLEAR tabs.
tabs-prim_tab = tabname.
COLLECT tabs.
DATA: position LIKE dd03l-position.
DATA: keyflag LIKE dd03l-keyflag.
CLEAR fields.
fields-tablename = tabname.
fields-sign = 'I'.
DATA: step LIKE sy-subrc.
SELECT fieldname keyflag position
INTO (fields-fieldname, keyflag, position)
FROM dd03l
WHERE tabname = tabname
AND fieldname NOT LIKE '.INCLU%'
AND datatype NE 'CLNT'
ORDER BY position.
ADD 1 TO step.
CHECK step LE maxnum.
IF keyflag <> 'X'.
efields = fields.
APPEND efields.
ENDIF.
APPEND fields.
ENDSELECT.
IF sy-subrc <> 0.
RAISE table_not_valid.
ENDIF.
CALL FUNCTION 'FREE_SELECTIONS_INIT'
EXPORTING
expressions = texpr
kind = 'F'
IMPORTING
selection_id = selid
expressions = texpr
where_clauses = twhere
field_ranges = trange
number_of_active_fields = actnum
TABLES
tables_tab = tabs
fields_tab = fields
fields_not_selected = efields
EXCEPTIONS
fields_incomplete = 01
fields_no_join = 02
field_not_found = 03
no_tables = 04
table_not_found = 05
expression_not_supported = 06
incorrect_expression = 07
illegal_kind = 08
area_not_found = 09
inconsistent_area = 10
kind_f_no_fields_left = 11
kind_f_no_fields = 12
too_many_fields = 13.
IF sy-subrc = 0.
CALL FUNCTION 'FREE_SELECTIONS_DIALOG'
EXPORTING
selection_id = selid
title = title
IMPORTING
where_clauses = twhere
expressions = texpr
field_ranges = trange
number_of_active_fields = actnum
TABLES
fields_tab = fields
EXCEPTIONS
internal_error = 01
no_action = 02
no_fields_selected = 03
no_tables_selected = 04
selid_not_found = 05.
IF sy-subrc = 0.
CLEAR ds_clauses.
MOVE tabname TO ds_clauses-tablename.
READ TABLE twhere WITH KEY ds_clauses-tablename INTO ds_clauses.
IF sy-subrc <> 0.
RAISE other_error.
ENDIF.
ELSE.
RAISE other_error.
ENDIF.
ELSE.
RAISE other_error.
ENDIF.
ENDFUNCTION. -
Create a select option in a screen
Is it possible to create a select option in a screen?
I can easily create the 2 input boxes, but not with the little button on the right like when we create a select option in a report.
Is the any other simple way to create a select option without creating a report? (the reason is because I want to have everything in the same module pool)Hi,
Please refer to SAP's documentation here: http://help.sap.com/saphelp_nw70/helpdata/en/e4/2adbec449911d1949c0000e8353423/frameset.htm.
Especially Part 'Subscreens and Tabstrips for Selection Screens', there go to 'Selection Screens as Subscreens'.
HTH, Gerd Rother -
How to create the select option in the screen
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Please search before asking - post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMTry RANGES.
The RANGES has same structure as that of select-options. -
To create Dynamic Selection screen using Key Fields
Hi All,
We have a requirement where we want to create Dynamic selection screen using Key fileds of Z-table or any standard table.
Please provide some solution if you have worked in this area.
Thanks in Advance,
Anand Raj KurubaHi,
You can use the following statement.
SELECTION-SCREEN DYNAMIC SELECTIONS FOR NODE|TABLE <node>.
declares a node <node> of a logical database for dynamic selections in the selection include.
To use the dynamic selections in the SELECT statements of the subroutine PUT_<node>, you must use the data object DYN_SEL. The data object DYN_SEL is automatically generated in the logical database program as follows:
TYPE-POOLS RSDS.
DATA DYN_SEL TYPE RSDS_TYPE.
You do not have to program these lines yourself. The data object DYN_SEL is available in the database program but not in a connected executable program.
The type RSDS_TYPE of the data object is defined in the type group RSDS as follows:
TYPE-POOL RSDS.
WHERE-clauses ------------------------------
TYPES: RSDS_WHERE_TAB LIKE RSDSWHERE OCCURS 5.
TYPES: BEGIN OF RSDS_WHERE,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
WHERE_TAB TYPE RSDS_WHERE_TAB,
END OF RSDS_WHERE.
TYPES: RSDS_TWHERE TYPE RSDS_WHERE OCCURS 5.
Expressions Polish notation ---------------
TYPES: RSDS_EXPR_TAB LIKE RSDSEXPR OCCURS 10.
TYPES: BEGIN OF RSDS_EXPR,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
EXPR_TAB TYPE RSDS_EXPR_TAB,
END OF RSDS_EXPR.
TYPES: RSDS_TEXPR TYPE RSDS_EXPR OCCURS 10.
Selections as RANGES-tables -----------------
TYPES: RSDS_SELOPT_T LIKE RSDSSELOPT OCCURS 10.
TYPES: BEGIN OF RSDS_FRANGE,
FIELDNAME LIKE RSDSTABS-PRIM_FNAME,
SELOPT_T TYPE RSDS_SELOPT_T,
END OF RSDS_FRANGE.
TYPES: RSDS_FRANGE_T TYPE RSDS_FRANGE OCCURS 10.
TYPES: BEGIN OF RSDS_RANGE,
TABLENAME LIKE RSDSTABS-PRIM_TAB,
FRANGE_T TYPE RSDS_FRANGE_T,
END OF RSDS_RANGE.
TYPES: RSDS_TRANGE TYPE RSDS_RANGE OCCURS 10.
Definition of RSDS_TYPE
TYPES: BEGIN OF RSDS_TYPE,
CLAUSES TYPE RSDS_TWHERE,
TEXPR TYPE RSDS_TEXPR,
TRANGE TYPE RSDS_TRANGE,
END OF RSDS_TYPE.
For more information, please check this link.
http://help.sap.com/saphelp_nw04/helpdata/en/67/93b80914a911d2953c0000e8353423/content.htm
Regards,
Ferry Lianto -
Creating a Select-option with no-intervals and a parameter on a single line
Hi
I have a unusual reqirment of creating a select-option with no intervals obligatory and a parameter on a single line. Is this possible? Can any one please provide me a solution for this. I reffered to the SAP help and what i found out is a single line can contain only parameters.Hi,
humm,
I guess it's not possible on one line.
SORRY I've tried and it works!
Try this :
SELECTION-SCREEN BEGIN OF BLOCK main WITH FRAME
TITLE text-s01 NO INTERVALS.
SELECTION-SCREEN begin of line.
PARAMETERS : p_gjahr LIKE bkpf-gjahr OBLIGATORY MEMORY ID gjr.
SELECT-OPTIONS : s_blart FOR bkpf-blart MODIF ID knt .
SELECTION-SCREEN end of line.
SELECTION-SCREEN END OF BLOCK main.
Regards,
erwan -
How to create a selection option or parameters in a subarea of the screen
Hi Experts,
My program have a screen 1001 and it is splited into two parts: the first is a Subarea for selection option, and the last is a table control. Now I want to create some selection option and parameters in the first subarea just like we do in screen 1000. Do we have any convenient way to do that?
Thanks in advance
JoeHi Joe,
Yes ,it can be done like below code:
TABLES : mara.
SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
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 1001.
DATA: number(4) TYPE n VALUE '1001'.
START-OF-SELECTION.
CALL SCREEN 100.
in screen flow logic .write below statements.
first declare the subscreen area 'AREA' in screen.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
CALL SUBSCREEN area INCLUDING sy-repid number.
PROCESS AFTER INPUT.
CALL SUBSCREEN area.
MODULE USER_COMMAND_0100.
Reward if useful,
Regards,
Talwinder -
How to create the select option for the Plant in screen (Module pool)
HI,
I am developing one module pool program and I have below requirement,
currently plant is acting like PARAMETER and the now it should be changed to select option.
how to create the select option in the screen
Thanks and regarding,
Malla
Moderator message - Cross post locked
Edited by: Rob Burbank on Dec 16, 2009 1:41 PMSteps to get SELECT-OPTIONS in module pool programs.
1.Start one dialog program with SAPMZ_001.
Place the below code in the TOP include of the dialog program.
TABLES marc.
SELECTION-SCREEN BEGIN OF SCREEN 3200 AS SUBSCREEN.
SELECT-OPTIONS: werks FOR marc-werks.
SELECTION-SCREEN END OF SCREEN 3200.
2 .Create one screen 3000.
Go to Layout of the screen and Define subscreen area on the screen and Name it as l_subscreen.
Place the below code in the Flow logic of the screen.
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN l_subscreen INCLUDING 'SAPMZ_001' '3200'.
PROCESS AFTER INPUT.
CALL SUBSCREEN l_subscreen.
Activate all.
Create Transaction code for the dialog program .
Execute the transaction code. You will see the select-option for werks how we see on Selection-screen. -
Can we create dynamic select boxes which will change when the user selection changes. How many levels we can go about.
For example
we have one combo box named states--> depending upon the states selected the corresponding districts should be shown in the other combo box, and when the user selects a district it should show the corresponding villages or towns and further..
Can we do it without ajax concept. if yes how?
If we have to use ajax one level is easy how to go about two or three levels.
Thanks in advance.Hi !
ya it is possible to change values of Combobox depending on the value changed in another combobox.
it is possible when you implement Model and by reference of that
model you can change values of that combobox such as.
model1.removeAllItems();
model1.addItemAt(location); etc
inspite of this if you need code help i will provide it to you. -
How to get dynamic select options from logical database?
Hi,
in one of my extended reports (means - overwritten standard SAP functionality in Z-namespace) I'm using LDB 'DDF'. I've been requested to validate some of the dynamic selection options (for example - field HKONT at Document level) and to split the logic depending on the particular value(s).
Tracking what is happened in the LDB program I found that this select option is added as dynamic WHERE clause to the SELECT statement - in a way:
WHERE bukrs = p_burks AND ... AND
(where_tab)
Is there a way to get values of these LDB dynamic select options into my report and if yes - how?
Thanks in advance.
Regards,
Ivaylo Mutafchiev
Senior SAP Abap ConsultantHi,
Try to use the following fm in your report and check
call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
exporting
curr_report = sy-cprog
mode_write_or_move = 'M'
importing
p_trange = gt_dyn_trange
exceptions
not_found = 1
wrong_type = 2
others = 3.
PS please make a whereused of this fm , how it has been used in LDB's to get dynmic selection values
a® -
Hi,
I need help in creating dynamic selections.
I am working on a report program. My requirement is to generate the dynamic selection fields based on the
name of table.
There is a selection parameter as table name. When user enter table name and hit enter first 3 fields in the
table should appear as select-options below the table name.
Am not able to figure it out, plz help me.
Thanks,Part 2
PARAMETERS: p_table TYPE ddobjname DEFAULT 'T000'.
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECT-OPTIONS: s_fld01 FOR (lv_field01) MODIF ID f01.
SELECT-OPTIONS: s_fld02 FOR (lv_field02) MODIF ID f02.
SELECT-OPTIONS: s_fld03 FOR (lv_field03) MODIF ID f03.
SELECT-OPTIONS: s_fld04 FOR (lv_field04) MODIF ID f04.
SELECT-OPTIONS: s_fld05 FOR (lv_field05) MODIF ID f05.
SELECT-OPTIONS: s_fld06 FOR (lv_field06) MODIF ID f06.
SELECT-OPTIONS: s_fld07 FOR (lv_field07) MODIF ID f07.
SELECT-OPTIONS: s_fld08 FOR (lv_field08) MODIF ID f08.
SELECT-OPTIONS: s_fld09 FOR (lv_field09) MODIF ID f09.
SELECT-OPTIONS: s_fld10 FOR (lv_field10) MODIF ID f10.
SELECT-OPTIONS: s_fld11 FOR (lv_field11) MODIF ID f11.
SELECT-OPTIONS: s_fld12 FOR (lv_field12) MODIF ID f12.
SELECT-OPTIONS: s_fld13 FOR (lv_field13) MODIF ID f13.
SELECT-OPTIONS: s_fld14 FOR (lv_field14) MODIF ID f14.
SELECT-OPTIONS: s_fld15 FOR (lv_field15) MODIF ID f15.
SELECT-OPTIONS: s_fld16 FOR (lv_field16) MODIF ID f16.
SELECT-OPTIONS: s_fld17 FOR (lv_field17) MODIF ID f17.
SELECT-OPTIONS: s_fld18 FOR (lv_field18) MODIF ID f18.
SELECT-OPTIONS: s_fld19 FOR (lv_field19) MODIF ID f19.
SELECT-OPTIONS: s_fld20 FOR (lv_field20) MODIF ID f20.
SELECTION-SCREEN END OF SCREEN 500 .
Regards,
Rich Heilman
Edited by: Rich Heilman on Dec 8, 2009 2:41 PM
Edited by: Rich Heilman on Dec 8, 2009 2:41 PM -
FAGL_FC_VAL in ECC 6.0 M not able to get the dynamic selection options
Hi
While executing the transaction FAGL_FC_VAL in ecc 6 we are not getting the dynamic selection option same as ecc 5 we need business area as selection option.
Please provide solution.. if any note to be applied we will do that. we have recently migrated to ECC 6.0
Regards,
AbhijeetSorry. This typo was only in this forum message. Within the BPEL process it's :
<from expression="ora:countNodes('inputVariable','payload','/ns1:Transmission/ns1:TransmissionBody/ns1:GLogXMLElement/ns1:Release') "/>
Still 0 count. -
Dynamic Selection option in the selection screen
Hi ,
I have a requirement like this ....
The user wants some fields to be default available in the selection screen. But they also want to be able to select the data based on additional fields (all the remaining fields ) which they want to see in the dynamic selection .
The basic list for selections should be limited to the fields listed in the specifications provided to me and the remaining fields should be made available through the dynamic selection option.
In the transaction FBL3N , this facility is provided.
Kindly help me with this..
thanks,
Sumit .Hi Sumit,
To include dynamic selection check this sample code.
TYPE POOLS DECLARATIONS FOR VALUE REQUEST MANAGER AND ICONS
TYPE-POOLS : vrm,
icon.
*SELECTION SCREEN FIELDS
TABLES : sscrfields.*GLOBAL DECLARATIONS
DATA : flag TYPE c,
tablename(10),
mmtable LIKE dd02l-tabname,
sdtable LIKE dd02l-tabname,
hrtable LIKE dd02l-tabname.*DECLARATIONS FOR SELECTION SCREEN STATUS
DATA it_ucomm TYPE TABLE OF sy-ucomm.***********SELECTION-SCREENS**********************
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.*FOR DYNAMIC DISPLAY OF MODULES
PARAMETERS : pa RADIOBUTTON GROUP rad USER-COMMAND com MODIF ID mod,
pb RADIOBUTTON GROUP rad MODIF ID rad,
pc RADIOBUTTON GROUP rad MODIF ID cad.SELECTION-SCREEN SKIP.**TO INCLUDE DYNAMIC ICONS
SELECTION-SCREEN COMMENT 2(6) text_001.*DYNAMIC LIST BOX BASED ON USER SELECTIONS
PARAMETERS one AS LISTBOX VISIBLE LENGTH 20 MODIF ID mod.
PARAMETERS two AS LISTBOX VISIBLE LENGTH 20 MODIF ID rad.
PARAMETERS three AS LISTBOX VISIBLE LENGTH 20 MODIF ID cad.SELECTION-SCREEN END OF BLOCK blk1.*DISPLAY DYNAMIC PUSHBUTTON ON APP TOOLBAR ON USER CLICKS
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2,
FUNCTION KEY 3.**EVENT ON SELECTION SCREEN FOR OUTPUT DISPLAY
AT SELECTION-SCREEN OUTPUT.*CLICK OF FIRST RADIO BUTTON
IF pa = 'X'.
sscrfields-functxt_01 = 'Materials Management'.
WRITE icon_plant AS ICON TO text_001.
*CODE TO GET DYNAMICS BASED ON THE SELECTED RADIO
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.*CLICK OF SECOND RADIO
IF pb = 'X'.
sscrfields-functxt_02 = 'Sales And Distribution'.
WRITE icon_ws_ship AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.*CLICK OF THIRD RADIO
IF pc = 'X'.
sscrfields-functxt_03 = 'Human Resources'.
WRITE icon_new_employee AS ICON TO text_001.
LOOP AT SCREEN.
IF screen-group1 = 'RAD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'MOD'.
screen-intensified = '0'.
screen-active = 0.
screen-display_3d = '0'.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'CAD'.
screen-intensified = '1'.
screen-active = 1.
screen-display_3d = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.*CUSTOMISING THE TOOLBARS OF THE SELECTION SCREEN
*WITH F8 BUTTON DISABLED APPEND : 'PRIN' TO it_ucomm,
'SPOS' TO it_ucomm,
'ONLI' TO it_ucomm. CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
EXPORTING
p_status = sy-pfkey
TABLES
p_exclude = it_ucomm.
**EVENT ON THE SELECTION
AT SELECTION-SCREEN.* LIST BOX ONE VALUES
CASE one.
WHEN '1'.
mmtable = 'MARC'.
WHEN '2'.
mmtable = 'MARA'.
WHEN '3'.
mmtable = 'MARD'.
WHEN '4'.
mmtable = 'MARM'.
ENDCASE.* LIST BOX TWO VALUES
CASE two.
WHEN '1'.
sdtable = 'VBAK'.
WHEN '2'.
sdtable = 'VBAP'.
WHEN '3'.
sdtable = 'VBUK'.
WHEN '4'.
sdtable = 'VBUP'.
ENDCASE.* LIST BOX THREE VALUES
CASE three.
WHEN '1'.
hrtable = 'PA0001'.
WHEN '2'.
hrtable = 'PA0006'.
WHEN '3'.
hrtable = 'PA0022'.
WHEN '4'.
hrtable = 'PA0008'.
ENDCASE.*VALUES FOR CLICK OF THE PUSHBUTTON ON APP TOOLBAR
*AND ENABLING THE BUTTONS TO PERFORM F8
CASE sscrfields-ucomm.
WHEN 'FC01'.
tablename = mmtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC02'.
tablename = sdtable.
sscrfields-ucomm = 'ONLI'.
WHEN 'FC03'.
tablename = hrtable.
sscrfields-ucomm = 'ONLI'.
ENDCASE.*INITIALIZATION EVENT
INITIALIZATION.*VALUES ASSIGNED TO DROPDOWNLISTS IN THE SUBROUTINES
PERFORM f4_value_request_pa.
PERFORM f4_value_request_pb.
PERFORM f4_value_request_pc.*START OF SELECTION EVENT
START-OF-SELECTION.*SUBROUTINE FOR OUTPUT
PERFORM output.*&----------------------------------------------------------------*
*& Form f4_value_request_PA
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST1
FORM f4_value_request_pa. 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 = 'Plant Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '2'.
l_value-text = 'General Material Data'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '3'.
l_value-text = 'Storage Location Data for Material'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '4'.
l_value-text = 'Units of Measure for Material'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'ONE'. 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.ENDFORM. " f4_value_request_tabname*&----------------------------------------------------------------*
*& Form f4_value_request_PB
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST2FORM f4_value_request_pb. 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 = 'Sales Document: Header Data'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '2'.
l_value-text = 'Sales Document: Item Data'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '3'.
l_value-text = 'Sales Document:Header Status'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '4'.
l_value-text = 'Sales Document: Item Status'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'TWO'.
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.
ENDFORM. " f4_value_request_PB*&----------------------------------------------------------------*
*& Form f4_value_request_PC
* text
*SUBROUTINE TO PROVIDE DROPDOWN VALUES TO LIST3FORM f4_value_request_pc. 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 = 'HR Master :Infotype 0001 (Org. Assignment)'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '2'.
l_value-text = 'Address Infotype 0006'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '3'.
l_value-text = 'Education Infotype 0022'.
APPEND l_value TO li_list.
CLEAR l_value. l_value-key = '4'.
l_value-text = 'Basic Pay Infotype 0008'.
APPEND l_value TO li_list.
CLEAR l_value.
l_name = 'THREE'.
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.
ENDFORM. " f4_value_request_PC
*& Form OUTPUT
* text
* -->P_TABLENAME text
*fINAL OUTPUT
FORM output. DATA p_table(10). p_table = tablename.*popup to display teh selected table and
*Continue button is clicked
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
titel = 'User Selections '
textline1 = p_table
textline2 = 'is the Selected table'
start_column = 25
start_row = 6.*assigning the table value in p_table to the
* Table in SE16 transaction by explicitly calling
SET PARAMETER ID 'DTB' FIELD p_table.
CALL TRANSACTION 'SE16'.
ENDFORM. "OUTPUT
Regards,
Manoj Kumar P
Maybe you are looking for
-
Communication error in login function in windows mobile in sup 2.0
hello experts, i have developed sample application using sup 2.0 the application works fine for windows I am using windows xp sp3 i refer all the dll required for the application i also configure Active sync 4.5 and Virtual machine 2007 SP1 for windo
-
Javascript popups open in new tab
I'm finding that links that used to open in javascript-controlled sized popup windows now open as a new tab. Sometimes this is nice, but most of the time it's frustrating. Is this a setting somewhere?
-
Hi, I am generating pdf output type reports with Oracle Reports . I am getting problem while trying to open the pdf file. My Problem is " There was an error opening this document. The file is damaged and could not be repaired ". Why i am getting this
-
How to Install Xvfb on oracle linux 6.5
Dear, I wanted to run Autovue on oracle linux, so that needs the first run Xvfb. How can I install and run Xvfb o oracle Linux 6.5? Best regards, Saeed.
-
hi everyone! i d like to ask you if there is a problem in using dreamweaver 8 + fireworks CS3. Does these cooperate correctly? Thanks!