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: 

Dynamic search help problem

Former Member
0 Kudos

Hi gurus,

I have one problem..

I have created dynamic search help for 2 fields of Selection Screen. First one is for Packing List no. from Ztable. And the other one is for Sub Packing List no. for selected Packing List no.

I have used following code,

SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
PARAMETERS : plno TYPE zpackh-zpno OBLIGATORY.
PARAMETERS : pitem TYPE zpackh-zpitem.
SELECTION-SCREEN END OF BLOCK blk1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR plno.
   PERFORM value_plno.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR pitem.
   PERFORM value_item.

First one works fine. But when I go for search help for sub packing list no. (pitem), I got nothing.

Because, In my code I am using packing list no. (plno) for retrieving sub packing list numbers. But the value of plno get cleared (0) in code (value_item). So, I am not getting sub packing list numbers.

Is there any event should be written before AT SELECTION-SCREEN ON VALUE-REQUEST ??

Please help me out..

Thanks in advance..


1 ACCEPTED SOLUTION

Former Member
0 Kudos

I have already used F4IF_INT_TABLE_VALUE_REQUEST fm for dynamic search help,

The following is my code,

SELECT vbeln zpno zpitem FROM ztable INTO TABLE it_help WHERE plno = plno.

   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
     EXPORTING
*     DDIC_STRUCTURE         = ' '
       retfield               = 'ZPITEM'
*     PVALKEY                = ' '
      dynpprog               = sy-repid
      dynpnr                 = sy-dynnr
      dynprofield            = 'PITEM'
*     STEPL                  = 0
*     WINDOW_TITLE           =
*     VALUE                  = ' '
      value_org              = 'S'
*     MULTIPLE_CHOICE        = ' '
*     DISPLAY                = ' '
*     CALLBACK_PROGRAM       = ' '
*     CALLBACK_FORM          = ' '
*     MARK_TAB               =
*   IMPORTING
*     USER_RESET             =
     TABLES
       value_tab              = it_help
*     FIELD_TAB              =
*     RETURN_TAB             =
*     DYNPFLD_MAPPING        =
*   EXCEPTIONS
*     PARAMETER_ERROR        = 1
*     NO_VALUES_FOUND        = 2
*     OTHERS                 = 3
             .

In that code,

SELECT vbeln zpno zpitem FROM ztable INTO TABLE it_help WHERE plno = plno.

I am getting "plno" blank. There is no value in "plno", it is selection screen field and it has value. But some how it is getting cleared while it reaches to this code.

Regards,

Vijay


5 REPLIES 5

Former Member
0 Kudos

Hi Vijay,

check this links:

http://scn.sap.com/thread/531178

http://scn.sap.com/thread/939493

Regards,

Jr Vieira

raymond_giuseppi
Active Contributor
0 Kudos

This is a FAQ, use search tool, you should find (look for F4IF_INT_TABLE_VALUE_REQUEST, DYNP_VALUES_READ FMs)

Regards,

Raymond

Former Member
0 Kudos

I have already used F4IF_INT_TABLE_VALUE_REQUEST fm for dynamic search help,

The following is my code,

SELECT vbeln zpno zpitem FROM ztable INTO TABLE it_help WHERE plno = plno.

   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
     EXPORTING
*     DDIC_STRUCTURE         = ' '
       retfield               = 'ZPITEM'
*     PVALKEY                = ' '
      dynpprog               = sy-repid
      dynpnr                 = sy-dynnr
      dynprofield            = 'PITEM'
*     STEPL                  = 0
*     WINDOW_TITLE           =
*     VALUE                  = ' '
      value_org              = 'S'
*     MULTIPLE_CHOICE        = ' '
*     DISPLAY                = ' '
*     CALLBACK_PROGRAM       = ' '
*     CALLBACK_FORM          = ' '
*     MARK_TAB               =
*   IMPORTING
*     USER_RESET             =
     TABLES
       value_tab              = it_help
*     FIELD_TAB              =
*     RETURN_TAB             =
*     DYNPFLD_MAPPING        =
*   EXCEPTIONS
*     PARAMETER_ERROR        = 1
*     NO_VALUES_FOUND        = 2
*     OTHERS                 = 3
             .

In that code,

SELECT vbeln zpno zpitem FROM ztable INTO TABLE it_help WHERE plno = plno.

I am getting "plno" blank. There is no value in "plno", it is selection screen field and it has value. But some how it is getting cleared while it reaches to this code.

Regards,

Vijay


0 Kudos

The data is passed from dynpro to program during PAI (AT SELECTION-SCREEN), in the POV event (AT SELECTION-SCREEN ON VALUE REQUEST) on second field only the value of the field for which F4 is processed is copied locally (In fact it is a FORM which manages the event, local variable) from dynpro the value in the first field is not always the same between program and dynpro, use DYNP_VALUES_READ to get other fields before fill the internal table used in the F4 help.

Regards,

Raymond

0 Kudos

Thanks Raymond,

Regards,

Vijay