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

Function Module ?

Former Member
0 Likes
436

Hi,

I am looking for a function module which will give the list of available F4 check values for a given characteristic field when I pass the field name to it.

Thanks.

Tushar.

2 REPLIES 2
Read only

Former Member
0 Likes
311

Hi Tushar,

Take a look at FM 'DD_SHLP_CALL_FROM_DYNP'.

Regards,

Erwan.

Read only

0 Likes
311

Are you referring to a VC characteristic?



* Enter a characteristic name in the P_ATNAM field.
* Then do F4 on the P_ATWRT field.

report zrich_0002 .

parameters: p_atnam type cabn-atnam,
            p_atwrt type cawn-atwrt.

at selection-screen on value-request for p_atwrt.

* Internal Table for storage location help
  data: begin of help_char occurs 0,
         atwrt type cawn-atwrt,
         atwtb type cawnt-atwtb,
        end of help_char.

  data: dynfields type table of dynpread with header line.


  dynfields-fieldname = 'P_ATNAM'.
  append dynfields.

  call function 'DYNP_VALUES_READ'
       exporting
            dyname               = sy-cprog
            dynumb               = sy-dynnr
            translate_to_upper   = 'X'
       tables
            dynpfields           = dynfields
       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.


  read table dynfields with key fieldname = 'P_ATNAM'.


  select * into corresponding fields of table help_char
                from cabn
                    inner join cawn
                     on cabn~atinn = cawn~atinn
                    inner join cawnt
                     on cawn~atinn = cawnt~atinn
                    and cawn~atzhl = cawnt~atzhl
                           where cabn~atnam = dynfields-fieldvalue.

  delete adjacent duplicates from help_char comparing atwrt.

  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
       exporting
            retfield    = 'ATWRT'
            dynprofield = 'P_ATWRT'
            dynpprog    = sy-cprog
            dynpnr      = sy-dynnr
            value_org   = 'S'
       tables
            value_tab   = help_char.

Regards,

Rich Heilman