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

Multiple selection button for FM F4IF_INT_TABLE_VALUE_REQUEST

Former Member
0 Likes
4,722

Hi

When we declare a select option using below syntax

select-options: s_vbeln for vbak-vbeln no intervals.

multiple selection button comes at the bottom part the selection pop up .(screenshot attached below)

But when we use FM F4IF_INT_TABLE_VALUE_REQUEST for any other field , multiple selection button doesn't appear (screenshot attached below).

Is there anyway can we get the button while using the FM F4IF_INT_TABLE_VALUE_REQUEST as well ?

Regards,

Prabin


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,877

Hi Rakshith,

You are right "The functionality of the multiple selection can be achieved using F4IF_INT_TABLE_VALUE_REQUEST" .

But in this way we have to include additional code to validate the selection screen value and check box mark.

So this is not time effective as compare to "AT SELECTION-SCREEN ON VALUE-REQUEST FOR" .

There should be an option/flag in the FM to take care of all these validations automatically. Isn't it ??

Thanks.

Regards,

Prabin

7 REPLIES 7
Read only

Former Member
0 Likes
2,877

Any input would be helpful....

Read only

Former Member
0 Likes
2,877

Hi Prabin,

I'm not sure whether can add multi select in F4IF_INT_TABLE_VALUE_REQUEST.

But you can use multi select in search help.

REPORT  zzzztest.
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

TABLES:
        vbak.
TYPES:
       BEGIN OF TY_vbak,
         vbeln TYPE vbak-vbeln,
       END OF TY_vbak.

DATA:
      IT_MARK     TYPE DDSHMARKS,
      WA_MARK     LIKE LINE OF IT_MARK,
      IT_vbak   TYPE STANDARD TABLE OF TY_vbak,
      WA_vbak   TYPE TY_vbak.

SELECT-OPTIONS:
     S_vbeln FOR vbak-vbeln NO INTERVALS.


AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_vbeln-LOW.
  PERFORM F4_FOR_vbeln USING 'S_VBELN-LOW'.
*&---------------------------------------------------------------------*
*&      Form  F4_FOR_PERNR
*&---------------------------------------------------------------------*
FORM F4_FOR_VBELN  USING  P_SEL_FIELD.
  TYPES:
        LTY_DYNPREAD        TYPE DYNPREAD,
        LTY_RET_TAB         TYPE DDSHRETVAL,
        LTY_DFIES           TYPE DFIES.
  DATA:
        LT_DYNPREAD         TYPE STANDARD TABLE OF LTY_DYNPREAD,
        LT_RET_TAB          TYPE STANDARD TABLE OF LTY_RET_TAB,
        LT_DFIES            TYPE STANDARD TABLE OF LTY_DFIES.
  DATA:
        LS_DYNPREAD         TYPE LTY_DYNPREAD,
        LS_RET_TAB          TYPE LTY_RET_TAB,
        LS_DFIES            TYPE LTY_DFIES.

  DEFINE F4_FIELDS.
    LS_DFIES-FIELDNAME = &1.
    LS_DFIES-INTLEN    = &2.
    LS_DFIES-LENG      = &3.
    LS_DFIES-OUTPUTLEN = &4.
    LS_DFIES-OFFSET    = &5.
    LS_DFIES-SCRTEXT_S = &6.
    LS_DFIES-SCRTEXT_M = &7.
    LS_DFIES-SCRTEXT_L = &8.
    LS_DFIES-REPTEXT   = &9.
    APPEND LS_DFIES TO LT_DFIES.
    CLEAR  LS_DFIES.
  END-OF-DEFINITION.

  F4_FIELDS:
         'VBELN' '16' '16' '16' '000' 'VBELN'  'VBELN'  'PERNR'
         'VBELN'.

  SELECT vbeln UP TO 100 ROWS
    FROM vbak
    INTO CORRESPONDING FIELDS OF TABLE IT_vbak.

  SY-DYNNR = 1000.
*  PERFORM INIT_FIELD_TAB CHANGING LT_DFIES.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      RETFIELD        = 'VBELN'
      DYNPPROG        = SY-REPID
      DYNPNR          = SY-DYNNR
      DYNPROFIELD     = P_SEL_FIELD
      VALUE_ORG       = 'S'
      MULTIPLE_CHOICE = 'X'
      MARK_TAB        = IT_MARK
    TABLES
      FIELD_TAB       = LT_DFIES
      VALUE_TAB       = IT_VBAK
      RETURN_TAB      = LT_RET_TAB.
*  CLEAR S_pernr[].
  DATA LV_VALUE TYPE SHVALUE_D.
  CLEAR IT_MARK.
  LOOP AT LT_RET_TAB INTO LS_RET_TAB .
    READ TABLE IT_VBAK INTO WA_VBAK WITH KEY VBELN = 
LS_RET_TAB-FIELDVAL.
    IF SY-SUBRC EQ 0.
      WA_MARK = SY-TABIX.
      APPEND WA_MARK TO IT_MARK.
      CLEAR  WA_MARK.
    ENDIF.
    LV_VALUE = LS_RET_TAB-FIELDVAL.
    AT FIRST.
      S_VBELN-LOW    = LV_VALUE.
      S_VBELN-SIGN   = 'I'.
      S_VBELN-OPTION = 'EQ'.
      APPEND S_VBELN.
      CLEAR S_VBELN.
    ENDAT.
    S_VBELN-LOW    = LS_RET_TAB-FIELDVAL.
    S_VBELN-SIGN   = 'I'.
    S_VBELN-OPTION = 'EQ'.
    APPEND S_VBELN.
    CLEAR S_VBELN.

  ENDLOOP.
  CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'.

ENDFORM.                    " F4_FOR_PERNR
Read only

0 Likes
2,877

Hi John,

I had already implemented the logic , which you have suggested .

My only concern is unavailability of Multiple selection button in selection pop up when we use F4IF_INT_TABLE_VALUE_REQUEST.

Thanks.

Prabin

Read only

rgore
Product and Topic Expert
Product and Topic Expert
0 Likes
2,877

Hi Prabin,

Mutiple selection button will be excluded when you use the AT SELECTION-SCREEN ON VALUE-REQUEST FOR because whatever the functionality of the multiple selection can be achieved using F4IF_INT_TABLE_VALUE_REQUEST(check the John Vo's coomment).

Thanks & Regards,

Rakshith Gore

Read only

mangesh_parihar
Explorer
0 Likes
2,877

Hi Prabin,

When you are calling the FM, please notice that there is a import parameter "multiple_choice".

Mark it as 'X' and you are good to go.

Example.

 CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'MATNR'
      dynpprog        = sy-repid
      dynpnr          = sy-dynnr
      dynprofield     = 'P_MATNR'
      value_org       = 'S'
      multiple_choice = 'X'
    TABLES
      value_tab       = it_mara.

Hope it helps.

Regards,

Mangesh

Read only

0 Likes
2,877

Hi Mangesh,

I had already implemented the suggested solution Still I don't see the multiple Selection button.

Thanks.

Regards,

Prabin

Read only

Former Member
0 Likes
2,878

Hi Rakshith,

You are right "The functionality of the multiple selection can be achieved using F4IF_INT_TABLE_VALUE_REQUEST" .

But in this way we have to include additional code to validate the selection screen value and check box mark.

So this is not time effective as compare to "AT SELECTION-SCREEN ON VALUE-REQUEST FOR" .

There should be an option/flag in the FM to take care of all these validations automatically. Isn't it ??

Thanks.

Regards,

Prabin