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

F4IF_FIELD_VALUE_REQUEST Error

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 07:15 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 07:10 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 06:46 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 07:04 AM

    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.

    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.