cancel
Showing results for 
Search instead for 
Did you mean: 

Long Text printing in SAP SCRIPT

Former Member
0 Kudos

Hi Experts,

I have a requirement of printing long text in sapscript.

There are 15 condition types for each item in sales order and one long text for each condition record.

Each long text has multiple lines i.e. for one long text it may have 2 lines and other may have 1 or 3 lines or etc.

My trials :

I used read_text() function mudule in a routine which is being called from the sap script to get the whole long text which has 5 lines and is stored in an internal table.

Now is there a way to transfer the whole internal_table data as a whole into the script i.e. is there a way to transfer the table from the routine to the sapscript.

Thanks in advance.

kalikonda.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi SAP Experts,

I have requirement to automatic update the Sales Order(VA02) as soon as the some changes(Quantity Change) carried out in the Back Order(V_RA). Actually it is getting updated manually, if I go to Transaction VA02 and goto Conditions tab and click UPDATE button.

But sales order needs to get updated automatically when some changes carried out in Back Order.

Is there any user exit in transaction V_RA or VA02 or any configuration settings which can be used to update the sales order.

Appreciate your prompt response.

Thanks,

Kalikonda.

Former Member
0 Kudos

I asked my user to limit the number of lines, so problem got solved.

Thank you all for your valuable advices/suggestions.

Kalikonda.

Former Member
0 Kudos

Hi ,

in your case the for every text it goes to sub routine and fetches the text for every line item .....

so in order to fit the text in your window or tab .....use offset giveing some characters

for example : print the text like this

Perform xxx from program yyy

using &zzz&

changing &text&

endperform

now you got text .....now the question is how to print the text which is very long ....do like this

see the length of the field you are printing ..if it is 50 ..then divide the text by using offset and print as given below

&text+0(10)&

&text+10(10)&

&text+20(10)&

&text+30(10)&

&text+40(10)&

Hope this solve your problem

thanks

Former Member
0 Kudos

Hi,

I think it is not possible for populating the table data through subroutine call from script. Best thing is use include text as below

/: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p]

[NEW-PARAGRAPH np]

or

as in driver program loop at textlines table and in loop call writeform with text element.

Thnaks,

suma.

Former Member
0 Kudos

hi,

i don't know exactly what you are printing but is it possible to use INCLUDE ??:

/: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p] [NEW-PARAGRAPH np]

Gr. Frank

Former Member
0 Kudos

Hi

In addition of my include solution.

you ofcourse can use a perform statement if you havea maximum of lines which is possible.

like (if you have a maximum of 5 lines

define &line_1& := ' '

define &line_2& := ' '

define &line_3& := ' '

define &line_4& := ' '

define &line_5& := ' '

Perform getsomedate in program abcxyz

using orderno

using itemno

changing &line_1&

changing &line_2&

changing &line_3&

changing &line_4&

changing &line_5&

Endperform

when printing the data

/: if &line_1& NE ' '

IL &line_1&

/: endif

/: if &line_2& NE ' '

IL &line_2&

/: endif

/: if &line_3& NE ' '

IL &line_3&

/: endif

/: if &line_4& NE ' '

IL &line_4&

/: endif

/: if &line_5& NE ' '

IL &line_5&

/: endif

Gr., Frank

Former Member
0 Kudos

Hi Everyone,

I know how to use include and also other things you have suggested and also I know that I can perfectly use the write_form function module if I use print program to print the long text, even I can use the changing parameters in the perform and end perform, but the only thing is the number of lines are not static and the user doesn't know upfront that how many lines he is going to use it may be 1 line or 20 or 30.

However, thank you very much for all of your suggestions and advices.

Thanks,

Kalikonda.

former_member156446
Active Contributor
0 Kudos
loop at itab_text into wa_text.

CALL FUNCTION 'WRITE_FORM'

     and print &wa_text-tdline& "<<<< in layout.

endloop.
Former Member
0 Kudos

Thanks for your reply Jay.

The function module you sent would be helpful when I use the print program to print some thing in the script, but I need this functionality from perform and end perform statements in sapscript.

example in sacpcript as below

Perform getsomedate in program abcxyz

using orderno

using itemno

how to use the next parameter to get the data from the internal table.

Endperform.

Kalikonda.