Custom search help with F4IF_INT_TABLE_VALUE_REQUEST to retrieve 2 columns
Hi all,
i have a problem to retrieve selected value from a custom search help. I need to retrieve 2 columns from the selected line. eg. there are A,B,C,D column in the search help. I need to get the B and D. can anyone help? Thanks
For achieving this follow the following 4 steps:
1. While calling F4IF_INT_TABLE_VALUE_REQUEST pass the importing paramter return_tab to make the data selected by the user IN SELECTION screen. Remember that without this the user entry is avaliable only at START OF SELECTION.
2. Use this value to READ TABLE your internal table to get the value of other column.
3. Load an internal table with values you want to assign to selection screen fields.
4. Assign values to the field in selection field using Fn Module: 'DYNP_VALUES_UPDATE'.
Example:
DATA: ......,
lit_fields type table of dynpread,
ls_fields type dynpread,
lit_ret_tab type table of ddshretval,
ls_ret_tab type ddshretval.
. call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'VARI'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'P_VARI'
value_org = 'S'
tables
value_tab = lit_abc
return_tab = lit_ret_tab
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
check sy-subrc eq 0.
*-----get the entered value of field vari
read table lit_ret_tab into ls_ret_tab index 1.
lv_vari = ls_ret_tab-fieldval.
check sy-subrc eq 0.
*-----get value of the other column vari_d
read table lit_abc into ls_abc with key vari = lv_vari.
lv_vari_d = ls_abc-vari_d.
*----- Append to an internal table with values you want to assin to selection screen fields.
ls_fields-fieldname = 'P_VARI'.
ls_fields-fieldvalue = lv_vari.
append ls_fields to lit_fields.
ls_fields-fieldname = 'P_VARI_D'.
ls_fields-fieldvalue = lv_vari-d.
append ls_fields to lit_fields.
*---- Assign values to the field in selection field
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = lit_fields
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
Similar Messages
-
Hi expert,
I want to create a search help that read data from a table and show this data, but only a selection of this data and not all.
So, I created a custom search help, with an exit search help ( refernce at F4IF_SHLP_EXIT_EXAMPLE ).
Inside this help I put the selection, with code like reference F4IF_SHLP_EXIT_EXAMPLE .
My problem is: the match code show all data of table and not the selection !!!
Any idea ???
Tks a lot,
bye.Hi,
In the selection step after receiving the required entries from table you have to pass the details to the following FM 'F4UT_RESULTS_MAP'
where SOURCE_STRUCTURE is the selection method name(Table structure name)
APPLY_RESTRICTIONS = 'X'
SOURCE_TAB is the table with u to pass the selected new entries
other parameters are general..
Finally set the CALLCONTROL-STEP = 'DISP'.
Thanks&Regards,
Karthik. -
Additional columns in customer search help
Need to add 5 additional fields in customer search help. The problem is i have to fetch data from ADR2 (active telephone and mobile number) ADR6 active email id. In table condition i have mentioned kna1-adrnr = adr2-adrnr, kna1-adrnr = adr6-adrnr.
So the search help is displaying only the record which is having adrnr number in adr2 and adr6. but the client wnat to display all the kunnr irrespective whether they are having mail id or telephone number. How to achieve it???
Is it is possible to add columns thru search help exist.
regards
MullaiCreate a copy of VTBAA and append your fields...
-
CL_BSP_WD_REFERENCE_TOOL Custom Search Help
Hi,
I tried to implement custom search help exactly as the guide "How-To Guide: Implement Value Helps in GenIL Components" instructed but I am facing a problem.
I am using CL_BSP_WD_REFERENCE_TOOL to store a reference of the context node class to be used in the search help class to get filter data, but it is not working, in method IF_BSP_WD_CUSTOM_F4_CALLBACK~RETRIEVE_CUSTOM_VALUES that I implemented the IR_CUSTOM_REF is initial.
I debbugged standard class CL_THTMLB_F4HELP method GET_HELP_VALUES and noticed that when it is calling the same class to get the reference the table inside the class that should have the reference is empty:
STANDARD CODE
* Retrieve the reference to use if any.
READ TABLE gt_sel_options WITH KEY shlpfield = if_bsp_wd_custom_f4_callback=>gc_key_ref INTO ls_option.
IF ls_option IS NOT INITIAL.
* the value in "low" might have been cut off, so get the safe one
lr_ref = cl_bsp_wd_reference_tool=>get_reference( iv_controller_key = lv_key_str ).
ENDIF.
I am wondering how that could be possible that a static class has different information when called inside the context node class and when called in CL_THTMLB_F4HELP, the only explanation I have is that the BSP application that is responsible to display the F4 view is statelless.
Does anyone was able to pass a reference to method IF_BSP_WD_CUSTOM_F4_CALLBACK~RETRIEVE_CUSTOM_VALUES?
The code that I implemented:
Inside the V Getter method I set the reference, so class CL_BSP_WD_REFERENCE_TOOL insert into its internal table that is a static attribute my reference:
lo_iterator = me->collection_wrapper->get_iterator( ).
IF lo_iterator IS BOUND.
lo_entity ?= lo_iterator->get_by_index( iv_index ).
ENDIF.
IF lo_entity IS BOUND.
CONCATENATE 'FIELDNAME_VSTEL' lv_str_index INTO lv_controller_key.
CONDENSE lv_controller_key NO-GAPS.
CALL METHOD cl_bsp_wd_reference_tool=>set_reference
EXPORTING
iv_remove_existing = abap_true
iv_controller_key = lv_controller_key
iv_controller_ref = lo_entity.
CONCATENATE '\''' lv_controller_key '\''' INTO ls_map-context_attr.
ls_map-f4_attr = if_bsp_wd_custom_f4_callback=>gc_key_ref.
APPEND ls_map TO lt_inmap.
ENDIF.
* Output mapping
CONCATENATE 'TABLE[' lv_str_index '].VSTEL'
INTO ls_map-context_attr.
ls_map-f4_attr = 'KEY'.
APPEND ls_map TO lt_outmap.
CREATE OBJECT rv_valuehelp_descriptor
TYPE
cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = '(ZCL_SOCR_CONTLIST_F4)'
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_comp
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap
iv_trigger_submit = abap_false.
Then in my class ZCL_SOCR_CONTLIST_F4 method IF_BSP_WD_CUSTOM_F4_CALLBACK~RETRIEVE_CUSTOM_VALUES I try to obtain my reference:
IF ir_custom_ref IS BOUND.
TRY.
lo_entity ?= ir_custom_ref.
lo_parent = lo_entity->get_parent( ).
CATCH cx_sy_move_cast_error.
ENDTRY.
ENDIF.
But in vain because in the standard code of class CL_THTMLB_F4HELP when its call static method CL_BSP_WD_REFERENCE_TOOL=>get_reference the static table attribute that should have the references is empty.
Does anyone have an explanation how a static class can have different data during the execution of the same program, same user session?
Thanks,
MauricioHi,
Any Ideas? -
Custom search help over standard search help
Hello all,
i made a selection screen with some standard fields and it is shoeing F4 as well, but now problem is that now i want to display customized search help, means wants to add our data in F4, can anyone please help me?
i m doing below code but it is showing nothing, neither standard one nor customized one.
code:
SELECT-OPTIONS: so_mesty FOR edidc-mestyp.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_mesty-low.
PERFORM f4_help.
FORM F4_HELP .
TYPES : BEGIN OF gst_stat,
ZZVALUE like ZCS_PARAM-ZZVALUE,
ZZPARADES like zcs_param-ZZPARADES,
END OF gst_stat.
data : lt_stat TYPE TABLE OF gst_stat.
CONSTANTS: gc_obj(7) type c value 'MMR0320',
gc_par(6) type c value 'MTYP*'.
refresh lt_stat.
select zzvalue ZZPARADES from ZCS_PARAm into table lt_stat where ZZOBJECT = gc_obj and ZZPARANAME = gc_par.
if lt_stat[] is not initial.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'ZZVALUE'
DYNPPROG = sy-repid
DYNPNR = sy-dynnr
DYNPROFIELD = 'SO_MESTY-LOW'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = lt_stat
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.
endif.
ENDFORM. " F4_HELP
Regards.Hi,
You can try doing like:
On At Selection Screen on value-request for Fieldname.
First select the data from your multiple table and populate
one final table then that final internal table needs to be passed
in FM:
For Eg:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CLASCN-LOW.
*F4 help for material classification data
PERFORM F4_HELP_CLASIFC USING S_CLASCN-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CLASCN-HIGH.
*F4 help for material classification data
PERFORM F4_HELP_CLASIFC USING S_CLASCN-HIGH.
*& Form F4_HELP_CLASIFC
* text
* -->P_S_CLASCN_LOW text
FORM F4_HELP_CLASIFC USING P_S_CLASCN_LOW.
*To fetch the classification data on the sel screen
SELECT CLINT CLASS FROM KLAH UP TO 500 ROWS
INTO TABLE IT_KLAH.
IF SY-SUBRC <> 0 .
MESSAGE TEXT-006 TYPE 'E'.
ELSE.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = ' '
RETFIELD = 'CLASS' "Field name on which custom F4 is required
* PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'p_s_clascn_low'
VALUE_ORG = 'S'
DISPLAY = ' '
TABLES
VALUE_TAB = IT_KLAH. "Final Internal table
ENDIF.
ENDFORM. " F4_HELP_CLASIFC
Hope it helps
Regards
Mansi -
Custom search help in sap field in standard transactions.
I have a requirement that I have to add a custom search help in XREF2 of bseg table either in fb02-f-43.
For FB02.
Display document.
Select a Line Item.
Go to Additional Data tab in menubar,a pop-up will come, where we will get the Reference1 fields .
My requiremnt is to add a custom input help having 3 constant values.
For F-43.
Give account , date etc in first screen.
Go to next screen give the amount.
Go to more data will get the fields in left side-no pop-up will come.
Help neededhi, Jkuma,
we met the similar situation with you while developing a anpplication form for HR.
our conclustions are:
1. it's not feasible to put all the data into the form, it will make the form too big and slow, so it must be a online interactive form
2. you may put a search field to let the user to input some kind of criteria and do the search on the r3 side and return the hit list on the form , but it's not so easy to develop a table control on the form using javascript to get the selected one.
3. so we built a 'selection screen' , using webdynpro for abap,
it will show up before the form, while can use ddic search help, to make the selection, then put all the selected entries into the adobe form for further processiong.
how this is helpful hint for you.
br.
jun -
Custom search help for characteristic based variant
Dear Experts,
I have characteristic based variant report, my requirement is, in any Article(matnr) related transaction( Ex: MM43, VA01..) I required custom search help based on these characteristics and i will populate article/variant. Attached report selection screen snap. This screen will come in my custom search help.
Regards,
Abbas.I have found own for my problem. I am using MAT1 standard search help and with database view.
Regards,
Abbas. -
Custom Search Help for Functional Area of Cost Centre(KS01/KS02)
Hi,
I need to implement a custom search help and custom enhancement for the field Functional Area in Basic Data tab of Cost Centre Create/Change(KS01/KS02) transactions. Details of the requirement are as below:
1. There will be a custom relation for the Cost Centre category and Functional Area which was maintained thru a SAP standard table TKA05 and a custom table.
2.When the relation to Cost Centre category and Functional Area is a one to one it exist in the TKA05 and if its one to many it will be maintained in the custom table.
3. The requirement is when the Cost Center to Functional area is maintained in table TKA05(One to One) in this case the corresponding Functional Area needs to be populated automatically after entering the cost centre and pressing a enter key by user.
4.When the Cost Centre Category and Functional area does not exist in table TKA05 and existing in custom table(One to Many) in this case the F4 should be enabled for user selection with the list of Functional area values corresponding to the cost centre category entered that are maintained in the custom table.
As per the functionality provided by SAP the input help(F4) of the field Functional area in Cost Center does not have any relation with Cost Centre Category. The existing F4 is from the Value Table(TFKB) attached to the domain of FKBER.
Please provide your valuable inputs to implement the above requirement. Your input will be rewareded.
Thanks in advance,
Regards,
Prasad.kalyani,
i can see your requirement in below way..
as it just reads: you need to assign the standard cost center help to a z cost center field in component /SAPSRM/WDC_UI_DO_ACC.. which actually is fetched though the component /SAPSRM/WDC_UI_BACKEND_SH
so, if you see the component controller of SAPSRM/WDC_UI_DO_ACC you will see the component
USAGE_SH_F4 /SAPSRM/WDC_UI_BACKEND_SH
USAGE_SH_F4 /SAPSRM/WDC_UI_BACKEND_SH INTERFACECONTROLLER
so you can replicate the same functionality for your z field.
but can you clarify one thing.. why are you going for this z field in place of standard field ? -
Access Account assignment data inside custom search help
Hi Experts,
I have faced with a challenge and I am stuck. Need some expert advise. I am developing a custom search help for GL account. Inside the search help exit I have to know what is the account assignment category of the accounting line i am currently accessing in WEB UI. for example i have one item in SC and there is a cost distribution between cost center and WBS element. Now i want to access GL account search help from second line in the account assignment ( ie from line having WBS as Acc Assignment).
one approach that i can think of is Enhance Accounting WD component and capture the details in a static attribute of a custom class and access them inside the search help exit. I know this will work. But i am looking for more clean approach.
I saw below code in WD comp method GET_BO_INFO of component controller.
lo_task_container = /sapsrm/cl_ch_wd_taskcont_fact=>get_task_container_instance( ).
CHECK lo_task_container IS BOUND.
* Get the BO type
ev_bo_type = lo_task_container->get_bo_type( ).
* Get the BO mapper, BO GUID, and item GUID of the lead selection
CASE ev_bo_type.
WHEN /sapsrm/if_pdo_obj_types_c=>gc_pdo_shop.
lo_bom_sc ?= lo_task_container->get_bom_sc( ).
ev_hdr_guid = lo_bom_sc->/sapsrm/if_cll_bo_mapper~get_bo_guid( ).
ev_item_guid = lo_bom_sc->/sapsrm/if_cll_bo_mapper~items_get_lead_selection( ).
I am not sure if this works. But even if this works I can not get the exact accounting line that the user is currently processing. Any ideas????
thanks
sankar.Hi,
Any Ideas? -
Is it possible to make a search help with dynamic selection table?
Hi Experts,
Is it possible to create search helps with dynamic seletion tables means
i dont know the selection table names at the time of creation of search help.
These tables will be determined at runtime.
if yes, Please give an idea how to create and pass the table names at runtime.
Thanks
Yogesh GuptaHi Yogesh,
Create and fill your itab and show it with FM F4IF_INT_TABLE_VALUE_REQUEST
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'field to return from itab'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'field on your screen to be filled'
stepl = sy-stepl
window_title = 'some text'
value_org = 'S'
TABLES
value_tab = itab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Darley -
Hi,
I have appended a custom search help to std collective search help C_SAKNR, which is assigned to data element SAKNR. The reason to append custom search help is when the user presses F4 on G/L account field on ME51N transaction, there should be another choice of selecting G/L account based on another custom field which we have added on custom data tab. The entries are maintained in custom table which is the selection method.
To test search help , I executed the Collective search help C_SAKNR, three parameters are used, BUKRS, KTOPL, SAKNR , when I press F4 on SAKNR I can see my search coming up at the end and can select the G/L account value which we have maintained. Now when try on ME51N screen, the additional custom search doesn't show up, the on screen field has same data element SAKNR.
I created one structure with field SAKNR and data element SAKNR and used on custom screen, when I execute and press F4 on screen, my custom search comes up with all the std ones. Its not working on ME51n or ME21N screens, not able to figure out whats wrong.
Please let me know your suggestions on this.
ThanksSolved it myself. I appended my search help in another included collective search help .
Thanks -
Select-Options search help with where
Hi Experts,
I need to have a search help in my selection screen with a Where clause.
I've tried to search it but I cant find answers.
The logic is like this, wherein the search help for my selection screen should just have the value PM001 and ZMIS.
SELECT-OPTIONS stsma estat tj30 FOR s_eqpstt FOR tj30t-estat WHERE stsma = 'PM001' and stsma = ZMIS.
ThanksSorry, a little more detail... create a view, of search help type, with the columns you present and restrict those two values. Then create the search help with that view. Then add the search help to the select-option.
Regards,
Edgar -
How to get search help results in RIGHT-JUSTIFIED column
I am writing a search help with search help exit. Therefore, I use a table lets say tabA. I don't need all fields of tabA but need some further fields which I fill during exit.
tabA does not have currency or number fields.
I need a currency field and use a char20 field of tabA instead. filling of this field and showing results is o.k., but of-course it is shown left-justified.
I did not find any fields of shlp-fielddescr which sounds like left/centered/right-alignment. Another try was to fill char20 field with leading '_' signs - that looked terrible and was not right-justified either, because of not fixed-size font.
Let's resume: there is no number or currency field which I can use. The shown results appear in a column of not fixed-size font.
Any other idea?Hi, I have the same problem. Did you get to resolve it? . Thanks
-
Custom search help in ADOBE Interactive form
Hi All,
I am trying to apply custom search help on a field on my ADOBE interactive form. This custom search help would require
import parameters which are some other fields on the same form.
How would I pass them ?
Thanks & Regards,
DebHi,
Hope, these links will help you.
F4 Value Help on Adobe Interactive Form with Web Dynpro ABAP
/people/community.user/blog/2006/11/20/search-help-in-isr-adobe-forms
/people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap
with regards,
Mamta -
Custom search help exit through stand search help SD_MAT1
Dear Experts,
How to prepare custom search help through stand search help(SD_MAT1).
My requirement: In VA01 transaction, material(matnr) search help, adding custom search help.
Regards,
Abbas.Dear Abijith,
How to write custom search help(FM) code with parameters and how match with search help parameters in search help exit. Please give some sudo code.
Regards,
Abbas.
Maybe you are looking for
-
Can anyone tell me why I can't get this freebie to work? http://www.solid-state-logic.com/resources/lmc1plugin.html I'm trying to use the AU version on an Intel iMac, it doesn't say anything about universal binary. My Logic Express AU manager is not
-
I got a problem, I can't set the bios to more then 240 fsb without it going black and refuses to start. The OC switch is off since I want to reach more then 20% OC with my AMD Phenom x4 9550 CPU I cant get higher? Or can I change some setting to let
-
Suddenly all my albums in Photos are blank. The photos are still in the camera roll but not in the albums. What happened and how do I recover them all? Are they in my icloud? Also the photos are clear as thumprints but when I touch it to zoom are
-
Data Guard - Grid Control - Standby database
Heys, now I have to RAC Clusters. The next step would be to setup a standby database to prepare a graceful switchover. But what are the next steps ? I am currently installing GridControl on a seperate host with the option: Enterprise Manager10g Grid
-
Dynamic selection in query structure
Hi everyone, I wonder if it is possible to create dynamic selections in a query structure. Here is my scenario: In the columns section of my query I have a structure with all months of a year. Depending on the time of the year, all past months shall