Sunteți pe pagina 1din 3

Custom Search Search

Home Trainings Quiz Tips Tutorials Functional Cert Q's Interview Q's Jobs Testimonials Advertise Contact Us

SAP Virtual/Onsite
Enable or disable a parameter on selection screen based on other
Trainings
parameter's value
Tips Categories: By Jayshree Santosh Mahajan, Cognizant

Like Rakesh Roshan Dhar and 13K others like this.


ABAPTM
ABAP-HR
Introduction:
ALE & IDocs
BAPI
Recently I got requirement to make visible a parameter based on the user input entered into another
BASIS
parameter.
LSMW
SAP Script/Smart Forms
Here are the details.
SAP Workflow
Userexits/BADIs
Scenario:
XI
Others
Depending on the users selection, the parameters should be visible/invisible.

In the below screen shot, suppose user selected the message type EMAIL then, only the Email Address
Contribute? parameter will be visible and others would be invisible. If message type PRINT is selected then
parameter Printer Name will be visible. Similarly if user selected the message type FAX then only the
FAX number should be visible.
What's New?

Download ABAP Code into PDF


file
Create Transport Request using
Function Module
Creating radio buttons on
popup window
Enable or disable a parameter
based on other parameter's
value
How to restrict other users from
editing a program?
Skip transaction in LSMW
How to make a table field to
store a lowercase value?
Increase maximum number of
SAP sessions per user
Manually push an email from
SAP Outbox using SOST
Where the history of
Transaction Codes does get
stored?
Enable, disable and delete input
history
Comparing two SAP script
forms
Consistency check for SAP Here is the code snippet:
Script forms and styles
HTML Viewer of SAP Script REPORT zdemo_prg.
texts
Uploading image without any
distortion from original image PARAMETERS :p_kschl TYPE zmsg_type AS LISTBOX VISIBLE LENGTH 10
Increasing number of display USER-COMMAND us1, " Message type
pages in spool request p_email TYPE ad_smtpadr MODIF ID md2, " Recipient email address
Unlocking the transport p_print TYPE tsp03-padest MODIF ID md3, " Printer Name
request/task p_fax TYPE na_telfx MODIF ID md4." Fax Number
Creating ZIP file on
UNIX/Application server
TYPES : BEGIN OF lty_kschl,
Forwarding spool request to
your inbox kschl TYPE zmsg_type,
Converting Smart form output END OF lty_kschl.
in to List Display in 1 step
Including all objects of a DATA : lt_kschl TYPE STANDARD TABLE OF lty_kschl,
package in the transport ls_kschl TYPE lty_kschl.
request
CLEAR : lt_kschl[].

What's Hot? AT SELECTION-SCREEN OUTPUT.


LOOP AT SCREEN.
CASE p_kschl.
Web Dynpro for ABAP Tutorials WHEN 'EMAIL'.
IF screen-group1 = 'MD3' OR screen-group1 = 'MD4'.
Join the Mailing List
screen-invisible = 1.
screen-input = 0.
Enter name and email address below: ENDIF.
Name: WHEN 'PRINT'.
IF screen-group1 = 'MD2' OR screen-group1 = 'MD4'.
screen-invisible = 1.
Email:
screen-input = 0.

Subscribe Unsubscribe ENDIF.


GO WHEN 'FAX'.
IF screen-group1 = 'MD2' OR screen-group1 = 'MD3'.
screen-invisible = 1.
screen-input = 0.
ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_kschl.


IF lt_kschl[] IS INITIAL.
ls_kschl-kschl = 'EMAIL'.
APPEND ls_kschl TO lt_kschl.
CLEAR ls_kschl.

ls_kschl-kschl = 'PRINT'.
APPEND ls_kschl TO lt_kschl.
CLEAR ls_kschl.

ls_kschl-kschl = 'FAX'.
APPEND ls_kschl TO lt_kschl.
CLEAR ls_kschl.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'


EXPORTING
retfield = 'KSCHL'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_KSCHL'
value_org = 'S'
TABLES
value_tab = lt_kschl.
ENDIF.

Output:

Selected: EMAIL

Selected: PRINT

Selected: FAX
In this way we can visible/invisible the parameters based on another parameter value.

Low Airfares
on Cleartrip
Upto 2000 Cashback on
Flight Bookings, Use Code
FLIGHT & Book Now!
cleartrip.com

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM


Home Contribute About Us Privacy Terms Of Use Disclaimer Safe Companies: Advertise on SAPTechnical.COM | Post Job Contact Us
2006-2007 SAPTechnical.COM. All rights reserved.
All product names are trademarks of their respective companies. SAPTechnical.COM is in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver, and and any other SAP trademarks are registered trademarks of SAP AG in Germany and in several other countries.
Every effort is made to ensure content integrity. Use information on this site at your own risk.

Graphic Design by Round the Bend Wizards

S-ar putea să vă placă și