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 SAVE_TEXT

Former Member
0 Likes
1,255

you have an example code for the fm SAVE_TEXT to modify the texts containing the delivery?

1 ACCEPTED SOLUTION
Read only

former_member1716
Active Contributor
1,120

nick.reyan

Try the Below Code:

        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            header          = HEADER
            savemode_direct = ABAP_TRUE
          TABLES
            lines           = LINES
          EXCEPTIONS
            id              = 1
            language        = 2
            name            = 3
            object          = 4
            OTHERS          = 5.

To brief you on few parameters of these FMs are given below:

Text Id:Which will be differing for each transaction level texts.

Text Object:This parameter also plays a similar role just like Text Id.

Text name :In Case of standard texts the text name will be the name which we used in creating a standard texts, in other transaction oriented texts it will be either concatenation of Client and document number or concatenation of Client and few other fields which can be found out through the view relating to that particular transaction.

Language:This is the field where we enter our desired language keys maintained for each language. The language Key for each language can be obtained from the data base transparent table T002.

LINES Table should hold the text that you want to update.

In any standard Texts you can get the above details by navigating to GO TO-->HEADER.

Regards!

4 REPLIES 4
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,120

What type of text, what kind of delivery object?

Read only

former_member1716
Active Contributor
1,121

nick.reyan

Try the Below Code:

        CALL FUNCTION 'SAVE_TEXT'
          EXPORTING
            header          = HEADER
            savemode_direct = ABAP_TRUE
          TABLES
            lines           = LINES
          EXCEPTIONS
            id              = 1
            language        = 2
            name            = 3
            object          = 4
            OTHERS          = 5.

To brief you on few parameters of these FMs are given below:

Text Id:Which will be differing for each transaction level texts.

Text Object:This parameter also plays a similar role just like Text Id.

Text name :In Case of standard texts the text name will be the name which we used in creating a standard texts, in other transaction oriented texts it will be either concatenation of Client and document number or concatenation of Client and few other fields which can be found out through the view relating to that particular transaction.

Language:This is the field where we enter our desired language keys maintained for each language. The language Key for each language can be obtained from the data base transparent table T002.

LINES Table should hold the text that you want to update.

In any standard Texts you can get the above details by navigating to GO TO-->HEADER.

Regards!

Read only

VeselinaPeykova
Active Contributor
1,120

I am not a developer, but why don't you simply place a break point in the FM and then add a text via the corresponding standard transaction? In this way you will see how SAP does it... at least this is the approach that I frequently use when I have to prepare development specifications.

You may need the help of a functional consultant to understand what kind of texts and textids you are expected to modify. Depending on the kind of texts the header parameter will be filled differently in the case of SD deliveries ( VBBK vs VBBP for example).

Read only

NTeunckens
Active Contributor
0 Likes
1,120

Please do a Search on the web "SAP Wiki SAVE_TEXT" and you'll arrive at various SAP-Wiki Codesamples that are publicly accessible ...