Need a drop down for a selection screen
HI all,
I need a drop down for a selection screen.
say for eg: Field is MARA-MTART (Material Type). The selection is optional and the dropdown should be using check table: T134
How to get a dropdown? I think a function module is used , but I dont remember the name.
Kindly reply.
Thanks in advance.
Points will be rewarded
Hi,
chk the below code...
TYPE-POOLS: vrm.
PARAMETER: pr_spart TYPE spart AS LISTBOX VISIBLE LENGTH 7.
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_spart.
INITIALIZATION.
*----Code for Drop down list....
DATA: lit_spart_list TYPE vrm_values, "Table for list of Divisions
lwa_spart_list TYPE vrm_value,
lw_name TYPE vrm_id. "Name of parameter with list-box.
*---Assign selected values to table that would be passed to FM VRM_SET_VALUES
CLEAR : lwa_spart_list,
lw_name.
*---Pass required values for list-box display.
lwa_spart_list-key = 'H'.
lwa_spart_list-text = 'HL'.
APPEND lwa_spart_list TO lit_spart_list.
lwa_spart_list-key = 'S'.
lwa_spart_list-text = 'SL'.
APPEND lwa_spart_list TO lit_spart_list.
lwa_spart_list-key = 'P'.
lwa_spart_list-text = 'PP'.
APPEND lwa_spart_list TO lit_spart_list.
lwa_spart_list-key = 'F'.
lwa_spart_list-text = 'FR'.
APPEND lwa_spart_list TO lit_spart_list.
*Name of parameter to which list is to be assigned
lw_name = 'PR_SPART'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = lw_name
values = lit_spart_list
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Reagrds,
nagaraj
Similar Messages
-
Drop down box in selection screen
Hi all,
I have a requirement in which i need to display a drop down list box for some of the fields in the input selection screen like 1) status to be A) Yes b) No and the 2) Order field to be A) Not started B) In Progress C) Complete....
So i need any one of you please help me out to write the code for the above requirement, hope iam clear in my question and if possible please try give me some example code thanks in advance.Hi,
Check this sample code..
TYPE-POOLS: vrm.
PARAMETERS: p_test TYPE char4 AS LISTBOX VISIBLE LENGTH 10.
DATA: t_data TYPE vrm_values.
INITIALIZATION.
DATA: s_data TYPE vrm_value.
s_data-key = 'ABCD'.
s_data-text = 'First four'.
APPEND s_data TO t_data.
s_data-key = 'EFGHI'.
s_data-text = 'Second four'.
APPEND s_data TO t_data.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'P_TEST'
values = t_data
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
START-OF-SELECTION.
WRITE: / p_test.
Thanks,
Naren -
How to put drop down box in selection screen
Hi all,
I have to create a selection screen.
in that i have to use a drop down box for the text box.
how to do that.
thanking u.
with regards,
giri.HI
Check thi ssample code -
REPORT ZTESTPRG.
TYPE-POOLS: VRM.
DATA: NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
PARAMETERS: PS_PARM(10) AS LISTBOX VISIBLE LENGTH 10.
AT SELECTION-SCREEN OUTPUT.
NAME = 'PS_PARM'.
VALUE-KEY = '1'.
VALUE-TEXT = 'LINE 1'.
APPEND VALUE TO LIST. VALUE-KEY = '2'.
VALUE-TEXT = 'LINE 2'.
APPEND VALUE TO LIST.
CALL FUNCTION 'VRM_SET_VALUES' EXPORTING ID = NAME VALUES = LIST.
START-OF-SELECTION.
WRITE: / 'PARAMETER:', PS_PARM.
Hope this helps.
OR
You can use the F4 function module or use a List box
see the sample codes
See the following ex:
TYPES: BEGIN OF TY_MBLNR,
MBLNR LIKE MKPF-MBLNR,
END OF TY_MBLNR.
DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
data: it_ret like ddshretval occurs 0 with header line.
At selection-screen on value-request for s_mat-low.
Select MBLNR from mkpf into table it_mblnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MBLNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_MBLNR
FIELD_TAB =
RETURN_TAB = IT_RET
DYNPFLD_MAPPING =
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.
IF SY-SUBRC = 0.
read table it_ret index 1.
move it_ret-fieldval to S_mat-low.
ENDIF.
Go through the test program.
REPORT Ztest_HELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
LIST BOX
Input : p_char = 'J'.
Press: enter
List Box of Month = January, June , July.
REPORT ZLIST_VALUES.
TYPE-POOLS vrm.
tables:
spfli.
parameters: p_char type c.
parameters:
p_month(12) as listbox visible length 20,
p_year as listbox visible length 20 .
DATA:
t_table TYPE STANDARD TABLE OF vrm_value,
t_table1 TYPE STANDARD TABLE OF vrm_value,
vrm_values1 LIKE LINE OF t_table.
DATA:
t_year TYPE STANDARD TABLE OF vrm_value.
data: w_year(4) type n value '2000'.
at selection-screen output.
vrm_values1-key = 'a'.
vrm_values1-text = 'January'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'p'.
vrm_values1-text = 'February'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'q'.
vrm_values1-text = 'March'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'r'.
vrm_values1-text = 'April'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 's'.
vrm_values1-text = 'May'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 't'.
vrm_values1-text = 'June'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'u'.
vrm_values1-text = 'July'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'v'.
vrm_values1-text = 'August'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'w'.
vrm_values1-text = 'September'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'x'.
vrm_values1-text = 'October'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'y'.
vrm_values1-text = 'November'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'z'.
vrm_values1-text = 'December'.
APPEND vrm_values1 TO t_table.
t_table1[] = t_table.
delete t_table1 where text+0(1) <> p_char.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'p_month'
values = t_table1
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
do 10 times.
add 1 to w_year.
vrm_values1-key = sy-index.
vrm_values1-text = w_year.
APPEND vrm_values1 TO t_year.
enddo.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'p_year'
values = t_year
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
start-of-selection.
write: p_month. -
Drop down list in selection screen.
hello there,
How to get a drop down list box in selection screen and in module pools.
explain also, how to populate some data into that.*& Report ZSREE_DROP *
REPORT ZSREE_DROP .
TABLES : LFA1,EKKO,EKPO.
TYPE-POOLS : VRM.
DATA I1 TYPE I VALUE 0.
DATA : BEGIN OF WA_LFA1,
LIFNR TYPE LIFNR,
NAME1 TYPE NAME1,
END OF WA_LFA1.
DATA IT_LFA1 LIKE TABLE OF WA_LFA1.
DATA : BEGIN OF WA_EKKO,
EBELN TYPE EBELN,
END OF WA_EKKO.
DATA IT_EKKO LIKE TABLE OF WA_EKKO.
DATA : BEGIN OF WA_EKPO,
EBELP TYPE EBELP,
END OF WA_EKPO.
DATA IT_EKPO LIKE TABLE OF WA_EKPO.
DATA : BEGIN OF WA_VRM,
KEY(40) TYPE C,
TEXT(80) TYPE C,
END OF WA_VRM.
DATA IT_VRM LIKE TABLE OF WA_VRM.
*& Module USER_COMMAND_0100 INPUT
text
module USER_COMMAND_0100 input.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'PDOC'. "fctcode for first list box
CLEAR IT_EKKO.
SELECT EBELN INTO TABLE IT_EKKO FROM EKKO WHERE LIFNR = LFA1-LIFNR.
CLEAR IT_VRM.
LOOP AT IT_EKKO INTO WA_EKKO.
WA_VRM-KEY = WA_EKKO-EBELN.
WA_VRM-TEXT = WA_EKKO-EBELN.
APPEND WA_VRM TO IT_VRM.
CLEAR WA_VRM.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'EKKO-EBELN'
VALUES = IT_VRM
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WHEN 'PITEM'. "fctcode second listbox
CLEAR IT_EKKO.
SELECT EBELP INTO TABLE IT_EKPO FROM EKPO WHERE EBELN = EKKO-EBELN.
CLEAR IT_VRM.
LOOP AT IT_EKPO INTO WA_EKPO.
WA_VRM-KEY = WA_EKPO-EBELP.
WA_VRM-TEXT = WA_EKPO-EBELP.
APPEND WA_VRM TO IT_VRM.
CLEAR WA_VRM.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'EKPO-EBELP'
VALUES = IT_VRM
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDCASE.
endmodule. " USER_COMMAND_0100 INPUT
**& Module STATUS_0100 OUTPUT
text
module STATUS_0100 output.
SET PF-STATUS 'ZSREE'.
SET TITLEBAR 'ZSREE'.
endmodule. " STATUS_0100 OUTPUT
*& Module SELECT_LIST OUTPUT
text
module SELECT_LIST output.
CLEAR IT_LFA1.
SELECT LIFNR NAME1 INTO TABLE IT_LFA1 FROM LFA1.
CLEAR IT_VRM.
LOOP AT IT_LFA1 INTO WA_LFA1.
WA_VRM-KEY = WA_LFA1-LIFNR.
WA_VRM-TEXT = WA_LFA1-LIFNR.
APPEND WA_VRM TO IT_VRM.
CLEAR WA_VRM.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'LFA1-LIFNR'
values = IT_VRM
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endmodule. " SELECT_LIST OUTPUT
Bye Murthy -
Drop down menu in selection screen field
Hi all,
my requirement is
In selection-screen in one field I have to get drop down menu for 2 values.
1. Pvalue.
2. Hvalue.
By default it should pickup Pvalue.
can any one guide me how to get the logic for that
Regards
cnuJust paste this code: u will get idea..
report YH642_DROP_DOWN_BOX.
TYPE-POOLS vrm.
**"Table declarations...................................................
*TABLES sscrfields.
*"Table declarations...................................................
PARAMETERS:
p_connid(11) AS LISTBOX
VISIBLE LENGTH 20 default 'FOREX-ANANTH'.
p_value TYPE i MODIF ID QWR.
*" Data declarations...................................................
Work variables *
DATA:
w_char(20) TYPE c,
w_flag TYPE i.
INITIALIZATION. EVENT *
INITIALIZATION.
Internal table to hold delivery header data *
DATA:
t_table TYPE
STANDARD TABLE
OF vrm_value,
vrm_values1 LIKE LINE OF t_table.
vrm_values1-key = 'a'.
vrm_values1-text = 'sap'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = '2'.
vrm_values1-text = 'testing'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = '2'.
vrm_values1-text = 'java'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = '4'.
vrm_values1-text = '.net'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = '5'.
vrm_values1-text = 'vc++'.
APPEND vrm_values1 TO t_table.
vrm_values1-key = 'che'.
vrm_values1-text = 'chetta-ram'.
APPEND vrm_values1 TO t_table.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'p_connid'
values = t_table
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
reward points if helpful,
regards,
seshu. -
Populate drop down in a selection screen
Hi All,
I have created a selection screen where i have a drop down field .How do i populate the drop down? In the backend i have a table type in the export param. which contains all the drop downs values.
Please help.
Thanks
tubai.Hi,
If you are using drop down by index. then use following code. Create a context node with cardinality 1:N
data : it_table type STANDARD TABLE OF sflight.
DATA lo_nd_cn_drpindex TYPE REF TO if_wd_context_node.
DATA lo_el_cn_drpindex TYPE REF TO if_wd_context_element.
DATA ls_cn_drpindex TYPE wd_this->element_cn_drpindex. " Here cn_drpindex is the name of context node which is binded to the drop down by index UI element.
* navigate from <CONTEXT> to <CN_DRPINDEX> via lead selection
lo_nd_cn_drpindex = wd_context->get_child_node( name = wd_this->wdctx_cn_drpindex ).
select carrid from sflight into CORRESPONDING FIELDS OF TABLE it_table.
lo_nd_cn_drpindex->bind_table( it_table ).
If you are using drop down by key ui element then you can use the following code
DATA : node_info TYPE REF TO if_wd_context_node_info.
DATA : it_zinsp TYPE TABLE OF zinsp.
FIELD-SYMBOLS : <tablezinsp> TYPE zinsp.
DATA : value TYPE wdy_key_value,
value_set TYPE wdy_key_value_table.
DATA : zlandx TYPE string.
node_info = wd_context->get_node_info( ).
node_info = node_info->get_child_node( 'CN_VISATYPE' ).
CALL METHOD cl_wd_dynamic_tool=>get_table_data
EXPORTING
tab_name = 'ZINSP' " Here ZINSP is name of table
row_count = 0
IMPORTING
data = it_zinsp.
LOOP AT it_zinsp ASSIGNING <tablezinsp> .
value-key = <tablezinsp>-zvisaty." This is field of table
value-value = <tablezinsp>-zvisaty.
INSERT value INTO TABLE value_set.
ENDLOOP.
node_info->set_attribute_value_set( name = 'CA_VISATYPE' " Name of attribute
value_set = value_set ).
I hope it helps.
Regards,
Rohit -
Need User-Exit / Badi For CO11N selection screen
Hello Gurus,
I need to add an extra functionality in the selection screen of the Tcode CO11N .Can you suggest some user exit or badi for the same .
The Functionality is : We need to make the field 'Reason' as mandatory whenever there is an entry in the field 'Scarp' .
Waiting for your valuable suggestion on this .
Regards,
Abhijit MandalHi,
Followings are Enhancement or BADI for Tcode-CO11N
CONFPP01 PP order conf.: Determine customer specific default values
CONFPP02 PP order conf.: Customer specific input checks 1
CONFPP03 PP order conf.: Cust. specific check after op. selection
CONFPP04 PP order conf.: Customer specific input checks 2
CONFPP05 PP order conf.: Customer specific enhancements when saving
CONFPP06 PP Order Confirmations: Actual Data Transfer
CONFPP07 Single Screen Entry: Inclusion of User-Defined Subscreens
CONFPS01 PS confirmation: Determine customer specific default values
CONFPS02 PS confirmation: Customer specific input checks 1
CONFPS03 PS confirmation: Customer specific check after op. selection
CONFPS04 PS confirmation: Customer specific input checks 2
CONFPS05 PS confirmation: Customer specific enhancements when saving
CONF0001 Enhancements in order confirmation
CONFPI01 Process order conf.: Calculate cust.specific default values
CONFPI02 Process order confirmation: Customer spec. input checks 1
CONFPI03 Process order conf.: Cust. spec. check after op. selection
CONFPI04 Process order conf.: Customer specific input checks 2
CONFPI05 Process order conf.: Cust. spec. enhancements when saving
CONFPI06 Process order confirmation: Actual data transfer
CONFPM01 PM/SM order conf.: Determine cust. specific default values
CONFPM02 PM/SM order confirmation: Customer specific input checks 1
CONFPM03 PM/SM order conf.: Cust. spec. check after op. selection
CONFPM04 PM/SM order conf.: Customer specific input check 2
CONFPM05 PM/SM order conf.: Cust. specific enhancements when saving
Regards. -
Drop down in the selection for the field from the table
Hi.
i want to put the drop down for the field from the table fo which i dont know the number of entries for the field zregion1 of the table zbwcntry.
please tell me how to use the function module and what could be the line of codes.
the drop down is for the select option on the slection screen of the classical report.
please help .HI,
Check below code..it may help you.
REPORT Zbunu .
TYPES :BEGIN OF STR ,
MATNR TYPE MATNR ,
END OF STR .
DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
VAR TYPE MARA-MATNR .
PARAMETERS : S_MATNR TYPE MATNR ,
P_MATNR TYPE MATNR.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MATNR .
SELECT MATNR FROM MARA INTO
CORRESPONDING FIELDS OF TABLE ITAB UP TO 1000 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'MATNR'
PVALKEY = ' '
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'S_MATNR'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = 'X'
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
tables
value_tab = ITAB
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
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.
Regards
Ansumesh -
How to add user command to drop down list in output screen for OALV Report
Hi Experts,
I have created a report by using OALV.
in Output screen i have added drop down for one filed with 2 values.
when i select value from the drop down list the program should trigger and the next field should be update.
so it is possiable to add a user command for the drop down list in output screen.
if so please help me .
Regards,
RathanHI,
Check the Demo program BCALV_EDIT_06 with having the DATA_CHANGED event still you can capture the changed data. This event will help you.
or you can go for this code..
data: it_f4 type lvc_t_f4,
wa_f4 type lvc_s_f4.
wa_f4-FIELDNAME = 'CONNID'.
wa_f4-REGISTER = 'X'.
wa_f4-GETBEFORE = 'X'.
wa_f4-CHNGEAFTER = 'X'.
append wa_f4 to it_f4.
"register F4 event
CALL METHOD g_alv_grid_ref->register_f4_for_fields
EXPORTING
it_f4 = it_f4.
"Once you try to pick the value HANDLE_DATA_CHANGED event will be triggered
"Definition
methods:
handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed e_onf4 e_onf4_before e_onf4_after,
"Implementation
METHOD handle_data_changed .
DATA: ls_mod_cells TYPE lvc_s_modi.
IF e_onf4_before = 'X'.
MESSAGE 'Data changed before F4' TYPE 'I'.
ENDIF.
IF e_onf4 = 'X'. "if event triggered by F4
MESSAGE 'Data changed on F4' TYPE 'I'.
ENDIF.
IF e_onf4_after = 'X'.
MESSAGE 'Data changed after F4' TYPE 'I'.
ENDIF.
"here you know which cell was modified
LOOP AT er_data_changed->mt_mod_cells INTO ls_mod_cells.
"just example test case, here you can implement your code for modified cells
IF ls_mod_cells-value >=5.
CALL METHOD er_data_changed->add_protocol_entry
EXPORTING
i_msgid = 'SABAPDOCU'
i_msgty = 'E'
i_msgno = '888'
i_msgv1 = 'Only numbers below 5 are possibe'
i_msgv2 = 'Please correct'
i_fieldname = ls_mod_cells-fieldname
i_row_id = ls_mod_cells-row_id.
CALL METHOD er_data_changed->modify_cell
EXPORTING
i_fieldname = ls_mod_cells-fieldname
i_row_id = ls_mod_cells-row_id
i_value = space.
ENDIF.
ENDLOOP.
ENDMETHOD. "handle_data_changed
Edited by: sum_it2 on Nov 21, 2011 10:07 AM -
0CURRENCY HAVING drop dwon issues at selection screen in BI7.0
Hi Experts ,
We are working in SAP environment, (ECC 6.0 and BI 7.0).
for our Fin - BI reports , we are trying to implement currnecy conversion for few reports at the dynamic selections.
for that we created currnecy translation type with few variables viz. for 0CURRNECY, Excahnge Rate type & Time, associated.
Now when we make the choices at the selection screen (lets take for 0CURRENCY), our idea is user should be able to pick up any currency at the selection screen if it available as a currency in TCURR table in the source (and extracted in BI).
The issue is at dropping down for 0CURRENCY, they system does not show us full options for currencies available in the system (TCURR table values), upon changing the box , it shows us more options with drill down but still to show full options anyways.
upon looking deeper, i could not really find how 0CURRENCY is set up for the loads in our BI env. as it simply show coming from attributes from the source but still to find how it is getting values from the source system, ( it shows 'owned by SAP'), and i can't think any alternative way of having values coming in BI for 0currnecy ( is there any please?)
I would need help to understand that how 0CURRNECY might get values with alternate ways from source when it is not really set up for any manual/process chain loads ( probably being the master data , and i can't see this being loaded as master data either anywhere).
Also, i would need to understand how i can have full values option while dropping down for 0CURRNECY at selection screen.
Thanks very much for you coperation in this regards in adv.
best regardsHi Experts ,
We are working in SAP environment, (ECC 6.0 and BI 7.0).
for our Fin - BI reports , we are trying to implement currnecy conversion for few reports at the dynamic selections.
for that we created currnecy translation type with few variables viz. for 0CURRNECY, Excahnge Rate type & Time, associated.
Now when we make the choices at the selection screen (lets take for 0CURRENCY), our idea is user should be able to pick up any currency at the selection screen if it available as a currency in TCURR table in the source (and extracted in BI).
The issue is at dropping down for 0CURRENCY, they system does not show us full options for currencies available in the system (TCURR table values), upon changing the box , it shows us more options with drill down but still to show full options anyways.
upon looking deeper, i could not really find how 0CURRENCY is set up for the loads in our BI env. as it simply show coming from attributes from the source but still to find how it is getting values from the source system, ( it shows 'owned by SAP'), and i can't think any alternative way of having values coming in BI for 0currnecy ( is there any please?)
I would need help to understand that how 0CURRNECY might get values with alternate ways from source when it is not really set up for any manual/process chain loads ( probably being the master data , and i can't see this being loaded as master data either anywhere).
Also, i would need to understand how i can have full values option while dropping down for 0CURRNECY at selection screen.
Thanks very much for you coperation in this regards in adv.
best regards -
Drop down for a field in a table
hi friends,
need a help from u, how to maintain the drop down for a field in a table..
advance thanks..Hi,
You can use the function module F4IF_INT_TABLE_VALUE_REQUEST
TABLES: T005T.
DATA: BEGIN OF t_t005 OCCURS 0,
land1 TYPE t005-land1,
END OF t_t005.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD P_LAND1.
PARAMETERS: p_land1 TYPE t005-land1.
SELECTION-SCREEN COMMENT 13(35) v_text1.
SELECTION-SCREEN END OF LINE.
INITIALIZATION.
v_text = 'Country'.
v_text1 = ' '.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_land1.
REFRESH: t_t005.
SELECT land1
INTO TABLE t_t005
FROM t005.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = 'T005'
PVALKEY = ' '
retfield = 'LAND1'
dynpprog = sy-repid
DYNPNR = sy-dynnr
dynprofield = 'P_LAND1'
callback_program = sy-repid
value_org = 'S'
TABLES
value_tab = t_t005
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.
Thanks
Naren -
F4 Help for the selection screen field
Hi Gurus,
I have to display F4 help for a selection screen field. i am using following code:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CODE'
dynpprog = lw_repid
dynpnr = sy-dynnr
VALUE_ORG = 'S'
TABLES
value_tab = gi_text
field_tab = li_fields_tab
return_tab = pi_return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
001 test
001 test1
but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
Please help me out.
Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.Sachin,
I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
REPORT zktest01 .
DATA :
BEGIN OF value_tab OCCURS 0,
field LIKE e070-trkorr,
text LIKE e07t-as4text,
END OF value_tab.
DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
PARAMETERS : p_field LIKE value_tab-field,
p_text LIKE value_tab-text. "NO-DISPLAY.
INITIALIZATION.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'FIELD'.
t_fldtab-langu = 'E'.
t_fldtab-position = 1.
t_fldtab-offset = 0.
t_fldtab-fieldtext = 'Key'.
t_fldtab-reptext = 'Key'.
t_fldtab-leng = 20.
t_fldtab-intlen = 20.
t_fldtab-outputlen = 20.
t_fldtab-datatype = 'CHAR'.
t_fldtab-inttype = 'C'.
t_fldtab-headlen = 20.
t_fldtab-keyflag = 'X'.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'TEXT'.
t_fldtab-position = 2.
t_fldtab-offset = 20.
t_fldtab-fieldtext = 'Text'.
t_fldtab-reptext = 'Text'.
t_fldtab-leng = 60.
t_fldtab-intlen = 60.
t_fldtab-outputlen = 60.
t_fldtab-headlen = 60.
t_fldtab-keyflag = ' '.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
value_tab-field = '101'.
value_tab-text = 'dddd'.
APPEND value_tab.
value_tab-field = '202'.
value_tab-text = 'aaaa'.
APPEND value_tab.
t_dynmap-fldname = 'FIELD'.
t_dynmap-dyfldname = 'P_FIELD'.
APPEND t_dynmap.
t_dynmap-fldname = 'TEXT'.
t_dynmap-dyfldname = 'P_TEXT'.
APPEND t_dynmap.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FIELD'
dynpprog = 'ZKTEST01'
dynpnr = '1000'
dynprofield = 'P_FIELD'
value_org = 'S'
TABLES
field_tab = t_fldtab
value_tab = value_tab
return_tab = t_rettab
dynpfld_mapping = t_dynmap
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
ENDIF.
START-OF-SELECTION.
Jeffrey Satriadi -
Abt Drop Down For ALV Data cells
Hi,
I m unable to create drop down for each cell of ALV table.
Reply me as soon as possible.
Thks.You need to create an object of type CL_SALV_WD_UIE_DROPDOWN_BY_KEY, which is the UI element for dropdown by key, and set that to be your individual cell editor.
For whichever column you want a dropdown box, use the method set_cell_editor to make the editor as a dropdown box. Hope this helps.
Regards
Nithya -
Not able to set values in drop down for a table field
Hi All,
I am not able to set values in drop down for a table field. Although I am able to set these values to a stand alone field but its not happening for a particular table field. I am using ABAP web dynpro for coding.
Pls help.
Regards,
BhaskarHi Otto,
Here is the code I am using:
* navigate from <CONTEXT> to <DATASOURCE> via lead selection
lo_nd_datasource = wd_context->get_child_node( name = wd_this->wdctx_datasource ).
* navigate from <DATASOURCE> to <CHANGING_PARAM> via lead selection
lo_nd_changing_param = lo_nd_datasource->get_child_node( name = wd_this->wdctx_changing_param ).
* navigate from <CHANGING_PARAM> to <EDUCATION_TAB> via lead selection
lo_nd_education_tab = lo_nd_changing_param->get_child_node( name = wd_this->wdctx_education_tab ).
node_info = lo_nd_education_tab->get_node_info( ).
REFRESH ddlb_value_set.
DATA: wa_edu_est TYPE t517t.
SELECT * FROM t517t INTO wa_edu_est WHERE sprsL = 'EN'.
s_element-text = wa_edu_est-stext.
s_element-value = wa_edu_est-slart.
APPEND s_element TO ddlb_value_set.
ENDSELECT.
SORT ddlb_value_set BY text.
* Set Value_sets to node_info
node_info->set_attribute_value_set(
name = 'EDU_EST'
value_set = ddlb_value_set ).
Regards,
Bhaskar -
F4 help for a selection screen parameter with filename created dynamically
Hi All,
I have a requirement where in an F4 help should be present for a selection screen parameter. After selecting the filepath and clicking OK button on the Dialog, the filename should be dynamically get created in the selection screen parameter field. For example:
if the path is D:\DOCS then at the end of DOCS the filename should automatically get populated.
Like below string:
D:\DOCS\new.txt
Is there any function module or method which does this kind of activity.
Thanks in advance,
Deepakthis code will help:
FORM get_filename CHANGING p_filename.
DATA : lv_filename TYPE string,
lv_rc TYPE i,
li_filetable TYPE filetable.
CONSTANTS : lc_fname TYPE string VALUE 'ZRPP4000.XLS',
lc_fpath TYPE string VALUE 'C:\',
lc_extn TYPE string VALUE 'XLS'.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
default_filename = lc_fname
initial_directory = lc_fpath
default_extension = lc_extn
CHANGING
file_table = li_filetable
rc = lv_rc
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
OTHERS = 5.
IF sy-subrc = 0 .
READ TABLE li_filetable INTO lv_filename INDEX 1.
IF sy-subrc = 0.
p_filename = lv_filename.
ENDIF.
ENDIF.
REFRESH li_filetable.
CLEAR:lv_filename.
ENDFORM. "get_filename
" p_filename is selection screen parameter
Maybe you are looking for
-
IPOD TOUCH UPDATED BACK TO FACTORY SETTINGS
My computer broke a few months ago, it had all 6000 songs that i had downloaded from CD's and songs people had sent me of their recordings etc etc. It had my full library on and i know apple updates every time you plug your ipod in and so any changes
-
Why does logic randomly delete my project files?
Logic will periodically delete the project files from the project folder and i can't get it to stop. It often costs me hours of work. For example, i'll close logic (and save) and come back the next day to find the "xxxx.logic" file missing. No alias,
-
Shut down (panic) during sleep?!
This is very unusual for me and I wondered if anyone can make sense of the report below. The only thing that has changed recently is the addition of an airport extreme card. Thanks in advance. Jim panic(cpu 0 caller 0x000E7FF4): vnode_put(924a5ac): i
-
Hey Guys, I have a lenovo T-400, Windows Vista Home Basic 32Bit. When I put my computer to sleep and try to wake it up within 5 minutes, it wakes up but it doesn't wake up when the sleep time goes beyond 5 mins. Here are the "few" things that I have
-
Business Rules - Configure Entities/Scope without elimination rules.
Hello Experts, I am working on BPC 10 and have set many elimination rules that apply to all "SCOPE". Is there a way to configure that for a given "SCOPE" elimination rules may be nullified, you bone not apply to a SCOPE in particular? Thanks for your