Value help - exporting parameters
Hello,
I am having difficulty exporting the vendor name in addition to the vendor number using search help in web dynpro ABAP.
I have looked at the SAP help (linked below) and read through some of the threads on value help before posting but have had no luck.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm
Here are the steps I've taken:
I've created a context node with dictionary structure LFA1 with two attributes LIFNR and NAME1. The input help mode for LIFNR is automatic and the search help is KRED_C.
I've gone into KRED_C and added an export parameter NAME1 and maintained the parameter assignment to KRED_T.
In search help KREDA I've changed the Selection method from M_KREDA to ZM_KREDA and added the NAME1 field in view ZM_KREDA. I added a search help parameter (EXP) name1 to KREDA and maintained the parameter assignment between KRED_T and KREDA.
When I test the web dynpro, the search help displays name1 in the hit list, but when I make a selection, only LIFNR is populated and NAME1 is not.
I've also tried using KRED for my LIFNR search help instead of KRED_C with no luck.
I've looked at the sample program WDR_TEST_DDIC_SHLP but can't see what I might be doing wrong.
Any ideas or suggestions would be greatly appreciated.
Thanks,
Gordon
Hi
You can directly aply the OVS to the field KRED_C.It is easy also..
Use the std component WDR_OVS in the used components.
Go to particular attribute and change the input help mode :Object value Selector
and OVS componet usage: <aliias name of std component>
then create event handler in methods tab and then bind the standard event(OVS) of std component to this event handler
In coding in place of kunnr ,name change to lifnr ,KRED_C
types:
begin of lty_stru_input,
kunnr type kna1-kunnr,
name1 type kna1-name1,
end of lty_stru_input.
types:
begin of lty_stru_list,
add fields for the selection list here
kunnr type kna1-kunnr,
name1 type kna1-name1,
land1 type kna1-land1,
end of lty_stru_list.
data: ls_search_input type lty_stru_input,
lt_select_list type standard table of lty_stru_list,
ls_text type wdr_name_value,
lt_label_texts type wdr_name_value_list,
lt_column_texts type wdr_name_value_list,
lv_window_title type string,
lv_group_header type string,
lv_table_header type string,
cond(72) TYPE c, "for one where clause
itab_where LIKE TABLE OF cond, "dyn. where clause tabl
lt_kna1 TYPE TABLE OF ty_pa0001, "Results table
node_kna1 TYPE REF TO if_wd_context_node, "Reference to context n
elem_kna1 TYPE REF TO if_wd_context_element. "Reference to context n
field-symbols: <ls_query_params> type lty_stru_input,
<ls_selection> type lty_stru_list.
case ovs_callback_object->phase_indicator.
when if_wd_ovs=>co_phase_0. "configuration phase, may be omitted
ls_text-name = `KUNNR`. "must match a field name of search
ls_text-value = `Customer Number`. "wd_assist->get_text( `001` ).
insert ls_text into table lt_label_texts.
ls_text-name = `NAME1`. "must match a field in list structure
ls_text-value = `Customer Name`. "wd_assist->get_text( `002` ).
insert ls_text into table lt_column_texts.
lv_window_title = 'Customer Details'.
ovs_callback_object->set_configuration(
label_texts = lt_label_texts
column_texts = lt_column_texts
window_title = lv_window_title
col_count = 2
row_count = 20 ).
when if_wd_ovs=>co_phase_1. "set search structure and defaults
node_kna1 = wd_context->get_child_node( name = `KNA1` ).
get element via lead selection
elem_kna1 = node_kna1->get_element( ).
ovs_callback_object->context_element->get_static_attributes(
importing static_attributes = ls_search_input ).
pass the values to the OVS component
ovs_callback_object->set_input_structure(
input = ls_search_input ).
when if_wd_ovs=>co_phase_2.
if ovs_callback_object->query_parameters is not bound.
endif.
assign ovs_callback_object->query_parameters->*
to <ls_query_params>.
if not <ls_query_params> is assigned.
endif.
IF not <ls_query_params>-kunnr EQ ' ' AND <ls_query_params>-name1 EQ ' '.
SELECT * FROM kna1
INTO CORRESPONDING FIELDS OF TABLE lt_select_list
WHERE kunnr EQ <ls_query_params>-kunnr
AND name1 EQ <ls_query_params>-name1.
ELSE.
SELECT * FROM kna1
INTO CORRESPONDING FIELDS OF TABLE lt_select_list.
ENDIF.
ovs_callback_object->set_output_table( output = lt_select_list ).
when if_wd_ovs=>co_phase_3.
assign ovs_callback_object->selection->* to <ls_selection>.
ovs_callback_object->context_element->set_static_attributes(
static_attributes = <ls_selection> ).
endif.
endcase.
if you have any doubts please let me know
Thanks and regards
Tulasi Palnati
Similar Messages
-
Handling the search help exporting parameters.
Hi all,
I am using a search help for an input field.My requirement is that on the selection of a row in the displayed result for search help two other fields needs to be populated in the UI , which actually are the exporting parametrs of the search help.I mean to say how to handle the exporting parameters of a search help so as to populate other input fields in the UI.This is possible with the DDic Search help. From the online help:
If an input help structure is stored in a field in the ABAP Dictionary, and if you want to use the field mapping of search help parameters stored in the ABAP Dictionary as the field name for the structure for your Web Dynpro input help, then map your context nodes to this structure. This ensures that all components of the structure are available dynamically at runtime as attributes of the node.
If the context node is not mapped to the structure, the data element's input help can be used if there is one.
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm -
Value Transport (Exporting) to multiple screen fields in Search Help
Hi all,
I have created elementary search help using exit and attached it to data element. After F4 when I get hitlist I want all the values from the selected rows to get copied to the screen fields. I.e. I want the value transport.
In the search help I am exporting those values which I want to get copied back but I am unable to get the result.
With Regards,
ChandraHi,
You can get this behaviour only by making the SEARCH HELP assignment at the STRUCTURE level.
You need to create or use an existing structure to create your screen fields which you want to populate using the search help. Then assign this search help directly to the structure and there do the mapping between structure fields and the search help export params.
Only by doing this you can autopopulate the values using one search help.
Regards,
Sesh -
Import and export parameters of an FM are passed by value---why?
Q] By default the import and export parameters of an FM are passed by value---what is the advantage of this system?
Hi,
Import and export parameters are, by default, passed by value. However, they can also be passed by reference. Tables parameters can only be passed by reference.
Pass by reference means, passing the address itself rather than passing the value.
I guess passing by value is easier and advantageous -
Variables/Input Parameters Value help not showing texts
Hello,
I have created a crystal report based on a calculation view in Crystal Reports for Enterprise 4.1 SP5, which has a input parameter on the field "Region". For the value help, I am using a custom view based on T005U in which I have made sure that RegionName field is present in the "Label Column" property of the Region field.(Required for viewing descriptions of LOVs).
In the crystal report, while previewing data in the query builder, I am able to see the value help for the input parameter in the prompt screen, which displays only the key part, but does not display the description of it. Moreover, after accepting the prompt value, the preview runs into an error(as shown below). Please note that I get the error below only when Region is a part of the output fields of the query.
Instead of input parameter, when I create a variable on the region field in the main calculation view, with the same value help view, I am able to do data preview in the query builder as also data appears in the report on running the query. But, just as in the case of input parameter value help in the prompt screen, even over here, I am only able to see the key part and not the description.
Are variables/input parameter LOV's supposed to display descriptions or just the key part? As also, any reason why I should be getting this error while using Input parameter?
Kindly let me know if I am missing something in the development of this report.
Regards,
AlstonHi,
I hope you are taking the BEx Query as a source to the crystal report. In the BEx query check region info object should is maintained as Text and Key. If text is not maintained over there you will not be getting text in Crystal reports.
Krishna. -
How to implement multiple Value Helps within the same Application ??
Dear Experts,
I want to implement multiple value helps in the same view.For that I have declared exporting parameters of type 'wdy_key_value_table.' within the component controller for each of the value helps.While I do activate and test the application I get the following error :
The following error text was processed in the system HE6 : A row with the same key already exists.
The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 4 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
Method: IF_PO_VIEW1~VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
Method: WDDOINIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
Method: INIT of program CL_WDR_CONTROLLER=============CP
Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
I dont know how to implement multiple value helps.Need your help on this.
Regards,
Mamai.Hi
Hint is : A row with the same key already exists it means , It is assigning the same value/Key to row and you are calling it at WDDOINIT so it giving error at the time of initialization .
Better way to do the coding at some event in view OR if not possible than just execute the first value help in wddoinit later clear all the value before gettig the other Value help. Code it at WdDoModify View to get its run time behaviour.
BR
Satish Kumar -
Latest Value - Select Option - At Selection Value help
Hi,
I need the current values entered in the Select Option of the Selection Screen while generating the Value Help.
There are two selection option fields in the Selection Screen, Selopt1 and Selopt2, to generate the Value help of Selopt2 i need the latest values of the Selopt1, the function module dynp_read_values does not return all the values of the selectop option Selopt1 it returns only the first row of selopt1-high and selopt1-low, the function module RS_REFRESH_FROM_SELECTOPTIONS does not return the current values entered in the selection screen, is there any way to retrive the latest values of the select option in the event At Selection Screen on Value Request.
regards
SantoshHi Santosh,
When you go for f4 help on selopt2, you can use following code to get the current value of selopt1,
AT SELECTION-SCREEN ON VALUE-REQUEST
FOR selopt2-high.
select * from bkpf into table it_bkpf where
BKTXT in selopt1[].
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BKTXT'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'Invoice Id'
value_org = 'S'
TABLES
value_tab = it_bkpf .
IF sy-subrc <> 0.
" do nothing.
ENDIF.
In selection screen, you can directly fetch the value of selection options or parameters by selopt1 or selopt2 (in your case by using AT Selection Screen for value request).
Reply for further doubts,
Please reward if useful.
Thanks and regards,
Ashlesha Desai
Edited by: ashlesha desai on May 26, 2008 6:06 AM -
Difference between Import and Export parameters in Function Module
Hi All,
I am unclear about the import and export parameters, when i create a function module. Can anyone explain abt this. However when i call the function module in any program the import parameters in Function module are displayed as exporting in program amd the export parameters as importing.
Any help on this would be appericiated.
Shejal.HI,
Import parameter in FM is the value u provide to FM for processing.
export is the value u get from FM after processing.
when u call a FM in a progam the import parameter will appear as Export bcos u r giving value to the FM.
and u r getting value from FM in import parameter(bcos u r importing).
rgds,
latheesh
Message was edited by: Latheesh Kaduthara -
Import and export parameters.
Hi Experts,
If I am using import n export parameters for getting data from a different program into my main program, do i have to declare the variables again in the second program.
For ex:
The main report has the following piece of code:
data: int1 type I,
int 2 type I.
export: int1 to memory id 'mem1',
int2 to memory id 'mem2'.
submit report 'call_report' and return.
The call_report has the following piece of code:
import: int1 from memory id 'mem1',
int2 from memory id 'mem2'.
So if I am not declaring int1 n int2 explicitly in this report, i get the syntax error that they r not defined.
My confusion is that when v r exporting int1 n int2 from the main report, then y is the explicit declaration required?
Is ther no other way out than decalring int1 n int2 in the call_report.
I will reward all the helpful answers.
Thanks,
Ajay.Hi Ajay,
With EXPORT u r not exporting the variable and its definition but the content(data) of the variable u r exporting. So if u want to get the content in another program then u have to declare the variables of same type in the calling program also. Similarly with IMPORT u are not downloading the attributes of the field but only the content of variable u exported earlier.
Another point to remember is u have declare the variable in the second report with the same name and type as of first report.
Also check below piece of code which is similar to ur req
First report
REPORT Z75694_TEST .
DATA: i_data TYPE i VALUE '1111'.
EXPORT i_data TO MEMORY ID 'VINOD'.
CHECK sy-subrc IS INITIAL.
WRITE: 'Exported'.
SUBMIT Z75694 AND RETURN.
Second report
REPORT z75694.
DATA i_data TYPE i.
IMPORT i_data FROM MEMORY ID 'VINOD'.
WRITE:/ i_data.
It is working fine.
Hope this clarified ur doubt.
Thanks,
Vinod.
Edited by: Vinod Kumar Vemuru on Apr 11, 2008 10:35 AM
Edited by: Vinod Kumar Vemuru on Apr 11, 2008 10:44 AM -
Export parameters for iDVD compatibility
Hi everybody,
I export some keynote presentation with sound capture to quicktime.
When I collected several of those exports, I'd love to create a DVD with iDVD.
When I drop the generated quicktime movies onto iDVD, iDVD will re-encode them to a proper iDVD format for burning.
I noticed that when I use Share->Transfer to... -> iDVD, Keynote generates a quicktime movie that is included in iDVD but that does NOT require a new encoding of the movie.
My question is: Which Keynote quicktime export parameters should I use in Keynote to prevent re-encoding in iDVD? (codec, format, speed, throughput, etc. are they all important?)
Many thanks for your help.Hi,
Check the below code
PERFORM get_materialbatch CHANGING i_mchb.
FORM get_materialbatch CHANGING fp_i_mchb TYPE ty_tab_mchb
The values that are changed will get updated in the i_mchb..
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 10, 2008 3:13 PM -
Hi gurus,
I'm trying to create a input value help with the records from my internal table but I woulkd like also to put the short when the popup displays.
Actually I only have the records.
SELECTION-SCREEN BEGIN OF BLOCK ref WITH FRAME TITLE text-t03.
SELECT-OPTIONS:
s_kstar FOR i_cska-kstar.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_kstar-low.
PERFORM search_kstar USING s_kstar-low.
FORM search_kstar
using kstar type cska-kstar.
SELECT * FROM cska
INTO CORRESPONDING FIELDS OF TABLE i_cska
WHERE kstar LIKE '08%'
OR kstar LIKE '008%'
OR kstar LIKE '0008%'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'KSTAR'
dynprofield = 's_kstar'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = i_cska.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'HELP_VALUES_GET'
EXPORTING
fieldname = 'KSTAR'
tabname = 'i_cska'
IMPORTING
SELECT_VALUE = kstar.
ENDFORM. " SEARCH_KSTAR
Anybody would a solution.
Thx in advance for your help.
Mohamed.Hi Mohamed,
Check the Following.
" Implement your own search Help as below
PARAMETERS : carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
fldate TYPE sflight-fldate.
DATA : itab TYPE TABLE OF sflight WITH HEADER LINE.
DATA : fmap TYPE TABLE OF dselc WITH HEADER LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR carrid." If it is a selection Screen
else in PROCESS ON VALUE REQUEST
SELECT * FROM sflight INTO TABLE itab.
SORT itab BY carrid connid fldate.
DELETE ADJACENT DUPLICATES FROM itab
COMPARING carrid connid fldate.
fmap-fldname = 'CARRID'.
fmap-dyfldname = 'CARRID'.
APPEND fmap.
fmap-fldname = 'CONNID'.
fmap-dyfldname = 'CONNID'.
APPEND fmap.
fmap-fldname = 'FLDATE'.
fmap-dyfldname = 'FLDATE'.
APPEND fmap.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ddic_structure = 'SFLIGHT'
retfield = 'CARIID'
* PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
DYNPROFIELD = 'CARRID'
* STEPL = 0
* WINDOW_TITLE =
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = itab
* FIELD_TAB =
* RETURN_TAB =
dynpfld_mapping = fmap
* EXCEPTIONS
* PARAMETER_ERROR = 1
* NO_VALUES_FOUND = 2
* OTHERS = 3
." Just Execute this pilot program and verify
IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Cheerz
Ram -
How to export parameters from Message Mapping
You can make use of this export parameter only in transformation step of Integration Process. You may use the following "Parameterized Mapping Programs"
http://help.sap.com/saphelp_nwpi71/helpdata/en/27/db283fd0ca8443e10000000a114084/content.htm
Regards,
PrateekIf you have defined the signature of your UDF then the return value of the UDF must be assigned to the Export paramter of message mapping.
Basically import parametrs represents the inputs to be passed for that function(message mapping here)
and export represents the output of that function.
so in your case if you want toassign the value to Export parameter (ERROR_TEXT) in UDF catch block
assign the error returned to the ERROR_TEXT field
http://help.sap.com/saphelp_nwpi71/helpdata/en/43/c3e1fa6c31599ee10000000a1553f6/frameset.htm
Check this link
Hope this is clear
Rajesh
Edited by: Rajesh on Mar 13, 2009 5:31 PM -
Exporting Parameters while creating objects
Hi,
While creating objects to a class,we can see few parameters with the object created.Any idea about where the parameters are coming from and what are the values to be passed for it should be helpful.
For ex:
I am creating a object for CL_DD_DOCUMENT.
CREATE OBJECT e_dyndoc_id
EXPORTING
STYLE =
BACKGROUND_COLOR =
BDS_STYLESHEET =
NO_MARGINS =
I am able to see BDS_STYLESHEET in attributes.
But where I can see the other parameters?How to set the values for those parameters?possibel styles:
'ALV_GRID'.
'ALV_TO_HTML'.
'TREE'.
'STAND_ALONE'.
taken from the local class implemented within CL_DD_DOCUMENT
how to reach this code.
go to the source view of the constructor method of cl_dd_document.
double click on method "initialize_document"
double click on method "get_gui_properties"
in the following statement there.
call method resources->get_gui_properties
now you will see these styles.
Regards
Raja -
Selection Screen - Text instead of Key in the value help
Hi ,
I have implemented selection options for Web dynpro.
The value help for the selection fields displays the key of the selected value (standard).
I would like to know if there is an option to display the text (instead of the key) in the field.
Key Text
01 AAAA
02 BBBB
03 CCCC
So if I select say - 01 and 03 in the value help, Can I display AAA, CCCC in the field (or next to the field)
Thanks,
Sri
Edited by: Sri on Sep 29, 2010 8:19 AMHI,
You can dispaly it as dropdown and it shown the text:Use the beloe code refernce;
DATA lt_valueset TYPE wdy_key_value_table.
DATA ls_valueset LIKE LINE OF lt_valueset.
ls_valueset-key = '1234'.
ls_valueset-value = '1234test'.
APPEND ls_valueset TO lt_valueset.
ls_valueset-key = '1235'.
ls_valueset-value = '1235test'.
APPEND ls_valueset TO lt_valueset.
ls_valueset-key = '1264'.
ls_valueset-value = '1236test'.
APPEND ls_valueset TO lt_valueset.
CALL METHOD wd_this->lo_select->add_selection_field
EXPORTING
i_id = 'CAND_ID'
it_result = lt_range_table
i_as_dropdown = abap_true
it_value_set = lt_valueset
* i_read_only = ABAP_FALSE
* i_dont_care_value =
* i_explanation =
* i_tooltip =
Regards,
madhu -
Help Needed in Input Value Help of Custom Set attribute
Hi All,
We have maintained value table for custom set type attribute. We generated UI configuration for this set type and brought it into the web UI. But, we did not get the value help on the UI.
We are trying to get the value help by implementing the BADI crm_prdgenset_valuehelp. This BADI returns object of type cl_bsp_wd_valuehelp_f4descr.
PFB the code that is showing up the Value help icon but it is not showing any values.
DATA: lv_valuehelp_descriptor type ref to cl_bsp_wd_valuehelp_f4descr.
* lv_fname_prefix = 'STRUCT'.
ls_map-context_attr = component. "ZCSDR_PRD_CLS
ls_map-f4_attr = 'KEY'.
INSERT ls_map INTO TABLE lt_outmap.
INSERT ls_map INTO TABLE lt_inmap.
CONCATENATE 'ZCSDR_CLS' 'ZZ0010' INTO lv_help_id SEPARATED BY '-'.
CREATE OBJECT lv_valuehelp_descriptor
TYPE
cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = lv_help_id
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_TRUE.
rv_valuehelp_descriptor = lv_valuehelp_descriptor.
Any pointers on this is really helpful.
Thanks,
UdayaHi Chand,
Sorry for the late response. As far as i recollect, i guess we have enhanced the setter getter methods and written logic in the get-v method.
Let me know if the issue is resolved.
regards,uday
Maybe you are looking for
-
Howto close all open windows?
Hi, I am developing some kind of library, and I would like to close all open windows, dialogs, tooltips in the error case. The problem is I don't have control about the windows currently open, many are instantiated by plug-ins. Is there a way to get
-
How do I insert a 'date created' field into a template?
I know that you can insert date & time fields into templates and make them auto-update whenever I open the document, but I am wondering if I can make the date field be set to the date when I created the document and then stay that date even if I reop
-
Issue with SUIM after EHP5 Upgrade
Dear All, We have recently upgraded our SAP System to EHP5, everything seems to be normal though. 1. When we do a search in SUIM under "Roles by Complex Selection Criteria" --> Transaction Code --> KSB9 and hit Execute we are popped up with about 100
-
Making a session in jsp.
I want ti make a session in jsp. suppose if any budy can login through login page which is www.harshworld.info/login.jsp they will just direct open that page www.harshworld.info/wallpage.jsp then this page will not open . & user will see The login pa
-
Third Party PO - Delivery Address not printing
Hi, I have a scenario where the Delivery Address is not getting printed in the Third Party Orders randomly. do i need to modified the Z program or there are missing configuration ? If i modified the Z program which are the table do i need to use ? Th