10-05-2007 6:26 PM
Hi
I have this select option in the user screen
SELECT-OPTIONS: ID FOR PA0094-FPNCD. " Emp Id
But when the user tries to look up the code by clicking on to the square box beside the input box it gives the user all the entries from the Field FPNCD.
My question is there anyway i could limit it to only show certain codes when they click on the box. (In this case codes for USA only).
Thanks in advance...
10-05-2007 8:22 PM
Hi,
Please try to change to read table T509G instead of T509F.
...
at selection-screen on value-request for s_ID-low.
Select IDCOD IDTEX INTO TABLE t_values from T509G Where MOLGA = '10'. "Change here
...
Regards,
Ferry Lianto
10-05-2007 6:40 PM
There is no search help associated with this, so you will have to select the records from T509F on your own by giving MOLGA = 10 to show only entries for USA. Once you get the records you need, you will display them in AT SELECTION-SCREEN ON VALUE-REQUEST FOR id-low OR (id-high) using F4IF_INT_TABLE_VALUE_REQUEST.
10-05-2007 6:51 PM
thanks for the reply.
I am new at this. do you have a code that i can look at or somthing..
10-05-2007 6:54 PM
10-05-2007 6:59 PM
Hi anwarul,
May be in this way.
First pop up the internal table by selecting the required data...
in your case you want the data of only USA.
Make select query according to ur requirement..
and then use the FM <b>F4IF_INT_TABLE_VALUE_REQUEST</b>
Go through the below example.
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.
select-options s_begru for kna1-begru.
at selection-screen on value-request for s_begru-low.
clear t_values.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
<b>call function 'F4IF_INT_TABLE_VALUE_REQUEST'</b>
exporting
retfield = 's_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-low = t_return-FIELDVAL.
Hope it will be helpful to you.
<b>Reward Points if it is helpful.</b>
Thanks & Regards
ilesh 24x7
10-05-2007 8:18 PM
Ok so far I did this
TABLES: REGUH, "Settlement data from payment program
PA0001, "HR Master Record: Infotype 0001 (Org. Assignment)
PA0094, "HR Master Record: Infotype 0094 (Residence Status
" - NA)
PA0000,
PA0002,
T509F.
SELECT-OPTIONS: PERAREA FOR PA0001-WERKS, " personnel area
SUBAREA FOR PA0001-BTRTL, " personnel subarea
COSTCTR FOR PA0001-KOSTL, " cost center
EXPID FOR PA0094-EXPID, " green card exp dt
STAT FOR PA0000-STAT2, " empl status
s_ID FOR PA0094-FPNCD, " Emp Id
VRESIS FOR PA0094-RESIS, " Residence Status
VEXPID FOR PA0094-EXPID. " Expire Date
Data: BEGIN OF t_Values occurs 0,
ID LIKE T509F-IDCOD,
IDTEX LIKE T509G-IDTEX,
END OF t_values,
t_return like T509F occurs 0 with header line.
at selection-screen on value-request for s_ID-low.
Select IDCOD IDTEX INTO TABLE t_values from T509F Where MOLGA = '10'.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 's_ID'
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_ID-low = t_return-FIELDVAL.
endif.
but i am getting this error
Unknown Column name IDTEX
10-05-2007 8:23 PM
At Selection-Screen on Value-Request for S_BWTAR-low.
Select BWTAR from T149D into table i_BWTAR.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
<b> retfield = 'FPNCD'</b>
PVALKEY = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
<b> dynprofield = 'S_ID-LOW'</b>
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = t_values
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
Can you make changes marked in bold?
ashish
10-05-2007 8:25 PM
Try:
SELECT idcod idtex INTO TABLE t_values FROM t509g WHERE molga = '10'.
Rob
10-05-2007 8:28 PM
Thanks guys for your help...
Gave appropriate points .
Message was edited by:
Anwarul Kabir
10-05-2007 8:22 PM
Hi,
Please try to change to read table T509G instead of T509F.
...
at selection-screen on value-request for s_ID-low.
Select IDCOD IDTEX INTO TABLE t_values from T509G Where MOLGA = '10'. "Change here
...
Regards,
Ferry Lianto
10-05-2007 8:35 PM
Ok changing that From F to G solved it but can any one tell me what's the difference?
10-05-2007 8:37 PM