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

help on value request

Hi all,

can anyone help me out with the following code in finding F4 help for the fiscal year .

while executing it is going to dump. The problem I fing is with the value_org = 'S'.

thanks....

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_GJAHR.

SELECT DISTINCT GJAHR FROM COSS

INTO CORRESPONDING FIELDS OF TABLE LT_GJAHR

UP TO 10 ROWS.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'GJAHR'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'P_GJAHR'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = LT_GJAHR

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Dec 23, 2008 at 07:09 PM

    Check the decleration of LT_GJAHR.

    Update: This works fine in my system... except its taking time to get the help..

    REPORT  zj_test LINE-SIZE 162.
    
    PARAMETER: p_gjahr TYPE vbrk-gjahr.
    
    DATA: BEGIN OF lt_gjahr OCCURS 0,
            gjahr TYPE vbrk-gjahr,
          END OF lt_gjahr.
    
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_gjahr.
    
      SELECT DISTINCT gjahr FROM coss
      INTO TABLE lt_gjahr
      UP TO 10 ROWS.
    
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'GJAHR'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'P_GJAHR'
          value_org       = 'S'
        TABLES
          value_tab       = lt_gjahr
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
    
      ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 23, 2008 at 07:12 PM

    You can refer to Function Module documentation in SE37. The usage is explained there.

    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.