Skip to Content
avatar image
Former Member

Sap script doesn't work inside a function module

hi experts,

i created a function module and add open_form write_form close_form inside it, now the layout of this script is fine, but variable which needs to be transferred from this function module into the script are failed. could anyone tell me how to transfer parameter into sap script when it's inside a FM?

thanks in advance.

Desmond.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 28, 2011 at 12:31 PM

    Where have you defined the attributes for the form?

    You have only access to global attributes. Do not declare them in the function modul.

    Regards,

    Christian

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 28, 2011 at 09:35 AM

    Hi Desmond,

    The variable declared in the driver program will be mapped 1 -to - 1. So just assign the value before the function modu;e write_form. Please use the same variaiable name in the script between the & sign.

    For instance, if the variable gv_name is assigned with the value 'Victor' and in the script the same is assigned as &GV_NAME&, the write_form FM will replace the variable &GV_NAME& with the value 'Victor'.

    If your qn is diff. please let me know with a suitable example.

    Regards,

    Selva K.

    Add comment
    10|10000 characters needed characters exceeded