Modifying the selection screen
Dear all,
I have two fields in selection screen sales order & SV Note.
Here if i enter SO,the SV Note field should be disabled & if i enter SV Note, SO field should be disabled.
Can any one give me the code for this ASAP.
Thanks & Regards,
Naresh
Hi Naresh,
Use the following code
select-options : s_order .... modif id 'ABC',
s_sv..........modif id 'DEF'.
at selection-screen.
loop at screen.
if screen-group1 = 'DEF'.
if not s_order is initial and screen-fieldname = 'S_SV'.
screen-input = '0'.
modify screen.
endif.
endif.
endloop.
try this and get back to me incase of any queries.
Dont forget to reward points if found useful.
Thanks,
Satyesh
Similar Messages
-
Modify the selection screen for the transaction VF04
Hi all,
My requirement is as follow . I need to modify the selection screen (1000) in such a way that I need to add three more fields to te existing selection screen and make some check boxes checked by default which are unchecked . I have found out all the exits in this development clas VF . I am listing them out here .
J_3RSINV Export Sales
SDVFX001 User exit header line in delivery to accounting
SDVFX002 User exit for A/R line (transfer to accounting)
SDVFX003 User exit: Cash clearing (transfer to accounting)
SDVFX004 User exit: G/L line (transfer to accounting)
SDVFX005 User exit: Reserves (transfer to accounting)
SDVFX006 User exit: Tax line (transfer to accounting)
SDVFX007 User exit: Billing plan during transfer to Accounting
SDVFX008 User exit: Processing of transfer structures SD-FI
SDVFX009 Billing doc. processing KIDONO (payment reference number)
SDVFX010 User exit item table for the customer lines
SDVFX011 Userexit for the komkcv- and kompcv-structures
V05I0001 User exits for billing index
V05N0001 User Exits for Printing Billing Docs. using POR Procedure
V60A0001 Customer functions in the billing document
V60P0001 Data provision for additional fields for display in lists
V61A0001 Customer enhancement: Pricing
Going with the descrition I dont see any of them suits my requirement . But there should be an approach . Can anyone please help me to find out an exit or explain me how do we identify an exit to modify the selection screen of an standard ransaction .
Regards,
Varun .Hello,
I would suggest you to go for BADI,
Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
1) Goto se24 (Display class cl_exithandler)
2) Double click on the method GET_INSTANCE.
3) Put a break point at Line no.25 (CASE sy-subrc).
Now
4) Execute SAP standard transaction
5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
7) This way you will find all the BADIs called on click of any button in any transaction.
Regs,
Venkat -
Modifying the selection screen dynamically
Hey folks,
I have posted this question previously but no one understood the real problem.
I have 4 fields
Company Code
material Number
plant
storage Location
Unit
when I select the company code AA01 from the F4 help I want to disable material number and Plant ..Like this i have 4 scenarios where based upon the input given in the selection screen other fields have to be enabled or disabled.
I have already used at selection screen on output but that doesn't help me as its a PBO event I tried to search for a proper event but cudn't find it. Is there any way i can achieve this. A sample code wud be easy for me to understand .
Thanks in advance
RockSet different groups in your fieds on the screen.
Set the screen group for the Material and Plant as the GR1
Set the screen gorup for the Storage location as the GR2.
You need to modify your screen fields on the PBO event.
Like:
IF P_BUKRS = 'AA01'.
loop at screen.
if screen-group1 = 'GP1'.
screen-input = 0.
modify screen.
elseif screen-group2 = 'GP2'.
screen-input = 1.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-group1 = 'GP2'.
screen-active = 0.
modify screen.
elseif screen-group2 = 'GP1'.
screen-input = 1.
modify screen.
endif.
endloop.
endif.
Regards,
Naimesh Patel -
Modifying the selection screen in an LDB
Hello Experts,
I have a requirement wherein, i need to copy a standard report which used an LDB 'ERM', into a z report and modify its selection screen(Add a check box).
Is this possible?
If yes, can you tell me how?
Thanks in advance,
Regards,
RaviHi ravi,
1. simple
2. just add your single line code for checkbox.
3. It will automatically come
beneath the standard selection screen of ldb.
regards,
amit m. -
How to Modify the Selection Screen in Report Painter
Hi All,
I am working on Report painter and writer,
can any body helpme how to change the selection screen i.e i want add some more select options to the exisiting roport .
how can i add more select options to the exisiting one
please let me know the Procedure and provide some relevent documents .
Thanks and Best regards.
umaHello...
In the program ...we can find the following chunk of code..
selection-screen:begin of block B1 with frame title text-001.
Parameters : ....
select-options:.....
selection-screen:end of block b1.
if we need to add any more user inputs we can write the code inside the existing
selection screen....end of block .
or create a new block ..just the block name should be different...
if we are using select options...we need to declare the table name using the key word for the field on which we are giving select options ....
Tables : BSIK.
Please see the following code:
Imagine :- we have the current selection screen..
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_BUKRS LIKE BSIK-BUKRS DEFAULT SPACE.
SELECT-OPTIONS: S_LIFNR FOR BSIK-LIFNR.
SELECTION-SCREEN END OF BLOCK B1.
we need to add 2 more fields on the selection screen ..this we can do as the following
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_BUKRS LIKE BSIK-BUKRS DEFAULT SPACE.
SELECT-OPTIONS: S_LIFNR FOR BSIK-LIFNR,
S_HKONT FOR BSIK-HKONT.
PARAMETER: P_DATE LIKE BSIK-BUDAT OBLIGATORY DEFAULT
SY-DATUM.
SELECTION-SCREEN END OF BLOCK B1.
OR...create a new block...
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: S_HKONT FOR BSIK-HKONT.
PARAMETER: P_DATE LIKE RFPDO-ALLGSTID OBLIGATORY DEFAULT
SY-DATUM.
SELECTION-SCREEN END OF BLOCK B2.
there are many options available in selection screens..like creating check box,radio button etc..
for more info press F1 help on the Selection screen in the ABAP editor
Revert back if not clear and reward if helpful
Regards
Byju -
Hi all ,
This is how I have defines my selection screen :
* S E L E C T O P T I O N S & P A R A M E T E R S *
SELECTION-SCREEN BEGIN OF BLOCK b1
WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP 1 .
SELECTION-SCREEN BEGIN OF BLOCK b4
WITH FRAME TITLE text-004.
SELECT-OPTIONS : s_matnr FOR mast-matnr ,
s_werks FOR mast-werks OBLIGATORY ,
s_andat FOR mast-andat ,
s_aedat FOR mast-aedat ,
s_stlnr FOR stko-stlnr NO-DISPLAY .
SELECTION-SCREEN END OF BLOCK b4.
SELECTION-SCREEN SKIP 1 .
SELECTION-SCREEN BEGIN OF BLOCK b3
WITH FRAME TITLE text-003.
PARAMETERS : p_sspec TYPE c AS CHECKBOX DEFAULT 'X',
p_fspec TYPE c AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b2
WITH FRAME TITLE text-002.
PARAMETERS : p_pr TYPE sfpoutputparams-preview RADIOBUTTON GROUP g1 ,
p_rm TYPE sfpoutputparams-reqimm RADIOBUTTON GROUP g1 ,
p_dl TYPE c RADIOBUTTON GROUP g1 .
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b5
WITH FRAME TITLE text-017.
PARAMETERS : p_fpath LIKE rlgrap-filename .
SELECTION-SCREEN END OF BLOCK b5.
SELECTION-SCREEN END OF BLOCK b1.
Now my requirement is the file path parameter should not be displayed when I select p_pr or p_rm . It should be displayed only when I select p_dl . I know this has to be coded in at selection-screen output event but not sure how to achieve this .
Can anyone help me out with this .
Thanks,
Varun .See the Below Logic :
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: s_werks LIKE zwafpo-dwerk OBLIGATORY DEFAULT '1000'.
"Plant
PARAMETERS: p_vdatu LIKE sy-datum OBLIGATORY modif id bel .
select-options : s_vdatu for sy-datum obligatory modif id rel.
SELECT-OPTIONS: s_waveno FOR zwafpo-zzrun. "Wave Run
SELECT-OPTIONS: s_dept FOR marc-zzdept OBLIGATORY. "Department
select-options : s_arbpl for RC68A-arbpl modif id arb.
select-options : s_mtart for mara-mtart modif id mta.
SELECT-OPTIONS: s_pwave FOR zwafpo-zzpwaveno.
SELECT-OPTIONS: s_swave FOR zwafpo-zzswaveno.
SELECT-OPTIONS: s_aufnr FOR zwafpo-aufnr.
SELECT-OPTIONS: s_matnr FOR zwafpo-matnr.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_conf AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(30) text-003.
SELECTION-SCREEN END OF LINE.
*selection-screen skip 1.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_pconf AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(26) text-007.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_nconf AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(25) text-004.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_teco AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(28) text-008.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS p_del AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 5(25) text-006.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-005.
PARAMETERS: p_sumexc RADIOBUTTON GROUP g1 DEFAULT 'X'. "Incl Summary rpt
PARAMETERS: p_suminc RADIOBUTTON GROUP g1. "Only Summary rpt
SELECTION-SCREEN END OF BLOCK b3..
selection-screen : begin of block blk with frame title text-010.
parameters : p_old radiobutton group rad default 'X',
p_new radiobutton group rad.
selection-screen : end of block blk.
User Dynamic Selection
at selection-screen output.
select single * from t000md.
loop at screen.
case screen-group1.
when 'REL'.
if not p_old is initial.
screen-input = '0'.
screen-required = '0'.
screen-invisible = '1'.
endif.
modify screen.
when 'BEL'.
if not p_new is initial.
screen-input = '0'.
screen-required = '0'.
screen-invisible = '1'.
endif.
modify screen.
when 'ARB'.
if p_new is initial.
screen-input = '0'.
screen-required = '0'.
screen-invisible = '1'.
endif.
modify screen.
when 'MTA'.
if p_new is initial.
screen-input = '0'.
screen-required = '0'.
screen-invisible = '1'.
endif.
modify screen.
endcase.
endloop.
Reward Points if it is helpful
Thanks
Seshu -
How to modify the selection screen frame.
<b>Friends,
I need to create two separate blocks A | B.
Using SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME , we can able to create the blocks one below the other.
How to create two blocks side by side?
And also how to fix the size for the block
Example: block with specific height and width
Please help it
<b></b></b>Hi,
If you use the WITH FRAME addition, a frame is drawn around the block. You can nest up to five different blocks with frames.
SELECTION-SCREEN BEGIN OF BLOCK RAD1
WITH FRAME TITLE TEXT-002.
PARAMETERS R1 RADIOBUTTON GROUP GR1.
PARAMETERS R2 RADIOBUTTON GROUP GR1.
SELECTION-SCREEN BEGIN OF BLOCK RAD2
WITH FRAME TITLE TEXT-002.
PARAMETERS R3 RADIOBUTTON GROUP GR2.
PARAMETERS R4 RADIOBUTTON GROUP GR2.
SELECTION-SCREEN END OF BLOCK RAD2.
SELECTION-SCREEN END OF BLOCK RAD1.
Regards
Sudheer -
Problem with checkbox in the selection screen
Hi guys,
I have a problem with the check box in the selection screen.When i select a check box then a field in the selection screen should be enabled for entering a value.Again if i unselect the checkbox then the field should be disabled for entering a value.I have written the code in at selection-screen output.
The problem is when i select the check box ,the field is not enabled.But when i press enter after selecting the checkbox then the field is enabled for input.It is the same when i unselect the checkbox,after i press enter only the field is getting disabled.What could be the problem.Any suggestions please?
Thanks.Hi d p
Please try this code . I think this code have some way that you would like.
REPORT zdownload_to_application_server.
TABLES : caufvd, jest.
I N C L U D E P R O G R A M *
*INCLUDE znrpstnd.
Selection Screen *
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t03.
PARAMETERS: p_outb RADIOBUTTON GROUP g1 USER-COMMAND outb DEFAULT 'X' ,
p_inb RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETERS : p_werks LIKE caufvd-werks MODIF ID a. " Plant "OBLIGATORY
SELECT-OPTIONS : s_auart FOR caufvd-auart MODIF ID a, " Order Type
s_aufnr FOR caufvd-aufnr MODIF ID a. " Order number
PARAMETERS: p_path TYPE string DEFAULT 'C:\SchedulerInterface-OutboundTextFile\' MODIF ID a,
p_actual AS CHECKBOX MODIF ID a. " Transfer Actual
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.
PARAMETERS : p_werks2 LIKE caufvd-werks MODIF ID b, " Plant "OBLIGATORY
p_path2 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
p_path3 TYPE string DEFAULT 'C:\SchedulerInterface-InboundTextFile\' MODIF ID b,
p_sessio TYPE apqi-groupid MODIF ID b. " BDC Session
SELECTION-SCREEN END OF BLOCK b2.
AT SELECTION-SCREEN OUTPUT.
IF p_outb EQ 'X'. " Outbound --> Hide inbound
LOOP AT SCREEN.
"IF screen-name = '%BT02011_BLOCK_1000'.
IF screen-group2 = 'BLK'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'A'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'B'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
"IF screen-name = '%BT01004_BLOCK_1000'.
IF screen-group3 = 'BLK'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'A'.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF screen-group1 = 'B'.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path2.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = 'C:\SchedulerInterface-InboundTextFile\'
mask = ',Text Files,.txt,All files,.*.'
IMPORTING
filename = p_path2
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path3.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_path = 'C:\SchedulerInterface-InboundTextFile\'
mask = ',Text Files,.txt,All files,.*.'
IMPORTING
filename = p_path3
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
TOP-OF-PAGE.
START-OF-SELECTION.
Regards
Wiboon -
How to Add a new fields in the selection screen of LDB.
Hi All,
I want to add a new fields in the selection screen of LDB & then i need to select the data for that fields.
So could you please tell me for that where i need to add the code for selecting the data.
Thanks
RoliHi
welcome to SDN forum
If you are designing your own LDB with your own tables you can define tree structure and then the selection screen for the tables
if you wants to modify the std LDB of SAp means take the access key and to modify that code
if you add the extra field you have to modify the where conditions in the code also
see the doc
A logical database is a special ABAP/4 program which combines the contents of certain database tables. You can link a logical database to an ABAP/4 report program as an attribute. The logical database then supplies the report program with a set of hierarchically structured table lines which can be taken from different database tables.
LDB offers an easy-to-use selection screens. You can modify the pre-generated selection screen to your needs. It offers check functions to check whether user input is complete, correct, and plausible. It offers reasonable data selections. It contains central authorization checks for data base accesses. Enhancements such as improved performance immediately apply to all report programs that use the logical database.
Less coding s required to retrieve data compared to normal internel tables.
Tables used LDB are in hierarchial structure.
Mainly we used LDBs in HR Abap Programming.
Where all tables are highly inter related so LDBs can optimize the performance there.
Check this Document. All abt LDB's
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=%2flibrary%2fabap%2fabap-code-samples%2fldb+browser.doc
GO THROUGH LINKS -
http://www.sap-basis-abap.com/saptab.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9bfa35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c6/8a15381b80436ce10000009b38f8cf/frameset.htm
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Re: **LDB**
www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_Logical_Database_FAQ.html
www.sap-img.com/abap/abap-interview-question.htm
www.sap-img.com/abap/quick-note-on-design-of-secondary-database-indexes-and-logical-databases.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9bb935c111d1829f0000e829fbfe/content.htm
Gothru the blog which provides info on LDB's:
/people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
Sample code
TABLES: SPFLI,
SFLIGHT,
SBOOK,
SCARR.
START-OF-SELECTION.
GET SPFLI.
WRITE:/ SPFLI: , SPFLI-CARRID, SPFLI-CONNID,
SPFLI-AIRPFROM, SPFLI-AIRPTO.
GET SFLIGHT.
WRITE:/ SFLIGHT: , SFLIGHT-CARRID, SFLIGHT-CONNID, SFLIGHT-FLDATE.
GET SBOOK.
WRITE:/ SBOOK: , SBOOK-CARRID, SBOOK-CONNID,
SBOOK-FLDATE, SBOOK-BOOKID.
GET SFLIGHT LATE.
WRITE:/ GET SFLIGHT LATE: , SFLIGHT-FLDATE.
Regards
anji -
Parameter inactive in the selection screen of a report with logical datab.
I`m using a logical database in a report (PNP).
I need put as inactive some parameters of the selection screen. How can i do it ??? From customizing ???
ThanksHi,
Check this code..
" In screen loop You need to inactive the field.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name CS 'PNPKOKRS' OR
screen-name CS 'PNPKOSTL' OR
screen-name CS 'PNPORGEH'.
screen-active = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
CLEAR screen.
ENDIF.
ENDLOOP. -
Creating a transaction variant doesn't catch the selection screen
Hi,
I am trying to create a transaction variant for RERAPP transaction, which calls the report RFRERAPP on selection screen 1000.
I have used SHD0, specifying the t. code and a name for a transaction variant, then pressed the "Create" button. the selection screen is displayed, I enter the relevant values for the transaction, and press enter. the system prompts me to create some screen variants, but none of them have fields listed, and none of them is for the screen 1000.
SAP Release 600.
Any hint on the reason behind this behavior?
I found another related, unanswered [topic|Transaction Variant for a standard report without transaction code;Hi,
I have faced similar problem..
Here is the work around.. Might be useful for you..
1. Create Selection screen variant for report (Modify selection screen 1000 for display/hide in variant maintaince)
2. Then create "parameter Transaction" with report on Transaction START_REPORT
D_SREPOVARI-REPORT = <Your Report Name>
D_SREPOVARI-VARIANT = <Newly created variant>
Nag
Edited by: Naga Mohan Kummara on Dec 31, 2009 10:46 AM
Edited by: Naga Mohan Kummara on Dec 31, 2009 10:49 AM -
How to display the dynamic text in the selection screen
Hi All,
I want to display the dynamic text in the selection screen .... ( I searched in forums , didnt get the any answer fot this sort of qustion ).....
EX: If i have the date of today 31st it has to show message like " today date is 31 like some thing " when i execute the report .
Could any one face this sort of requirment, Please let me know.
Thanks in advance.
Reagrds,
BharaniWhere would you like this dynamic text being displayed? As an "message" or in some parameter field?
If first
parameters date type d.
data: text type string.
at selection-screen.
concatenate 'Today is' date into text.
message text type 'I'.
If second
parameters pa_text type c length 50.
at selection-screen on date.
if date is not initial.
concatenate 'Today is' date into pa_text.
enidf.
at selection-screen output.
"show it as read only
loop at screen.
if screen-name = 'PA_TEXT'.
screen-input = abap_false.
modify screen.
endif.
endloop.
Regards
Marcin -
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 -
hi folks,
I need help in updating the selection screen, I have declared the 'parameters' object in the selection screen like this.
parameters:
Paygroup type ZPGKIS obligatory.
it has three values '5A', '5B' and '5V'. when I select '5V' from the parameters, I need to display another parameters selection object for 'date' otherwise NO
I tried something like this.....
if Paygroup = '5V'.
parameters: p_date type d.
endif.
It is not working...
How can I correct this??
Thanks in advance
Vinuhii
you can make that using radio button
<b>
REPORT z_selectionscreen .
SELECTION-SCREEN BEGIN OF BLOCK blk.
PARAMETERS : p_rb1 TYPE PAYGROUP RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND FC,
p_rb2 TYPE PAYGROUP RADIOBUTTON GROUP rad1.
SELECTION-SCREEN END OF BLOCK blk.
SELECTION-SCREEN BEGIN OF BLOCK blk_1 WITH FRAME.
PARAMETERS : p_werks1 TYPE werks_d MODIF ID bk1.
SELECTION-SCREEN END OF BLOCK blk_1.
SELECTION-SCREEN BEGIN OF BLOCK blk_2 WITH FRAME.
PARAMETERS : p_werks2 TYPE werks_d MODIF ID bk2,
p_matnr2 TYPE matnr MODIF ID bk2.
SELECTION-SCREEN END OF BLOCK blk_2.
AT SELECTION-SCREEN OUTPUT.
IF p_rb1 = '5V'.
LOOP AT SCREEN.
IF screen-group1 = 'BK1'.
screen-active = 0.
MODIFY SCREEN.
ELSE.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = 'BK2'.
screen-active = 0.
MODIFY SCREEN.
ELSE.
screen-active = 1.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.</b>
you can as well check this code
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_FILE(25) TYPE C,
O_FILE(25) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
*Selection Screen 2
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS: CAL_TRA RADIOBUTTON GROUP G1 USER-COMMAND FLAG,
SESSION RADIOBUTTON GROUP G1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK B2.
*Selection Screen 3
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
PARAMETERS: MODE DEFAULT 'X' MODIF ID BL1,
UPDATE DEFAULT 'X' MODIF ID BL1.
SELECTION-SCREEN END OF BLOCK B3.
*Selection Screen 4
SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-003.
PARAMETERS: SES_NAM TYPE APQI-GROUPID MODIF ID BL2,
KEP_TRAS TYPE C DEFAULT 'X' MODIF ID BL2,
LOC_DATE TYPE SY-DATUM MODIF ID BL2,
USER TYPE SY-UNAME DEFAULT SY-UNAME MODIF ID BL2.
SELECTION-SCREEN END OF BLOCK B4.
At Selection-Screen Output *
AT SELECTION-SCREEN OUTPUT.
IF CAL_TRA = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'BL1'.
SCREEN-ACTIVE = '1'.
ENDIF.
IF SCREEN-GROUP1 = 'BL2'.
SCREEN-ACTIVE = '0'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
IF SESSION = 'X'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'BL1'.
SCREEN-ACTIVE = '0'.
ENDIF.
IF SCREEN-GROUP1 = 'BL2'.
SCREEN-ACTIVE = '1'.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
Message was edited by: Naresh Kumar
Message was edited by: Naresh Kumar -
INVISBLE TEXT IN THE SELECTION SCREEN
HI ALL,
I HAVE LOOP ON SCREEN AT THE SELECTION SCREEN,
AND IT SUPPOSE TO INVISIBLE SOME FIELDS.
THE PROBLEM IS THAT IT IS NOT INVISIBLE THE TEXT.
THE CODE IS ABOVE:
case screen-name.
when 'SO_SAKNR-LOW' OR 'SO_SAKNR-HIGH'.
screen-invisible = 0.
screen-active = 1.
when 'SO_KUNNR-LOW' or 'SO_KUNNR-HIGH'.
screen-invisible = 1.
screen-active = 0.
when 'SO_LIFNR-LOW' or 'SO_LIFNR-HIGH'.
screen-invisible = 1.
screen-active = 0.
endcase.
HOW AM I SUPPOSE TO INVISIBLE THE TEXT TOO?
THANKS,
DANA.Dana,
try following code
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 01(30) text-003 FOR FIELD p_monat MODIF ID fi.
SELECTION-SCREEN POSITION 33.
PARAMETERS p_gjahr LIKE bkpf-gjahr MODIF ID fi.
PARAMETERS p_monat LIKE bkpf-monat MODIF ID fi.
SELECTION-SCREEN COMMENT 52(04) text-005 FOR FIELD p_monat MODIF ID fi.
SELECTION-SCREEN POSITION 58.
PARAMETERS p_bgjahr LIKE bkpf-gjahr MODIF ID fi.
PARAMETERS p_bmonat LIKE bkpf-monat MODIF ID fi.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'FI'.
screen-input = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
-Anu.
Message was edited by: Anupama Reddy
Maybe you are looking for
-
Out of the clear blue sky, I now cannot resize any images in PSE 7. I have Win7. In the image Resize box, I can change a image to 50 percent and hit ok and nothing happens.
-
Hi: I have a WRT54G v5 router that I use only for its hardware firewall with my standalone desktop PC. I am losing internet access every few hours, even though all the LED's on my cablemodem and router remain green. I invariably have no connection wh
-
Duplicating a database using FRA
Hello, I'm trying to duplicate a database using a backupset stored in FRA. However, I thought rman would go take the most recently backupset that I'd backed up but isn't what's happening. It's trying read backup piece from tape and this is what I don
-
I'm trying to Export my completed video; however, the Export option is grayed out in the File Menu. What am I not doing?
-
Sub-Contracting where BOM contains NLAG's
Hi All, We currently are using the Sub-contracting process but we have an issue with adding a material of type NLAG to the Bill of Materials. We are getting the error message " Material type NLAG cannot be used with item category L" If i remove the I