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

SAPScript: Textelement not completely executed

gnter_lidl2
Explorer
0 Likes
2,140

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
Read only

gnter_lidl2
Explorer
0 Likes
2,078

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
Read only

Former Member
0 Likes
2,078

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...

Read only

Former Member
0 Likes
2,078

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

Read only

Former Member
0 Likes
2,078

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

Read only

0 Likes
2,078

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

Read only

0 Likes
2,078

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

Read only

0 Likes
2,078

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

Read only

0 Likes
2,078

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!

Read only

0 Likes
2,078

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

Read only

0 Likes
2,078

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

No print of remark and of text

Read only

gnter_lidl2
Explorer
0 Likes
2,079

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'