Application Development 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: 

How to find out the current form name

Former Member
0 Kudos

Hi all,

I have to pass the current sapcript form name in the sauroutine pool for some further processing.

I just wanted to is there any variable, method, or way to find out the current/running Sapscript form name generically so that we can pass it on to subpool.

Looking forward for your reply.

Regards,

Anuja.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Anuja,

You can declare a variable of type TDFORM and assign your form name to it.

Then pass it for further processing.

Use TNAPR table to fetch the form name for any program.

Revert back in case of any concern.

Regards,

Nitin.

Edited by: Nitin Karamchandani on Apr 8, 2009 3:04 PM

8 REPLIES 8

Former Member
0 Kudos

Hi Anuja,

You can declare a variable of type TDFORM and assign your form name to it.

Then pass it for further processing.

Use TNAPR table to fetch the form name for any program.

Revert back in case of any concern.

Regards,

Nitin.

Edited by: Nitin Karamchandani on Apr 8, 2009 3:04 PM

former_member156446
Active Contributor
0 Kudos

we generally use the output type like &nast-kschl&

Former Member
0 Kudos

Use TNAPR table to take the form name based on the access conditions specified in nace transaction. You can get to know the output types, form name etc from the access conditions which in turn can be fetched from nast (for access conditions) and TNAPR( for program name and form name).

shadow
Participant
0 Kudos

Hi ,

TNAPR is a data base table for predefine forms and predefine print program........

using this u can find form name .

Regard's

SHAIK.

Former Member
0 Kudos

Hi All,

Many thnaks for your replies.

Actually in my case the situation is, i have to change in multiple forms.

I mean the same perform needs to be used in all the forms almost around 20 using the current form name.

So that perform should be generic. I mean is there any variable/ method or way to get the current form name so that we can pass that to the subroutine pool through form.

Looking forward for yoour reply.

Regards,

Anuja.

Former Member
0 Kudos

Hi All,

Many thnaks for your replies.

Actually in my case the situation is, i have to change in multiple forms.

I mean the same perform needs to be used in all the forms almost around 20 using the current form name.

So that perform should be generic. I mean is there any variable/ method or way to get the current form name so that we can pass that to the subroutine pool through form.

Looking forward for yoour reply.

Regards,

Anuja.

0 Kudos

Hi,

You can check the sy-repid of the program and know the form name from TNAPR table using field FONAM.

Regards,

Nihar

venkatesan_nagiah
Active Participant
0 Kudos

Hi Anuja,

in each driver program, while calling OPEN_FORM, you must be passing form name in a variable. If this variable is declared as a global variable, then this variable can be accessed inside sapscript form as symbol like &form_name&. This symbol you can pass it to subroutine for further processing.