Accessing DropDownByKey value in Table
Hi everyone,
I have a table and inside it dropdownbykey.
I want to go with a loop on the table contents.
with the following command:
wdContext.nodeResearcherTable().getElementAt(i)...
I get the selected row of the table.
But, how do I get what the user chose?How do I get the selected key of the dropdownbykey in the table ?
Thanks you guys.
Ruthie.
> Hi everyone,
>
> I have a table and inside it dropdownbykey.
> I want to go with a loop on the table contents.
> with the following command:
> wdContext.nodeResearcherTable().getElementAt(i)...
> I get the selected row of the table.
> But, how do I get what the user chose?How do I get
> the selected key of the dropdownbykey in the table ?
>
> Thanks you guys.
> Ruthie.
Hi Guys,
I still have problems.
Anilkumar - I can't use currentTableNodeElement() because
I need to go over the intire table with a loop so I need
some condition which uses the iterator of the loop -
like - getElementAt(i)...
Bharathwaj - I wasn't clear enough. key isn't a name of
a field but I wanted to get the key of the dropdownbykey.
after:
wdContext.nodeResearcherTable().getElementAt(i)
I can use either getAttributeValue()
or getAttributeAsText().
Any suggestions ???
Thanks.
Ruthie.
Similar Messages
-
Accessing ID Value Mapping table in XSLT
Hi Experts,
In the XSLT mapping,I would like to access my value mapping table which i defined in ID .The purpose of ID value mapping here is, the table entries will be changing in future and i don want to use fix values, XML table which is defined in runtime.
I have gone through the blog
/people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
which explians design value mapping table in XSLT.
Is there any way to access Configuration Value Mapping table in XSLT? If yes, can you explain how should i achieve it ?Hi,
you can use the xivmService to call ID val map tables.
Use tha java function executeMapping, Its a standard SAP api.
Declare the Service in XSLT at start
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vm="com.sap.aii.mapping.value.api.XIVMService" version="1.0">
Call the val mapping table using below template wherever required.
<xsl:template name="ValueMapping">
<xsl:param name="SenderParam"/>
<xsl:value-of select="vm:executeMapping( 'SenderType', 'SenderTypeSchema', $SenderParam, 'receiverType', ReceiverTypeSchema')"/>
</xsl:template>
Call template like :
<xsl:call-template name="ValueMapping">
<xsl:with-param name="SenderParam">
try it and let me know if you have any doubt.
regards
Inder
Edited by: Kulwinder Grewal on Aug 12, 2009 11:36 PM -
Access follwing values in table interface
Hi,
how can I access follwing values in the table interface.
I want to use the value of the 9th column cell in the first one to create a link.
But with
if i_x = 1.
endif.
I'm just able to access the current cell.
By the way, is there a possibility to add columns? How?
greetings form munich
MikeHi,
you can have also access on the complete result set of the table (meaning on every cell) at any time in processing the table interface. But this requires some basic understanding on the dataset and especially the cell_data.
http://help.sap.com/saphelp_nw04/helpdata/en/2a/20ac3a22f0785ce10000000a11402f/frameset.htm
and
http://help.sap.com/saphelp_nw04/helpdata/en/e0/42a63adf18e648e10000000a11402f/frameset.htm
Heike -
Value Mapping Table - XI MDM Design Question
Hi All,
I have a scenario as :
When XI receives data from a sender system,before sending data to receiver system (in this case MDM),XI is supposed to check some fields in MDM and depending on the result XI should decide whether to send the records or not.
Now,in this case I have two options:
1.After recieving data from sender system ,from XI mapping call a webservice(webservice is supposed to go to MDM and check the fields and give the result),then depending on the result XI will decide whether to send or not.
2.After receving data from sender system,from XI mapping access a value look table in XI from a UDF and then check the result,then depending on the result XI will decide whether to send or not.
I have pointed out some glitches for every option:
1.First considering volume of XI source message( approx. 800 records per message),then MDM database records (approx 40000 or 50000).Hence once XI receives message XI will have to go to MDM for every record and every time it will search among 40000 MDM records using webservice.
This will effect performance as for every record webservice will be called and again it might face connection problems.
2.In this option XI will have to store all the 40000 records from MDM in the value lookup table.Again,how to synch up this value lookup table with MDM database?
This table has to be a copy of MDM database which changes everyday.
Is it ok to store around 40000 records in XI's value lookup table?
Considering above points can you please help me to find out optimum solution?
Thanks,
Shweta.>>Is it ok to store around 40000 records in XI's value lookup table?
its advised to use value mapping for static values,not for dynamic values,since you will have changes everyday you should not use Value mapping here.
now coming to your first approach,why not copy this table from MDM to XI(i know XI is not the owner of data,but if its an internal MDM server,you should be able to do it),once the table is copied in XI itself,you can simply use ABAP mapping to create the receiver structure.
the above approach looks good to me as long as the MDM guys don't have any problem with XI storing the data as well and you sync up the table between XI and MDM periodically
Thanx
Aamir -
How can i access value mapping table using xslt mapping
Hi All,
I have maintained value mapping table in integration directory.I want to access the data from the value mapping table in XSLT mapping using java function.PLease suggest me to do this.
Thanks
Pullarao.Value mapping that thread should solve your query !!!
-
Trying to access row values in a table which does not have any rows yet
try{
MappedRecord importParams = recordFactory.createMappedRecord("CONTAINER_OF_IMPORT_PARAMS");
IFunction function1 = client.getFunctionsMetaData().getFunction(funModGetDet);
IStructureFactory strucFact = interaction.retrieveStructureFactory();
response.write("try2 :"+pnumber);
IRecord structure = (IRecord) strucFact.getStructure(function1.getParameter("PERNR_TAB").getStructure());
response.write("try111 :"+pnumber);
structure.setString("PERNR",pnumber);
I am getting the following error "Trying to access row values in a table which does not have any rows yet " where PERNR_TAB is a table containing field "PERNR".
Can anybody help me out?Please re-post this question in the appropriate forum. It seems to have nothing to do with Web Dynpro.
-
DropdownByKey inside ALV Table - Problem with Value set
Hi,
I have Component A which has a custom controller that uses the interface controller of the ALV Component.
Custom controller has node ITAB.. that has certain attributes...
I want DropdownByKey inside the ALV Table column. I am populating the corresponding attribute of ITAB node with the value set that I want the drop down to have.
However when I execute the application..I get error
" Key XXX not present in Value Set and is not initial"
XXX is present in the Value Set table of the attribute.
<b>Following is my code in the methods of CUSTOM CONTROLLER</b>
<u>Generate Value Set</u>
nodeinfo_context = wd_context->get_node_info( ).
nodeinfo_ITAB= nodeinfo_context->get_child_node( wd_this->wdctx_ITAB ).
<u> Populate the Value Set</u>
data ls_valueset type wdy_key_value.
data it_valueset type wdy_key_value_table.
ls_valueset-key = 'FRA'.
ls_valueset-value = 'FRANCE'.
Append ls_valueset to it_valueset.
ls_valueset-key = 'SFO'.
ls_valueset-value = 'SAN FRANCISCO'.
Append ls_valueset to it_valueset.
<u>Set the Value Set for the Attribute</u>
call method nodeinfo_ITAB->SET_ATTRIBUTE_VALUE_SET
EXPORTING
NAME = <b>'ATTR1'</b>
VALUE_SET = it_valueset.
<u>Changing ALV Column</u>
Get the ALV Configuration Model
ifc_alv2 = wd_this->wd_cpifc_alv2( ).
itab_alv2_config = ifc_alv2->get_model( ).
itab_alv2_config->IF_SALV_WD_TABLE_SETTINGS~SET_READ_ONLY( abap_false ).
<u>Get the Column reference for ATTR1</u>
ref_alv2_colset = itab_alv2_config->if_salv_wd_column_settings~get_column( <b>'ATTR1'</b> ).
<u>Create the DropDownByKey Object</u>
CREATE OBJECT ref_dropdownkey
exporting SELECTED_KEY_FIELDNAME = ref_alv2_colset->id.
ref_dropdownkey->SET_SELECTED_KEY_FIELDNAME( <b>ref_alv2_colset->id</b> ).
ref_alv2_colset->SET_CELL_EDITOR( <b>ref_dropdownkey</b> ).
<u>Check the value set</u>
ref_attr_info = nodeinfo_flight_details2->get_attribute( ref_alv2_colset->id ).
I do get back the value set if I see ref_attr_info->value_set.
SO the Value Set is getting set for attribute ATTR1, but still I get Error
<b>"The value selectedKey = "SFO" in DropDownByKey "_8C" does not exist in the value list and is not initial either "</b><u></u>
SAP UserYou have forgotten to set a cell variant. I had the same with setting a ProgressIndicator cell-editor to a table column as default editor. This causes the column to be hidden on the table while it did show up in the settings dialog. I removed the set_editor( lr_progressindicator) and created a cell variant instead with this lr_progressindicator. You then need to add this cell variant to your column. By default it will select the standard viewtext-cell-editor (which can only be textview and inputfield, like when you create a table yourself in a view), but if you use a cell variant, it will display the required cell editor if you set it (last line of the code).
<b>In your case, replace lr_progressindicator by your ref_dropdownkey.</b>
DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
lr_column TYPE REF TO cl_salv_wd_column,
lr_column_header TYPE REF TO cl_salv_wd_column_header,
lr_cellvar TYPE REF TO cl_salv_wd_cv_standard,
l_cellvar TYPE string,
lr_progress_indicator TYPE REF TO cl_salv_wd_uie_progr_indicator.
lr_column_settings ?= wd_this->mr_table.
lr_column = lr_column_settings->get_column( 'STATUSBAR' ).
lr_column_header = lr_column->get_header( ).
lr_column_header->set_text( 'Completed' ).
CREATE OBJECT lr_cellvar.
l_cellvar = 'CV_SB'.
lr_cellvar->set_key( l_cellvar ).
CREATE OBJECT lr_progress_indicator.
lr_progress_indicator->set_percent_value_fieldname( 'STATUSBAR' ).
lr_progress_indicator->set_tooltip( 'completed' ).
lr_cellvar->set_editor( lr_progress_indicator ).
lr_column->add_cell_variant( lr_cellvar ).
lr_column->set_selected_cell_variant( l_cellvar ).
I hope this will solve your issues. -
How to access value mapping table in xi ?
Hi All,
i want to load all value mapping table data from XI to a excel sheet. how can i do it ?could anyone provide java code needed for it ?Hello
Maybe you could extract it via the Integration Directory Webservice Programming Interface...
Check this link:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/46/6dca42e5c269dfe10000000a11466f/frameset.htm
There is a section for Valuemappings there. Apparently it would be a matter of calling the corresponding webservice with the GUID of the valuemapping and it returns the data.
Good luck and please tell us if it works!
-Sam. -
Get selected row values from Table view control
Hi ,
I am using transaction ME23N, would like to access row values from item table for selected row. I have written a script as in screen shot and its giving me error at java script step two. I want to get the PR number from item table for selected row.
With Regards
Vishal LokapurH Vishal,
Can you please share how you were able to resolve the issue regarding the selected row
in case of a table control .
Regards -
Hello experts,
I have created an simple ALV Grid report, in that I have implemented double click event n I want to create a new ALV grid with new data to be displayed. So I want to access field value ie using SLIS_SELFIELD or anything. Could anyone please guide me how can I access a field value using slis though SLIS_SELFIELD has methods like SEL_TAB_FIELD... I wan to access something like SEL_FIELD_VALUE but its not available in the class.
Thanks in advance...
Regards,
Viral PatelHi Viral,
SLIS_SELFIELD has an attribute named VALUE which holds the value you selected row & TBAINDEX holds the row number.
Refer below code snippet :-
FORM user_command
USING s_ucomm LIKE sy-ucomm
s_selfield TYPE slis_selfield. "#EC CALLED
CASE s_ucomm.
WHEN '&IC1'.
CLEAR wa_podat2.
READ TABLE itab_podat2 INTO wa_podat2 INDEX s_selfield-tabindex.
CHECK sy-subrc = 0.
IF wa_podat2-ebeln = s_selfield-value.
SET PARAMETER ID 'BES' FIELD wa_podat2-ebeln.
IF wa_podat2-ebeln IS NOT INITIAL.
CALL TRANSACTION c_tcode.
ENDIF.
For above event to happen, you have to use parameter I_CALLBACK_USER_COMMAND of REUSE_ALV_GRID_DISPLAY as below :-
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = itab_fieldcat
it_events = itab_events
TABLES
t_outtab = itab_podat2[].
Regards
Abhii
Edited by: Abhii on Nov 30, 2009 11:25 AM -
How to access the value of a field of a field symbol.
Hello All,
i need to access the value of a field in a field symbol. But when i am trying to get the value like <FS>-POSNR, it's showing that that the <FS> has no structure.
In my program, the field itself that i need to check should be dynamic. ie i'll get the field in a variable and i need to find the value of that field.
Am pasting my code below, please tell me what needs to be done.
here in my sample code i am moving the entry of the <FS> into a work area structure. But in my actual program, i gets the structure as a parameter. So is there any way i can declare a work area dynamically...
FUNCTION z_39181_dyn_fs_60758.
""Local interface:
*" IMPORTING
*" REFERENCE(PARAMETER) TYPE VBELN
*" TABLES
*" DATA_TAB
BREAK-POINT.
FIELD-SYMBOLS <fs> TYPE ANY.
FIELD-SYMBOLS <fs1> TYPE ANY.
FIELD-SYMBOLS <fstab> TYPE ANY TABLE.
DATA name(5) VALUE 'POSNR'.
FIELD-SYMBOLS <f> TYPE ANY.
DATA: dref TYPE REF TO data,
dref1 TYPE REF TO data,
dref2 TYPE REF TO data.
DATA: lv_lips TYPE string.
DATA: lv_lipsfld TYPE string,
lv_fld TYPE string,
lw_lips TYPE lips.
lv_lips = 'LIPS'.
lv_fld = 'LW_lips-POSNR'.
CREATE DATA dref1 TYPE (lv_lips).
CREATE DATA dref TYPE STANDARD TABLE OF (lv_lips).
CREATE DATA dref2 LIKE LINE OF data_tab.
ASSIGN dref->* TO <fstab>.
ASSIGN dref1->* TO <fs>.
assign dref2->* to <fs
<fstab> = data_tab[].
LOOP AT <fstab> INTO <fs>.
lw_lips = <fs>.
WRITE lw_lips-vbeln.
ASSIGN (lv_fld) TO <fs1>.
write <fs>
ENDLOOP.
Helpful answers will be rewarded...Use syntax
ASSIGN COMPONENT name OF STRUCTURE struc TO <fs>. -
Possible Sequential Read Access for a Sorted Table
Hi All,
I have the following warnings in Code inspector check.
'Possible Sequential Read Access for a Sorted Table'
Kindly provide me the solution to overcome this warning message.
This is my code in BAdi : CRM_ORDER_FIELDCHECK , Method : FIELDCHECK
I am getting the above warning at
READ TABLE lt_status INTO ls_status WITH KEY status = 'E0001'
user_stat_proc = 'ZITRHDQT'
object_type = 'BUS2000114'.
and at
MODIFY ct_input_field_names FROM ls_input_field_names
TRANSPORTING changeable
WHERE fieldname NE lv_field.
Please see the below code .
DATA : lt_header_guid TYPE crmt_object_guid_tab,
lt_item_guid TYPE crmt_object_guid_tab,
lt_order_i TYPE crmt_orderadm_i_wrkt,
ls_order_i LIKE LINE OF lt_order_i,
lt_status TYPE crmt_status_wrkt,
ls_status LIKE LINE OF lt_status,
ls_input_field_names TYPE crmt_input_field_names.
DATA : lv_header_guid TYPE crmt_fieldcheck_com-guid,
lv_chng_no TYPE c VALUE 'A',
lv_field(10) TYPE c VALUE 'ACT_STATUS'.
DATA: lv_status_completed TYPE crmt_boolean.
To Get GUID
IF is_fieldcheck_com-guid IS NOT INITIAL.
lv_header_guid = is_fieldcheck_com-guid.
ELSE.
lv_header_guid = is_fieldcheck_com-ref_guid.
ENDIF.
IF is_fieldcheck_com-ref_kind EQ 'A'.
INSERT lv_header_guid INTO TABLE lt_header_guid.
ELSE.
SELECT SINGLE header FROM crmd_orderadm_i INTO lv_header_guid
WHERE guid = is_fieldcheck_com-ref_guid.
INSERT lv_header_guid INTO TABLE lt_header_guid.
ENDIF.
*To Get the required details
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_header_guid
IMPORTING
et_status = lt_status
EXCEPTIONS
document_not_found = 1
error_occurred = 2
document_locked = 3
no_change_authority = 4
no_display_authority = 5
no_change_allowed = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE lt_status INTO ls_status WITH KEY status = 'E0001'
user_stat_proc = 'ZITRHDQT'
object_type = 'BUS2000114'.
IF sy-subrc = 0.
ls_input_field_names-changeable = lv_chng_no.
MODIFY ct_input_field_names FROM ls_input_field_names
TRANSPORTING changeable
WHERE fieldname NE lv_field.
ENDIF.
ENDMETHOD.
Regards
VenkatHello Blake,
Try this:
READ TABLE lt_action_fld WITH KEY STATUS = '0' BINARY SEARCH.
wf_index = sy-tabix.
loop at lt_action_fld from wf_index.
if lt_action_fld-status ne '0'.
exit.
endif.
delete lt_action_fld index wf_index.
endloop.
Let us know, if this helps.
Rgds,
Raghu. -
Lookup value mapping table through message mapping.
Hello All,
I am working on a graphical mapping (message mapping). When trying to map the source message to the target message, I need to find out it a particular <b>key</b> exists in the <b>value mapping table</b>. Depending on the result, I need to map different source fields to the target field.
Is there any inbuilt function which will allow me to do a lookup on a value mapping table, or is it possible to lookup a value mapping table from a UDF?
Please help!
Warm Regards,
KeertiHi,
Please see the below links for Value mapping ..
Value mapping /people/sukumar.natarajan/blog/2006/10/23/accessing-value-mapping-defined-in-directory-using-java-functions
Value mapping in XSLT /people/sreekanth.babu2/blog/2005/01/05/design-time-value-mappings-in-xslt
Value Mapping replication - /people/sreekanth.babu2/blog/2005/02/23/value-mapping-replication
Also see
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
/people/community.user/blog/2007/01/08/valuemapping-using-the-graphical-mapping-tool
/people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=value%20mapping%20in%20xi&cat=sdn_weblog
Regards
Pradeep N -
Access to KeyPolicy mapping table
Hi all,
i've the following scenario:
- Sender system: B1.2007 - Sender Object: customized Purchase Order
- Receiver system: B1.2007 - Receiver Objcet: standard Sales Order
For the insert operation of a new PO, it's all right.
About the operation of update i've read that with KeyPolicy, B1i can mantain a key mapping table of the key value of the sender object and the key value of the object created.
I've seen that in the message monitor, effectively, when a SO is inserted, the system stores the primary keys (DocEntry) of object sent (PO) and received (SO).
i would use these values in a QueryParams tag for update phase. How can i access these values?
ThanksHi Shaun,
>>>Also does anyone know the directory where SAP ultimately stores the .jar files that get produced as a result of the graphical mappings
sure we know:
SID\DVEBMGS10\j2ee\cluster\server0\temp\classpath_resolver
you'll find all the mapping jars you need inside this folder:)
>>>Is there an easy way to view the Java code that is the result of a graphical mapping?
yes - just decompile those jars and you can see all the code - no other way to see it
Regards,
michal -
What are "value mapping tables"..
hi friends,
I am not getting the clear idea of value mapping tables and how it refers in cache monitoring....pls help me out...
with regards,
Santosh.Hi,
Value Mapping
A perticular object/field could have different interprtations from applications to applications and Business to Business. For e.g Suppose a particular document XYZ has an identity code 001 in one application or may be in one orgnization. But the same document could have different ID in different applications.
With the help of Value Mapping you could map these IDs with each other, thus while transaction of the data XI will act as an smart mapper to pass the Application specific values.
http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/frameset.htm
There are many docs available about Value mapping in SDN forum.
How to Perform Value Mapping A Walkthrough
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5
http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/frameset.htm
SDN Discussions
/people/sukumar.natarajan/blog/2006/10/23/accessing-value-mapping-defined-in-directory-using-java-functions
SAP - XI Value Mapping : Mapping two values to a single value
Value Mapping Issue in SAP XI
Value mapping
VALUE MAPPING TABLE
Regards,
Phani
Maybe you are looking for
-
Hello, Anybody an idea how to get the information regarding delivery schedule as in ME22 Position/Confirmations/Lists (Programm SAPSVC_FULLSCREEN)??? Thank you. Best regards, Paul.
-
PSE 13, Mac OS X Yosemite - how to write edited photos using keyboard only?
Apple-W -> Save/Discard (hit Enter to continue) -> File name (is displayed already, so hitting Enter continues) -> Are you sure? (Cancel is selected, but I want to switch to Continue - -> how? tab or space key don't work, first letter doesn't either)
-
Ipad stuck on connect to itunes screen but won't come up on computer in itunes
Hi, I have just bought a brand new ipad mini. When i connected it to my itunes it needed to be updated so that is the first thing i did. As it was updating my laptop suddenly turned off therefore the update was not complete. Now my ipad is stuck on t
-
How Configuring Channel to use Mail Event Generator with a "String" Message
Hello, I would like use a Mail Event Generator to receive String message. The BEA example is : <channel name ="SampleEGEmailChannel" messageType="xml" qualifiedMessageType="oagpo:PROCESS_PO_007" qualifiedMetadataType="eg
-
Trying to keep canvas on top of Iframe and drawing on it!
Hi I need to draw some rectangles on top of canvas which is placed on top of Iframe component. How can I do this? Any pointers are welcome. Regards, Aruna