cancel
Showing results for 
Search instead for 
Did you mean: 

Nested Included Text Modules

Former Member
0 Kudos

From my BC460 SAPScript course notes, I see that u201CYou may also include text modules in other text modules.u201D

Now, I have a SAPScript form which has a text element. Within that text element, I have an include:

/: INCLUDE &REC_KEY& OBJECT &TX_OBJ& ID &TX_ID&

This works well. But when I try to put an include within the above text module, either:

/: INCLUDE &REC_KEY_N& OBJECT &TX_OBJ& ID &TX_ID&

or

/: INCLUDE '9001B' OBJECT 'Z9100' ID 'NTCE'

the included text module is not displayed.

Can anyone see what I am doing wrong, or am I misunderstanding the documentation?

Thanks

Rob

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Yes..you are correct..in your case you have to give the entries..

OBJECT - Z9100

ID - NTCE

INCLUDE OBJECT - Z9100

INCLUDE ID - NTCE

In spro...it is in the following path..

REAL ESTATE -> TOOLS -> CENTRAL CORRESPONDENCE MAINTENANCE -> TEXTS TO BE INCLUDED.

Not sure why it is in real estate? :-)..But please check the documentation..

Thanks

Naren

Former Member
0 Kudos

@Naimesh and @Naren - OK let me try this out and get back.

Thanks

Rob

Former Member
0 Kudos

@Naimesh - the symbol check was OK

@Naren - Bingo! How in the world did you know that? I checked my notes, searched SDN and didn't see anything about allowing texts to be included.

And I don't really see any reason for this. Why would anyone want to disallow texts from being included unless specifically allowed. I would think it would be the other way around. And I do find it odd where SAP put it in the IMG.

It tends to confirm my suspicion that Germany is trying to continue fighting the wars through SAP

Answers (10)

Answers (10)

Former Member
0 Kudos

found it in debugging...anyways..it works...very good..:-)

Thanks

Naren

Former Member
0 Kudos

OK - for completeness sake, I'll tell you exactly what I did.

From the IMG, I took the path suggested by Naren and got to "SAPScript: who with whom" screen. I entered the values I suggested above and did not check any of the checkboxes. My reading of the documentation suggests that I should have checked "all objects" and "all IDs" but did not because I wanted to test it the way I said I was going to. Since it worked, I didn't go back to experiment. Saving it raised a transport.

Thanks to all who helped.

Rob

ThomasZloch
Active Contributor
0 Kudos

As a peaceful signal, North Americans may maintain TTXIN directly through SM30 without having to go through SPRO.

Former Member
0 Kudos

Well, it would be more peaceful if SAP would at least let us know that it needs to be maintained.

Rob

naimesh_patel
Active Contributor
0 Kudos

It seems that, when you include the text in the another text, it would not recognize the Variables.


/: INCLUDE &REC_KEY_N& OBJECT &TX_OBJ& ID &TX_ID&

Can you perform the check on the main text?

Text > Check > Select Symbol Check

Regards,

Naimesh Patel

Former Member
0 Kudos

Hi Rob,

I tested the advice of Naren in my SO10.

Select text. and expand include.

So it is strange. It works directly from SAPSCRIPT, but the expand from so10 doesnot pick it up

So the problem is probably not in your sapscript, but i have no bloody idea where it is.

Very interesting problem, but i cannot solve it from here. I am sorry.

Gr., Frank

Former Member
0 Kudos

Hi Rob,

Did you try maintaining the entry in the table TTXIN as I mentioned in my previous reply? Please let me know

Thanks

Naren

Former Member
0 Kudos

Hi Rob,

I Did a little debugging to see why it is not working..

I believe it is because of the entry missing in the table TTXIN.

You have to make an entry for the source object and ID and the include object and Include ID..

Go to SM30 ....and here you can maintain the entry...

Check the function module CHECK_INCLUDE_ALLOWED...subroutine FORM CHECK_INCLUDE_ALLOWED..

I tried and it worked for me..

I entered..TEXT ST VBBK 0002

Please try this..

Thanks

Naren

Former Member
0 Kudos

@Naren - I tried running this FM with the values you used and it returned a space in INCLUDE_ALLOWED. But there are only 17 entries in this table in our development system, so I tried it again with:

DOKU TA TEXT ST

and it returned an 'X', so this looks promising. But before I update this table, I'd like to confirm what you are suggesting. I should add a line like:

OBJECT - Z9100

ID - NTCE

INCLUDE OBJECT - Z9100

INCLUDE ID - NTCE

Do you know if this is documented anywhere? In the IMG?

Thanks

Rob

Former Member
0 Kudos

Hi,

Increase the window size of the Page, if not possible reduce the font size of text to be printed

using the Paragraph and Character Formats.

Regards

Venkata

Former Member
0 Kudos

Hi,

I also tested in a sapscript now. It really works great.

I tested it 4 includes deep.

Try something easy as i did and see yourself it works.

What happens if you call that inner include directly from your sapscript.

Gr., Frank

Former Member
0 Kudos

@Frank - I tried calling it directly from the form using:

/: INCLUDE &REC_KEY_N& OBJECT &TX_OBJ& ID &TX_ID&

and it picked it up ok, so at least I know that the variables are assigned correctly.

@Venkata - I think this is a problem with the texts and not the form.

Thanks

Rob

Former Member
0 Kudos

Hi,

Try this..text editor..place the cursor on the include...

/: INCLUDE '9001B' OBJECT 'Z9100' ID 'NTCE'

Then select the text or press F2.

Then in the menu..EDIT -> SELECTED AREA -> EXPAND INCLUDE.

Check if this works...

Thanks

Naren

Former Member
0 Kudos

@Naren - I get the message "No INCLUDE commands were expanded".

@Frank - I tried with and without quotes - same thing. I haven't yet tried calling it directly, but will give it a try.

Thanks

Rob

Former Member
0 Kudos

Hi,

I tested this form SO10 and it could be nested.

I tried

* Hello 1

/: INCLUDE ZTEST2 OBJECT TEXT ID ST

and it that one another and it that another.

Maybe you have to remove the quotes.

Gr., Frank

Former Member
0 Kudos

increase your window size and then pass your include...

Former Member
0 Kudos

>

> increase your window size and then pass your include...

How would that help?

Rob

Former Member
0 Kudos

goto SE71 and give your script name and goto PAGE windows in change mode double clik the text window and you have down on the same page Window width Window hight ...

Former Member
0 Kudos

I know how to change the window height, but I don't see how that would help. The inner include isn't being picked up.

Rob