Application Development and Automation 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: 
Read only

Script Problem

Former Member
0 Likes
523

Hi friends,

I have to fields &J_1IEXCDTL-MRK_PKG(10)& &J_1IEXCDTL-NOS_ON_PKG(10)& in modified script for which I have put texts maintained in tcode VL02N dynamically.

How can I achieve this thru subroutine pool program and where I have write PERFORM statement in script before text element or after?

Kindly help....

Thanks in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
507

hiiii

in script you call subroutine before text element

use ...

perform (subroutine-name) IN PROGRAM (subroutine-pool name).

for calling subroutine from subrotine pool.

regards

twinkal

Read only

0 Likes
507

Hi,

Pls provide sample code how to write this in subroutine pool program.........

Read only

0 Likes
507

kindly reply.......

Read only

Former Member
0 Likes
507

Hi Hosmath,

In order to call a subroutine from a sapscript, you could define some calling code in sapscript as follow:

PERFORM &form_name& IN PROGRAM &zprogram_name&

using &J_1IEXCDTL-MRK_PKG&

using &J_1IEXCDTL-NOS_ON_PKG&

changing &xresult&

endperform

Whereas in the pool program itself, you could define any formula, calculation or conditions required, for example as follow:

Form &form_name& TABLES invar1 structure itcsy

outvar structure itcsy.

  • == read itab index 1, with field invar1-value as the first parameter passed from the sapscript value == *

  • == read itab index 2, with field invar1-value as the second parameter passed from the sapscript value == *

  • == for the result, you could modify it into the outvar itab == *

endForm.

Hope it could helps.

Cheers,

FNR