cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How can I get PR number in ME52N?

Catherine3
Explorer
0 Kudos
394

I have an enhancement in ME52N to add a header tab. However, I use below coding to get PR number but failed.

      DATA:  ls_mereqheader TYPE REF TO cl_po_header_handle_mm.
      DATAlt_header TYPE mepoheader.

      CREATE OBJECT ls_mereqheader.

      CALL METHOD ls_mereqheader->get_data
        IMPORTING
          ex_data lt_header.

OR

      DATAdynpfields TYPE TABLE OF dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               'SAPLMEGUI' "sy-repid
          dynumb               '3327'   "sy-dynnr
*         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           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 <> 0.
* Implement suitable error handling here
      ENDIF.

What is wrong for the above coding? or any other way to get the PR number? Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

ulrich_mhrke
Participant
0 Kudos

You have to fill dynpfields with the fields you want to read for use of function module DYNP_VALUES_READ.

lt_dynpfields VALUE #FIELDNAME 'MEREQ_TOPLINE-BANFN_EXT' ).

Answers (0)