Match code for an editable ALV field
Hi everyone,
I have an ALV with an editable field. I want to add matchcode with predefined 2 values to it.
I used EDIT option for field catalog to make this field editable.
I defined this field as a custom field in one of the DB table.
The possible values of the field are in the declaration of the DOMAIN. But I still can't see the matchcode with those values when I want to enter a value into this field in ALV.
What should I do?
Thank you in advance,
Diana
Hi Diana,
Welcome to SDN
When you set the field catalog you have to set option F4AVAILABL to 'X'.
If w_fcat is the field catalog structure then set as
w_fact-F4AVAILABL = 'X'
w_fact-CHECKTABLE = 'SCARR'
w_fact-REF_TABLE = 'SPFLI'
w_fact-REF_FIELD = 'CARRID'.
Refer the standard program BCALV_TEST_GRID_F4_HELP and BCALV_GRID_EDIT_DELTA
Please go through this thread for sample code
Re: F4 for fields in ALV Grid
Hope this would help you.
Good luck
Narin
Similar Messages
-
Help in Match-code for field SEARK (Search Term)
Friends, in my aplication was necessary insert the match-code for SEARK field.
I use the function module RH_OBJID_REQUEST in the form OPEN_BOX2 at the event AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_requi-low.
When I use this match-code and select the 4 itens and clique the OK button, only the last item appears in the field.
Anyone else had this problem?
Can someone help me?
Thanks for listening.
Below is the code:
select-options:
so_requi for pm0d1-seark no intervals .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_requi-low.
PERFORM open_box2 CHANGING so_requi-low.
form OPEN_BOX2 changing p_so_requi_high.
Variáveis
DATA: h_plvar LIKE p1000-plvar,
h_otype LIKE p1000-otype,
h_objid LIKE objec-realo,
h_begda TYPE begda,
h_endda TYPE endda,
p_subty TYPE plog-subty.
tables
DATA: p_change_profq LIKE hrpe_profq OCCURS 0 WITH HEADER LINE.
preenche as variantes para os parâmetros da função
h_plvar = PCHPLVAR.
h_otype = 'Q'.
h_begda = sy-datum.
h_endda = '99991231'.
DATA: sel_objects LIKE objec OCCURS 0 WITH HEADER LINE.
popup with qualifications catalogue
CALL FUNCTION 'RH_OBJID_REQUEST'
EXPORTING
plvar = h_plvar
otype = 'Q'
seark = '*'
seark_begda = h_begda
seark_endda = h_endda
set_mode = 'X' "multiple choice
TABLES
sel_objects = sel_objects
EXCEPTIONS
cancelled = 1
wrong_condition = 2
nothing_found = 3
illegal_mode = 4
internal_error = 5
OTHERS = 6.
Captura os dados selecionados e passa para o select-options
free: so_requi.
if sy-subrc = 0 .
loop at sel_objects.
clear so_requi.
so_requi-sign = 'I'.
so_requi-option = 'EQ'.
so_requi-low = sel_objects-objid.
append so_requi.
endloop.
endif.
endform. " OPEN_BOX2Hi
I am sorry I thought that it is TPLNR field
for EQFNR there is no matchcode or search help
if you want you can create a matchcode/search help and add
It is a CHAR 30 field for which most of the times no values are entered
Reward points for useful Answers
Regards
Anji
Message was edited by:
Anji Reddy Vangala -
Exception while creating f4 help for editable alv field
hi experts
i have created search help for editable alv field by following link
http://scn.sap.com/docs/DOC-39832
But i m getting an exception : Field symbol has not yet been assigned.
exception area code
read table <tab1> into <ls_wa> index i_row_id.
assign component m_cl_variant->ms_layout-stylefname
of structure <ls_wa> to <l_field>.
read table <l_field> into ls_style
with table key fieldname = is_col_id-fieldname.
if sy-subrc eq 0.
if ls_style-style o mc_style_enabled.
ready_for_input = 1.
exit.
elseif ls_style-style o mc_style_disabled.
ready_for_input = 0.
exit.
endif.
first read statement is giving sy-subrc =4.
PS: exception from method..:IS_READY_FOR_INPUT
kindly helpHello Ankush,
read table <tab1> ASSIGNING <ls_wa> index i_row_id.
IF <ls_wa> IS ASSIGNED.
assign component m_cl_variant->ms_layout-stylefname
of structure <ls_wa> to <l_field>.
read table <l_field> into ls_style
with table key fieldname = is_col_id-fieldname.
if sy-subrc eq 0.
if ls_style-style o mc_style_enabled.
ready_for_input = 1.
exit.
elseif ls_style-style o mc_style_disabled.
ready_for_input = 0.
exit.
endif.
ENDIF.
Regards,
TP -
ME51N - Match-Code for field AFANAM
Hi experts,
Can anyone tell me if it´s possible to create a match code for the field: Name of requisitioner/requester (AFNAM), on the transaction ME51N - Item overview?
Regards,
Leonel FernandesHello,
if you want a list of defined entries to that field AFNAM, i think it's not possible. This field is defined as a simple char 12 field with no check table behind it. So you would have to modify the data element AFNAM or the Domain AFNAM.
A search help to find purchase orders by field AFNAM would be easy, just an append to search help MBAN - if that's your problem.
Regards Wolfgang -
Standard Match Code for Selection Options with Example
Hi Guys,
Can anybody tell me Standard Match Code or Search help for Selection Options.
ex: MBEW-MATNR , MBEW-BWKEY and MBEW-BWTAR. can anybody tell how to keep Search Help or Match Code for the Above Fields in ECC 6.0 with Example
Very Urgent.
Thanks,
Gopi.Well Gopi.. as per your requirement no need to use collective search help.
I guess you have three fields in selection-screen,out 3 fields you have two fields contains search help.
Create your user defined search help BWTAR ..
Check the below links for creation search help :
http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee2b446011d189700000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
Hope you got it.
Thanks
Seshu -
Possibility of giving match code for Manufacturer in Equipment Master
Hi -
We can have a field exit on fieler HERST of Equipment Master.
Is there any possibility of giving a match code on this filed? so that we can maintain a table for manufacturer and user can select any one entry from this table.
We do have activated filed exit for manufacturer check, but need to further restrict the entry so that there is uniformity of entry maintained in this field.
Kindly advice.hi narendar,
some information :
In addition to the above mentioned exit we have also created a custom match code for this field in one of our project ... the exit gets triggerred whenver user hits enter and the value entered here is used in selection criteria that displays the custom popup window ... the data is picked from vendor master table the selection createria we used was vendor name and description and vendor acount group MNFR - for manufacturers would be defaulted and displayed.So you can go with creating a custom match code which is invoked whenever user selects F4...
regards
pushpa -
Hi all,
I need a match code for the field LFA1-KONZS... it should appears on XK03 transaction for example.
The idea is to create a new Z table and after fill this table, the values of them should appears as a search help into the LFA1-KONZS.
This Z table should have the fields:
KONZS type KONZS (data element)
DESCR type Char 50
I tried to modify the domain (KONZS) and insert the Z table on the option VALUE TABLE on the tab VALUE RANGE.
But it doesn't works.
The other thing is that these two fields should accept blank values... but I think for this will need one of these fields as a key, is that correct?
Manys thanks for all!
RicardoHi,
Create a search help for the Z table, and then you need change the SI_LFA1 structure (ask the BASIS team for an access key) field KONZS.
In the tab ENTRY HELP/CHECK, you specify the CHECK TABLE and the SEARCH HELP for the field KONZS.
And then test it into the SE16 transaction. -
Search Help For An Editable ALV List
Hi,
All ABAP Gurus !!
I have made an Editable ALV with the fields of ZTable. In ALV I want the search help in one of the columns.The entry in that should come from the standard table name-TVM5 and the field which should come is MVGR5. MVGR5 does not contain the search help .Following are the description for my ZTable-------
Field Name - MC_NO,
Data Element - ZZMC_NO1,
Domain -ZZMC_NO1.
While creating this ZTable, in the Entry help/check tab I have also mention Input help with fixed values in the column- Origin of the input help and entered the entries also.
About ALV (Only one alv column is shown here for reference in which search help or input help is needed of all the possible entries)---
DATA: INT_FIELDCATALOG2 TYPE LVC_T_FCAT WITH HEADER LINE.
DATA: WA_FIELDCATALOG2 TYPE LVC_S_FCAT ,
WA_LAYOUT2 TYPE SLIS_LAYOUT_ALV ,
GD_LAYOUT2 TYPE LVC_S_LAYO. "slis_layout_alv.
WA_FIELDCATALOG2-FIELDNAME = 'MC_NO'.
WA_FIELDCATALOG2-TABNAME = 'T_ITAB2'. " T_ITAB2 contains all the other fields
WA_FIELDCATALOG2-SCRTEXT_M = 'Machine No.'.
WA_FIELDCATALOG2-EDIT = 'X'.
WA_FIELDCATALOG2-F4AVAILABL = 'X'.
WA_FIELDCATALOG2-REF_FIELD = 'MVGR5'.
WA_FIELDCATALOG2-REF_TABLE = 'TVM5'.
APPEND WA_FIELDCATALOG2 TO INT_FIELDCATALOG2.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS1'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT_LVC = INT_FIELDCATALOG2[]
IS_LAYOUT_LVC = GD_LAYOUT2
TABLES
T_OUTTAB = T_ITAB2.
Please explain in detail
Thanks to all in advance.Please check the following links :
F4 help -- on editable alv field.
F4 help in editable ALV
ALV Editable Grid Control F4 help problem
And search the forum for f4 help on editable alv
KR
Veeranji Reddy P. -
Plant a match code for opening a project
Hi All,
I am trying to develope a match code of Plant for opening a project. Such that a list of projects to come out after entering a plant then select a project and then open a project like PO by supplying plant. I have gone through SPRO that is OPT2 match codes for Project definitions. But not found ready made match code to be included.
Is ther any easy way other ABAP use? or give logic how to deveope it.
Thanks and regardsHi
If you mean opening a project in standard reports like CN41, it would be easier to use "dynamic selection option" and hard code the plant, and then save the selection version.
Everytime, you want to open projects in the respective plant, you can call the selection version in the initial screen of the report.
Hope it helps.
Regards
Srikrishna -
Hi;
I need the exactly match code S509-SPMON that is used in Tcode MCSI, i do the same in my program but i don´t get the match code.
in Tcode MCSI i select S509 option
Tcode MCSI / RMCY5090
SELECT-OPTIONS SL_SPMON FOR S509-SPMON MODIF ID PER.
My Program
SELECT-OPTIONS pspmon FOR s509-spmon OBLIGATORY.
or
PARAMETER pspmon TYPE s509-spmon.
How do i get a match code as the field "s509-spmon" in tcode MCSI..?
Thanks on advance.
Edited by: David Funez on Oct 14, 2009 4:49 PMThanks,
I answer myself..
With CALL FUNCTION 'POPUP_TO_SELECT_MONTH' i get the same than Tcode MCSI.
Edited by: David Funez on Oct 16, 2009 10:30 AM
Edited by: David Funez on Oct 16, 2009 10:31 AM -
Need code for calculation of amount field(DMBTR)of BSEG table conditionally
Hi all,
I am selecting data for fields belnr(A/c doc.), dmbtr(Amount), hkont(G/L acc) from bseg cluster table giving the particular value for hkont in the selection screen.now there are some records fetched out of which there are few records in which same A/c no.(belnr) .So my requirement is to collect those same belnr records and do following calculation:
1. suppose for some record of same belnr , if all the value for field SHKZG is 'H' then summing up the values of field DMBTR.
2. suppose for some record of same belnr , if few value for the field SHKZG is 'H' and few are 'S' then the (summation the values of field DMBTR for all 'H' in field SHKZG -summation the values of field DMBTR for all 'S') and both the case the single record will fetched with belnr, sum(DMBTR) according to the condition, and hkont. Please provide me the reqd. code for the above problem.Thanks in advance.
regards
Anand.Hi Anand,
We can do like this.
This will take into account 'S', 'H' (debit/credit indicator) and BELNR wise sum.
1. Create new internal table, STAB with only two fields. (with header line)
BELNR "<------- refer below statement
HKONT "<------ Whatever unique combination of field(s) you want, you can put here 1,2,
DMBTR "<----
Numeric field
If you want only HKONT wise SUM, then remove BELNR
2. Now write this code.
Loop at Itab.
Clear STAB.
IF ITAB-SHKZG = 'H'.
STAB-DMBTR = ITAB-DMBTR.
else.
STAB-DMBTR = - ITAB-DMBTR. "<----- Negative Sign
endif.
STAB-BELNR = ITAB-BELNR.
STAB-HKONT = ITAB-HKONT.
COLLECT STAB. "<------ Important.
Endloop
Note:
Based upon the alphanumeric fields combination (BELNR and HKONT), the sum will be done.
Similar to group by in a select query
regards,
amit m.
Edited by: Amit Mittal on Jan 22, 2010 2:14 PM -
Match code for Vendor Master Data on PAN
Hi
Vendor match code will work only if the name are identical. But for the same vendor, user create multiple vendors.
For Ex: If the vendor name is ABC Private Limited, User puts different names like ABC Pvt Ltd, ABC P Ltd, etc.
Hence the match code check is over ridden.
For that reason, i want check on the basis of PAN number.
There is no field for PAN number in match codes field.
Please suggest how it can be maintainedHi ,
Use the exit SAPMF02K , which is specially ment for vendor master data .
Cheers ,
Dewang -
Hi,
How can I do for activating a match code with data from "Z" table in field EKKN-WEMPF?
Thanks in advance.Hi,
It is possible. We can extend an existing standard collective search help using append search help option.
Please goto se11 & input the standard search help name (in your case, it is MBAN_C) in the serach help option & display it. Press the menu GOTO->Append search help. You will get a pop-up and there you can create the new seach help as per your requirement.
Hope, you know well how to create the search help. Please check with the below link if you don;t know:
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
Regards,
Selva K. -
GRR2- 4FM-RepPaint(put ABAP code for convert data in field)
Hi,
If somebody know how possible add ABAP code for convert data in some column-field of report (by RepWriter,UserExit,BADI)?
Thanks a lot.Elaborate your question. Not clear ??
-
Hi all,
I have a selection screen with a parameter "file name output" and i have to add to it a match code.
I have no idea about the code to be applied to set up this match code.
Some one can help me please?
Thanks for allHi,
Check this Re: browse files on client PC
aRs
Maybe you are looking for
-
File Path and Name field does not display correct path
We are using Crystal 2008 along with VS 2005. We embed the special "File Path and Name" field inside our report and it displays the correct path when viewed inside Crystal reports: C:\Program Files\reports\Chart.rpt When run through the web and view
-
My camera has a every size of resoloution. From 1080-60/30 to 720-24.It is totally compatiable with FCP.What i would like to know is what format is recomended for music video's and film production.Any info is greatly apprec!!!! Thank you! P.S. Ive be
-
Cannot scan with HP LaserJet M1005 MFP
I updated to Snow Leopard 10.6.3 yesterday. Big mistake as I cannot now scan with my HP LaserJet M1005 MFP. I have been unable to find a solution here or via Google. Does anyone know if this is possible? I realize this device has never been "Mac frie
-
My Book appears greyed out in the Books section
A purchased book, sometime back in September but I seem to have deleted the receipt e-mail, is now "greyed out" and seems to be a corrupted file. Can I recover somehow? I tried going into Purchased but it doesn't show there but I am sure I did purcha
-
Connecting anything to my machine via USB has become painfully slow. When connecting an iPod to the USB port on the front of the machine, a window will sometimes popup saying "You are connecting to a USB 1.1 port - connect to a 2.0 port to ....etc et