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: 

F4IF_FIELD_VALUE_REQUEST Error

Former Member
0 Kudos

Dear All,

I am trying to create F4 Help for p_wgru1 field using F4IF_FIELD_VALUE_REQUEST functional group.

I have exported the values required but still I am not getting the help..

My piece of code is:

PARAMETERS : p_wgru1 LIKE twispc_filgrpz-wgru1 OBLIGATORY .

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_wgru1.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'twispc_filgrpz'

fieldname = 'wgru1'

YNPPROG = 'zramya' " Nme of program in which this is used.

DYNPNR = '0100'

DYNPROFIELD = 'p_wgru1'.

Please let me know...

Thanks in advance

Ashima

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

there is no search help for twispc_filgrpz-wgru1 , so instead of F4_FIELD_VALUE_REQUEST use

F4IF_INT_TABLE_VALUE_REQUEST

you can make use of avinash's post with an example.

TABLES : twispc_filgrpz.

PARAMETERS : p_wgru1 LIKE twispc_filgrpz-wgru1 OBLIGATORY .

DATA: BEGIN OF itab occurs 0,

wgru1 LIKE twispc_filgrpz-wgru1,

END OF itab.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_wgru1.

SELECT wgru1 FROM twispc_filgrpz INTO TABLE itab.

DELETE ADJACENT DUPLICATES FROM ITAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'WGRU1'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'P_WGRU1'

VALUE_ORG = 'S'

tables

value_tab = ITAB

.

Edited by: Sathish Reddy on Feb 25, 2009 1:03 PM

5 REPLIES 5

Former Member
0 Kudos

Hi Ashima

try giving the names of table and field in CAPITAL LETTER between the quots.

AND TRY TO CREATE AN INTERNAL TABLE OF TYPE

DATA:T_ITAB TYPE TABLE OF twispc_filgrpz-wgru1,

FS_ITAB LIKE LINE OF T_ITAB.

NOW APPEND THE ITAB WITH THE REQUIRED VALUES.

And pass the itab to the exporting parameter VALUE .

Regards

Hareesh

Edited by: Hareesh Menon on Feb 25, 2009 7:58 AM

Edited by: Hareesh Menon on Feb 25, 2009 8:48 AM

Former Member
0 Kudos

hi,

Check this code..


PARAMETES : p_plnnr type ....

 
AT SELECTION-SCREEN ON P_PLNNR.

  data:
    lg_condition    type string.

  data:
     lwa_ddshretval type ddshretval,
     lwa_dselc      type dselc,
     lwa_dynpread   type dynpread.
  data:
     li_f4_insp     type standard table of t_f4_insp,
     li_ddshretval  type standard table of ddshretval,
     li_dselc       type standard table of dselc,
     li_dynpread    type standard table of dynpread.


* Fetch Data
  select werks
         plnnr
         plnal
         plnty
         ktext
    into table li_f4_insp
    from plko
    where <condit>.

  lwa_dselc-fldname = 'F0002'.
  lwa_dselc-dyfldname = 'PLNNR'.
  append lwa_dselc to li_dselc.
  clear lwa_dselc.

* FM For F4 Help
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
      retfield        = 'PLNNR'
      dynpprog        = sy-cprog
      dynpnr          = sy-dynnr
      dynprofield     = 'PLNNR'
      value_org       = 'S'
    tables
      value_tab       = li_f4_insp
      return_tab      = li_ddshretval
      dynpfld_mapping = li_dselc
    exceptions
      parameter_error = 1
      no_values_found = 2
      others          = 3.

  if sy-subrc eq 0.
    refresh li_dynpread.
    read table li_ddshretval into lwa_ddshretval index 1.
    if sy-subrc eq 0.
      move lwa_ddshretval-fieldval to p_plnnr.
      lwa_dynpread-fieldname = 'P_PLNNR'.
      lwa_dynpread-fieldvalue = lwa_ddshretval-fieldval.
      append lwa_dynpread to li_dynpread.
      clear lwa_dynpread.
    endif.                             " IF sy-subrc EQ 0.
    read table li_ddshretval into lwa_ddshretval index 2.
    endif.                               " IF sy-subrc EQ 0.


  check sy-subrc eq 0.

Former Member
0 Kudos

HI,

Pass the Patameters to TABLES also.(It will give you return value)

Use:

Data:

Itab type DDSHRETVAL.

And Instead of passing value directly to the parameters

Pass it through variables.

Ex:

Program name use:

Data:

P_prog type sy-repid value 'Z_rama'.

Hope this resolves your issue.

Regards,

Gurpreet

Former Member
0 Kudos

Hi,

there is no search help for twispc_filgrpz-wgru1 , so instead of F4_FIELD_VALUE_REQUEST use

F4IF_INT_TABLE_VALUE_REQUEST

you can make use of avinash's post with an example.

TABLES : twispc_filgrpz.

PARAMETERS : p_wgru1 LIKE twispc_filgrpz-wgru1 OBLIGATORY .

DATA: BEGIN OF itab occurs 0,

wgru1 LIKE twispc_filgrpz-wgru1,

END OF itab.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_wgru1.

SELECT wgru1 FROM twispc_filgrpz INTO TABLE itab.

DELETE ADJACENT DUPLICATES FROM ITAB.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'WGRU1'

DYNPPROG = SY-REPID

DYNPNR = SY-DYNNR

DYNPROFIELD = 'P_WGRU1'

VALUE_ORG = 'S'

tables

value_tab = ITAB

.

Edited by: Sathish Reddy on Feb 25, 2009 1:03 PM

0 Kudos

Dear Sathish,

Thanks for the rpy..I done the changes suggested.And my problem got solved.