2008 Jun 10 12:06 PM
Hi,
I have 3 list box coloum in my table control.Based on the 1st list box selection i wanna fill the 2nd list box.
I used function code 'CUS' and made the Fct type <BLANK> but my problem is fuction code triggers PAI but i am not getting the values what i slected in the 1st list box.
Please help me.
Regards,
Karthik.
2008 Jun 10 12:18 PM
write ur logic for filling the second list box in PBO and check in debugging if it is being triggered...
regards,
lavanya
2008 Jun 10 12:32 PM
Hi Lavanya,
The problem is when i give the function code and click it goes PAI and PBO but i can get the values from the list box.
2008 Jun 10 12:45 PM
Hi,
The selected value from the list box will be updated in the internal table which is attached to the table control. Just check the internal table contents for that row. The selected value should be there.
Regards,
Siva.
2008 Jun 10 3:38 PM
hi,
PROCESS AFTER INPUT.
MODULE user_command_0100.
loop at it_time.
module get_data.
endloop.
PROCESS ON VALUE-REQUEST.
FIELD X_TIME-CUSTOMER MODULE CUSTOMER_details.
here my X_TIME-CUSTOMER is the table control field name
it_time is my internal table. the problem is when i select values in
X_TIME-CUSTOMER listbox and try to retrive in PAI the value is null .
2008 Jun 11 5:18 AM
Hi,
Are you updating the internal table based on the value selected by the user in MODULE CUSTOMER_details. If you don't update the internal table, values will be lost. So, just check this and attach the code of MODULE CUSTOMER_details if it doesn't solve the problem.
Regards,
Siva.
2008 Jun 11 5:37 AM
HI Siva,
I am not updating the internal table once value is selected from the list box the problem is i am not able to retrive the values from the screen field X_TIME-CUSTOMER
I have pasted the code for the POV...please help
module CUSTOMER_details input.
data : v_cus_count TYPE i,
v_pspnr TYPE i,
v_project(8).
*-----Check already listbox has data.
if l_clist is INITIAL.
l_cname = 'X_TIME-CUSTOMER'.
SELECT cust_no FROM zassignment
into (zassignment-cust_no)
where EMPLOYEE_ID = LFA1-LIFNR
ORDER BY cust_no.
+v_cus_count = v_cus_count + 1.+
l_Cvalue-key = v_cus_count.
l_Cvalue-text = zassignment-cust_no.
APPEND l_Cvalue to l_clist.
ENDSELECT.
CLEAR v_cus_count.
*-----Upload the data to the list box.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = l_cname
values = l_clist.
endif.
endmodule. " CUSTOMER_details INPUT
2008 Jun 11 5:52 AM
Hi,
If i'm not wrong:
l_clist contains the values to be displayed in the list box. So, if the list box contains the values then your code will not have any effect because entire code is in if block. Please check whether this is correct or not?
Check all these thing by debugging the POV module.
The structure you have used is X_TIME to display the internal table. So, when you select any value this structure will be updated and this value you have to modify in the internal table it_time
with the current line no of the internal table.
I don't have code snippet to explain this behaviour.
Regards,
Siva.
2008 Jun 11 5:59 AM
Hi,
Check the following link which could be helpful for you.
Link: [http://help.sap.com/erp2005_ehp_03/helpdata/EN/9f/dbabe435c111d1829f0000e829fbfe/frameset.htm].
Regards,
Siva.
2008 Jun 11 6:12 AM
Hi Siva,
The problem is the system is not passing the values for the structure XTIME-Customer alone but i have a other field XTIME-PROJECT which is a ordinary text box in my table control where i am able to to read in PAI loop and Endloop.
Is that any steps to be followed while changing textbox to list box .If so please explain?
Regards,
Karthik
2008 Jun 11 7:35 AM
Hi,
I've tried this. I was able to read the selected list box value. When i update the internal table with the new value, UI displays selected value. Just modify the internal table in the PAI loop..endloop for the current line of table control.
NOTE: List box values are coming from data element.
Regards,
Siva.
Edited by: Siva Satya Prasad Yerra on Jun 11, 2008 12:05 PM
2008 Jun 11 8:04 AM
Hi Siva,
Can you please paste the code ...so that i can get an clear idea
Regards,
Karthik.
2008 Jun 11 8:09 AM
Hi,
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
loop at lt_table_temp.
module table_1000_input.
endloop.
-
MODULE TABLE_1000_INPUT INPUT.
wa_table_temp = zdemo_ts_sub_device_dmswcv-operator.
read table lt_table_temp transporting no fields index table_ctrl-current_line.
if sy-subrc = 0.
modify lt_table_temp from wa_table_temp index table_ctrl-current_line.
else.
append wa_table_temp to lt_table_temp .
endif.
ENDMODULE. " TABLE_1000_INPUT INPUT
zdemo_ts_sub_device_dmswcv is the structure which i'm using.
lt_table_temp is the internal table which is used for table control.
table_ctrl is the Table control name
I don't have POV module.
Reward points if it is useful
Regards,
Siva.
2008 Jun 11 8:28 AM
Hi Siva,
Thanks for your extended help.But still i have a clarrification,which is zdemo_ts_sub_device_dmswcv-operator did you assign this field as get from program or get from Dictionary .Because in my case i got it from Program.If the other case how to create a zstructure for my userdefined table..
Regards,
Karthik.
2008 Jun 11 9:15 AM
Hi,
I've used that field by "Get from Dictionary" option. You can create structure for your table as follows:
Create a structure with some name.
enter the field values as
component = .include
Type category = Type
component type = * your table name*.
You can use this strcuture in your screen.
Reward points if useful.
Regards,
Siva.
2008 Jun 11 12:48 PM
Hi Karthik,
Assign points if the problem is resolved and mark the thread as answered.
Regards,
Siva.
2008 Jun 10 10:36 PM
Hi Try this one,
Process AFter input
PROCESS ON VALUE-REQUEST.
FIELD table-field
MODULE populate_field1.
FIELD table-field
MODULE populate_field2.
Let me know if u have further question.
Thanks
2008 Jun 11 6:09 AM
Hi Karthikeyan,
i tried to insert a list box in the table control,
it is not accepting .
can u plz tell how did u added the list box into table control.
Regards,
Ganesh.
2008 Jun 11 6:15 AM
Hi Ganesh,
Place a Textbox in the table control and change the DROPDOWN option as Listbox.
2008 Jun 15 10:25 AM
Thank all.....Problem solved it was the function module in the POV that was troubling me... instead of VRM_SET_VALUES i now used F4IF_INT_TABLE_VALUE_REQUEST that was working fine...
Thanks all specially SIVA....you helped me lot in fixing it.
Regards,
karthik