Application Development and Automation 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: 
Read only

value request for table control

Former Member
0 Likes
949

hello all,

i have a requirment where i have table control on my screen which consists of material and plant. based on the material and plant for a particular line i need to populate a drop down list, some kind of help or drop down what ever it might be for that particular line.

may be i can use F4IF_INT_TABLE_VALUE_REQUEST function but how can i idetify the current line of table control or internal table.

thanks,

raju N.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
775

hi

there is one search help available (standard) : H_WERKS_MATNR.

u can assign this search help in the screen ..dounle click on matnr field ..one long box will come ...put this (H_WERKS_MATNR) in search help field..save & activate,,now check ur tcode.

Ramesh.

6 REPLIES 6
Read only

Former Member
0 Likes
776

hi

there is one search help available (standard) : H_WERKS_MATNR.

u can assign this search help in the screen ..dounle click on matnr field ..one long box will come ...put this (H_WERKS_MATNR) in search help field..save & activate,,now check ur tcode.

Ramesh.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
775

Hi,

Check this sample code.It will help you.Kindly reward points by clicking the star on the left of reply,if it helps.

PROCESS BEFORE OUTPUT.

PROCESS AFTER INPUT.

FIELD s_begru MODULE abc ON INPUT.

Process on value-request.

field s_begru module f4_help.

&----


*& Report ZZZ_JAYTEST1 *

*& *

&----


*& *

*& *

&----


REPORT ZZZ_JAYTEST1 .

tables kna1.

data:

begin of t_values occurs 2,

value like kna1-begru,

end of t_values,

t_return like ddshretval occurs 0 with header line.

data s_begru like kna1-begru.

call screen 9000.

&----


*& Module f4_help INPUT

&----


  • text

----


module f4_help input.

refresh t_values.

t_values = 'PAR*'.

append t_values.

t_values = 'UGG'.

append t_values.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'BEGRU'

value_org = 'S'

tables

value_tab = t_values

return_tab = t_return

exceptions

parameter_error = 1

no_values_found = 2

others = 3.

if sy-subrc = 0.

read table t_return index 1.

s_begru = t_return-fieldval.

endif.

endmodule. " f4_help INPUT

&----


*& Module abc INPUT

&----


  • text

----


module abc input.

read table t_values with key value = s_begru.

if sy-subrc ne 0.

clear s_begru.

endif.

endmodule. " abc INPUT

Read only

0 Likes
775

hello jayaraman,

actually when is my on value-request triggered, when tried to click on the dropdown in debugging mode its not going any where.

thing is that in my table control one is material coloum, plant coloum and third is my select line which should be populated based on the material and plant for that line when is select the drop down. what would i do.

thanks,

raju N

Read only

0 Likes
775

Hi,

I hope you will have some code like this in PAI.

PROCESS AFTER INPUT.

LOOP AT itab.

FIELD itab-field1 MODULE field1.

FIELD itab-field2 MODULE field2.

Field itab-field3 MODULE field3.

ENDLOOP.

MODULE field1 INPUT.

MODIFY itab INDEX t_ctrl-current_line.

ENDMODULE.

MODULE field2 INPUT.

MODIFY itab INDEX t_ctrl-current_line.

ENDMODULE.

MODULE field3 INPUT.

MODIFY itab INDEX t_ctrl-current_line.

ENDMODULE.

Process on value-request.

...

field field3 module f4_help.

..

Read only

0 Likes
775

HELLO JAYRAMAN,

actually in the pbo module itseld i will populate material and plant, when i click my third field at that time if some event fires i want to write some code so that a popup appears with all the possible values for that item. please tell me out would i fire an event.

thanks,

raju N.

Read only

Former Member
0 Likes
775

Hi Raju,

To identify a perticular row which is selected,

1.double click on table control, atrributes window will open

2. check the checkbox <b>with selectability column</b> (for versoion 4.7 EE) or <b>W/Selcolumn</b> ( for version ECC 5.0).

3. In the adjacent textbox, enter the name of the coulmn which you want to select, ex: index.

4. In the code,

IF index = 'X'. " When the column is selected

Message I000.

_ _ _ _

_ _ _ _

ENDIF.

Regards,

Abdul.

P.S: Reward points if useful.