Application Development 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: 

Header shipping instructions paragraph issue

Former Member
0 Kudos

Hi ,

   I have to print the shipping instructions in sales order to invoice. In header shipping instructions contains two paragraphs. But when I am passing this to invoice it is printing first paragraph###Second Paragraph. I mean at the end of first paragraph text it is printing ### and then second paragraph in same line ..

Ex: We are working in SAPABAP.(First paragraph) 

Discussion on shipping instructions(Second paragraph)

Now it is displaying as We are working in ABAP###Discussion on shipping instructions.

I want this in two paragraphs. Can anyone help me?

14 REPLIES 14

thanga_prakash
Active Contributor
0 Kudos

Hello Chaitra,

What do you mean by printing shipping instructions? Is there any output configured to print those instructions? If yes what is the output type and the program, sapscript or smartform or adobe form associated with it?

It can be a design problem in the form.

All those texts are stored in Standard texts, and it is read using function module "READ_TEXT".

The internal table output from the function module will have the lines of shipping instruction, cross check the internal table and make it as two entries in the internal table so that it will print it as two different paragraphs.

0 Kudos

Hi Prakash,

   Thanks for your  reply.I am calling READ_TEXT FM in driver program and storing this shipping instructions in a internal table and passing this text from internal table to sapscript to print it in invoice.

But in debugging in internal table also i am getting same data with ###.

One more thing in salesorder header->text->shipping instructions->i am getting in two paragraphs.

but when i double click on that text i saw text as how i am getting output now,i mean first paragraph ### and second paragraph.

If you want my code please tell me.

0 Kudos

Please paste the screen shot

0 Kudos

Code is as follows:

In Driver program

CALL_FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'SHIPPING_INSTRUCTIONS'

In sap script

Include &vbdka-tdname& object vbbk id 0050 Paragraph SA.

Before I tried using READ_TEXT and collect that DTEXT to internal table as I said before, but I am not getting the output in two paragraphs.so I replaced it with this simple code.

0 Kudos

I'm confused - so after replacing it with INCLUDE it's still not printing two paragraphs?

0 Kudos

NO.It is not showing two paragraphs after using INCLUDE

0 Kudos

Well, if you have entered the text directly in SAP (vs. copy-pasting it from somewhere, which could cause such issue) and it's not printed correctly when you use INCLUDE then I'm afraid you may need to open an incident with SAP.

We don't use SAPScript for sales documents (Smartforms have been available for over 10 years already) but never had such issues in any other places where SAPScript is still used.

Jelena
Active Contributor
0 Kudos

You don't need to use READ_TEXT in the driver program for that. Text can be included directly in SAPScript, Google -> "include text SAPSCRIPT site:sap.com"

Usually hash sign (#) represents something unrecognizable and such issues tend to occur when the text is copy-pasted from somewhere.

Former Member
0 Kudos

Hi Jelena ,

                Thank you for ur response.Ya,I just called function 'write_form' in driver program and I used include in script.

But my problem is it is taking with ###.I have two paragraphs in shipping instructions.

when I open my sales order->header->text->shipping instructions I can see that shipping instructions in two paragraphs.

But when I double click on that shipping instructions it is showing firstparagraph###second paragraph in same line(I think that ### is used to indicate new paragraph).

But in my invoice it is showing firstparagraph###second paragraph. I want to remove that ### and display the text after ### in second paragraph.

EX: After using this service please logout and close the window.(1stparagraph).

Please read the terms and conditions before you login and tick it.(2nd paragraph).

(the way it is showing in header shipping instructions)

After double click on header shipping instructions text it is showing as below.###Please read the terms and conditions before you login and tick it.

what I have to do to display it the way it is displaying in header text.(I mean in two paragraphs)

Former Member
0 Kudos

Hi Chaithra Reddy,

                          You can use SO10 transaction for including text.

                        Go to SO10 transaction and create text objects.Type shipping instruction in your text object.Finally include text in your text elements in window which you want to display.

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

[NEW-PARAGRAPH np]

here you can use new paragraph.

0 Kudos

That shipping instructions is already given in sales order by functional people

Former Member
0 Kudos

Thnk u all for ur quick responses

0 Kudos

Hi Chaitra,

I do not know your problem is solved or not.

But in case of your future also for your information.

You can use the function module READ_TEXT.
and get he value and make the appropriate changes on the value.

EX:

The text will be captured as "First Paragraph #### Second Paragraph"

Split the value at #### into two variable and pass those two into your header as line by line.

First Paragraph

Second Paragraph

Thanks,

Sivanadh.

0 Kudos

i tried a logic using split and replace all occurences to split the sentence at ### and remove that ###.But it is not working fine.

Thank u for your response.