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 parameter for field with conversion routine

Former Member
0 Likes
767

How do you handle a function parameter intended for a field that uses a conversion routine?

For example if I want to declare a parameter of type PS_PSPNR there is a conversion routine (KONPD) that raises an error if the input parameter does not exist. Mabye I want to use the parameter in a SELECT statement that uses a BETWEEN in the WHERE clause.

Do I have to have to just use a generic parameter of TYPE C and convert it prior to my SELECT statement?

How do you specify a field length for an import parameter?

Would it be easiest just create my own data element type?

Thanks for any help or tips you can provide.

Greg

4 REPLIES 4
Read only

Former Member
0 Likes
661

Yes, create the Char field and prior to select you use conversion routine.

it is the one of the best way to proceed

regards

vijay

Read only

Former Member
0 Likes
661

I dont think u have to create a data element, instead find out the length of the PSPNR from the domain of the current data element and delcare a CHAR type field of same lenght.

Read only

0 Likes
661

Specify it as type STRING. Then you can do whatever you want to it in the function module code.

Or don't TYPE it at all.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
661

Thanks everyone. I guess I was just stuck on using the data element types for my import parameters because they are formatted for size when running the test tool.

I just wish there was a way to create an import parameter and declare a length with creatinga custom data element.