Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

List Box Problem in Table Control

Former Member
0 Kudos

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.

19 REPLIES 19

Former Member
0 Kudos

write ur logic for filling the second list box in PBO and check in debugging if it is being triggered...

regards,

lavanya

0 Kudos

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.

0 Kudos

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.

0 Kudos

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 .

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

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.

0 Kudos

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

0 Kudos

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

0 Kudos

Hi Siva,

Can you please paste the code ...so that i can get an clear idea

Regards,

Karthik.

0 Kudos

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.

0 Kudos

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.

0 Kudos

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.

0 Kudos

Hi Karthik,

Assign points if the problem is resolved and mark the thread as answered.

Regards,

Siva.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

Hi Ganesh,

Place a Textbox in the table control and change the DROPDOWN option as Listbox.

Former Member
0 Kudos

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