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

abap data dictionary

how can we add search help to our report program

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 01:03 PM

    hi

    in PAI

    FIELD IT_SCD_LINES-EBELP MODULE VALUE_REQUEST .

    inside the module

    MODULE VALUE_REQUEST INPUT.

    • Module to generate F4 Help

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    • DDIC_STRUCTURE = ' '

    RETFIELD = 'EBELP'

    • PVALKEY = ' '

    DYNPPROG = SY-REPID

    DYNPNR = SY-DYNNR

    DYNPROFIELD = 'DYNPFD'

    • STEPL = 0

    • WINDOW_TITLE =

    • VALUE = ' '

    VALUE_ORG = 'S'

    • MULTIPLE_CHOICE = ' '

    • DISPLAY = ' '

    • CALLBACK_PROGRAM = ' '

    • CALLBACK_FORM = ' '

    • MARK_TAB =

    • IMPORTING

    • USER_RESET =

    TABLES

    VALUE_TAB = IT_LINE_ITEMS

    • FIELD_TAB =

    • RETURN_TAB =

    • DYNPFLD_MAPPING =

    • EXCEPTIONS

    • PARAMETER_ERROR = 1

    • NO_VALUES_FOUND = 2

    • OTHERS = 3

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDMODULE. " VALUE_REQUEST INPUT

    regards

    ravish

    <b>plz reward if useful</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 01:09 PM

    hi,

    use FM 'F4IF_INT_TABLE_VALUE_REQUEST'

    Check this....

    TABLES: mara, makt.

    DATA mat LIKE mara-matnr.

    DATA: BEGIN OF itab OCCURS 0,

    matnr LIKE mara-matnr,

    END OF itab.

    DATA : BEGIN OF btab OCCURS 0,

    maktx LIKE makt-maktx,

    END OF btab.

    DATA : return LIKE ddshretval OCCURS 0 WITH HEADER LINE.

    SELECT-OPTIONS: so_matnr FOR mara-matnr,

    so_maktx FOR makt-maktx.

    INITIALIZATION.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_matnr-low.

    PERFORM matnr.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_matnr-high.

    PERFORM matnr.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_maktx-low.

    PERFORM maktx.

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_maktx-high.

    PERFORM maktx.

    &----


    *& Form matnr

    &----


    • text

    ----


    FORM matnr.

    REFRESH itab.

    SELECT matnr FROM mara INTO TABLE itab.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'MATNR '

    dynprofield = 'P_MATNR '

    dynpprog = sy-repid

    dynpnr = sy-dynnr

    value_org = 'S'

    TABLES

    value_tab = itab

    return_tab = return.

    mat = return-fieldval.

    UNPACK mat TO mat.

    so_matnr = return-fieldval.

    REFRESH return.

    CLEAR return.

    ENDFORM. "matnr

    &----


    *& Form maktx

    &----


    FORM maktx.

    REFRESH btab.

    SELECT maktx FROM makt INTO TABLE btab WHERE matnr = mat AND spras =

    sy-langu.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    retfield = 'MAKTX'

    dynprofield = 'SO_MAKTX '

    dynpprog = sy-repid

    dynpnr = sy-dynnr

    value_org = 'S'

    TABLES

    value_tab = btab

    return_tab = return.

    so_maktx = return-fieldval.

    REFRESH return.

    CLEAR return.

    ENDFORM. "maktx

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 01:16 PM

    Please see this link ...<b> here with screen shots</b>

    https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap-Create+Listbox&</a>

    reward points if it is usefull ..

    Girish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 01:17 PM

    <b>see WHICH are the fields passing to the FM</b>

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST' 
    
    EXPORTING 
    
    RETFIELD = <name of return field in internal table> 
    
    DYNPPROG = <Report Name i.e sy-repid> 
    
    DYNPNR = <Screen number e.g. 1000 incase of sel. 
    screen) 
    
    DYNPROFIELD = <screen field name> 
    
    VALUE_ORG = 'S' 
    
    TABLES 
    
    VALUE_TAB = <internal Table with values> 
    
    EXCEPTIONS 
    
    PARAMETER_ERROR = 1 
    
    NO_VALUES_FOUND = 2 
    
    OTHERS = 3. 
    

    reward points if it is usefull ....

    Girish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2007 at 01:18 PM

    <b>sample progarm for F4 in report</b>

    REPORT DEMO_DYNPRO_F4_HELP_MODULE.
    
    TYPES: BEGIN OF VALUES,
             CARRID TYPE SPFLI-CARRID,
             CONNID TYPE SPFLI-CONNID,
           END OF VALUES.
    
    DATA: CARRIER(3) TYPE C,
          CONNECTION(4) TYPE C.
    
    DATA: PROGNAME LIKE SY-REPID,
          DYNNUM   LIKE SY-DYNNR,
          DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
          FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
          VALUES_TAB TYPE TABLE OF VALUES.
    
    CALL SCREEN 100.
    
    MODULE INIT OUTPUT.
      PROGNAME = SY-REPID.
      DYNNUM   = SY-DYNNR.
      CLEAR: FIELD_VALUE, DYNPRO_VALUES.
      FIELD_VALUE-FIELDNAME = 'CARRIER'.
      APPEND FIELD_VALUE TO DYNPRO_VALUES.
    ENDMODULE.
    
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    
    MODULE VALUE_CARRIER INPUT.
    
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
           EXPORTING
                TABNAME           = 'DEMOF4HELP'
                FIELDNAME         = 'CARRIER1'
                DYNPPROG          =  PROGNAME
                DYNPNR            =  DYNNUM
                DYNPROFIELD       = 'CARRIER'.
    
    ENDMODULE.
    
    MODULE VALUE_CONNECTION INPUT.
    
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                DYNAME                   = PROGNAME
                DYNUMB                   = DYNNUM
                TRANSLATE_TO_UPPER       = 'X'
           TABLES
                DYNPFIELDS               = DYNPRO_VALUES.
    
      READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
    
      SELECT  CARRID CONNID
        FROM  SPFLI
        INTO  CORRESPONDING FIELDS OF TABLE VALUES_TAB
        WHERE CARRID = FIELD_VALUE-FIELDVALUE.
    
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                RETFIELD         = 'CONNID'
                DYNPPROG         = PROGNAME
                DYNPNR           = DYNNUM
                DYNPROFIELD      = 'CONNECTION'
                VALUE_ORG        = 'S'
           TABLES
                VALUE_TAB        = VALUES_TAB.
    
    ENDMODULE.
    
    

    reward points if it is usefull ...

    Girish

    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.