Skip to Content

SAPscript: link to existing element in same window

Hi,

i'm using standard print programm (SAPM07DR) to print material documents (MIGO).

I allready have defined my element

/E WE3KOPF


and printout is OK.

Problem:
for other type of material print programm (SAPM07DR) is requesting

/E WE3KOPF1



Standard solution would be:
create

/E WE3KOPF1

and copy/paste text from

/E WE3KOPF

into

😔

i don't like that, because in case of changings i have to change twice !!!

So i search for a function which allows me to link to

/E WE3KOPF

like:

-

-


/E WE3KOPF


K1 &H_STRAS&
K1 &H_PSTLZ& &H_ORT01& &H_ORT02&
/*

/E WE3KOPF1

/: link to WE3KOPF <---- ???

does anybody know about such a function?

(i don't want to change/copy standard print program!)

kind regards

Jörg S.

Message was edited by: Jörg S. (i like it bold)

Jörg Sauterleute

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2007 at 04:35 PM

    Hi,

    Try this..

    Use the PERFORM STATEMENT in the text element WE3KOPF1..

    /E WE3KOPF1

    SAPSCRIPT FORM CHANGES

    -


    /: PERFORM DISPLAY_WE3KOPF1 IN PROGRAM ZREPORT1

    ............

    /: ENDPERFORM.

    Report program

    -


    Create a new report program and have that subroutine here.

    FORM DISPLAY_WE3KOPF1 TABLES IN_PAR STUCTURE ITCSY

    OUT_PAR STRUCTURE ITCSY.

    • CALL THE FUNCTION WRITE_FORM WITH THE TEXT ELEMENT.

    ENDFORM.

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Naren,

      in Function "WRITE_FORM" there is a certain check:

      +function write_form.

      data:

      create type i,

      etype like itcca-tdetype.

      check co_perform-active <> true.+ <--- !!! (function was left at this point)

      subrc = 0

      Looks like SAP avoids your solution ... 😔

      kind regards

      Jörg

  • Posted on Jan 16, 2007 at 04:50 PM

    Hi Jörg,

    Hmm. You could try to write an external form and let this form trigger the defined element.

    At element WE3KOPF1 add the command lines

    /: PERFORM LINK_ELEMENT IN PROGRAM Z_SAPSCRIPT_FORMS

    /: USING 'WE3KOPF1'

    /: ENDPERFORM

    Then create an external formroutine with a function call

    CALL FUNCTION 'WRITE_FORM'

    ...

    elem = -value

    ...

    Just an idea - don't know it works. I hope you have minimal experience creating external form for sapscript. If not - it's well-documented at

    Calling ABAP Subroutines: PERFORM

    Hope it's worth a try.

    Regards,

    Clemens

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 11, 2009 at 09:01 AM

    No Solution found.

    Not worth trying any longer...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.