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

Question about Conversion Routine

Former Member
0 Likes
630

I want to get the field name and table name while I am inside a conversion routine.

For example, I want to see the table name and field name  for which the conversion routine is being processed while

                          I am still inside a conversion routine.

Anybody has idea ?

Regards,

Arnold.

3 REPLIES 3
Read only

amy_king
Active Contributor
0 Likes
504

Hi Arnold,

Under the hood, a conversion routine is just a function module, e.g., domain MATNR has conversion routine MATN1, which points to function modules CONVERSION_EXIT_MATN1_INPUT and CONVERSION_EXIT_MATN1_OUTPUT. A function module knows only about its own parameters (plus global data from the function group), which in the case of a conversion routine, are untyped parameters, INPUT and OUTPUT.

What are you trying to achieve in the conversion? Sometimes a BAdI is available, again in the case of domain MATNR, there is BADI_MATN1

Cheers,

Amy

Read only

Former Member
0 Likes
504

Hi,

there is no straight forward way to find this...If you are inside a conversion routine ( in debugging )  go to ABAP debugger>desktop 2>abap stack. Find the program where this conversion is being called. There might be some BAPI/FM/method which access that conversion routine. You can have an idea pf table or field for which it has been called.

Read only

wol
Active Participant
0 Likes
504

Hello Arnold,

first, I would suggest to avoid the need of coding depending on tablenames or fieldnames. Dangerous if you change it. Hard to understand if someone else reads the code.

I would suggest to define a new parameter in your search help which you can explicitly fill if you link your search help. So it is transparent and better to read.

Regards,

Stefan