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

Help with Select Option

Former Member
0 Likes
1,283

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...

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
1,248

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

11 REPLIES 11
Read only

Former Member
0 Likes
1,248

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.

Read only

0 Likes
1,248

thanks for the reply.

I am new at this. do you have a code that i can look at or somthing..

Read only

0 Likes
1,248

Please check these threads which gives sample code for how to use thi sfm

thanks

ashish

Read only

Former Member
0 Likes
1,248

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

Read only

0 Likes
1,248

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

Read only

0 Likes
1,248

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

Read only

0 Likes
1,248

Try:

  SELECT idcod idtex INTO TABLE t_values FROM t509g WHERE molga = '10'.

Rob

Read only

0 Likes
1,248

Thanks guys for your help...

Gave appropriate points .

Message was edited by:

Anwarul Kabir

Read only

ferry_lianto
Active Contributor
0 Likes
1,249

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

Read only

Former Member
0 Likes
1,248

Ok changing that From F to G solved it but can any one tell me what's the difference?

Read only

0 Likes
1,248

G is the text table.

Rob