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

Problem in SAPScript.....

Former Member
0 Likes
801

Hi,

I am working on SAPScript. I have a got a problem here.

In the Script, the standard print program is firing following text element in the script.

/E ER_MAT_MATNR_9

/: &ESSR-LBLNI&

Now there is a loop in the standard print program which keeps on firing text element until values in the internal table gets finished.

Without changing print program, I want to stop printing &ESSR-LBLNI& if it is same as the one printed previously,

even if the text element gets fired due to looping in print program.

How do I do this ? Do I have to use some buffering so as to check the value printed previously ?

Please help.

Rajesh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
777

Hi,

You can use IMPORT/EXPORT if you want to export the value in one program and import the value in another program.

I think in this scenario STATICS will work..

Thanks,

Naren

8 REPLIES 8
Read only

Former Member
0 Likes
777

Please help...

Read only

abdul_hakim
Active Contributor
0 Likes
777

hi

you could copy this stanndard program into Z-program and do the necessary changes...

cheers,

Abdul Hakim

Read only

Former Member
0 Likes
777

Hi,

create a z report program and create a subroutine..

Use the perform statement in the SAP script and in the subroutine create a statics variable and check for the previous variable..

Pass the current value and check the value against the statics value in the subroutine..

And return a variable 'X' or ' '.

If 'X' means changed..

Hope this helps...

Thanks,

Naren

Message was edited by: Narendran Muthukumaran

Read only

0 Likes
777

How to create static variable in ABAP ?

Read only

sridhar_k1
Active Contributor
0 Likes
777

If the LBLNI field is sorted in the itab, then try this.

/E ER_MAT_MATNR_9

/: IF &ESSR-LBLNI& NE &V_TMP&

/ &ESSR-LBLNI&

/: ENDIF

/: DEFINE &V_TMP& = &ESSR-LBLNI&

Regards

Sridhar

Read only

Former Member
0 Likes
777

Hi,

STATICS: V_PREV_CHAR TYPE STRING.

Thanks,

Naren

Read only

0 Likes
777

This might be one of the feasible solution but can I do that using EXPORT to memory ID and Import to Memory ID ?

Read only

Former Member
0 Likes
778

Hi,

You can use IMPORT/EXPORT if you want to export the value in one program and import the value in another program.

I think in this scenario STATICS will work..

Thanks,

Naren