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

please give code

How to write code for

AT SELECTIPON-SCREEN VALUE REQUEST FOR <FILED>.

I CALL ED A FUNCTION MODULE

‘F4IF_INT_TABLE_VALUE_REQUEST’.

And passed internal table

But I am getting runtime error please tell me the code.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 04:48 AM

    Hi,

    could you pls give us ur that portion of code?

    AT SELECTION-SCREEN ON value-REQUEST FOR S_DESCR-LOW.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'DESCRIPTION'

    dynprofield = 'S_DESCR-LOW'

    dynpprog = SY-REPID

    dynpnr = sy-dynnr

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = VALUES_TAB1

    return_tab = it_return.

    pls make sure u have declared all the fields correctly.

    Regards,

    Anjali

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 04:49 AM

    HI, have a look at thischeck this code u can under stand better.

    this is for a select-option where code is for both low and high.

    TYPES: BEGIN OF VALUES,

    DESCRIPTION like CRMd_orderadm_h-DESCRIPTION,

    END OF VALUES.

    DATA: PROGNAME LIKE SY-REPID, "program name

    DYNNUM LIKE SY-DYNNR, "screen number

    DYNPRO_VALUES TYPE TABLE OF DYNPREAD,

    FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,

    VALUES_TAB1 TYPE TABLE OF VALUES,

    VALUES_TAB2 TYPE TABLE OF VALUES.

    DATA it_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.

    DATA L_DESCRIPTION like CRMd_orderadm_h-DESCRIPTION.

    AT SELECTION-SCREEN ON value-REQUEST FOR S_DESCR-LOW.

    read table IT_RETURN. "with key fieldname = 'S_DESCR-LOW'.

    L_DESCRIPTION = IT_RETURN-fieldval.

    SELECT DESCRIPTION

    FROM CRMd_orderadm_h

    INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB1.

    DELETE ADJACENT DUPLICATES FROM VALUES_TAB1.

    IF L_DESCRIPTION NE SPACE.

    DELETE FROM VALUES_TAB1 WHERE DESCRIPTION = L_DESCRIPTION.

    ENDIF.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'DESCRIPTION'

    dynprofield = 'S_DESCR-LOW'

    dynpprog = SY-REPID

    dynpnr = sy-dynnr

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = VALUES_TAB1

    return_tab = it_return.

    AT SELECTION-SCREEN ON value-REQUEST FOR S_DESCR-HIGH.

    read table IT_RETURN. "with key fieldname = 'S_DESCR-HIGH'.

    L_DESCRIPTION = IT_RETURN-fieldval.

    SELECT DESCRIPTION

    FROM CRMd_orderadm_h

    INTO CORRESPONDING FIELDS OF TABLE VALUES_TAB1.

    DELETE ADJACENT DUPLICATES FROM VALUES_TAB2.

    IF L_DESCRIPTION NE SPACE.

    DELETE FROM VALUES_TAB2 WHERE DESCRIPTION = L_DESCRIPTION.

    ENDIF.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'DESCRIPTION'

    dynprofield = 'S_DESCR-HIGH'

    dynpprog = SY-REPID

    dynpnr = sy-dynnr

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = VALUES_TAB2

    return_tab = it_return.

    reward points if this is useful

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 04:57 AM

    HI,

    do like this.

    PARAMETERS:matnr type mara-matnr.

    data:BEGIN OF itab occurs 0,

    matnr type mara-matnr,

    END OF itab.

    AT SELECTION-SCREEN on VALUE-REQUEST FOR MATNR.

    select * from mara into CORRESPONDING FIELDS OF TABLE itab.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'MATNR'

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = itab.

    <b>reward if helpful</b>

    rgds,

    bharat.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 05:02 AM

    hi,

    AT SELECTION-SCREEN on VALUE-REQUEST FOR MATNR.

    select * from vbap into CORRESPONDING FIELDS OF TABLE vbap.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

    EXPORTING

    RETFIELD = 'EBELN'

    VALUE_ORG = 'S'

    TABLES

    VALUE_TAB = itab.

    IF HELEPFUL REWARD SOME POINTS.

    WITH REGARDS,

    SURESH ALURI.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 05:03 AM

    Hi

    see this program you will understand vary clearly

    reward if usefull

    *&---------------------------------------------------------------------*
    *& Report  ZSD_EXCEL_INT_APP
    *&
    *&---------------------------------------------------------------------*
    *&
    *&
    *&---------------------------------------------------------------------*
    
    REPORT  ZSD_EXCEL_INT_APP.
    
    parameter: file_nm type localfile.
    
    types : begin of it_tab1,
            f1(20),
            f2(40),
            f3(20),
           end of it_tab1.
    
    
    data : it_tab type table of ALSMEX_TABLINE with header line,
           file type rlgrap-filename.
    
    data : it_tab2 type it_tab1 occurs 1,
           wa_tab2 type it_tab1,
           w_message(100)  TYPE c.
    
    
    <b>at selection-screen on value-request for file_nm.
    
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
     EXPORTING
    *   PROGRAM_NAME        = SYST-REPID
    *   DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = ' '
       STATIC              = 'X'
    *   MASK                = ' '
      CHANGING
       file_name           = file_nm
     EXCEPTIONS
       MASK_TOO_LONG       = 1
       OTHERS              = 2
              .
    IF sy-subrc <> 0.
     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    
    
    start-of-selection.
    
    refresh it_tab2[].clear wa_tab2.
    
    file = file_nm.
    
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        filename                      = file
        i_begin_col                   = '1'
        i_begin_row                   =  '1'
        i_end_col                     = '10'
        i_end_row                     = '35'
      tables
        intern                        = it_tab
     EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 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.</b>
    loop at it_tab.
    
      case it_tab-col.
    
       when '002'.
    
        wa_tab2-f1 = it_tab-value.
    
       when '004'.
    
        wa_tab2-f2 = it_tab-value.
    
      when '008'.
    
        wa_tab2-f3 = it_tab-value.
    
     endcase.
    
     at end of row.
    
      append wa_tab2 to it_tab2.
     clear wa_tab2.
      endat.
    
    endloop.
    
    data : p_file TYPE  rlgrap-filename value 'TEST3.txt'.
    
    
    OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    *--- Display error messages if any.
      IF sy-subrc NE 0.
        MESSAGE e001(zsd_mes).
        EXIT.
      ELSE.
    
    *---Data is downloaded to the application server file path
        LOOP AT it_tab2 INTO wa_tab2.
          TRANSFER wa_tab2 TO p_file.
        ENDLOOP.
      ENDIF.
    
    *--Close the Application server file (Mandatory).
      CLOSE DATASET p_file.
    
     loop at it_tab2 into wa_tab2.
    
      write : / wa_tab2-f1,wa_tab2-f2,wa_tab2-f3.
    
     endloop.

    regards

    naresh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 05:04 AM

    the part of the code shown above as per ur req

    at selection-screen on value-request for file_nm.

    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

    EXPORTING

    • PROGRAM_NAME = SYST-REPID

    • DYNPRO_NUMBER = SYST-DYNNR

    • FIELD_NAME = ' '

    STATIC = 'X'

    • MASK = ' '

    CHANGING

    file_name = file_nm

    EXCEPTIONS

    MASK_TOO_LONG = 1

    OTHERS = 2

    .

    IF sy-subrc <> 0.

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

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

    ENDIF.

    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.