Skip to Content
author's profile photo Former Member
Former Member

Any Function module or any other way to update/change the Function module's fields ?

Hello Experts,

I want to update/change fields of function module, say import or export parameter etc. So is there any FM available and if not any way of doing so ?

I am trying to see in debug mode how the change happens, but not getting anything.

Please suggest.

Regards,

Ankur Sharma.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

9 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2012 at 12:44 PM

    Hello Rüdiger Plantiko ,

    Actually what i want is to make a report, in it if user gives old name and new name, then report should replace all the data element used in a FM by new name.

    And that too with dark functionality, i.e. with no screen.

    So i debugged the SAP's method for that and came to know about this class and method, but when i use it, its not updating the FM in which the named DE is used.

    Regards,

    Ankur Sharma

    Add a comment
    10|10000 characters needed characters exceeded

    • This is a general topic: "How to activate inactive workbench objects in the background, with no dialogue", it has nothing to do with the rest of this topic. Maybe you open up a new question? I don't know an answer (and I don't have this problem in my SAP_BASIS 702 system, see above).

      Regards,

      Rüdiger

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2012 at 11:38 AM

    i got the class and its method name, i.e. CL_FUNCTION_BUILDER and method is UPDATE_PARAMETER.

    CALL METHOD obj1->update_parameter

    EXPORTING

    parameter = par_name

    line = '1'

    parameter_type = 'I'

    changing

    param_table = it_or

    param_docu = it_doc1

    modparam = it_ch

    moddocu = it_doc

    EXCEPTIONS

    ERROR = 1

    others = 2

    .

    IF sy-subrc <> 0.

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

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

    else. WRITE: 'TEST'.

    ENDIF.

    But getting confused in their parameters.

    PLEASE SUGGEST.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 20, 2012 at 07:47 AM

    Hi Ankur ,

    I think what you need can't be done through any FM .

    You certainly have two choices :

    1 > Enhancement in FM

    2 > create you own Z .

    regards ,

    Yogendra Bhaskar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2012 at 08:37 AM

    Hi,

    You can do it by Enhancement.There is a option in Menu Function Module -> Enhance Interface.

    Regards

    Ajit

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2012 at 04:30 AM

    Experts please suggest.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2012 at 05:49 AM

    I dont know from where to fetch the data of FM's parameters. Please suggest something.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      i must say...please elaborate your requirement.

      why you need to change the parameters of the function module.

      come with your exact requirement.

      however if it is absolute necessary you can create your own custom function module.

      first u need to create a function group in which u will assign that FM.

      we will start after Your requirement

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2012 at 07:18 AM

    Hello Abhishek,

    My requirement is, I want to rename the DATA ELEMENT used in a Function Module. And i want to do it programatically. This is not good, but i have to do this.

    I tried to debug this but could not find much, only that the method update_parameter of class CL_FUNCTION_BUILDER is used, but i am not getting how to use it.

    So, if you can suggest anything, than pls help.

    Regards,

    Ankur Sharma

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Thomas Zloch

      Hello Thomas,

      Till now i am able to rename DE, and if its used in some structure/table/program/class, i am able to change there also.

      But now getting prob in changing the DE in FM. i got the class and method name by debugging, but not being able to change.

      I try not to post many suggest request, but after few time if i see no reply, i repost it to keep the post fresh and in hope of getting some reply from all.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2012 at 09:13 AM

    Please suggest something.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2012 at 12:01 PM

    Suggest me how to use class CL_FUNCTION_BUILDER and method its UPDATE_PARAMETER.

    It shows sy-subrc zero but change is not happening in the FM, i tried commit work also.

    Please suggest.



    Add a comment
    10|10000 characters needed characters exceeded

    • If understand correctly, Ankur is building a tool that is supposed to take old and new data element name as input and then crawl through the entire object dependency tree in order to rename it whereever the old name is used.

      Ankur, maybe you should explain this in each of your initial posts, to save people from spending time suggesting workarounds or alternative approaches that do not apply to your case.

      Thomas

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.