Application Development and Automation 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: 
Read only

DYNP_VALUES_UPDATE Problem

Former Member
0 Likes
646

'DYNP_VALUES_UPDATE' cann't update screen element values. Why?

Thanks

DynpFields-Fieldname  = 'ZWM460-MAKTX'.
DynpFields-FieldValue = MyMaktx.
DynpFields-stepl      = l_stepl.
Append DynpFields.
 
CALL FUNCTION 'DYNP_VALUES_UPDATE'
  EXPORTING
    DYNAME                     = 'ZHYT_WM_RPR_460'
    DYNUMB                     = P_0064
  TABLES
    DYNPFIELDS                 = DynpFields
 EXCEPTIONS
   INVALID_ABAPWORKAREA       = 1
   INVALID_DYNPROFIELD        = 2
   INVALID_DYNPRONAME         = 3
   INVALID_DYNPRONUMMER       = 4
   INVALID_REQUEST            = 5
   NO_FIELDDESCRIPTION        = 6
   UNDEFIND_ERROR             = 7
   OTHERS                     = 8.
IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

1 ACCEPTED SOLUTION
Read only

anversha_s
Active Contributor
0 Likes
500

hi,

chk this code.

**Transport values to table dynpro/screen table control
  DATA: l_stepl LIKE  sy-stepl,
        l_indx  LIKE  sy-stepl.
  DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.

* Adjust for scroling within table control
  CALL FUNCTION 'DYNP_GET_STEPL'
    IMPORTING
      povstepl        = l_stepl
    EXCEPTIONS
      stepl_not_found = 0
      OTHERS          = 0.

  l_indx = tc_ekpotable-top_line + l_stepl - 1. 
          "tc_ekpotable should already have been declared

  REFRESH dynpfields.
  CLEAR   dynpfields.
  dynpfields-fieldname  = 'EKPO-EBELN'.
  dynpfields-fieldvalue = '00010'   "wa_ekpo-ebeln.
  dynpfields-stepl      = l_stepl.
  APPEND dynpfields.
  dynpfields-fieldname  = 'EKPO-EBELP'.
  dynpfields-fieldvalue = '00020'   "wa_ekpo-ebelp.
  dynpfields-stepl      = l_stepl.
  APPEND dynpfields.

  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      dyname     = 'SAPLZZ_EKKO'    "Program name
      dynumb     = '0100'           "Screen number 
    TABLES
      dynpfields = dynpfields
    EXCEPTIONS
      OTHERS     = 0.
ENDMODULE.                 " help_ekpo  INPUT
.

Regards

Anver

2 REPLIES 2
Read only

anversha_s
Active Contributor
0 Likes
501

hi,

chk this code.

**Transport values to table dynpro/screen table control
  DATA: l_stepl LIKE  sy-stepl,
        l_indx  LIKE  sy-stepl.
  DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.

* Adjust for scroling within table control
  CALL FUNCTION 'DYNP_GET_STEPL'
    IMPORTING
      povstepl        = l_stepl
    EXCEPTIONS
      stepl_not_found = 0
      OTHERS          = 0.

  l_indx = tc_ekpotable-top_line + l_stepl - 1. 
          "tc_ekpotable should already have been declared

  REFRESH dynpfields.
  CLEAR   dynpfields.
  dynpfields-fieldname  = 'EKPO-EBELN'.
  dynpfields-fieldvalue = '00010'   "wa_ekpo-ebeln.
  dynpfields-stepl      = l_stepl.
  APPEND dynpfields.
  dynpfields-fieldname  = 'EKPO-EBELP'.
  dynpfields-fieldvalue = '00020'   "wa_ekpo-ebelp.
  dynpfields-stepl      = l_stepl.
  APPEND dynpfields.

  CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
      dyname     = 'SAPLZZ_EKKO'    "Program name
      dynumb     = '0100'           "Screen number 
    TABLES
      dynpfields = dynpfields
    EXCEPTIONS
      OTHERS     = 0.
ENDMODULE.                 " help_ekpo  INPUT
.

Regards

Anver

Read only

0 Likes
500

thanks but it doesn't update element