Peoplecode to get dropdownlist box value and its description
Hi,
I have assigned a value and its description to dropdownlist box. when try to get the value and description in somewhere, i didn't get the description. i got only the value of the current row in a rowset. but i want to fetch the description which i assigned to the dropdownlist for the corresponding value. Is there any way to get the description?
Since it is not a XLAT bound to the field, you cannot use the field class properties.
What is the source of the dropdownlist?
If it comes from a database record, you could fetch the description from the database using the &Field.Value as input.
But this would cause a lot of database roundtrips.
You could store the value and description in a two dimensional component array variable and load this array with the values and descriptions at PostBuild Event.
This will only fires ones during the component build.
Suppose the values are "hardcoded", something like this
/* Create component 2-dim array */
Component array of array of string &DropdownArray;
&DropdownArray = CreateArrayRept("", 0);
&DropdownArray.Push(CreateArray("value1", "descr1");
&DropdownArray.Push(CreateArray("value2", "descr2");
&DropdownArray.Push(CreateArray("value3", "descr3");
After this populate the dropdownlist with values and descriptions from the array.
For &i = 1 To &DropdownArray.Len
&Field.AddDropDownItem(&DropdownArray[&i][1], &DropdownArray[&i][2]);
End-For;
Whenever you need to fetch the description of the dropdownlist value, first find the value by &Field.Value and then search within the array for the description.
/*Get value from dropdown */
&Value = &Field.Value;
/*Find index for value*/
&Ind = &DropdownArray.Find(&Value);
/*Get description (second index in subarray)*/
&Descr = &DropdownArray [&Ind][2];
I am writing the code without an environment, so typos could exist
Hope this helps.
Similar Messages
-
Getting the UPDATEd value and its primary key
I have two procedures, proc1 and proc2.
In proc1 there is an update happening like
CREATE OR REPLACE procedure proc1
as
TYPE NumList IS TABLE OF employees.employee_id%TYPE;
enums NumList;
TYPE NameList IS TABLE OF employees.last_name%TYPE;
names NameList;
BEGIN
UPDATE emp set sal=900 WHERE department_id = 30
RETURNING employee_id, last_name BULK COLLECT INTO enums, names;
DBMS_OUTPUT.PUT_LINE('Updated ' || SQL%ROWCOUNT || ' rows:');
FOR i IN enums.FIRST .. enums.LAST
LOOP
DBMS_OUTPUT.PUT_LINE('Employee #' || enums(i) || ': ' || names(i));
END LOOP;
END;
/In proc2 which is getting executed just after proc2 i want to SELECT the sal column values and its primary keys(employee_id) which got updated in proc 1.
How can i achieve this?add two out parameters from proc1 so that you can pass them into proc2 (obv. you'd need to add two in parameters to proc2 if they aren't there already)
-
How to get profit center group and its description
According to three tables(as below), i get profit center group, how to get its description?
CEPC (Profit Center Master Data Table)
SETLEAF
SETNODE
PS:(Referrence to teh link fields in table)
For Profit centre Group ( SETLEAF-SETNAME )
Select BSEG-BUKRS / BSEG-PRCTR from BSEG.
SELECT SINGLE SETNAME INTO WA_SETNAME
FROM SETLEAF
WHERE SETCALSS = '0106'
AND SUBCLASS = BSEG-BUKRS
AND VALFROM = BSEG-PRCTR
i can get two records, why?Hi,
I am not sure of the significance of this table...
But looking at the table structure it is having LINEID as one of the key fields..
So you can have more than one record for the same combination..
Thanks,
Naren -
Dropdownlist box value and display field retrieval question
have a case on a dropdown list where I want to not only retieve the value from the selected item, but I also want to retrieve the display field. I know that you use the the tempDropdownlist.getValue() to get the value, but how do you retrieve the display field?
The dropdown box is bound to a table with id(int) and Name(string).Yes there's no easy way - but you can loop thru the select items list and find the one that matches the current getValue result... and get it that way - see the tutorial on Using Listbox Components...
http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
hth,
v -
FM to get OA/SA history and its value
hi guys,
is there any FM that can be used to get OA/SA history and its follow-on documents value ..pls adviceHi Huang,
i had a similar requirement and unfortunately i wasnt able to get any solution on this(probably there isnt).
how to get Position of cursor and its cell value in webdynpro alv
My requirement was to pick up the value from the cell and do a multi paste to all lead selected records of the same column.
Sadly, i had to do a workaround to achieve the solution.
1) user needs to click on "Enter" key with cursor on the cell
2) lead select all the records where multipaste is required
3) then click on button "Paste" on application bar to paste the values to multiple cell.
Let me know if you get anything on this (for my education).
Regards,
Tashi -
How to create dropwdown list box values and checkbox in screen painter.
Hi Experts,
I need to know the creation of dropdown list box values and the checkbox to use in screen painter.
I have 3 values to insert as:-
INR,USD,EUR
if user selects INR/USD/EUR, then it will store into the table field.
And also want to know the checkbox functioning in screen painter, i.e. what should we write in PBO/PAI.
I have found some sites to get knowledge, but didnot found anything that relates to my questions.
So please help me!
Thanks,
DeepanshuHi,
For dropdown list box in Screen create a input field and choose Drop down by index.
To populate the values write the logic in PBO as follows
TYPE-POOLS : VRM
DATA : field_id TYPE VRM_ID ,
values TYPE VRM_VALUES,
value LIKE LINE OF values.
PROCESS BEFORE OUTPUT
MODULE list_fill_100
MODULE list_fill_100 OUTPUT
SELECT f1 f2 f3 FROM tab WHERE condition.
value-KEY = f1.
value-TEXT = f2
APPEND value TO VALUES
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'i/o screen field'
values = values.
ENDMODULE. -
Material Characterstic values and its text
HI,
I need material Characterstic values and its texts
CABN Characteristic Detail
AUSP Characteristic Values
CAWN Characteristic Values
CAWNT Characteristic Value Texts
KSML Characteristic Allocation to Class
But my AUSP table dont have all material numbers which i need to give the condition ausp-OBJNUM = mara-matnr and my mara-atinn filed also blank to fetch the values directly.
But the CABN,CAWN,CAWNT holds the data
Any new inputs and conditions other than these
Regards
RashedHi,
You need to search the object number in INOB(Link between Internal Number and Object) table first then you will get the record from AUSP.
In INOB you can put the material number in objek field
sample attached
MANDT CUOBJ KLART OBTAB OBJEK
013 000000000000021515 001 MARA 000000000000905030
Hopefully It should solve your probelm.
Regards,
Atul -
I have a question about Lightroom 5... I used it last night, I go to get on it today and its will not open. I have an error msg "Lightroom encountered an error when reading from its preview cache and needs to quit" Lightroom will attempt to fix the problem when reopened
https://forums.adobe.com/message/6219922#6219922
See if the issue in the thread above helps you to solve your problem. -
I want to get increment only amount and its percentage of increment from HR
Dear Sir,
I want to get increment only amount and its percentage of increment can you plz help me how to get it
please find below mentioned query.
Regards
select
papf.employee_number as employee_number,
papf.last_name as last_name,
papf.middle_names as middle_name,
papf.first_name as first_name,
papf.known_as as preferred_name,
ppt.user_person_type as employment_type,
ppp.change_date as change_effective_date,
cur.currency_code as currency,
ppp.proposed_salary_n * per_saladmin_utility.get_annualization_factor(paaf.assignment_id , to_date(sysdate)) as current_salary_annual,ppp.proposed_salary_n,
per_saladmin_utility.get_previous_salary(paaf.assignment_id,ppp.PAY_PROPOSAL_ID) PREVIOUS_SAL,
ppp.proposal_reason as sal_proposla_resaon,
ppp.attribute2 as performance,
ppp.attribute3 as gandac,
ppp.attribute4 as NINEBOXPOSITION,
ppp.attribute1 as RPR
from
per_all_people_f papf,
per_all_assignments_f paaf,
per_pay_proposals ppp,
per_pay_bases ppb ,
pay_input_values_f piv,
pay_element_types_f pet,
fnd_currencies_tl cur,
per_person_type_usages_f pptu,
per_person_types ppt
where 1=1
and papf.employee_number in (127)
--and ppp.change_date >= ’01-Jan-2005?
and papf.current_employee_flag = 'Y'
and sysdate between papf.effective_start_date and papf.effective_end_date
and papf.person_id = paaf.person_id
and sysdate between paaf.effective_start_date and paaf.effective_end_date
and paaf.assignment_id = ppp.assignment_id
and paaf.pay_basis_id = ppb.pay_basis_id
and ppb.input_value_id = piv.input_value_id
and piv.element_type_id = pet.element_type_id
and pet.input_currency_code = cur.currency_code
and papf.person_id = pptu.person_id
and pptu.person_type_id = ppt.person_type_id
order by papf.employee_number, ppp.change_date desc
Edited by: user10941925 on Jan 20, 2012 2:37 AMMaybe (taking it literally)
select proposed_salary_n - PREVIOUS_SAL increment,
100 * (proposed_salary_n / PREVIOUS_SAL - 1) increment_percentage
from (select papf.employee_number as employee_number,
papf.last_name as last_name,
papf.middle_names as middle_name,
papf.first_name as first_name,
papf.known_as as preferred_name,
ppt.user_person_type as employment_type,
ppp.change_date as change_effective_date,
cur.currency_code as currency,
ppp.proposed_salary_n * per_saladmin_utility.get_annualization_factor(paaf.assignment_id,to_date(sysdate)) as current_salary_annual,
ppp.proposed_salary_n,
per_saladmin_utility.get_previous_salary(paaf.assignment_id,ppp.PAY_PROPOSAL_ID) PREVIOUS_SAL,
ppp.proposal_reason as sal_proposla_resaon,
ppp.attribute2 as performance,
ppp.attribute3 as gandac,
ppp.attribute4 as NINEBOXPOSITION,
ppp.attribute1 as RPR
from per_all_people_f papf,
per_all_assignments_f paaf,
per_pay_proposals ppp,
per_pay_bases ppb,
pay_input_values_f piv,
pay_element_types_f pet,
fnd_currencies_tl cur,
per_person_type_usages_f pptu,
per_person_types ppt
where 1=1
and papf.employee_number in (127)
-- and ppp.change_date >= ’01-Jan-2005?
and papf.current_employee_flag = 'Y'
and sysdate between papf.effective_start_date and papf.effective_end_date
and papf.person_id = paaf.person_id
and sysdate between paaf.effective_start_date and paaf.effective_end_date
and paaf.assignment_id = ppp.assignment_id
and paaf.pay_basis_id = ppb.pay_basis_id
and ppb.input_value_id = piv.input_value_id
and piv.element_type_id = pet.element_type_id
and pet.input_currency_code = cur.currency_code
and papf.person_id = pptu.person_id
and pptu.person_type_id = ppt.person_type_id
order by papf.employee_number,ppp.change_date desc
order by employee_number,change_effective_date descRegards
Etbin -
SQL Query to get All AD Groups and its users in Active Directory
Hi,
Is there any query to get all AD groups and its user in an instance of a SQL server?Check this blog.
http://www.mikefal.net/2011/04/18/monday-scripts-%E2%80%93-xp_logininfo/
It will give you more than what is required. If you dont want the extra information,then you can try this.. I took the query and removed the bits that you might not require.
declare @winlogins table
(acct_name sysname,
acct_type varchar(10),
act_priv varchar(10),
login_name sysname,
perm_path sysname)
declare @group sysname
declare recscan cursor for
select name from sys.server_principals
where type = 'G' and name not like 'NT%'
open recscan
fetch next from recscan into @group
while @@FETCH_STATUS = 0
begin
insert into @winlogins
exec xp_logininfo @group,'members'
fetch next from recscan into @group
end
close recscan
deallocate recscan
select
u.name,
u.type_desc,
wl.login_name,
wl.acct_type
from sys.server_principals u
inner join @winlogins wl on u.name = wl.perm_path
where u.type = 'G'
order by u.name,wl.login_name
Regards, Ashwin Menon My Blog - http:\\sqllearnings.com -
How to get the kerning value and set it to back use script?
hi,guys
I come back again.
I encountered a kerning problem.
how to get the kerning value and set it to back use script?
Thanks very much!For both cases, the filename can be found on the FILE.ReceivedFileName Context Property. You can access this Property in a Pipeline Component or Orchestration and take any action you want, such as apply to a database.
The value is accessed by: MyReceivedMessage(FILE.ReceivedFileName)
In the case of a duplicate EDI Interchange, you would use the Failed Message Routing feature to capture the error message with either an Orchestration or Send Port. -
How to get selection screen elements and its table reference of a report ?
halo experts
How can I get selection screen elements and its table reference of a report ? . I tried rs_refresh_from_select_options. But I am unable to get the table and field it is referring to
For eg if my selection screen 1000 is
parameters: p_carrid type spfli-carrid,
select-options :s-_connid type sflight-connid.
is there any Fm or method which gives me what are the screen elements( p_carrid and s_connid ) and what table( splfi and sflight ) and field ( carrid and conid )it is referring to ?The following code is an example of how you might dynamically determine all your PARAMETERS and SELECT-OPTIONS variables at run time. The PARAMETERS and SELECT-OPTIONS only point to a dictionary element--not a specific table. Even though you may say "spfli-carrid" or "sflight-connid", the data type really references the dictionary type and not a specific table/structure.
REPORT ZTEST_PROG.
TABLES sflight.
DATA:
screen_tab TYPE STANDARD TABLE OF screen,
wa_screen TYPE screen,
scrn_nm TYPE string,
scrn_leftover TYPE string,
l_type TYPE REF TO cl_abap_typedescr,
typ_nm TYPE string,
typ_pre TYPE string.
FIELD-SYMBOLS <fs_data> TYPE ANY.
PARAMETERS p_carrid TYPE spfli-carrid.
SELECT-OPTIONS s_connid FOR sflight-connid.
INITIALIZATION.
LOOP AT SCREEN.
IF screen-group3 = 'PAR'
OR screen-group3 = 'LOW'.
APPEND screen TO screen_tab.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
LOOP AT screen_tab INTO wa_screen.
ASSIGN (wa_screen-name) TO <fs_data>.
l_type = cl_abap_typedescr=>describe_by_data( <fs_data> ).
IF wa_screen-group3 = 'LOW'.
SPLIT wa_screen-name AT '-' INTO scrn_nm scrn_leftover.
TRANSLATE scrn_nm TO UPPER CASE.
ELSE.
scrn_nm = wa_screen-name.
ENDIF.
SPLIT l_type->absolute_name AT '=' INTO typ_pre typ_nm.
WRITE:
/ 'Screen Name: ', scrn_nm,
/ 'DDIC Type: ', typ_nm.
ENDLOOP.
When you get into defining internal tables you can determine those at run time with cl_abap_structdescr. The following is an example of how you might do that. You can loop through the "components_table" and evaluate each field of the structure in this way.
DATA: structure_reference TYPE REF TO cl_abap_structdescr,
components_table TYPE abap_compdescr_tab,
components_structure LIKE LINE OF components_table.
structure_reference ?= cl_abap_structdescr=>describe_by_data( any_structure ).
components_table = structure_reference->components.
I don't know if this answers any of your questions but I hope that some of it is useful. -
How to get Portal Login User and Its Related BP in CRM?
Hi,
An ABAP Webdynpro program is called in CRM from Portal user by a portal link. How to get the user ID and its related BP in CRM? Thanks!
The portal is integrated with ECC, and all users and BPs are maintained in ECC then replicated to CRM.
Best regards,
HaoHi,
Try the below code
IUserFactory userfact=UMFactory.getUserFactory();
IUser user=userfact.getUserByUniqueName(request.getUser().getUserId());
String usrid=user.getUniqueName();
And also you can get the groups assigned to user by using the below code
Iterator groups = user.getParentGroups(true);
while (groups.hasNext()) {
String groupstr = (String) groups.next();
IGroup g = UMFactory.getGroupFactory().getGroup(groupstr);
response.write("Group name "g.getUniqueName()"<br>");
Regards
Suresh -
I just purchased harry potter and the deathly hallows digital copy but i just synced my ipod and its not there. i went back to get the copy again and its says the code can only be used once. I dont have the movie and now i cant get it at all. i paid for it when i bought the movie but now i dont own it at all. i feel cheated, somebody please help!
Not Charge
- See:
iPod touch: Hardware troubleshooting
iPhone and iPod touch: Charging the battery
- Try another cable. Some 5G iPods were shipped with Lightning cable that were either initially defective or failed after short use.
- Try another charging source
- Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
- Make an appointment at the Genius Bar of an Apple store.
Apple Retail Store - Genius Bar -
When we run query how it gets the characteristic values and attributes.
Hi,
When we load transaction data it chacks characteristic values then SIDs then DIM IDs then insert DIM IDs into fact table but when we run the query how it checks and gets the characteristic values and attributes.
Bye
GKwhen we run the query how it checks and gets the characteristic values and attributes.
Just the opposite way you have described. It gets from the corresponding masterdata tables, with the connected SID.
Maybe you are looking for
-
How do I save pictures to an external hard drive that can be opened by a pc?
I have saved all of my pictures from my macbook pro on an external hard drive but my PC does not even show the hard drive when I plug it in to transfer the pictures over... any ideas here? Thanks
-
I have a new Mark3 D 5, I can't open Raw files
I have a new Mark3 D 5, I can't open Raw files I've shot in LR 3, I read I would be able to in LR 4 or 5. Because my mac is 10.6.8 I prefer to get LR 4 so I don't have to also update my operating system. Will LR 4 open my rw files in Mark3 D5. What a
-
Cannot install Canon printer drivers after upgrade to Mountain Lion
Have got a MG3150 printer from Canon. which is in the supported list. I tried to add the new printer and get the message "can't install the software for the Canon MG3100 series becuase it is not currently available from the Software Update Server. It
-
How to install and configure Wordpress? [SOLVED]
I have a experience in Ubuntu. I installed Wordpress and it worked great. I could find many tutorial for Ubuntu or Debian. But I couldn't find one of Arch. Anyone knows a good tutorial for Arch Linux? Thank you. Last edited by since1992 (2010-11-06 1
-
ABAP Unit on ABAP Sneak Preview 2004s
I am trying to look at ABAP Unit within ABAP Sneak Preview 2004s. Upon trying I get a message 'The system settings prevent the use of unit tests in this client'. I have gone to transaction SAUNIT_CLIENT_SETUP but it will not allow me to uncheck 'Pr