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

Search help

Former Member
0 Likes
516

Hi expersts,

i am working with module pool program. i have desinged three screens 100 and 200 and 300 for chaning data in ztable.

table : zsecion_tst.

its fields are

-sectioncode

-parametercode

-budat

-quanity

-remarks

so in screen 0100 there is a input field for date and 3 buttons on the screen CREATE, CHANGE, DELETE.

when i give input date and clikc CHANGE OR DELETE i ll display screen 0300 where i given 2 fields for input sectioncode and paramtercode and i created search help for sectioncode and paramtercode.

So my requiment is when i click search help for paramtercode it is showing all the values that are in Zsection_tst. so i need only the values of particular date in search help . The date values which i ll give in screen 0100 that particular values should be shown in search help for both sectioncode and parameter code.

How can i do that??? please help me its urgent.

<b>points will be rewarded</b>

regards,

priyanka reddy.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
485

hai..

please use the function module given below with example...

SELECT LIFNR NAME1

FROM LFA1

INTO CORRESPONDING FIELDS OF TABLE CODE_TAB

WHERE KTOKK = WK_TRAN_CODE1.

REFRESH : RETURN_TAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'IT_LFA1-LIFNR'

DYNPPROG = PROGNAME

DYNPNR = DYNNUM

DYNPROFIELD = 'IT_LFA1-LIFNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = CODE_TAB

RETURN_TAB = RETURN_TAB

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

IF SY-SUBRC = 0.

READ TABLE RETURN_TAB INDEX 1.

IT_LFA1-LIFNR = RETURN_TAB-FIELDVAL.

WK_TRAN_CODE = IT_LFA1-LIFNR.

ENDIF.

you will get the result... try it...

3 REPLIES 3
Read only

Former Member
0 Likes
485

Hi priyanka,

keep a validation statement in pai for the field parameter for that particular date range..

like..

select parameter from table into table where date in (range)..

this should work ..

reward if helps..

thanks.

Read only

Former Member
0 Likes
486

hai..

please use the function module given below with example...

SELECT LIFNR NAME1

FROM LFA1

INTO CORRESPONDING FIELDS OF TABLE CODE_TAB

WHERE KTOKK = WK_TRAN_CODE1.

REFRESH : RETURN_TAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'IT_LFA1-LIFNR'

DYNPPROG = PROGNAME

DYNPNR = DYNNUM

DYNPROFIELD = 'IT_LFA1-LIFNR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = CODE_TAB

RETURN_TAB = RETURN_TAB

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

IF SY-SUBRC = 0.

READ TABLE RETURN_TAB INDEX 1.

IT_LFA1-LIFNR = RETURN_TAB-FIELDVAL.

WK_TRAN_CODE = IT_LFA1-LIFNR.

ENDIF.

you will get the result... try it...

Read only

Former Member
0 Likes
485

hi priya,

Analyse this code and try it.

********in PAI module.***************

when 'SEARCH'.

clear: ipcleid,ipcn, ipro, ips,ipcd, ipud.

call screen '0300'.

in screen 300.

data itab type DBtable occurs 0 with header line.

data: s1 type c length 100,

f type n length 1 value 0.

case sy-ucomm.

when 'BACK'.

call screen '0100'.

when 'Search'.

clear: s1,f.

f = 0.

if ipcleid is initial and ipro is initial and ipcn is initial and

ips is initial and

ipcd is initial.

message i001(001) with 'Enter atleast one field'.

call screen '0300'.

else.

if not ipcleid is initial.

concatenate 'CLE_ID = ''' ipcleid '''' into s1.

f = 1.

endif.

if not ipcn is initial.

if f = 0.

concatenate 'CLE_Name = ''' ipcn '''' into s1.

f = 1.

else.

concatenate s1 ' and CLE_Name = ''' ipcn '''' into s1.

endif.

endif.

if not ipro is initial.

if f = 0.

concatenate 'Resp_Office = ''' ipro '''' into s1.

f = 1.

else.

concatenate s1 ' and Resp_Office = ''' ipro '''' into s1.

endif.

endif.

if not ips is initial.

if ips <> 'A' and ips <> 'I'.

message i001(001) with 'Invalid status'.

call screen '0300' .

elseif f = 0.

concatenate 'Status = ''' ips '''' into s1.

f = 1.

else.

concatenate s1 ' and Status = ''' ips '''' into s1.

endif.

endif.

select * from DBtable into table itab where (s1).

if sy-subrc <> 0.

message i001(001) with 'No data found'.

call screen '0300'.

else.

call screen '0301' starting at 50 50.

endif.

endif.

regards

rajasekhar reddy P

Edited by: Rajasekhar Reddy on Jan 21, 2008 2:17 PM