cancel
Showing results for 
Search instead for 
Did you mean: 

Call report with parameters while displaying SAPScript?

KHummel
Participant
0 Kudos

Hi,

I'm looking for a possibility to start another program from within the display of an SAPScript long text (e.g. the documentaion of a program, or a message's long text), and give additional parameters to this program.

By inserting a link into the long text, I can call either a report (tag <DS:REPO... > is inserted), or a transaction (tab <DS.TRAN...>). But neither can I transmit explicit parameters or the name of a variant to the report following the DS:REPO tag, nor can I predefine fields for the transaction in the DS:TRAN tag.

Does anyone know a little trick to achieve this?

Thanks in advance!

Klaus

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Klaus,

Have you found any work around for SE91->long text -> <DS.TRAN...> with parameters?

Please share solution if possible.

Regards,

Rakesh M.

alejandro_lpez
Contributor
0 Kudos

Hi Klaus,

In SAPScript, you can call soubrutines using the sentence PERFORM, like this:

PERFORM

This is a example:

/: PERFORM MAIN IN PROGRAM ZMMRECO00_0011_01

/: USING &EKPO-EBELP&

/: USING &EKPO-EBELN(K)&

/: USING &EKPO-MATNR(K)&

/: USING &EKPO-PEINH&

/: CHANGING &FECHA&

/: CHANGING &TOTAL&

/: CHANGING &TXZ01&

/: CHANGING &TXZ02&

/: CHANGING &TXZ03&

/: CHANGING &TXZ04&

/: CHANGING &TXZ05&

/: CHANGING &EKPO-NETPR(T)&

/: ENDPERFORM

Inside the soubrutine:

FORM main TABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

ENDFORM.

In the soubrutine MAIN, you could use all code ABAP that you need.

Best regards,

Alejandro López.

KHummel
Participant
0 Kudos

Hi Alejandro,

I know this PERFORM ... IN PROGRAM...-technique, but I'm experiencing difficulties while trying to pass variables without DDIC referece to the subroutine.

Example:

/: DEFINE &&TEXT1& = 'This is the text I want to show' 
/: PERFORM SUBROUTINE IN PROGRAM ZREPORT
/: USING &TEXT1&

Then, inside my subroutine


FORM subroutine TABLES in_tab STRUCTURE itcsy
                                out_tab STRUCTURE itcsy.

TEXT1 is no longer contained in parameter table in_tab.

What I was looking for was a possibility to add parameters to the <DS:REPO> tag of SapScript.

Thanks nevertheless for your answer.

KHummel
Participant
0 Kudos

Additionally, as I just recognized, the

PERFORM .. IN PROGRAM ...
ENDPERFORM 

-technique does not work properly when displaying a help text within the Performance Assistant.

Former Member
0 Kudos

Hi

I think u can try to transfer the value by SET/GET PARAMETER or IMPORT/EXPORT FROM/TO MEMORY stataments, but that means u need to change the called program in oder to import the value from memory.

U can try to use a FORM:

PERFORM .. IN PROGRAM ...
ENDPERFORM

in order to transfer the value to memory

Max