Skip to Content
avatar image
Former Member

Medruck (additional logic to be implemented in std. script in subroutine)

I am making a Script of Scheduling Agreement(MM Module) in which I'm making use of standard print program"SAPFM06P" and created a Z Script Form(Copy of Medruck) in which I have made layout changes as per the requirement. In the Main Window, I am having line items details for a particular Scheduling Agreement. Now, what is needed is I need to calculate four type of taxes(Basic Excise Duty, CESS, HECCV etc) for every line item by using FM u201CCALCULATE_TAX_ITEMu201D but I need not have to print the Taxes info for every line item . I want the taxes part to be printed beneath the last line item.What should i do for this?

If I am not wrong I need to write an external subroutine and I have to call it. But from where should I call the subroutine ?

From the Z Script Form or from the Std Print Program?.

It would be helpful for me if you can send me the sample code or any relevant website link.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Sep 04, 2008 at 08:25 AM

    Hi,

    You write your perform statement in your Z form and the coding is written in the external subroutine program / executable program

    zform

    /: perform <subroutine name> in program <program name>

    /: using <using parameter>

    /: changing <changing parameter>

    /: endperform

    regards

    padma

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 04, 2008 at 08:30 AM

    Hi Roopesh,

    You call the subroutine from you ZSCRIPT iteself.. But ensure that you call the text element from the

    program and in that text element call the subroutine and include that subroutine in any of the executable program

    Hope you know the syntax and other stuff of Perform..

    Check this below link for reference regarding Perform in SCRIPTS

    http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm

    Hope this would help you.

    Any questions please revert back.

    Good luck

    Narin.

    Add comment
    10|10000 characters needed characters exceeded