cancel
Showing results for 
Search instead for 
Did you mean: 

How can i dynamic find the formname within a SSF or SAPScript

TMNielsen
Contributor
0 Kudos

Hi All

I am writing a dynamic function that should be called from all our sapscripts and smartforms to generate some usage statistics.

One of the parameters for the function is the form name (SSF or sapscript).

I don't want to have to change the call when a form is copied from one name to another, so i don't want do hardcode the form name in all the calls.

My question is: where (in which variable) can i find the form name of the fin SSF and in where can i find it in SAPSCRIPT?

best regards

Thomas Madsen Nielsen

Accepted Solutions (0)

Answers (1)

Answers (1)

naimesh_patel
Active Contributor
0 Kudos

Your question seems to uncomplete.

If you are talking about the formname maintained in the output types than you can get them through table TNAPR.

Regards,

Naimesh Patel

TMNielsen
Contributor
0 Kudos

Ok I will try to clerify.

I'm talking about the name of the smartform (SSF) or the name of the SAPScript.

If my SSF is called ZTEST i need to find some system variable that contains ZTEST and the variable should be avaliable somewhere in the abap code of my SMARTFORM so that i can write a statement like this:

Call function 'ztestfunction'

exporting

SSF = some-system-variable

exceptions

NOT_FOUND.

And in sapscript i need to be able to do:

/: DEFINE &SAPSCIPT& = some-system-variable

/: PERFORM FORMID_REGISTER IN PROGRAM YBCBSFORMID

/:USING &SAPSCRIPT&

/: ENDPERFORM

It should be a system variable that is avaliable in all SSF and the same in all SAPSCripts (mabye an other variable)

Actually I also need the language key of the called form.

valter_oliveira
Active Contributor
0 Kudos

Hello.

Go to:

http://help.sap.com/saphelp_nw70/helpdata/EN/d6/0db74a494511d182b70000e829fbfe/frameset.htm

BC SAPscript: Printing with Forms -> SAPscript in Detail-> SAPscript Control Tables and Structures -> explore here.

Best regards.

Valter Oliveira.