Application Development 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: 

SAPScript: Textelement not completely executed

gnter_lidl2
Explorer
0 Kudos

Hi Gurus,

now i am running crazy due to a Problem with SAPScript!

Following is a part of the script:

/E     ER_CREDIT_HEAD

/:       PERFORM ..... IN PROGRAM ....

/:         USING &...&

/:         CHANGING &GV_TEXT&

/:         CHANGING &GV_REMARK&

/:       ENDPERFORM

/:       IF &GV_TEXT& <> ''

I2        &GV_TEXT&

/:       ENDIF

/

I2      &GV_REMARK&

/

/:       .....

The Problem is, that after the /-Command the text element is been left, so that the other Statements are not printed!

some ideas about this phenomen?

Thanks a lot in advance

1 ACCEPTED SOLUTION

gnter_lidl2
Explorer
0 Kudos

I solved it now!

The Problem was an ADDRESS..ENDADDRESS Statement which damages the control of the form because of "I don't know why'

10 REPLIES 10

Former Member
0 Kudos

Hi,

It might be the reason that you have element in the Script and not maintained in the Driver program, checkout the Driver program whether the Element is used or not...

former_member216168
Active Participant
0 Kudos

As said before, probably you forgot to make the code in your driver program. Other reason could be you forgot to active this form... sometimes it happened to me

Former Member
0 Kudos

Hi Lidl,

I cannot get what is the exact problem you are facing so could you please elaborate "after the /-Command the text element is been left" .

Regards

Nav

0 Kudos

Dear all,

thanks a lot for your replies!

The Driver program is SAP Standard and ok, the form is activated!

following Problem i saw in debug mode:

/:     IF &GV_TEXT& <> ''          <- excetued

I2     &GV_TEXT&                    <-- skipped because gv_text is initial

/:     ENDIF                                <-- exceuted

/                                                 <-- executed

I2     &GV_REMARK&               <-- not executed, program jumps to the next text element

/:     IF .....                                   <-- the following Statements will not be executed because
                                                       text element left

0 Kudos

When you enter in debug mode in this report, is it possible to see this variables?

0 Kudos

Hi Lidl,

According to the debugging you did it seems that  there is a condition which could be executed only when text element is not blank that is the text element is mandatory.

Regards

Nav

0 Kudos

Yes, when GV_TEXT IS INITIAL it should'nt be printed, but after this GV_REMARK should be printed but the textelement was been left before, means after the ENDIF Statement!

The / is a linefeed only!

0 Kudos

Hi Lidl,

Here in the codes you have written

/:       PERFORM ..... IN PROGRAM ....

/:         USING &...&

/:         CHANGING &GV_TEXT&

/:         CHANGING &GV_REMARK&

/:       ENDPERFORM

So I think as Gv_text  gets blank gv_remark also becomes blank and may be due to this reason it doesn't print the remarks.So, do a check on this.

Regards

Nav

0 Kudos

Sorry, but i checked it and text element is left!

No print of remark and of text

gnter_lidl2
Explorer
0 Kudos

I solved it now!

The Problem was an ADDRESS..ENDADDRESS Statement which damages the control of the form because of "I don't know why'