‎2011 Jun 17 12:50 PM
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS : QMART FOR QMEL-QMART NO-DISPLAY.
SELECT-OPTIONS : S_WERKS FOR QMIH-IWERK OBLIGATORY NO-EXTENSION NO INTERVALS .
SELECT-OPTIONS : S_TPLNR FOR IFLOT-TPLNR NO INTERVALS .
SELECT-OPTIONS : S_EQUNR FOR EQUI-EQUNR NO INTERVALS .
SELECT-OPTIONS : S_INGRP FOR QMIH-INGRP OBLIGATORY .
SELECT-OPTIONS : S_QMDAT FOR QMEL-QMDAT OBLIGATORY NO-EXTENSION.
SELECTION-SCREEN END OF BLOCK B1.In this selection screen i want to read multiple value read on the event AT SELECTION SCREEN from the S_TPLNR selection screen field.
I write the below code in the event AT SELECTION SCREEN.
DATA: BEGIN OF T_DYNPFIELDS OCCURS 0.
INCLUDE STRUCTURE DYNPREAD.
DATA: END OF T_DYNPFIELDS.
CLEAR : T_DYNPFIELDS[].
T_DYNPFIELDS-FIELDNAME = 'S_TPLNR-LOW'.
APPEND T_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-CPROG
DYNUMB = SY-DYNNR
START_SEARCH_IN_CURRENT_SCREEN = 'X'
TABLES
DYNPFIELDS = T_DYNPFIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
IF SY-SUBRC IS INITIAL.
READ TABLE T_DYNPFIELDS WITH KEY FIELDNAME = S_TPLNR.
IF T_DYNPFIELDS-FIELDVALUE IS INITIAL.
ELSE.
SET LOCALE LANGUAGE SY-LANGU.
TRANSLATE T_DYNPFIELDS-FIELDVALUE TO UPPER CASE. "#EC TRANSLANG
W_S_TPLNR-LOW = T_DYNPFIELDS-FIELDVALUE .
ENDIF.
ENDIF...........................*************************but when i entered multiple value in field S_TPLNR only gate 1st one value by this function module..............NOT GATTING multiple value..........***************************when i give T_DYNPFIELDS-FIELDNAME = 'S_TPLNR'. no value gatting by this function module,,,,,,,,,,,,,,,,,,,,,,,,,,,,
SO Please suggest me how can i Gate multiple value frrom S_TPLNR selection screen field with in the event AT SELECTION SCREEN.
Added tags
Edited by: Suhas Saha on Jun 17, 2011 5:23 PM
‎2011 Jun 17 1:07 PM
Hello Soumen,
but when i entered multiple value in field S_TPLNR only gate 1st one value by this function module.NOT GETTING multiple value.
The FM 'DYNP_VALUES_READ' returns the values of the elements which are available on the screen in case the PAI event is not triggered. For e.g., this FM in the POV module if we want to populate the F4 values of the screen element based on the values in another element.
when i give T_DYNPFIELDS-FIELDNAME = 'S_TPLNR'. no value gatting by this function module
There is no element 'S_TPLNR' available in the screen-painter. It is either ''S_TPLNR-LOW' or 'S_TPLNR-HIGH'. Hence the FM is not returning any values!
As i have mentioned earlier this FM is required if the PAI module is not triggered yet. In your code snippet i can see you have used this in the AT SELECTION-EVENT(PAI event for seln. scr.), so you can access the values by directly using the variable S_TPLNR. (Since this is a range table you'll have to handle it accordingly)
AT SELECTION-SCREEN.
FIELD-SYMBOLS <ls_tplnr> LIKE LINE OF s_tplnr.
SET LOCALE LANGUAGE sy-langu.
LOOP AT s_tplnr ASSIGNING <ls_tplnr>.
TRANSLATE <ls_tplnr>-low TO UPPER CASE.
ENDLOOP.Why do you need to use the 'DYNP_VALUES_READ'? What is your actual business requirement?
BR,
Suhas
Edited by: Suhas Saha on Jun 17, 2011 5:41 PM
‎2011 Jun 17 1:07 PM
Hello Soumen,
but when i entered multiple value in field S_TPLNR only gate 1st one value by this function module.NOT GETTING multiple value.
The FM 'DYNP_VALUES_READ' returns the values of the elements which are available on the screen in case the PAI event is not triggered. For e.g., this FM in the POV module if we want to populate the F4 values of the screen element based on the values in another element.
when i give T_DYNPFIELDS-FIELDNAME = 'S_TPLNR'. no value gatting by this function module
There is no element 'S_TPLNR' available in the screen-painter. It is either ''S_TPLNR-LOW' or 'S_TPLNR-HIGH'. Hence the FM is not returning any values!
As i have mentioned earlier this FM is required if the PAI module is not triggered yet. In your code snippet i can see you have used this in the AT SELECTION-EVENT(PAI event for seln. scr.), so you can access the values by directly using the variable S_TPLNR. (Since this is a range table you'll have to handle it accordingly)
AT SELECTION-SCREEN.
FIELD-SYMBOLS <ls_tplnr> LIKE LINE OF s_tplnr.
SET LOCALE LANGUAGE sy-langu.
LOOP AT s_tplnr ASSIGNING <ls_tplnr>.
TRANSLATE <ls_tplnr>-low TO UPPER CASE.
ENDLOOP.Why do you need to use the 'DYNP_VALUES_READ'? What is your actual business requirement?
BR,
Suhas
Edited by: Suhas Saha on Jun 17, 2011 5:41 PM
‎2011 Jun 17 1:44 PM
Thanks ...........for give me the proper soluction...............My business requirment was...................F4 help on onther field depending on the S_TPLNR field............