Skip to Content
author's profile photo Former Member
Former Member

Search help

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 08:22 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 08:06 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 08:46 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.