Skip to Content
avatar image
Former Member

Auto Populate description of Z-field value selected from F4 on mm02 screen.


I have extended MARA table by appending two Z-fields 1] ZZ_PROD_CAT 2] ZZ_BRND_EQTY.

Now i added these field on MM02->Sales org2 tab. My requirement is when the value is selected for these fields eg:  ZZ_BRND_EQTY , the check table is : T2505 and the text table is T25A5.

So when user selects a value for ZZ_BRND_EQTY 0002 which has description as "DEFEND" then defend should be visible on next right of the field on screen  after user saves this value.

I have added a Input/output field for this purpose which is refering to T25A5-BEZEK for brand equity field. and made it as output only.

But the value is not getting populated.

Please help.


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 06, 2015 at 01:29 PM

    HI Archana,

    Use function module : DYNP_VALUES_READ.

    Check the sample Code as an attachment.



    Add comment
    10|10000 characters needed characters exceeded

    • HI Archana,

      Sample code

      *---Report with selection screen and to display the list of

      * possible entries for field 'B' as per the value in field 'A'.

      parameters: p_vbeln type vbak-vbeln,

                  p_posnr type vbap-posnr.

      at selection-screen on value-request for p_posnr.

        data: begin of help_item occurs 0,

                posnr type vbap-posnr,

                matnr type vbap-matnr,

                arktx type vbap-arktx,

              end of help_item.

        data: dynfields type table of dynpread with header line.

        dynfields-fieldname = 'P_VBELN'.

        append dynfields.

        call function 'DYNP_VALUES_READ'


                  dyname               = sy-cprog

                  dynumb               = sy-dynnr

                  translate_to_upper   = 'X'


                  dynpfields           = dynfields


                  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.

        read table dynfields with key fieldname = 'P_VBELN'.

        p_vbeln = dynfields-fieldvalue.

        call function 'CONVERSION_EXIT_ALPHA_INPUT'


                  input  = p_vbeln


                  output = p_vbeln.

        select posnr matnr arktx into table help_item

                       from vbap

                            where vbeln = p_vbeln.

        call function 'F4IF_INT_TABLE_VALUE_REQUEST'


                  retfield    = 'POSNR'

                  dynprofield = 'P_POSNR'

                  dynpprog    = sy-cprog

                  dynpnr      = sy-dynnr

                  value_org   = 'S'


                  value_tab   = help_item.