Application Development and Automation 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: 
Read only

F4 value help in table

Former Member
0 Likes
1,757

Hi all!

I need to create a function that can take a value help for a table filed into internal table without showing this value help on the screen. I need to transfer the table with value help to WebDynpro application. I found the functions HELP_VALUES_GET_*, but I couldn’t find anyone that returns the values and do not display them on the screen. Does anybody have an idea what I should do?

Thanks in advance,

Pit

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,522

Have you tried FM 'GET_DOMAIN_VALUES' ?

13 REPLIES 13
Read only

Former Member
0 Likes
1,523

Have you tried FM 'GET_DOMAIN_VALUES' ?

Read only

0 Likes
1,522

Hi,

Thanks. I tried what you suggested. The function returns an exception but the transparent table is full!

Read only

Former Member
0 Likes
1,522

Hi.

Use

DATA: FIELDS LIKE HELP_VALUE      OCCURS 1 WITH HEADER LINE.
DATA: VALUER LIKE DFIES-FIELDTEXT OCCURS 1 WITH HEADER LINE.

 CLEAR: FIELDS[]
      , VALUER[]
      , IY17FI_KREDIT_FLT[]
      .

  SELECT DISTINCT FCITY
         INTO CORRESPONDING FIELDS OF TABLE IY17FI_KREDIT_FLT
         FROM Y17FI_KREDIT_FLT.

  CHECK SY-SUBRC EQ 0.

  LOOP AT IY17FI_KREDIT_FLT.
     VALUER = IY17FI_KREDIT_FLT-FCITY.   APPEND VALUER.
  ENDLOOP.

  FIELDS-TABNAME    = 'Y17FI_KREDIT_FLT'.
  FIELDS-FIELDNAME  = 'FCITY'.
  FIELDS-SELECTFLAG = 'X'.
  APPEND FIELDS.

  CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
          EXPORTING
             DISPLAY      = ' '
             FIELDNAME    = 'FCITY'
             TABNAME      = 'Y17FI_KREDIT_FLT'
             TITEL        = 'City'
          IMPORTING
             SELECT_VALUE = ITAB-FCITY
          TABLES
             FIELDS       = FIELDS
             VALUETAB     = VALUER.

Regards.

Read only

0 Likes
1,522

Thanks!

I actually did not need a function to display an internal table as a F4 value help.

My case is the opposite: I need a function that takes this values that the system creates and puts them into internal table without displaying the results on the screen.

Regards!

Read only

0 Likes
1,522

Hello Petar,

In the FM F4IF_FIELD_VALUE_REQUEST

there is parameter called <b>SUPPRESS_RECORDLIST = 'X'</b>

So u will the values in the itab without displaying.

If useful reward.

Vasanth

Read only

0 Likes
1,522

Hello,



check this sample code
DATA F4VA LIKE DDSHRETVAL OCCURS 20 WITH HEADER LINE.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
     EXPORTING
          TABNAME             = 'TVKO'
          FIELDNAME           = 'VKORG'
*          DISPLAY             = 'X'
          SUPPRESS_RECORDLIST = 'X'
     TABLES
          RETURN_TAB          = F4VA
     EXCEPTIONS
          OTHERS              = 1.

LOOP AT F4VA.
  WRITE:/ F4VA.
ENDLOOP.

If useful reward.

Read only

0 Likes
1,522

Thanks all of you!

I tried (as I wrote in previous posting) this function and I like the result in the return_tab.

CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'

EXPORTING

tabname = 'ZTR3_APRHIST'

fieldname = 'LIFNR'

value = '6*'

suppress_recordlist = 'X'

TABLES

return_tab = tb_f4_help

EXCEPTIONS

field_not_found = 1

no_help_for_field = 2

inconsistent_help = 3

no_values_found = 4

OTHERS = 5.

BUT when I call the func. a window appears to enter more selection criteria.

I suppose that it is because the field 'LIFNR' has a collective search help 'KRED_C' which is linked to 11 search help tables.

The problem is that I do not know how to confirm this window using some ABAP code...

Best regards

Read only

0 Likes
1,522

Hello Petar,

Better U can do one thing.

Since the LFA1 is check table for LIFNR u ca directly select from LFA1 into itab.

Vasanth

Read only

0 Likes
1,522

Thank you, Vasanth!

I hope that this will resolve my problem in the exact case. Unfortuntelly this is not a general solution. I should do the same for 5 more fileds of differen tables.

Thank you, Eswar!

I will try that FM the next week, because I have no access to SAP servers at home.

Best regards,

Pit

Read only

Former Member
0 Likes
1,522
Read only

0 Likes
1,522

Thanks!

I tried this FM F4IF_FIELD_VALUE_REQUEST and gives me enough information but now I have another problem. Some of the fields have collective search helps and need to find out a way to suppress the pop up window with criteria. Do you have any suggestions?

Read only

Former Member
0 Likes
1,522

Hi Pit,

Use the Fucntion module DDUT_DOMVALUES_GET to get the Domain Fixed Values.

Regards

Sudheer

Read only

Former Member
0 Likes
1,522

use the FM RFC_GET_NAMETAB