Javascript help to compare fields
Looking for some help with javascript to check values using if/then statements.
I have 3 fields:
JobTitle
RateRange
RateAmount
JobTitle is a drop down with the following list items and corresponding values:
List Item Text Value
Manager 1
Supervisor 2
Rep 3
RateRange is a drop down that gets its value from the JobTitle.I pass the rawValue to pull up the corresponding Rate. Here are the values:
List Item Text Value
$30 - $37 1
$26 - $31 2
$12 - $17 3
This part works perfect. If I choose Manager then the RateRange shows me $30-$37.
So the process is the user has selects the JobTitle and the RateRange auto populates, then they will enter the RateAmount. Once the RateAmount is entered, I want to have a script check to see if the amount entered is between the RateRange amounts. If it is not I want it to change the color of the field. Ive figured out how to change the color, but I cant get any if/then statements to work correctly. I figure its because how the RateRange field is set up.
So Ive tried adding a field that will do the same thing as the RateRange except it will only pull the first value, instead of both values in the range, but Im having problems getting that to work.
Any ideas?
Also, how do you reference the display text of a drop down? I believe the binding value is the rawValue? What do you use to look at the display text value?
Thank you in advance!
try this:
window.location.href = "mailto:[email protected]?subject=Subject&body=message%20goes%20here";
Fouad Roumieh
Similar Messages
-
I have 5 combo boxes with choices of Y, N and NA. When yes is selected the score will equal 3, when no is selected the score will equal 0, when NA is selected the score will show no score. I have a text box that will then show the final score from the 5 combo boxes, out of a possible 15. I have one last text field that will show a pass or fail. A pass would be 15 anything less than a 15 is a fail. I have custom JavaScript stating the following:
var aFields = new Array("6 Combo Box 1", "6 Combo Box 2", "6 Combo Box 3", "6 Combo Box 4", "6 Combo Box 5");
var aDefault = new Array();
for (var i = 0; i < aFields.length; i++){
if (this.getField(aFields[i]).value == this.getField(aFields[i]).defaultValue){ //compares field value to default value which is empty
aDefault.push(aFields[i]); //this will create an array of fields not filled in
var v = +this.getField("Model Call Score").value;
if (v>14) event.value = "Pass";
else event.value = "Fail";
//verify if aDefault contains at least one field
if (aDefault.length >0){
event.target.display = display.hidden;
//hide my value if a field is still empty
else{
event.target.display = display.visible;
I understand that the last part of the code said to make the value hidden. I want a pass or a fail to show up only when all combo boxes are selected. I do not have knowledge of JavaScript. Could someone please help me correct my current code or come up with another suggestion. Attached is a link to my form. My above question is referring to the bottom section.Wicked! Thanks so much! I have one last question regarding this form. Earlier in my form I have 5 sections of combo boxes. Each section contains 4 choices. They then populate a score then an average score then a final average score. The issue I'm having is if the user selects NA it no longer counts in the score, the score would now be based out of 3 and not 4. If they select NA twice the score would be based out of 2 and not 4. How can I write a custom JavaScript that lets me say what the score will be based on if the user selects NA.
-
F4 Help on one field should populate data on another field
Dear All....
I am using the FM - F4IF_INT_TABLE_VALUE_REQUEST for F4 help on one field of the selection screen. Based on the selected value, a values corresponding to it should appear on another field.
My Code -
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_svn.
SELECT qmnum serialnr
INTO TABLE t_qmel
FROM qmel
WHERE qmart = 'ZD'.
SORT t_qmel BY qmnum.
Display the f4 Help Values for SVN
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'QMNUM'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_SVN'
window_title = text-015
value_org = 'S'
TABLES
value_tab = t_qmel
return_tab = t_retval.
READ TABLE t_retval INTO w_retval_wa INDEX 1.
IF sy-subrc = 0.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = w_retval_wa-fieldval
IMPORTING
output = w_qmel_wa-qmnum.
w_retval_wa-fieldval = w_qmel_wa-qmnum.
READ TABLE t_qmel INTO w_qmel_wa WITH KEY qmnum = w_retval_wa-fieldval
BINARY SEARCH.
IF sy-subrc = 0.
p_esn = w_qmel_wa-serialnr.
ENDIF.
ENDIF.
But this is however not working.
Please let me know where I am going wrong.
I have serached SDN thoroghly but could not get my solution.
Please guide me....
Regards,
Pankaj Agarwal.*& AT SELECTION SCREEN ON VALUE-REQUEST FOR FIELD
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ebeln.
PERFORM f4_hlp_ebeln.
*& Form F4_HLP_EBELN
text
--> p1 text
<-- p2 text
FORM f4_hlp_ebeln .
TYPES: BEGIN OF ty_ebeln,
ebeln TYPE ebeln ,
END OF ty_ebeln.
DATA: lt_ebeln TYPE TABLE OF ty_ebeln.
CLEAR: lt_ebeln[].
SELECT ebeln
FROM zmt_po_mic_ded
INTO TABLE lt_ebeln.
IF sy-subrc = 0.
SORT lt_ebeln[] BY ebeln.
DELETE ADJACENT DUPLICATES FROM lt_ebeln COMPARING ALL FIELDS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'EBELN'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_EBELN'
value_org = 'S'
callback_program = sy-repid
TABLES
value_tab = lt_ebeln[]
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_HLP_EBELN
DATA: t_dynfields TYPE TABLE OF dynpread,
t_valhlp TYPE TABLE OF ty_valhlp.
DATA: w_dynfields TYPE dynpread.
CLEAR: t_dynfields[], t_valhlp[].
DATA: l_ebeln TYPE ebeln.
w_dynfields-fieldname = 'P_EBELN'.
w_dynfields-fieldvalue = p_ebeln.
APPEND w_dynfields TO t_dynfields.
CLEAR w_dynfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = c_x
TABLES
dynpfields = t_dynfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
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 t_dynfields INTO w_dynfields INDEX 1.
IF sy-subrc = 0.
l_ebeln = w_dynfields-fieldvalue.
SELECT ebeln
ebelp
FROM ekpo
INTO TABLE t_valhlp
WHERE ebeln = l_ebeln.
IF sy-subrc = 0.
SORT t_valhlp[] BY ebeln ebelp.
here we get the value of ebelp depending on the selection of EBELN ***
endif.
ENDIF. -
Search help for A field in select option which doesnt have search help in c
u have table in QM which is QMFE in whihc field FECOD which doesnt have search help , but my requirement is that in select option in report to have users to see its search help, anyone there to help me
Hi sridhar loganathan,
For this goto SE11 and create a ZFECOD Search help for that field. In Defination Tab enter table name
QMFE and Enter Z_F4_FECOD_EXIT in Search help Exit.
Then create a FM in SE37 as Z_F4_FECOD_EXIT under a FG. And then write code as follows for example:
FUNCTION Z_F4_REG_EXIT.
""Local Interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
TYPES: begin of ty_code,
dam_code type QMFE-FECOD ,
end of ty_code.
DATA : tw_code type ty_code,
ta_code type table of ty_code.
IF "callcontrol-step <> 'SELONE' AND
callcontrol-step <> 'SELECT' AND
callcontrol-step <> 'DISP'.
EXIT.
ENDIF.
IF callcontrol-step = 'SELECT'.
CALL FUNCTION 'F4UT_PARAMETER_ALLOCATE'
EXPORTING
PARAMETER = 'FECOD'
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol
EXCEPTIONS
OTHERS = 3.
ENDIF.
IF callcontrol-step = 'DISP'.
Get the Region
CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
EXPORTING
PARAMETER = 'FECOD'
FIELDNAME = 'FECOD'
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
RESULTS_TAB = ta_code
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol
EXCEPTIONS
PARAMETER_UNKNOWN = 1
OTHERS = 2.
IF SY-SUBRC = 0.
SORT TA_CODE BY DAM_CODE.
Deleting duplicate damage codes in Internal Table ta_code
DELETE ADJACENT DUPLICATES FROM TA_CODE COMPARING DAM_CODE.
Passing changed Internal table to FM
CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
EXPORTING
PARAMETER = 'REGION'
FIELDNAME = 'REGION'
TABLES
SHLP_TAB = shlp_tab
RECORD_TAB = record_tab
SOURCE_TAB = ta_code
CHANGING
SHLP = shlp
CALLCONTROL = callcontrol
EXCEPTIONS
PARAMETER_UNKNOWN = 1
OTHERS = 2.
ENDIF.
ENDIF.
ENDFUNCTION.
Revert me for any clarifications.
Regards,
Suneel G. -
How to delete entries from search help for a field
hi guys
how r u all doing.
i have some questions for u.
1. How can i delete some entries(from a list of many) from search help of a field with out (writing)going to a program.
2.in PA10 (Personnel File),when i try to display data for a pernr,i am getting an error saying that infotype 122 doesnot exist.
3.Again in Pa20,when i try to display data for a custom infotype,it leads me to short dump saying that load program does not exist.
any help in this regard,wud be appreciated.
thanksFollow this
What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support -
Reg : F4 help for custom fields in ALV report
hi friends..
in my internal table i have fields including 1 custom field..
DATA : BEGIN OF i_final OCCURS 0,
pernr LIKE p0000-pernr,
begda LIKE p0000-begda,
plans LIKE ZPOSITION-plans, (custom)
werks LIKE pspar-werks,
end of i_final.
i want to display this i_final table in alv. for that i genetrate one fieldcatalog
PERFORM fcat USING:
'I_FINAL' 'PERNR' 'P0000' 'PERNR' '15' 'X' '',
'I_FINAL' 'BEGDA' 'P0000' 'BEGDA' '10' 'X' '',
'I_FINAL' 'PLANS' 'ZPOSITION' 'PLANS' '8' 'X' '',
'I_FINAL' 'WERKS' 'PSPAR' 'WERKS' '14' 'X' ''.
in custom table zposition, i maintain serch help for custom field "PLANS".
then i used reuse_alv_grid_display.. for all the std fields along wit custom fields
i got f4 all std fields but for my custom i am not getting the f4 help
how can i get the F$ help for this custom fields Zposition-plans..
plz give some ideaHi
In that Ztable against the field
PLANS give the check table name as <b>T528B</b>
then it will automatically give the search help
or you can create your own search help(elementary) and add to that field
Reward if useful
regards
Anji -
How to get the F4 help for a field in the selection screen
Hi all,
I am working on a report program. In the selection screen, I have the field 'Brand Node ID'(ZNODEID). The requirement is to have the F4 help for this field. This field is available in a 'Z' table ZNODETAB. There is no Value table maintained for the corresponding data element. So, without disturbing the table data element/domain, I should get the F4 help in the selection screen of the report. In the F4 help, data should be fetched from the table ZNODETAB and the field is ZNODEID. Is there any way to do this.
By searching the function modules, I could find that, we can use the FM F4IF_INT_TABLE_VALUE_REQUEST. But, I am not Sure. Can someone tell me the parameters to be passed to this function module to get the F4 help and the procedure to follow. S_NODEID is the select option used in the program. Please help me in this regard. Thanks in advance.
Thanks & Regards,
Paddu.look at this code and try
select-options : S_NODEID for ZNODETAB-ZNODEID.
at selection-screen on value-request for s_nodeid-low
perform f4_nodeid using 'S_NODEID-LOW'.
at selection-screen on value-request for s_nodeid-low
perform f4_nodeid using 'S_NODEID-HIGH'.
end-of-selection.
FORM f4_nodeid USING p_field.
declare it_node.
select znodeid from ZNODETAB into table it_node.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZNODEID'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = p_field
value = space
value_org = 'S'
display = 'F'
TABLES
value_tab = it_node
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
endform -
Hi All,
I have enhanced IT 21 with a new field called "Country of citizenship" in custom include CI_0021.
For this i have assigned LAND1 as the domain and the data element. The value table for this is
T005. but the problem is i am not able to get any value in the F4 help for this field in PA30 screen
for IT 21. Please help me in solving this issue. its very urgent.
RupeshHi,
Use the follwoing function module, you get search help. But you have to pass your table name, field names below.
data: it_itab type help_info,
rsmdy_ret type rsmdy.
data: it_itab1 type table of dselc initial size 0,
it_itab2 type table of dval initial size 0.
it_itab-tabname = 'GMGR'. " Table Name
it_itab-fieldname = 'GRANT_NBR'. " Field Name
it_itab-MCOBJ = 'GMGRANT'. " Name of the Search Help
it_itab-TCODE = 'CJ20N'. " Transaction Code
& Function Module for calling Search Helps from DYNPRO &
CALL FUNCTION 'DD_SHLP_CALL_FROM_DYNP'
EXPORTING
HELP_INFOS = it_itab
IMPORTING
SELECT_VALUE = SELECT_VALUE
RSMDY_RET = RSMDY_RET
TABLES
DYNPSELECT = it_itab1
DYNPVALUETAB = it_itab2
exceptions
others = 1 .
Pass the search help value to a temporary variable
l_temp = select_value.
Hope it helps you.
Regards,
CS.
Note: Reward points if helpful.
Edited by: CSY on Mar 19, 2008 4:51 PM -
F4 help for a field in module pool
Hello Experts,
I need to provide f4 help on field sales office(VKBUR) in my module pool program.
I have searched forums about it. but all forum contains either doc. no or customers etc.
these field are directly available on table, so very easy to find.
But for sales office, how can i provide f4 help. there is no straight entries in tables like for this company code this sales office.
so its getting difficult for me to provide help.
so if anybody know the solution plz help, and if anyone know table where all sales offices are stored, i will be thankful.
Thanks,
AmarHi amar_war,
use screen painter to edit the screen layout where the field VKBUR is on. Double click the field to get the details screen. Here you can attach a search help to the field.
H_TVBUR has no more parameters, it will display a list of al sales offices with description text
H_TVBVK will also show the sales group, if VKGRP is a screen field, it will restrict the result list automatically on matching VKGRP.
H_TVKBZ has also VKORG VTWEG SPART - it will take those values from screen if filled.
If you are not satisfied with the results, you can easily create your own search help using own selection method and own search help exits if required.
Try standard search help for standard field first.
You can create a copy of VKBUR as ZVKBUR and attach search help there, you can create your own screen structure and attach the search help there - 50 ways to get your search help...
Regards,
Clemens -
F4 help for a field in item table in a view cluster
Hi All,
I have a view cluster with two tables. I should provide F4 help for field in item table based on the selected row of the header table.
F4 should have only values fetched based on the header table entry.
How can i achieve this. Please suggest.
Regards,
Kusuma K.Hi amar_war,
use screen painter to edit the screen layout where the field VKBUR is on. Double click the field to get the details screen. Here you can attach a search help to the field.
H_TVBUR has no more parameters, it will display a list of al sales offices with description text
H_TVBVK will also show the sales group, if VKGRP is a screen field, it will restrict the result list automatically on matching VKGRP.
H_TVKBZ has also VKORG VTWEG SPART - it will take those values from screen if filled.
If you are not satisfied with the results, you can easily create your own search help using own selection method and own search help exits if required.
Try standard search help for standard field first.
You can create a copy of VKBUR as ZVKBUR and attach search help there, you can create your own screen structure and attach the search help there - 50 ways to get your search help...
Regards,
Clemens -
F4 help for a field in UI(CRM 5.1)
Hi All
Can anybody tell me how to do F4 help for a field in UI( CRM 5.1). scenario is given below.
I have 2 customer fields added to UI using EEW and have custom table for maintaining field values. need to add F4 help for field1 ( field1 and field2 values needs to be displayed in F4 help list) and field2 should get value when we hit the particular entry from field1 F4 help list.
thanks in advance.Hi,
You can implement the Get_V* method for the field1 attribute and use the following code to populate both field1 and field2 as output paramters for your F4 help.
DATA:
ls_map TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
ls_map-context_attr = '<STRUCT.field1>'.
ls_map-f4_attr = 'field1'.
APPEND ls_map TO lt_outmap.
ls_map-context_attr = '<STRUCT.field2>'.
ls_map-f4_attr = 'field2'.
APPEND ls_map TO lt_outmap.
<fill the lt_inmap (input parameters) as per your requirement>
CREATE OBJECT rv_valuehelp_descriptor TYPE cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = '<your search help id>'
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
Note: In your DDIC search help, define field1 and field2 as output parameters in SE11.
Reward if it works!
Thanks,
Sudipta. -
Hi,
In BP_CONT component, for address field I need to provide F4 help. And the F4 should contain the addresses with separate fields as (city.street,country).On selecting the row the data should flow as concatenated manner to the address field.
Please provide some idea to achieve this.
Thanks.Hi Ginger,
I would like to add what Vinamra has said, you need to create a search help through se11 transaction. As per your requirement you need to map address field of the selected row to different fields in UI.
In search help we have IMPORTING(IMP) and EXPORTING(EXP) Fields or parameter.
Lets take a simple example, suppose you have three address field house no, street and city. Now you would like to apply F4 help on CITY field so you need to choose CITY field as IMPORTING and EXPORTING parameter in your search help and other fields like HOUSE NO and STREET as EXPORTING parameter only.
Now following code you need write in GET_V_CITY() method
DATA:
lt_inmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
ls_map TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping,
lt_outmap TYPE if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab.
ls_map-context_attr = 'STRUCT.CITY'.
ls_map-f4_attr = 'CITY'.
APPEND ls_map TO: lt_inmap, lt_outmap. " map to input and out
ls_map-context_attr = 'STRUCT.HOUSENO. " Context node attribute
ls_map-f4_attr = 'HOUSE_NO'. "corresponding Field in search help
APPEND ls_map TO: lt_outmap.
ls_map-context_attr = 'STRUCT.STREET. " Context node attribute
ls_map-f4_attr = 'STREET'. "corresponding Field in search help
APPEND ls_map TO: lt_outmap.
CREATE OBJECT rv_valuehelp_descriptor
TYPE
cl_bsp_wd_valuehelp_f4descr
EXPORTING
iv_help_id = 'ZSH_ADDRESS'
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name
iv_input_mapping = lt_inmap
iv_output_mapping = lt_outmap.
May this will help you.
Regards
Ajay -
hi all
i am developing a z report.input field is customer name (ADRC-NAME1). SAP has not given F4 help on this field.
please tell mo how to give f4 Help for this field in report.
regard.
ulhashi..
do as below..
AT SELECTION-SCREEN ON VALUE-REQUEST FOR PR_VERSB.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = 'MDPB'
FIELDNAME = 'VERSB'
SEARCHHELP = 'H_T459V'
DYNPPROG = 'ZPP_SHORT'
DYNPNR = '1000'
DYNPROFIELD = 'PR_VERSB'
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Rahul -
HI all,
in the report selection screen i have one field for which F4 HELP doesnt exits, even in the table for that field F4 HELP is not there but the user requests me to get the F4 HELP for that field in the selection screen .
please help how to get F4 HELP for the field
thanks in advance.The following are the options for F4 help
Code:
PARAMETERS: p_ccgrp LIKE rkpln-ksgru. "Cost Center Group
*Input help for Cost Center Group
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_ccgrp.
TYPES: BEGIN OF ty_ccenter_group,
setname TYPE setnamenew,
descript TYPE settext,
END OF ty_ccenter_group.
DATA: it_ccenter_group TYPE TABLE OF ty_ccenter_group.
CLEAR it_ccenter_group.
SELECT a~setname
b~descript
INTO TABLE it_ccenter_group
FROM setheader AS a INNER JOIN
setheadert AS b ON
asubclass EQ bsubclass AND
asetname EQ bsetname
WHERE a~setclass EQ '0101' AND
b~langu EQ sy-langu.
CALL FUNCTION
'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ret field = 'SETNAME'
dynpprog = v_repid
dynpnr = SY-DYNR
dynprofield = 'P_CCGRP'
value_org = 'S'
TABLES
value_tab = it_ccenter_group.
F4IF_FIELD_VALUE_REQUEST:
This FM is used to display value help or input from ABAP dictionary. We have to pass the name of the structure or table (TABNAME) along with the field name (FIELDNAME). The selection can be returned to the specified screen field if three
parameters DYNPNR, DYNPPROG, DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = table/structure
FIELDNAME = 'field name'
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNR
DYNPROFIELD = 'screen field'
IMPORTING
RETURN_TAB = table of type DYNPREAD
Getting F4 help based on other field .
Suppose if there are 2 fields on selection screen user name and Purchasing Document and the case is getting values of Purchasing Document Number based on user name
Code:
TYPES: BEGIN OF ty_match_nast,
objky TYPE na_objkey,
END OF ty_match_nast.
Data: it_match_nast TYPE STANDARD TABLE OF ty_match_nast.
Data: it_dypr_val TYPE STANDARD TABLE OF dynpread.
DATA: wa_dypr_val TYPE dynpread.
DATA: it_return TYPE STANDARD TABLE OF ddshretval.
Case when only username value is entered.
SELECT objky
FROM nast
INTO TABLE it_match_nast
WHERE kappl = c_ef
AND kschl = c_neu
AND usnam = wa_dypr_val-fieldvalue.
ENDIF.
*Read User name on selection screen field value
CLEAR wa_dypr_val.
REFRESH it_dypr_val.
wa_dypr_val-fieldname = 'P_UNAME'. "User name
APPEND wa_dypr_val TO it_dypr_val.
*FM to get the value
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = it_dypr_val_h.
*Pass the values to f4 table
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = u2018OBJKY'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_EBELN'
value_org = 'P'
TABLES
value_tab = it_match_nast
return_tab = it_return. -
F4 help for a field on table control
Hi All,
I have to display F4 help for a purticular field on the table control depending on one of the value in the row if the table.
There will be multiple entries in the table control and the F4 help for the field should change according to the value of other field in the row.
Can anybdy help me out doing this.....
Edited by: Alvaro Tejada Galindo on Feb 21, 2008 10:46 AMCheck the FM: HELP_VALUES_GET_WITH_TABLE_EXT
Check the documentation for example code.
regards,
Ravi
Maybe you are looking for
-
how do I add an ipad to devices in my itunes account which was previously associated with another account?
-
BAPI for assing source of supply for purchase requisitions
Hi, can any one let me know if there is any bapi or function module to assing source of supply for purchase requisitions. Points will be given regards, siva prasad.
-
Need to pass user_id and password in URL item attribute of workflow
Hi Gurus, I am facing an issue in creating an URL in workflow builder. Basically i have created an URL Item type attribute with value ../../OA_HTML/jtfTaskMain.jsp?jttst0=2414_23135%2C23135%2C-1%2C0%2C&jttmexjtfm0=_0_0_1_0_f_nv_&jttmexetfm1=_0_-1_&jf
-
Data in ZIC_C03 cube not visible
I have loaded the data into the cube using 2LIS_03_BF infosource. The data is loaded into the cube and it is showing as reportable when I go to the Manage Requests tab. However when I try to look into the cube contents, nothing comes up. Also when I
-
APPSET (Errors in Copying AppShell) --------AppSet without copying?
Hi Folks; I am creating a new APPSET, Obviouslly based in APPSHELL. 1.- I get this ERROR in the Five Step: (You know how solve it?) > Check Enviroment Information OK > Copy File OK > Copy DataBase OK > Create OLAP Database OK > OLAP Connect ERROR