Using FM with CHARxx Parameters in a Method

Zmudzin,Tomasz,VEVEY,GL-IS/IT Tomasz.Zmudzin at nestle.com
Mon Mar 10 04:50:26 EST 2003


1. When asked if you want to create the method using a FM as a template,
reply "No".
2. Then create all the necessary method parameters as container elements for
this method.
3. Only then jump into the coding. Let the system generate the code for the
method -- it will include the retrieval/setting of the parameters you've
defined.
4. After the code that retrieves the method parameters, and before the code
that sets the parameters insert the call to your function module. You can do
it by inserting a "pattern" (Edit) menu.
5. Complete the parameter passing to the FM.
 
That should do,
Tomasz
 
-----Original Message-----
From: Thad Gorbal [mailto:Thaddeus.Gorbal at pb.com]
Sent: Friday,7. March 2003 18:05
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Using FM with CHARxx Parameters in a Method
 
 
Hi All:
 
I am implementing a function module to a method under ZVBRK.  Unfortunately
that FM has several parameters defined as TYPE  'CHARxx'   (where xx stands
for a number of characters).  Those parameters are for passing back
literals, needed for my PC document creation step.
 
When I attempt to create a method, I get an error message 'Data type CHARxx
cannot be used for methods'.
 
I am not sure how to best approach it. One way would be to create a custom
structure with all the necessary fields, as far as length is concern.  And
then use it for the function parameters as a references.
 
However, I would hope there is a better and quicker way to tackle this one.
 
Thanks in advance for your advice.
 
Best regards,
Thad
 


More information about the SAP-WUG mailing list