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

F4IF_INT_TABLE_VALUE_REQUEST in Module pool Table control

Former Member
0 Likes
2,717

Hi,

In my module pool table control i need F4 help to the second field based on the fst fied.

my F4 help is working fine if the user enters values in a sequence,

If the user doesnot enter the values in sequence my F4 help is not working.

Example: if the user enters fst line data and goes for F4 help for the 2nd field in the same line then F4 is working.

If the user enters the 3 lines data at a time then if he wants to use F4 help. then my F4 help is not working .

Any inputs plz

Regards

Rasheed

7 REPLIES 7
Read only

Former Member
0 Likes
1,212

Hi Rasheed,

I guess the problem with something else. F4 should work fine irrespective of the sequence. if you can paste some of your coding it would be better. If possible give a breakpoint in the POV module and check if the FM "F4IF_INT_TABLE_VALUE_REQUEST" is getting triggered or not if you don't give the input in sequence.

regards

Amarendra

Read only

Former Member
0 Likes
1,212

hi

check ur F4 help coding with the below example coding.

tables : ysrtmm.

module valuerequest_help input.

data : begin of it_tmp occurs 0,

sno like ysrtmm-sno,

end of it_tmp.

data: progname like sy-repid,

dynnum like sy-dynnr.

data : t_return like ddshretval occurs 0 with header line.

refresh it_tmp.

select sno from ysrtmm client specified into it_tmp

where mandt = sy-mandt.

append it_tmp.

endselect.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

exporting

retfield = 'YSRTMM-SNO'

dynpprog = progname

dynpnr = dynnum

dynprofield = 'WK_SNO'

value = 'YSRTMM-SNO'

value_org = 'S'

tables

value_tab = it_tmp

return_tab = t_return.

if sy-subrc = 0.

read table t_return index 1.

condense t_return-fieldval.

wk_sno = t_return-fieldval.

endif.

endmodule. " VALUEREQUEST_HELP INPUT

Regards

Read only

0 Likes
1,212

Hi,

check with your internal table , may be you are calling the same data again without clearing the data.

Thanks,

Rahul

Read only

0 Likes
1,212

where to define wk_sno ? of which type or like ?

Read only

Former Member
0 Likes
1,212

Hi Rasheed,

Check the Below code,

MODULE fill_customer INPUT.

*Checking the customer is initial

IF t_customer[] IS INITIAL.

SELECT pspid FROM proj

INTO t_customer-pspid.

APPEND t_customer.

ENDSELECT.

  • Function module for appending the customer in the customer listbox

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'WA_CUSTOMER'

value_org = 'S'

TABLES

value_tab = t_customer

return_tab = return2.

IF sy-subrc = 0.

t_customer-pspid = return2-fieldval.

ENDIF.

ENDIF.

IF NOT wa_customer IS INITIAL.

v_cus = wa_customer.

ENDIF.

ENDMODULE. " FILL_CUSTOMER INPUT

&----


*& Module FILL_PROJECT INPUT

&----


  • Filling the project details in the listbox

----


MODULE fill_project INPUT.

*Filling the Project Details Based on the Customer

DATA : v1_pspnr TYPE prps-pspnr.

  • Refreshing the t_project to get the project details based on the customer

REFRESH : t_project.

IF t_project[] IS INITIAL.

SELECT SINGLE pspnr FROM proj

INTO v1_pspnr WHERE pspid = wa_customer.

IF sy-subrc = 0.

SELECT psphi FROM prps

INTO t_prps-psphi

WHERE psphi = v1_pspnr.

APPEND t_prps.

ENDSELECT.

ENDIF.

SELECT posid FROM prps INTO

t_project-posid

WHERE psphi = t_prps-psphi.

APPEND t_project.

ENDSELECT.

*Inserting all to the project listbox

t_project-posid = 'ALL'.

INSERT t_project INTO t_project INDEX 1.

  • Function module for appending the project in the project listbox

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'WA_PROJECT'

value_org = 'S'

TABLES

value_tab = t_project

return_tab = return3.

IF sy-subrc = 0.

t_project-posid = return3-fieldval.

ENDIF.

  • to get the WBS element

IF NOT wa_project IS INITIAL.

SELECT SINGLE pspnr FROM prps INTO prps-pspnr

WHERE posid = wa_project.

IF sy-subrc = 0.

  • wa_project = prps-pspnr.

v_pro = prps-pspnr.

ENDIF.

ENDIF.

ENDIF.

ENDMODULE. " FILL_PROJECT INPUT

Here am bringing the Projects based upon the customer similarly irrespective number of dropdown you are going it should work. just check whether you are getting the value the first line value when you are going to the third line.

Read only

Former Member
0 Likes
1,212

Hi,

Try to get the line number in which you expect for search help.

It is like,

DATA l_selline type sy-stepl.

GET CURSOR LINE l_selline.

This code you write in search help request module.

The according to the line got, select value from the internal table of table control and get search help for the field.

This may work. try it.

Thanks and regards,

Venkat.

Read only

Former Member
0 Likes
1,212

Got another solution.