Parameter search help
How can I create a parameter on the selection screen for lifnr that will allow the user to search for the correct vendor and then display the vendor name on the screen when a vendor is chosen?
Should I use search help or value-request or a combination?
Any examples would be very appreciated.
Thanks,
Janet
Thanks. This is great.
I am having a problem that my program is not hitting the AT selection-screen. Any ideas?
selection-screen end of block invoice.
parameter: p_lifnr like lfa1-lifnr,
p_name like lfa1-name1.
*Initialize variables
initialization.
set pf-status 'MAIN'.
at selection-screen.
IF NOT P_LIFNR IS INITIAL.
SELECT SINGLE NAME1
INTO P_NAME
FROM LFA1
WHERE LIFNR = P_LIFNR.
ENDIF.
start-of-selection.
Similar Messages
-
How to get search help for 2nd parameter based on the 1st parameter value
Hi all!
I have 2 parameters (material no, revision level). I have created a search help for revision level. It has an importing parameter :material no. and one exporting parameter : revision level.When I checked it, it's giving the revision values only for the specified.
In my report , I have kept these 2 materials in my selection screen.For revision level , I have added the matchcode object which I have created. When I pressed F4 for revision level, it's giving all the values irrespective of the material no. in the first parameter. How to solve it? Please suggest.Hi,
Try this code filling internal table fields,
DATA: BEGIN OF values,
OID TYPE ZCL_OBJECT-OBJECTID,
ODEC TYPE ZCL_OBJECT-OBJECT_DESC,
END OF values,
W_FIELD(10).
DATA: ZCL_PROJECT-PROJECTID type zcl_project-projectid,
ZCL_OBJECT-OBJECTID(5).
DATA: progname TYPE sy-repid,
dynnum TYPE sy-dynnr,
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values,
values_tab LIKE TABLE OF values.
CALL SCREEN 100.
*& Module VALUE_PROJECTID INPUT
text
*MODULE VALUE_PROJECTID INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'ZCL_PROJECT'
fieldname = 'PROJECTID'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ZCL_PROJECT-PROJECTID'.
*ENDMODULE. " VALUE_PROJECTID INPUT
*& Module VALUE_OBJECTID INPUT
text
MODULE VALUE_OBJECTID INPUT.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = progname
dynumb = dynnum
translate_to_upper = 'X'
TABLES
dynpfields = dynpro_values.
READ TABLE dynpro_values INDEX 1 INTO field_value.
W_FIELD = FIELD_VALUE-FIELDVALUE.
SELECT OBJECTID
OBJECT_DESC
FROM ZCL_OBJECT
INTO (VALUES-OID,
VALUES-ODEC)
WHERE PROJECTID = FIELD_VALUE-FIELDVALUE.
APPEND VALUES TO VALUES_TAB.
ENDSELECT.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'OID'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ZCL_OBJECT-OBJECTID'
value_org = 'S'
TABLES
value_tab = values_tab.
ENDMODULE. " VALUE_OBJECTID INPUT
*& Module INIT OUTPUT
text
MODULE INIT OUTPUT.
progname = sy-repid.
dynnum = sy-dynnr.
CLEAR: field_value, dynpro_values.
field_value-fieldname = 'ZCL_PROJECT-PROJECTID'.
APPEND field_value TO dynpro_values.
IF SY-UCOMM = 'BACK'.
LEAVE program.
ENDIF.
IF SY-UCOMM = 'ANS'.
LEAVE TO SCREEN '0'.
ENDIF.
ENDMODULE. " INIT OUTPUT
START-OF-SELECTION.
WRITE: / field_value-fieldvalue,
W_FIELD.
LOOP AT VALUES_TAB INTO VALUES.
WRITE / VALUES.
ENDLOOP.
if sy-subrc <> 0.
WRITE / field_value-fieldvalue.
endif.
Plzz reward points if it helps -
Search Help parameter not passing in FM
A Search Help ZAMCH1 is included in collective search help MCH1.Within it an elementary search help ZMME_CHARG2 is included.In this Elementary Search Help, a parameter 'CHRUE' ( Inventary Indicator) is there with data element 'ZMM_CHARG_IND' and default value 'X'.
But this parameter is not passed into the search help exit i.e. the function module.All other parameters are passed correctly in structure 'shlp-selopt' except CHRUE.So the indicator is always blank in FM.what might may be the reason and remedy ?Since your search help starts with the letter Z, it is a custom search help. So we can't look at the code to see what might be going on. You can try posting more specific information from the search helps here, and then someone might be able to help you.
- April King -
Export parameter in elementary search help not working.
I have created an elementary search help that will display all sold-tos for entered ship-to(s). Everything works fine except that the sold-to that is selected from the hit list is not being entered into the customer field on the selection screen.
eg transaction VD03, F4 on Customer, enter import parameters VKORG VTWEG SPART and KUNN2, hit list is displayed correctly and one line selected. I expect that my export parameter KUNNR should now appear in the Customer field of VD03 but its not.
This is my elementary search help definition:
Elementary srch hlp ZDEBIC Active
Short description Customers for Ship-to
Selection method Z_DEBIC Dialog type
Text table Hot key 2
Search help exit Z_SHIP_TO_SEARCH_HELP_EXIT
Parameter IMP EXP LPos SPos Data Element Default Value
SORT1 1 AD_SORT1
SORT2 2 AD_SORT2
MCOD1 4 MCDD1
MCOD3 5 MCDD3
PSTLZ 6 PSTLZ
KTOKD 7 KTOKD
VKORG x x 8 1 VKORG VKO
VTWEG x x 9 2 VTWEG VTW
SPART x x 10 3 SPART SPA
KUNN2 x 11 4 KUNN2 KUN
KUNNR x 3 KUNNR
I suspect the problem may be with default value KUN against KUNN2, but if I put it against KUNNR, I get a message "No values for this selection" instead of my hit list.
Can anybody give me a clue as to the problem?
Thanks,
BrigitteI just found out - I had asked my fellow ABAPer to have a look at it and he just told me that he had changed the Parameter Assignment of the Collective Search Help from the proposed one of KUNN2 C KUNNR to KUNNR C KUNNR. It seems that was necessary as well so I'm putting this in for future reference of anybody with the same problem.
-
Search Help Problem - Passing parameter between to search helps.
I created following 2 table for entering data in PO screen using ME21N using Custom Data Tab.
ZSTATE_TAB - State table (has elementary search help ZSTATE_SH - Value of SCODE is exported)
SCode(Key) Description
S001 New York
S002 Virginia
S003 West Virginia
ZCITY_TAB - City Table (has elementary search help ZCITY_SH - Value of SCODE is imported)
SCode(Key) CCode (Key) Description Level
S001 C001 New York City L001
S001 C002 Rochester L002
S001 C003 Buffalo L003
S002 C004 Richmond L029
S002 C005 Fairfax L030
I have created an custom input field LEVEL in t-code ME21N in Customer Data Tab.
I want to create search help for LEVEL using import parameter STATE & CITY .
On selection screen of search help two selection parameters STATE and CITY are displayed.
Step 1:User press F4 for getting list of state and selects any state using search help ZSTATE_SH (Value of SCODE is exported)
Step 2:User press F4 to get the list of City using search help ZCITY_SH, based on state selected in Step 1. (Value of SCODE is imported)
In Step 2, I want to see only the cities selected in Step 1. But instead all Cities are displayed in hit list.
I also created a table maintenance program SM30 for ZCITY_TAB, the search help ZCITY_SH is correctly displaying the data in hit list according to the State selected in ZSTATE_SH.
But it is not displaying the correct list for cites in ME21N.
Kindly help me in fixing this problem.
Thanks in advance.here is the answer from [sap library - Value Transport for Input Helps - Parametrizing the Import Parameters of the Search Help|http://help.sap.com/saphelp_nw2004s/helpdata/en/35/bdb6e2c48411d1950800a0c929b3c3/frameset.htm] :
If the search help is attached to the table field ( Attaching to Table Fields) or to the check table of the field ( Attaching to Tables), a value transport can take place for all the screen fields that are linked with a parameter of the search help. -
Selection screen parameter validation using search help/check table
Hi experts,
I have a select-option that is tied to a search help and check table (type tq80-qmart). Is there a way to automatically validate the field based on what comes up in the F4 search help? What I mean is, when the user hits F4 on the parameter, the list pops up with several records that the user can choose. When the program is executed, I want the program to show an error if the value is NOT in that F4 list.
I know this can be done in AT SELECTION SCREEN event with a select, but I was wondering if there was a way ABAP does it automatically. Any help will be greatly appreciated.
Thanks,
JuanHello Juan,
SAP does have a standard way of allowing the the user to select from the list via LISTBOX.
But list box is restricted to parameters only, you cannot attach list boxes to select-options.
I think the best place to do this validation would be th AT SELECTION-SCREEN event & from your original post it seems you know what code to write -
Set a parameter value using Search help exit
Hi All,
I want a search help such as If I enter a warehouse number on my screen then search help for storage bins should have that warehouse number populated in selection dialog.
I guess i have to write some code in search help exit if CALLCONTROL-STEP = 'PRESEL'.
But I am not able to set the warehouse value to parameter.
Does any one have done something like this?
Thanks in Advance,
ShaillyHi Shailly,
I don#t know if that will be the best option for you, but you can make use of the abap program event at value request for your parameter_id.
What you need is to insert a similar code like the one below:
at selection-screen on value-request for p_param
select fielda fieldb from storage bin table into gi_warehouse_bin
where warehouse = warehouse parameter.
delete adjacent duplicates from gi_zzdez comparing all fields.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = space
dynpprog = 'REPORT_NAME'
dynpnr = '1000'
dynprofield = 'P_BIN'
window_title = 'Text'
value_org = 'S'
tables
value_tab = gi_warehouse_bin
exceptions
parameter_error = 1
no_values_found = 2
others = 3
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Cheers,
Florin -
How to create search help on a parameter
Hi all,
How to create search help on a parameter .Please tell me process .
Regards,Hi,
If you want to create search help in parameter check that search help is available
by going to se11 or
create search help there ..
Please check the following links to create a search helps. They guide you step by ste.
Link:[http://www.sap-img.com/abap/attach-a-search-help-to-the-screen-field.htm]
Regards
Vinu.r -
Passing input parameter to an standard search help
Hi all.
I have the following code into my Z report:
PARAMETERS:
p_bukrs TYPE t8jv-bukrs OBLIGATORY,
p_vname TYPE t8jv-vname OBLIGATORY MATCHCODE OBJECT h_t8jv.
The SHLP H_T8JV has the field BUKRS as an import parameter. When the user executes the SHLP (press F4), I would like for it to reflect the value indicated by the user into the selection parameter P_BUKRS.
How can I do this?
Regards.
Gregory.I guess you want to allow F4 to both parameters p_bukrs and p_vname, and both values have to be passed to the search help forth and back?
I also guess that vname is the first parameter of this search help?
In that case, you must not use MATCHCODE OBJECT at all, because it will link only one field at a time.
Instead, you must find out a structure (or create it) that have these 2 fields, each having the H_T8JV search help assigned (with correct parameter assignment too), and the selection screen parameters must refer to this structure. -
Import parameter to search help
Hi all,
I've created a search help for use in a customer screen on the Purchase Order (ME2xN). What I need to do is to use the <b>Purchasing Document Date</b> (field EKKO-BEDAT, screen field MEPO_TOPLINE-BEDAT) as an <b>import parameter to this search help</b> (the search help exit).
How do I go about to solve this?
ALL HELPFUL ANSWERS WILL BE REWARDED!
- Mari VirikI already found out now, that I should at my search help to the field in the table instead of to the dynpro field. I mapped my import parameters of the search help with the corresponding fields of the same table as the field itself in SE11. The import parameters of my search exit have the same name and type as the import parameter of the search help. But when I debug the call of the search exit, the import parameters are still empty although the corresponding fields contain data.
Does anybody see, were my mistake is? I configured everything according to the online help.
Thanks in advance,
Martin -
Search Help With Input Parameter in WebDynpro ABAP
Hello all,
I have been facing a problem regarding a search help I wanted to attach to an input field on my UI. The search help expects an import parameter and offers four output parameters. What I did was to create a context node based on a ddic structure. The structure has one attribute for each of the five parameters. I defined the search help for all context attributes except the importing one where I deactivated the search help. The search help is available on one of the input fields on the view and bound to one of the attributes in the context. The other context attributes are not bound to anything. The names as well as the data types are the same in the search help as well as in the ddic structure, bound to the context node.
During WDDOINIT, I am setting the "import" context attribute. The problem is that the table with the search help parameters is empty when the search help exit is entered. Do you have any idea what I have to do in order to provide the import value to the search help?
Thanks in advance and best regards
SimeonHi,
By context node, do u mean that u made a drop down with values in ddic structure ,
rather than that u can use FM 'VRM_SET_VALUES' this would be simpler if that makes sense for ur requirement.
pls revert if any comments on it.
regards,
Dinesh. -
Search help PREM end parameter
Dearu2026
Since few days ago we noticed that search help PREM (for example from transaction PA30) has changed, although we didnu2019t implement any change or system modification. Can someone explain me why this could have happened Is there any other system parameter than MOL influencing the match code Which one Thanks in advanceYou may check the following IMG path from SPRO:
Personnel Management > Personnel Administration > Basic Settings > Maintain search helps
And then look into tab 'Included search helps'. Maybe some of the check-boxes have been checked / unchecked here.
Hope this helps.
Regards, -
Search Help Import Parameter as Listbox
How to make a search help parameter as Listbox( with Key ). Currently all search help parameters in F4 Dialog will be input fields with value help been fected from data element/domain.
I need the parameter as list box because only then I could populate the text along with the value.
Like there is a domain whose fixed values are 1- Active, 2 - Locked etc,
When I use a search help parameter with a data element of the above domain, then during F4, THE SEARCH HELP DIALOG has this parameter as 1. The text "Active also should appear ideally"
FYI: the parameter is an import parameter.
Best Regards,
Ragha.Please check the below program...
REPORT ztest_sri.
TYPE-POOLS: vrm.
DATA: it_list TYPE vrm_values,
wa_list LIKE LINE OF it_list,
id TYPE vrm_id.
DATA: gv_menge TYPE menge_d.
PARAMETERS: p_box LIKE mara-matnr AS LISTBOX VISIBLE LENGTH 10.
INITIALIZATION.
REFRESH: it_list.
CLEAR: wa_list, p_box.
wa_list-key = 'Srinu'.
wa_list-text = 'Srinivasu'.
APPEND wa_list TO it_list.
wa_list-key = 'Radha'.
wa_list-text = 'Radha Krishna'.
APPEND wa_list TO it_list.
id = 'P_BOX'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = id
values = it_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.
START-OF-SELECTION.
WRITE: p_box.
thanks,
Srinivas -
Hi,
I have 2 columns in my ALV table. COL_A and COL_B.
My requirement is to populate the search help entries of COL_B based on COL_A. but if COL_A is left blank then search help of COL_B should display all values based on user access.
Can I access value of import parameter (COL_A) of dictionary search help in search help exit so that i would know whether COL_A is empty or not.
Please let me know how can I access value of import parameter of dictionary search help in search help exit .
Thanks,
FerozHi Feroz,
It is easy..
Just mention both column A and column B as importing paramenter.
and use this code skeleton..
use it in the "select" call control step
CALL FUNCTION 'F4UT_RESULTS_MAP'
EXPORTING
source_structure = 'XXXXXXXXX'
apply_restrictions = ' '
TABLES
shlp_tab = shlp_tab
record_tab = record_tab
source_tab = 'XXXXXXXX'
CHANGING
shlp = shlp
callcontrol = callcontrol
EXCEPTIONS
OTHERS = 0.
CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
EXPORTING
PARAMETER = 'XXXXXXX' "this can be your column A
fieldname = 'XXXXXXXXX'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab[]
source_tab = lt_time_range
CHANGING
shlp = shlp
callcontrol = callcontrol.
callcontrol-step = 'DISP'.
CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
EXPORTING
PARAMETER = 'XXXXXXX' "this can be your column B
fieldname = 'XXXXXXXXX'
TABLES
shlp_tab = shlp_tab
record_tab = record_tab[]
source_tab = lt_time_range
CHANGING
shlp = shlp
callcontrol = callcontrol.
callcontrol-step = 'DISP'.
here, source_structure is the structure of the table where the data is available which is the "source_tab".
Parameter field is the name of parameter specified in search help. and fieldname is the field corresponding to the paramer in the table "source_tab". -
Calling search Help with parameter/
I have selection-screen as follows
PARAMETERS : p_bukrs1 TYPE bukrs ,
p_kostl1 TYPE kostl .
PARAMETERS : p_bukrs2 TYPE bukrs ,
p_kostl2 TYPE kostl .
Req: When user press F4 on P_KOSTL1, it should display cost centers only for company code value entered in P_BUKRS1, similarly for P_KOSTL2 it should display cost centers for comapny code entered in P_BUKRS2.
I know I can select records on AT SELECTION-SCREEN .. ON VALUE-REQUEST for respective fields and display in F4 with some FM .
<b>Is there any method by which I can call the search help specifying the company code as parameter?</b>by using FM DYNP_VALUES_READ u can get the values of BUKRS.
based on the values of BUKRS get values of Cost Centres from DB tables into Internal tables
F4IF_INT_TABLE_VALUE_REQUEST by using this u can display.
Regards
peram
Maybe you are looking for
-
Items below to phantom items are not available in ASCP workbenck.
Hi Experts, I came up one issue on ASCP, consider following BOM. Assume that all below items are MRP planned , all items supply qty is zero, FG ( finished good, WIP supply type - Push) |-> PH ( Phantom, WIP Supply type - Phantom) |-> P (Purchase item
-
Dear all, I have assigned mail3 follow up action to UD selected set for rejected lots.system is sending mail to user only .my user needs a list of recipents to be added to follow up action.(by default).What are the settings to do. thx®ds prasad
-
Calling an actionListener in a method
Im trying to call the method ticktack() Everytime startButtonHandler is performed it must go immediately to the ticktack() method my problem is it has an error "illegal start of expression" My question is: what's the proper way of calling or coding a
-
I have to replace an old 20" iMac. If I get a new mini what inexpensive monitor would look at least as good as the iMac display it would replace? This new computer would not be used for any graphic work, just online things: internet browsing, email,
-
Since I updated to lates LR version it constantly crashes saying the the program found a problem. I'm running Windows 8.1 OS. Any assistance will be much appreciated! Raul