cancel
Showing results for 
Search instead for 
Did you mean: 

To Include Standard Text in TEXT Field of SMARTFORM

Former Member
0 Kudos

Hi,

I have a requirement to include a Standard text inside a TEXT field. The name of standard text is ZSD_CMR_&VSTEL&_STATISTICAL where for VSTEL we should put the respective work area field like ZSD_CMR_&W_LIKP-VSTEL&_STATISTICAL .

But while executing the Form its giving Error that STD text does not exist.

The Requirment is like - shipping point (LIKP_VSTEL) of the delivery to identify the standard text. So, if a doucument for a delivery for shipping point 3114 is printed, it should come with the contents of ZSD_CMR_3114 STATISTICAL In case the shipping point is 3112 it shoukd be ZSDCMR_3112 _STATISTICAL.

Can you please let me know how to include Std Text inside the TEXT, I mean SYNTAX .

Regards

Avi

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Avi,

Lets take the example the standard text <b>'ZSD_CMR_3114 _STATISTICAL'</b> then with this standard text get the TDOBJECT,TDNAME,TDID and TDPRAS from <b>STXH</b> table.

In the Smartform, goto <b>TEXT->General Attributes Tab</b>.

Select <b>Type</b> to be I<b>nclude Text</b> from the drop down list.

Then give the Text Name, Text Object, Text ID and Language.

Your Standard Text whcih you maintain in S010 will be displayed in the smartform window.

Regards,

Tushar

Message was edited by:

Tushar Marshall Dass

Former Member
0 Kudos

Hi!

You can give in the text mane only a complete variant name, for example: &text_name&.

You have to write an abap coding, before the text, and determine the exact name of the text element, somehow like this:

CONCATENATE 'ZSD_CMR_' GV_VSTEL '_STATISTICAL' INTO text_name.

Regards

Tamá

Former Member
0 Kudos

Hi

you can use following function module for std text printing

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = 'ZREM'

LANGUAGE = 'E'

NAME = NAME

OBJECT = 'VBBK'

TABLES

LINES = GT_LINES.

its my exampls u can change variables as per your requirement.

cheers,

Pritesh

Former Member
0 Kudos

Use the READ_TEXT FM to read the text and store it in some workarea.

You can then put this workarea in your text field.

for reading the text use CONCATENATE command to concatenate the text name with variable fields and pass them to FM READ_TEXT.

Make sure you have the Standard text already created.

Thanks.