How to add * wild card to a specific field on the selection-screen.
Hello,
How to add a * WIld card to a field in selection screen.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : S_STCTS FOR G_STCTS OBLIGATORY, "NUMBER SCHEME
S_AT20A FOR G_ATTR20A, "SUBSTANCE ID
SELECTION-SCREEN END OF BLOCK B1.
I need to add Wild card functionality to Number scheme field S_STCTS on selection-screen.
Any suggestions would be apprecaited..
Regards,
Kittu
Hi Kittu,
Here is one sample code:-
select-option : s_name like kna1-name1.
start-of-selection.
if s_name-low = '*'.
select * from kna1 into table it_kna1.
elseif s_name-low = 'pat*' or s_name-low = 'pat'.
select * from kna1 into table it_kna1 where name1 like 'Pat%'.
endif.
In case of wild card Select should be :-
select * from <dbtab> where <field> like 'P%'.
You can also use RANGES in your Code.
E.g. RANGES: R_OBJNR FOR JEST-OBJNR
R_OBJNR-SIGN = 'I'.
R_OBJNR-OPTION = 'CP'.
R_OBJNR-LOW = 'K1*'.
R_OBJNR-HIGH = 'K2*'.
Hope this helps.
Thanks & Regards
Jitendra Gujarathi
Similar Messages
-
How to Add a parameter of currency exchange rate in the selection screen
Dear Friends,
How to Add a parameter of currency exchange rate in the selection screen with format (9999.99999). wich field i need to take.
Thanks,
SridharTCURR-UKURS.
~Suresh -
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 -
How to attach search help to a particular feild in the selection screen..
Hi all,
how can we put a search help for a field in the selection screen.
i have to attach search help for this.
SELECT-OPTIONS: s_xabln FOR qals-mblnr. "GRS NoFind out the respective search help and use like this...
Parameters : p_pernr type pa0001-pernr MATCHCODE OBJECT prem .
Here PREM is the search help for PERNR -
How do we validate input fields on the selection screen
How do we validate input fields on the selection screen
hi balram,
u can validate input fields using <b>AT SELECTION-SCREEN</b> Event.
PARAMETERS : p_werks TYPE marc-werks.
AT SELECTION-SCREEN ON p_werks.
SELECT SINGLE *
FROM t001w
WHERE werks = p_werks.
IF sy-subrc <> 0.
MESSAGE 'Invalid Plant' TYPE 'I'.
ENDIF.
Like this, we can validate user input for plant.
check this link:
http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
Reware me if useful......
Harimanjesh AN -
How to hide the fields in the selection screen
hi please let me know how to keep hide the fileds in the selection screen i.e in display mode, for the condition
Hi Sudhir,
Check the below code.
tables: pa0000, pa0001.
parameters: p_chk1 as checkbox user-command rusr,
p_chk2 as checkbox user-command rusr,
p_chk3 as checkbox user-command rusr,
p_chk4 as checkbox user-command rusr,
p_chk5 as checkbox user-command rusr.
selection-screen: begin of block blk1 with frame.
select-options: s_pernr for pa0000-pernr modif id ABC,
s_stat2 for pa0000-stat2 modif id DEF,
s_werks for pa0001-werks modif id GHI,
s_persg for pa0001-persg modif id JKL,
s_persk for pa0001-persk modif id MNO.
selection-screen: end of block blk1.
AT SELECTION-SCREEN output.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
IF p_chk1 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'DEF'.
IF p_chk2 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'GHI'.
IF p_chk3 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'JKL'.
IF p_chk4 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'MNO'.
IF p_chk5 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
*Note
*Titles for check boxes and select options
*P_CHK1 Personal Number
*P_CHK2 Employment Status
*P_CHK3 Personnel Area
*P_CHK4 Employee Group
*P_CHK5 Employee Sub group
*S_PERNR Personal Number
*S_PERSG Employee Group
*S_PERSK Employee Sub group
*S_STAT2 Employment Status
*S_WERKS Personnel Area -
How to gray out certain fields on the selection screen based on the radio b
HI All,
I have an ALV report. On the selection screen I have 2 radio buttons ..for eg..A and B.
When radio button A(its on by default) is on..certain fields not relevant to this should be grayed out. Similarly when radio button B is on, certain fields should be grayed out.
I did the AT SELECTION SCREEN OUTPUT and also did the
LOOP AT SCREEN....ENDLOOP logic. The logic works but when I click the radio button B...the screen fields automatically does not gray out. I have to press ENTER and then its grays out.
I know a USER_COMMAND needs to be attached.
Can anyone give me a step by step details of how to do this. I truly appreciate it. if a screen painter thing is required..please give me the tcode and step by step detail to do this.
ThanksTry this one too:
REPORT ztest.
TABLES: mara,
bkpf.
CONSTANTS:
c_pos(3) TYPE c VALUE 'POS',
c_acc(3) TYPE c VALUE 'ACC',
c_all(3) TYPE c VALUE 'ALL',
c_x TYPE c VALUE 'X'.
The Selection Screen Definition
SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-000.
SELECT-OPTIONS: s_mara FOR mara-matnr.
SELECTION-SCREEN END OF BLOCK b_0.
SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-037.
PARAMETER: rb_all RADIOBUTTON GROUP rb1 USER-COMMAND rad default 'X',
rb_acc RADIOBUTTON GROUP rb1.
SELECTION-SCREEN END OF BLOCK b_1.
SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-011. "Acct
SELECT-OPTIONS: s_blrtc1 FOR bkpf-blart MODIF ID acc,
s_blrti1 FOR bkpf-blart MODIF ID acc.
SELECTION-SCREEN END OF BLOCK b_2.
SELECTION-SCREEN BEGIN OF BLOCK b_3 WITH FRAME TITLE text-011. "Acct
SELECT-OPTIONS: s_blrtc2 FOR bkpf-blart MODIF ID all,
s_blrti2 FOR bkpf-blart MODIF ID all,
s_blrtv2 FOR bkpf-blart MODIF ID all.
SELECTION-SCREEN END OF BLOCK b_3.
AT SELECTION-SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
PERFORM f0200_screenfield_hide_logic.
initialization.
PERFORM f0200_screenfield_hide_logic.
FORM f0200_screenfield_hide_logic *
FORM f0200_screenfield_hide_logic.
LOOP AT SCREEN.
IF rb_acc = c_x.
IF screen-group1 = c_all.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
IF rb_all = c_x.
IF screen-group1 = c_acc.
screen-active = 0.
ELSE.
screen-active = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. " F0200_SCREENFIELD_HIDE_LOGIC -
How to use wild card character in input field
Hi
I'm creating model in which the Purchase Order information need to be entered in Input Field.
My requirement is search using wild char char as '*'
Let say in input field i gave PO order as 20* then it'll search for all the PO's which starts from 20.
Could you please share some documents/guidelines, for this issue
Thanks and Regards
PuneetHi,
You can use the wild card char in the input box.please try below steps.
1.Check whether the input string has ' * ' char using "CONTAINS(text,pattern)" operation.
2.If yes, Replace the ' * ' with space by "REPLACE(text,pattern,repstr)" operation.->consider this result as input2
3.Now , Have a Filter from ur webservice(which gives your Purchase Order information )
and filter it by the condition " BEGINS(WSField,input2)"
the Final expression in the filter will be "_=IF(CONTAINS(input,""),BEGINS(HelpWSField,REPLACE(input,"\","")),true)_"
Hope it helps.
Regards,
Priya
Edited by: priya on May 20, 2009 12:49 PM -
How to Add Values in INVOICE SUB-TYPE field at the Invoice Header Forms
Hello,
Does any body knows how could I add/modify values in the INVOICE SUB-TYPE field at the Invoice Header Forms?. This values are related to the Globalization, in this case for the Chilean Localizations.
Thanks,
Alejandro R.It gives any error or just does nothing?
Have you tried making another simple form with just one block and one or two items?
You can do this type of testing in these conditions.
Which version of forms are you using? -
How to add a field to the selection screen and when the user enters ...
hi all,
can any one plesase send the code of how to add a field to seletiion screen and when the user enters in the field , it should be store in the database table , the table is MKPF and the field is BKTXT. Thanks.Hi Kripa,
If u r using PNP ldb then the screen u will get is the screen for that ldb and if u want to add some more fields then u define using selection-screen..as follows
SELECTION-SCREEN BEGIN OF BLOCK mysel WITH FRAME TITLE text-111.
PARAMETERS: n_in_en RADIOBUTTON GROUP g1,
q_ev RADIOBUTTON GROUP g1.
SELECTION-SCREEN END OF BLOCK mysel.
SELECTION-SCREEN BEGIN OF BLOCK mysel1 WITH FRAME TITLE text-222.
PARAMETERS: r_date TYPE sy-datum DEFAULT sy-datum.
SELECTION-SCREEN END OF BLOCK mysel1.
SELECTION-SCREEN BEGIN OF BLOCK mysel2 WITH FRAME TITLE text-333.
PARAMETERS:f_ver(3) TYPE c DEFAULT 1,
c_no(10) TYPE c DEFAULT '9D0161',
u_id(15) TYPE c,
password(15) TYPE c,
r_email(30) TYPE c DEFAULT PARAMETERS: s_not TYPE c AS CHECKBOX.
PARAMETERS:t_run TYPE c AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK mysel2.
SELECTION-SCREEN BEGIN OF BLOCK mysel3 WITH FRAME TITLE text-444.
SELECTION-SCREEN BEGIN OF BLOCK mysel4 WITH FRAME TITLE text-555.
PARAMETERS: p_ser RADIOBUTTON GROUP g2,
a_ser RADIOBUTTON GROUP g2.
SELECTION-SCREEN END OF BLOCK mysel4.
SELECTION-SCREEN BEGIN OF BLOCK mysel5 WITH FRAME TITLE text-666.
PARAMETERS:p_path TYPE string.
SELECTION-SCREEN END OF BLOCK mysel5.
SELECTION-SCREEN END OF BLOCK mysel3.
u will get this additional screen after the screen of ldb.
I hope this will help u..
Thanks & Regards
Ashu Singh. -
How to add user defined functions in Menu bar of a Selection Screen?
Hi,
Can anybody please suggest me that how can I add user defined functions in the menu bar of a Selection Screen?
Regards
s@kDear Amit,
I am referring to the standard SAP program: RIEQUI20.
On the initial screen, there are 3 tabs.
Code:
SELECTION-SCREEN BEGIN OF TABBED BLOCK tab FOR 25 LINES.
SELECTION-SCREEN TAB (20) tab1 USER-COMMAND ucomm1
DEFAULT SCREEN 001.
SELECTION-SCREEN TAB (20) tab2 USER-COMMAND ucomm2
DEFAULT SCREEN 002.
SELECTION-SCREEN TAB (20) tab3 USER-COMMAND ucomm2
DEFAULT SCREEN 003.
SELECTION-SCREEN END OF BLOCK tab.
AT SELECTION-SCREEN.
CLEAR gv_okcode.
gv_okcode = sy-ucomm.
CLEAR sy-ucomm.
CASE gv_okcode.
WHEN 'IH08'.
CALL TRANSACTION 'IH08'. "Equipment Selection
WHEN 'IW29'.
CALL TRANSACTION 'IW29'. "Notification Selection
WHEN 'IW39'.
CALL TRANSACTION 'IW39'. "Order List Selection
WHEN OTHERS.
ENDCASE.
* Check date:
IF NOT datuv IS INITIAL
AND NOT datub IS INITIAL.
IF datub >= datuv.
ELSE.
MESSAGE e884(ih) WITH datuv datub.
ENDIF.
ENDIF.
IF variant IS INITIAL AND
dy_vari IS INITIAL.
PERFORM get_default_variant_f14 USING variant.
ENDIF.
PERFORM variant_existence_f14 USING variant.
IF datuv IS INITIAL.
datuv = sy-datum.
ENDIF.
IF datub IS INITIAL.
datub = sy-datum.
ENDIF.
IF sy-ucomm = 'ADDR'.
PERFORM adress_sel_f01 USING 'EQUIR'.
ENDIF.
PERFORM check_parnr_f76.
* AT SELECTION SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
STATICS: l_slset TYPE sy-slset.
*--- Set initial variant
PERFORM variant_init_f14 USING 'INST' 'INST' 'INST' 'RIEQUI20'.
IF variant IS INITIAL AND
dy_vari IS INITIAL AND
gv_variant_flag IS INITIAL.
PERFORM get_default_variant_f14 USING variant.
gv_variant_flag = 'X'.
ENDIF.
*--- Set Icon for adress-button
PERFORM set_icon_f01 USING dy_adrfl ad_icon text-ad0 text-ad1.
*--- get classification data from select option
*--- (if new variant or if called via submit or F3)
IF ( l_slset NE sy-slset ) OR
( s_comw[] IS NOT INITIAL AND gt_clsd_comw[] IS INITIAL ).
l_slset = sy-slset.
gv_class_old = dy_class.
gv_klart_old = dy_klart.
PERFORM copy_selopt_comw_f79 TABLES gt_clsd_comw s_comw.
PERFORM class_search_init_f77 USING 'EQUI'.
ENDIF.
*--- set Icon for classification
LOOP AT gt_clsd_comw TRANSPORTING NO FIELDS
WHERE atcod > '0'.
EXIT.
ENDLOOP.
IF sy-subrc IS INITIAL.
gv_comw_flag = 'X'.
ELSE.
CLEAR gv_comw_flag.
ENDIF.
PERFORM set_icon_f01 USING gv_comw_flag cl_icon text-cl0 text-cl1.
CALL METHOD cl_uid_cust=>selection_screen_output.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR variant.
PERFORM variant_inputhelp_f14 USING variant 'RIEQUI20'.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR dy_parnr.
PERFORM f4_for_parnr_f76.
AT SELECTION-SCREEN ON BLOCK clse.
IF dy_class NE gv_class_old
OR dy_klart NE gv_klart_old.
gv_class_old = dy_class.
gv_klart_old = dy_klart.
CLEAR gv_comw_flag.
REFRESH gt_clsd_comw.
REFRESH s_comw.
ENDIF.
PERFORM class_exist_f77 USING dy_klart dy_class 'DY_CLASS'.
IF sy-ucomm = 'COMW'.
CALL FUNCTION 'IHCLSD_VALUATION_POPUP'
EXPORTING
i_klart = dy_klart
i_class = dy_class
i_language = sy-langu
i_key_date = sy-datum
i_also_subclasses = dy_subcl
TABLES
ct_comw = gt_clsd_comw
EXCEPTIONS
exc_no_class = 1
exc_klart_not_allowed = 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.
*--- fill classification data in select option
PERFORM copy_comw_selopt_f79 TABLES gt_clsd_comw s_comw.
ENDIF.
IF sy-ucomm = 'ONLI'.
sscrfields-ucomm = sy-ucomm.
ENDIF.
Regards
s@k
Edited by: siemens.a.k on Jan 15, 2010 10:10 AM -
How to get required fields in the selection screen while filling a set tabl
hai,
i was filling the set up table for 2lis_13_vditm.but while filling the set up table in the selection conditions in the tcode OLI9BW.
I would like to have the a field added in the selection condition which is not existing in the OLI9BW.
kindly help me out of ths.
with regards
soumya.As far as I know, you're just limited to whatever fields are in the transaction... That applies for any of the setup tables processes.
If you need to limit the data that goes to BW, you can do so by putting the logic in CMOD, EXIT_SAPLRSAP_001, Include ZXRSAU01 for the specific extractor. -
Need to add more field in the selection screen in tcode crm_dno_monitor
Hi,
In the transaction code crm_dno_monitor, i need to add extra fields in selection screen. Do we have any way to add fields in the standard tcode crm_dno_monitor.
Thanks
PrasadIf you need to add 5 fields on ticket screen then use EEWB enhancement.
The ticket screen transaction is crmd_order which even opens up after you double click the ticket no from crm_dno_monitor report list.
for crm_dno_monitor you can have the BADI CRM_DNO_MONITOR which will add later the column for the fields which you can add using EEWB
Check the following blog which guide you for custom field creation using EEWB
/people/bruyneel.guillaume/blog/2008/06/13/service-desk-implementation-guide-part-ii -
Add custom field in the selection screen for shopping cart monitor report
Hello,
refering to the notes 458591 an 672960, in order to add custom field at item level, we get the structure INCL_EEW_PD_ITEM_CSF.
But this doesnt make it appear on the "Shopping Cart Monitor Report" selection screen.
So should I try adding it in the existing interface of the badi bbp_sc_mon ?hello Yann,
ok I will implement that. Is it possible to change the interface of the badi method to include more data if we want to check the role of the user who is executing the shopping cart monitor report and accordingly do the settings of field display ? Or calling a function module inside the method to get the attributes of sy-uname would be easier?
rita -
IW31- How to add Search help for User specific fields in IW31 transaction.
Hi Experts,
I have to add Search help for standard fields USR00 to USR10 fields in IW31 transaction.
Is there any user exit for this requirement.
Please reply, it will be very helpful for me.
Regards,
B. V. RaoBala,
See the following user-exits:
IWO10015: F4 Help for user fields on operation
IWO10016: Customer enhancement to check operation user fields
PeteA
[www.pjas.com]
Maybe you are looking for
-
Apps missing from use cellular data list in iphone 6
So I got the new iPhone 6...and half of my apps are missing from the "use cellular data" list...those that are missing won't load when I try to open them...they just flash and shut down. I've tried turning off wifi...I've tried resetting the phone..
-
Error Message when logging on 2nd user on XP
I have an XP system with two users. For the past week or so, an error has been displaying when you log on the 2nd user. The error is an IE explorer window that says "This Web Page can not be displayed" and there is a little red Verizon logo in the up
-
ITunes no longer recognizes my mp3 player, iTunes no longer recognizes my mp3 player
I have used iTunes to purchase and download music to my RCA MP3 player, but now it doesn't recognize it. Can anyone help?
-
Tcode for maintaining conditions in PO
Hi all, I have created a new condition for 1% special excise duty on purchase. I have configured it on material type. what is the front end tcode for users to maintain this condition for different material types? Regards, Aisha Ishrat. ICI Pakistan L
-
How to connect BlackBerry Pearl to Mac to transfer media?
I'm having difficulty connecting my BlackBerry Pearl 8100 to my Mac for transfering MP3s and photos. What is the best way to achieve this, as RIM's software does not supoort Mac?