‎2009 May 25 10:43 AM
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
‎2009 May 25 11:34 AM
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
‎2009 May 25 3:48 PM
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
‎2009 May 26 5:14 AM
Hi,
check with your internal table , may be you are calling the same data again without clearing the data.
Thanks,
Rahul
‎2016 Aug 31 4:07 PM
‎2009 May 26 6:45 AM
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.
‎2009 May 26 8:27 AM
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.
‎2009 Jun 01 11:18 AM