cancel
Showing results for 
Search instead for 
Did you mean: 

SAP SCRIPT issue

Former Member
0 Kudos

Hi,

I am facing an issue in SAP Script.

When the script executed in quality server control moves from statement => ,,&'Shipping instructions: 'T027B-EVTXT& to

statement => INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID& LANGUAGE in main window code for a particular PO while debugging.

But when executed in development server for a particular PO, control moves to some other statement instead of executing

/: INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID& LANGUAGE.

One of the observation in later case &T166P-TXNAM& is blank.

can anybody explain what could be the reason for non-execution of include?

Following is the code for referance in main Window-

,,&'Shipping instructions: 'T027B-EVTXT& * <= control doesnt navigate from this statement to following state.*

/E ITEM_INFO_ACKNOW

IN ,,We require an order acknowledgment for this item

/E ITEM_TEXT

/* { Begin of BD9633-070508

/: IF &T166P-TDID& <> 'F07'

/: INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID& LANGUAGE

Thnaks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

well, the statement INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID&

will print a text with textname T166P-TXNAM, for object T166P-TDOBJECT with TextID T166P-TDID.

most probably the text element ITEM_TEXT is only beeing called if T166p is properly filled, since it doesnt make sense to call a text without textname e.G..

Additionally in your form you have a check for the TDID, so the include will only get triggered when TDID is not F07.

having to guess i´d say your customizing for document texts in quality system is different from the one in your development system.

Answers (2)

Answers (2)

aidan_black
Active Contributor
0 Kudos

HI,

You should activate the sapscript debugger from SE71(with your form name). Then reproduce the problem and step throught the saspcript to see what happens that the line is not executed.

Regards,

Aidan

Former Member
0 Kudos

Hi!

You include will run, only if the ITEM_TEXT label is called from your printer program, with the CALL 'WRITE_FORM' fm statement.

Debug your printer program always, forget debugging the SAPScript, it's just a waste of time.

You might search after type bugs in your SAPScript also, Maybe you forget an ENDIF, after an IF, or you didn't finis a variable with &, or a string with '.

There could be many problems, using SAPsripts are really Slow And Painful.

Regards

Tamá