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

FM CREATE_TEXT.

Former Member
0 Likes
10,918

Hi all,

how does the FM CREATE_TEXT , can some one help me in detail, what are the input parmeters that we have to give , and in specific input parameters FNAME , FOBJECT

Thanks in advance

Kishore Kumar Yerra.

10 REPLIES 10
Read only

Former Member
0 Likes
4,246

Hi Yerra ,

check this table for OBject <b>TTXG</b>and Fname is nothing but Object for which u are maintaining text,

like FNAME = MATNR.

sample code for PO text.

<b>Text Name 4500099643

Language EN

Text ID F01 Header text

Text object EKKO Purchasing doc. header texts </b>

Regards

prabhu

Read only

Former Member
0 Likes
4,246

Hi, the FM is used to create long text entries.. as u can c in transactions like ME22N. ( material Po text, Header text,etc..)..just go to the sapscript editor of one of these texts ( a button just below the long text Box ), there in the sapscript editor, goto>header>u ll c the 4 parameters ( TDNAME, TDOBJECT....) that u need to pass to the FM CREATE_TEXT to save the text in that particular place...

hope it helps...

Read only

Former Member
0 Likes
4,246

I could find this code in net. Just go through that...

FUNCTION zcc_updateorder_text. Baically those 2 parameters are TDNAME, TDOBJECT of the Standard text which you can view in So10. Also in SCRIPT EDITER ==> goto-->header

Rgds,

TM


*"----------------------------------------------------------------------
*"*"Interfase local
*" IMPORTING
*" REFERENCE(AUFNR) TYPE AUFK-AUFNR
*"----------------------------------------------------------------------
  DATA: p_orden TYPE aufk-aufnr,
  p_tdname TYPE thead-tdname,
  p_tdid TYPE thead-tdid,
  p_tdobject TYPE thead-tdobject,
  p_header TYPE thead,
  it_tline TYPE STANDARD TABLE OF tline
  WITH HEADER LINE,
  p_function.



  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
       EXPORTING
            input  = aufnr
       IMPORTING
            output = p_orden.

  CONCATENATE sy-mandt
  p_orden
  INTO p_tdname.

  it_tline-tdline = 'Some Text...'.
  APPEND it_tline.

  p_tdid = 'KOPF'.
  p_tdobject = 'AUFK'.

  CALL FUNCTION 'CREATE_TEXT'
       EXPORTING
            fid         = p_tdid
            flanguage   = sy-langu
            fname       = p_tdname
            fobject     = p_tdobject
            save_direct = 'X'
            fformat     = '*'
       TABLES
            flines      = it_tline
       EXCEPTIONS
            no_init     = 1
            no_save     = 2
            OTHERS      = 3.

ENDFUNCTION.

Read only

Former Member
0 Likes
4,246

hai kishore

this function module used to create text

for ex : In va01 you have header text to create the text

use this function module , this will directly update the db table

CALL FUNCTION 'CREATE_TEXT'

EXPORTING

FID = id

FLANGUAGE = 'E'

FNAME = sale order no

FOBJECT = 'VBBK' or 'VBBP'

SAVE_DIRECT = 'X'

FFORMAT = '*'

TABLES

FLINES = t_line

EXCEPTIONS

NO_INIT = 1

NO_SAVE = 2

OTHERS = 3

sale order texts are stored in stxh (header text) and stxl tables

regards

vijay

Read only

Former Member
0 Likes
4,246

Hi Kishore,

For the CREATE_TEXT fn module, the parameters essential are TDID, TDOBJECT, TDNAME and TDSPRAS.

Mostly the TDOBJECT would be VBBK.

TDID can be a custom or a standard one.

TDSPRAS for English = "E"

TDNAME will be the key reference like Inquiry number or Quotation or the value under which you store.

Once you create a value, the value gets updated in the <b>STXH</b> table.

Reward if helpful.

Regards,

Tushar

Read only

Former Member
0 Likes
4,246

Hi Kishore,

If you want to create material sales text then

these are required parameters for the material sales text

TDID = '0001'

TDOBJECT = 'MVKE'

TDNAME = '000000000000001130100001'

TDSPARS = 'EN'

now TDNAME is part of materialplantdistribution channel

000000000000001130 <<<- material

1000 <<<<<- plant

01<<<<<-dist channel

and more over you can check all the parameters in the table STXH.

and also don't forget to use FM COMMIT_TEXT after CREATE_TEXT FM.

Regards

vijay

Regards

vijay

Read only

0 Likes
4,246

Hi Vijay and all,

as you have explained the split of TDNAME of MVKE , how do i find out the same for 'VBKA'.

-


TDOBJECT = 'MVKE'

TDNAME = '000000000000001130100001'

TDSPARS = 'EN'

now TDNAME is part of materialplantdistribution channel

000000000000001130 <<<- material

1000 <<<<<- plant

01<<<<<-dist channel

-


Thanks in Advance

Kishore Kumar Yerra.

Read only

0 Likes
4,246

Hi Kishore,

in case of SALES ORDER

for header:-

TDOBJECT = 'VBBK'

TDNAME = 'SALESORDER' ."it should be with padded zeroes

TDSPARS = 'EN'

TDID = 'CHECKIN STXH table'."it is dependent on config

for item:-

TDOBJECT = 'VBBP'

TDNAME = 'SALESORDER+ITEM' ."it should be with padded zeroes

TDSPARS = 'EN'

TDID = 'CHECKIN STXH table'."it is dependent on config

Regards

vijay

Read only

Former Member
0 Likes
4,246

in case of VBKA, the Textname is 'Order Number' ,ie VBELN field.

Read only

0 Likes
4,246

Hi All ,

But what if the object is being created and number is not generated yet. For example in my case of equipment in tcode IE01 , equipment no. is yet not generated and I am having a temporary equipment no. In that case which FM should be used and with what parameters . I have tried SAVE_TEXT also but it doesn't work .