‎2012 Apr 26 2:09 PM
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..
‎2012 Apr 26 2:23 PM
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
‎2012 Apr 26 2:11 PM
Hi Vijay,
check this links:
http://scn.sap.com/thread/531178
http://scn.sap.com/thread/939493
Regards,
Jr Vieira
‎2012 Apr 26 2:12 PM
‎2012 Apr 26 2:23 PM
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
‎2012 Apr 26 2:39 PM
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
‎2012 Apr 26 3:00 PM