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

READ VALUE TABLE AFTER F4IF_INT_TABLE_VALUE_REQUEST

Former Member
0 Likes
2,137

Hi All,

Here is my code I need the read table row after double click,

DATA: BEGIN OF LT3 OCCURS 0,

            TPLNR TYPE TPLNR,

            FLTYP TYPE FLTYP,

         END OF LT3,

           WA_LT3 LIKE LINE OF LT3,

        IT_RETURN TYPE STANDARD TABLE OF DDSHRETVAL.

   SELECT TPLNR FLTYP FROM IFLOT INTO TABLE LT3

     WHERE  FLTYP = 'G'

        OR  FLTYP = 'T'.

   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

     EXPORTING

*     DDIC_STRUCTURE         = 'IFLOT'

       RETFIELD               = 'LT_DEVRELER-DEVRE'

*     PVALKEY                = ' '

      DYNPPROG               = SY-REPID

      DYNPNR                 = '0102'

*     DYNPROFIELD            = 'LT_DEVRELER-DEVRE'

*     STEPL                  = 0

      WINDOW_TITLE           = 'Arama Yardımı'

*     VALUE                  = ' '

      VALUE_ORG              = 'S'

*     MULTIPLE_CHOICE        = ' '

*     DISPLAY                = ' '

*     CALLBACK_PROGRAM       = ' '

*     CALLBACK_FORM          = ' '

*     CALLBACK_METHOD        =

*     MARK_TAB               =

*   IMPORTING

*     USER_RESET             =

     TABLES

       VALUE_TAB              = LT3

*     FIELD_TAB              =

      RETURN_TAB             = IT_RETURN

*     DYNPFLD_MAPPING        =

*   EXCEPTIONS

*     PARAMETER_ERROR        = 1

*     NO_VALUES_FOUND        = 2

*     OTHERS                 = 3

             .

   IF SY-SUBRC <> 0.

* Implement suitable error handling here

ENDIF.

                                                            I NEED GET THE ROW AFTER DOUBLE CLICK..                                            

THANKS FOR ALL.


BEST REGARDS.

Hi All,

Here is my code I need the read table row after double click,

DATA: BEGIN OF LT3 OCCURS 0,

            TPLNR TYPE TPLNR,

            FLTYP TYPE FLTYP,

         END OF LT3,

           WA_LT3 LIKE LINE OF LT3,

        IT_RETURN TYPE STANDARD TABLE OF DDSHRETVAL.

   SELECT TPLNR FLTYP FROM IFLOT INTO TABLE LT3

     WHERE  FLTYP = 'G'

        OR  FLTYP = 'T'.

   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

     EXPORTING

*     DDIC_STRUCTURE         = 'IFLOT'

       RETFIELD               = 'LT_DEVRELER-DEVRE'

*     PVALKEY                = ' '

      DYNPPROG               = SY-REPID

      DYNPNR                 = '0102'

*     DYNPROFIELD            = 'LT_DEVRELER-DEVRE'

*     STEPL                  = 0

      WINDOW_TITLE           = 'Arama Yardımı'

*     VALUE                  = ' '

      VALUE_ORG              = 'S'

*     MULTIPLE_CHOICE        = ' '

*     DISPLAY                = ' '

*     CALLBACK_PROGRAM       = ' '

*     CALLBACK_FORM          = ' '

*     CALLBACK_METHOD        =

*     MARK_TAB               =

*   IMPORTING

*     USER_RESET             =

     TABLES

       VALUE_TAB              = LT3

*     FIELD_TAB              =

      RETURN_TAB             = IT_RETURN

*     DYNPFLD_MAPPING        =

*   EXCEPTIONS

*     PARAMETER_ERROR        = 1

*     NO_VALUES_FOUND        = 2

*     OTHERS                 = 3

             .

   IF SY-SUBRC <> 0.

* Implement suitable error handling here

ENDIF.

                                                            I NEED GET THE ROW AFTER DOUBLE CLICK..                                            

THANKS FOR ALL.


BEST REGARDS.

10 REPLIES 10
Read only

former_member219762
Contributor
0 Likes
1,702

Hi,

Get filed value from RETURN_TAB and read table LT3 with that value.

or you can use Callback programme,form.

Regards,

Sreenivas.

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,702

Please check all the internal table under tables parameters. Read about documentation of this function module and parameters

Nabheet

Read only

Former Member
0 Likes
1,702

You can use the following code.

DATA:IT_RETURN TYPE STANDARD TABLE OF ddshretval.

IF NOT LT3[] IS INITIAL.

    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

      EXPORTING

        retfield        = 'TPLNR'

        dynpprog        = sy-repid

        dynpnr          =  '0102'

        dynprofield     =  <Use the screen Field Name>

        value_org       =  'S'

      TABLES

        value_tab       = LT3

        return_tab      = IT_RETURN

      EXCEPTIONS

        parameter_error = 1

        no_values_found = 2

        OTHERS          = 3.

    IF sy-subrc <> 0.

    ENDIF.

ENDIF.

Read only

kamesh_g
Contributor
0 Likes
1,702

Hi First thing importing paramter RETFIELD, you can pass just field name  'DEVRE' .

And use below

READ TABLE LT3 INTO  <wa> WITH KEY DEVRE = IT_RETURN-fieldval. 

IF sy-subrc = 0.        

  DEVRE = <wa>-devre.

.ENDIF.

Read only

Former Member
0 Likes
1,702

I cant read which row has double clicked. I need the catch that row.

Read only

0 Likes
1,702

Based on field value chosen in return read table LT3 with same value as key and identify the line selected

Read only

0 Likes
1,702

Hi Erman,

You can select only any one column value of the selected row .you cannot select total row (if you contain multiple fields in F4 help.

Are you expecting mutliple fields to be selected when you double click. If this is the requirement it cannot be possible .

But with the mentioned read statement you can select  any one field of your selected row .

Thanks

Kamesh

Read only

Former Member
0 Likes
1,702

data: row type i,

        it_lt3 type standard table of lt3.

loop at it_lt3 into wa_lt3.

if wa_lt3-TPLNR = <captured value when you doubled clicked>

move sy-tabix to row.

endif.

endloop.

***************************************************************

-->declare an internal table it_lt3 of type lt3.

-->please write the code to capture the value of tplnr field when you double click  [ you can use function module for this code].

-->the value that you will capture here put it in above loop [where i gave<  >].

-->here row contain the actual row number where you doubled clicked.

PROVIDE SCORE IF YOU FOUND THIS CODE IS NEEDFUL

****************************************************************************

Read only

0 Likes
1,702

hI,

Check this thread: http://scn.sap.com/thread/1271545

Regards,

Sandro Ramos

Read only

Former Member
0 Likes
1,702

Hii Erman,

in order to read the field selected in the search help window , have to read the internal table which is displayed in the search help window (value_tab = lt3) with the return_tab (lt_return) internal table which have field FIELDVAL hold selected value of the search help.Here is the sample code for reading the selected value,

READ TABLE lt3 INTO wa_lt3 WITH KEY TPLNR = lt_return-fieldval BINARY SEARCH.


     IF sy-subrc eq 0.

           "do your logic you want.

          "WRITE wa_lt3-tplnr.

     ENDIF.


Note: Your WITH KEY <field> must be of your internal table field,which is displayed in search help (value_tab).

          So in your case tplnr is the field in lt3 .


Check out the lt_return-fieldval in debug mode.


regards

Syed