Skip to Content
0
Former Member
Mar 25, 2009 at 11:35 AM

YAPN-SPEY IS NOT EXISTING

50 Views

Hi Experts,

In the below code, i am not able to find YAPN-SPEY.

It is showing the error,the type YAPN is unknown.

please show how to declare that one to get the screen feild.

Please do the needful.

DATA : tb_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE, "to read values from screen

spey TYPE yapn-spey. "field spey to store the screen field value

CLEAR: tb_dynpfields.

REFRESH: tb_dynpfields.

MOVE 'YAPN-SPEY' TO tb_dynpfields-fieldname. "move field name of screen to tb_dynpfields-fieldname

"name of input/output field on screen is YAPN-SPEY

APPEND tb_dynpfields.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = 'Z_F1F4' "program name

dynumb = '1010' "screen number

  • TRANSLATE_TO_UPPER = ' '

  • REQUEST = ' '

  • PERFORM_CONVERSION_EXITS = ' '

  • PERFORM_INPUT_CONVERSION = ' '

  • DETERMINE_LOOP_INDEX = ' '

  • START_SEARCH_IN_CURRENT_SCREEN = ' '

  • START_SEARCH_IN_MAIN_SCREEN = ' '

  • START_SEARCH_IN_STACKED_SCREEN = ' '

  • START_SEARCH_ON_SCR_STACKPOS = ' '

  • SEARCH_OWN_SUBSCREENS_FIRST = ' '

  • SEARCHPATH_OF_SUBSCREEN_AREAS = ' '

TABLES

dynpfields = tb_dynpfields "internal table to read the screen value

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 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

READ TABLE tb_dynpfields INDEX 1.

IF sy-subrc EQ 0.

spey = tb_dynpfields-fieldvalue. "assign value from screen field to variable

ELSE.

spey = ' '.

ENDIF.

Regards

Basheer shaik