‎2010 Jan 21 6:03 AM
Dear Experts,
Can any one suggest is there any FM or BAPI to find the
screen values in a custom screen.
Eg:
in a screen Plant and voltages are there
if i give the screen num and program name it need to give the plant and plant details,voltage and voltage details
Thanks
Surendra P
‎2010 Jan 21 6:06 AM
‎2010 Jan 21 6:06 AM
‎2010 Jan 21 6:09 AM
Hi Surendra,
Is this what you are looking for: Function module: DYNP_VALUES_READ
Regards,
Swarna Munukoti
‎2010 Jan 21 6:13 AM
Dear Anish/Swarna
ya but while i give program name and screen num it is not giving any values and i give traslate = 'X'
is there any other values to pass in this function module
Thanks
Surendra
‎2010 Jan 21 6:16 AM
‎2010 Jan 21 6:22 AM
Hi Swarna
just iam testing the function module which u gave
it is not returning any value
in that function module i pass program name and screen num ,translate
if testing is over than ill write
‎2010 Jan 21 6:30 AM
Hello Suri,
Please check the code below...
DATA: DYNNUM TYPE SY-DYNNR, "Screen Number
DYNPRO_VALUES TYPE TABLE OF DYNPREAD, " Table that will have the value read
FIELD_VALUE LIKE LINE OF DYNPRO_VALUES, " U pass the name of the screen field to the FM in this
DYNNUM = SY-DYNNR. " Passing ur screen number
FIELD_VALUE-FIELDNAME = '<Name of the screen field to be read>'. " Passing the field whose scr value u need
APPEND FIELD_VALUE TO DYNPRO_VALUES.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = PROGNAME
DYNUMB = DYNNUM
TRANSLATE_TO_UPPER = 'X'
DETERMINE_LOOP_INDEX = 'X'
TABLES
DYNPFIELDS = DYNPRO_VALUES.
READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.
Now, FIELD_VALUE-FIELDVALUE will contain the screen value of the field u passed in FIELD_VALUE-FIELDNAME.
Hope this helps....
Regards,
Jaison
‎2010 Jan 21 6:35 AM
Solved by MySelf,
first need to get the fields from the screen.
using DYNPRO_FIELD_GET
and there after use the below function module to get the values of the fields
DYNP_VALUES_READ