Application Development 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: 

issue with 'F4IF_INT_TABLE_VALUE_REQUEST'

Former Member
0 Kudos

Hi, I am using this FM : 'F4IF_INT_TABLE_VALUE_REQUEST' in my screen program for F4 help.

when I select F4 and double click on value, it will return the valur into my screen field. then

I want to set the cursor at last of value in the same screen field. which is not happening.

It is going to set there where the previously cursor was placed in the same field.

Can anybody suggest how to do..

Thanks

kumar

9 REPLIES 9

former_member305388
Active Contributor
0 Kudos

A little clear plzzz

0 Kudos

in my screen program suppose my field name is ZTABLE1-NAME and suppose from F4 help I have selected value = abcdefgh

now I am placing the cursur between c and d.

again i have selected new valuse from F4 help and now the value i got is = pqrstuvwxy

here i am getting the cursor between r and s.

But i want to set the cursor after y. this is my requirement.

Hope u will get it.

0 Kudos

Hi, Kumar,

Have you tested SET CURSOR ? it will work for you.

Best Regards,

Faisal

0 Kudos

Yes, I have tried set cursor,

Its not working.

0 Kudos

Hi,

you can do this by using

SET CURSOR FIELD 'TEST_FIELD' OFFSET n.

where n is type i.

regards

neha

I355602
Advisor
Advisor
0 Kudos

Hi,

Refer demo:-


PARAMETERS : p_belnr TYPE belnr,
             p_bukrs TYPE bukrs.
 
DATA : BEGIN OF itab OCCURS 0,
         bukrs TYPE bukrs,
       END OF itab.
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
 
  PERFORM f4_bukrs_help USING p_bukrs.
 
*&---------------------------------------------------------------------*
*&      Form  f4_bukrs_help
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_BUKRS text
*----------------------------------------------------------------------*
FORM f4_bukrs_help USING p_bukrs.
 
  DATA : itab TYPE STANDARD TABLE OF it WITH HEADER LINE,
         tb_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE,
         v_belnr TYPE belnr.
 
  CLEAR:   tb_dynpfields.
  REFRESH: tb_dynpfields.
 
  MOVE 'P_BELNR' TO tb_dynpfields-fieldname.
  APPEND tb_dynpfields.
 
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname                               = 'Z_F4' "program name
      dynumb                               = '1000' "screen number
    TABLES
      dynpfields                           = tb_dynpfields
    EXCEPTIONS
      INVALID_ABAPWORKAREA                 = 1
      INVALID_DYNPROFIELD                  = 2
      INVALID_DYNPRONAME                   = 3
      INVALID_DYNPRONUMMER                 = 4
      INVALID_REQUEST                      = 5
      NO_FIELDDESCRIPTION                  = 6
      INVALID_PARAMETER                    = 7
      UNDEFIND_ERROR                       = 8
      DOUBLE_CONVERSION                    = 9
      STEPL_NOT_FOUND                      = 10
      OTHERS                               = 11.
 
  IF sy-subrc  0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
 
  READ TABLE tb_dynpfields INDEX 1.
  IF sy-subrc EQ 0.
    v_belnr = tb_dynpfields-fieldvalue.
  ENDIF.
 
  SELECT bukrs from <db_table> INTO TABLE itab WHERE belnr = v_belnr.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield               = 'BURKS' "internal table field
      dynpprog               = 'Z_F4' "program name
      dynpnr                 = '1000' "screen number
      dynprofield            = 'P_BUKRS' "screen field name
      value_org              = 'S'
    TABLES
      value_tab              = itab "internal table
    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.
 
ENDFORM.                    " f4_bukrs_help

Hope this helps you.

Regards,

Tarun

Former Member
0 Kudos

HI,

Check out ur FM with this,

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'WERKS'

dynpprog = sy-cprog

dynpnr = sy-dynnr

dynprofield = 'S_PLANT'

value_org = 'S'

TABLES

value_tab = it_data

EXCEPTIONS

parameter_error = 1

no_values_found = 2

OTHERS = 3.

Thanks.

faisal_altaf2
Active Contributor
0 Kudos

HI, Kumar,

Just after F4IF_INT_TABLE_VALUE_REQUEST Use Set Cursor follow the Syntax of Set Cursor.

Syntax 
SET CURSOR { { FIELD field [LINE line] [[DISPLAY] OFFSET off] } 
           | { col lin } }.

Hope above will solve out your problem,

Best Regards,

Faisal

Former Member
0 Kudos

Hi,

Kindly go through this link below:

Hope it helps

Regards

Mansi