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

issue with smartform address printing

Former Member
0 Likes
1,987

Hi,

I am developing a smartform for  printing labels and the sold from and ship to addresses are maintained as the standard text in SO10 . I want to print those addresses in the form.

I know we can use the text type as Include text  and input the SO10  text name which prints the data in the SO10 txt, but my question is I want to print as the below way.

SOLD FROM:   ABC consulting

                          crocin street

                           hyderabad.

                            40018999

The approach I am using is get the SO10 text in driver prog and pass to form for this I need to create a dictionary type which can hold 5 variables of 255 char each. I dont want to folow this approach.

Please suggest best way for this.

Thanks,

RG

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,831

Hi,

You create a text node in the smartform and mention Text name, Text object, Text id, Language.

System will display in the same order how the address maintained in SO10. Maintain the way you want in SO10.

Regards,

Athi

Hi,

I am developing a smartform for  printing labels and the sold from and ship to addresses are maintained as the standard text in SO10 . I want to print those addresses in the form.

I know we can use the text type as Include text  and input the SO10  text name which prints the data in the SO10 txt, but my question is I want to print as the below way.

SOLD FROM:   ABC consulting

                          crocin street

                           hyderabad.

                            40018999

The approach I am using is get the SO10 text in driver prog and pass to form for this I need to create a dictionary type which can hold 5 variables of 255 char each. I dont want to folow this approach.

Please suggest best way for this.

Thanks,

RG

9 REPLIES 9
Read only

rajkumarnarasimman
Active Contributor
0 Likes
1,831

Hi Ramya,

Alternate way, system is reading the standard text in driver program using READ_TEXT function module, the values is stored in internal table(LINES).

Move the internal table values into smartform. Use table concept/template inside loop in smartform to show address.

Hope it will work.

Regards

Rajkumar Narasimman

Read only

0 Likes
1,831

Hi Rajkumar,

Thanks for your reply.

Yes I am reading the standard text in driver prog,  for passing the SO10 text  from driver prog to smartform I need to create a custom structure type in SE11 which I dont want to use, I want suggestion for if the include text can be used and can be formatted.

Thanks,

RG

Read only

0 Likes
1,831

Hi Ramya,

Since we are reading the Standard Text using READ_TEXT, we have the existing structure TLINE in standard, so custom structure is not required to create in SE11.

Can you please show the screenshot how user is maintaining the data in SO10 by functional consultant and how the data need to be displayed.


SOLD FROM:   ABC consulting

                          crocin street

                           hyderabad.

                            40018999

As per the above text, what I understood is SOLD FROM:  text need be concatenated in first line and space required from the second line.

Also kindly share the smartform screenshot.

Regards

Rajkumar Narasimman

Read only

Former Member
0 Likes
1,832

Hi,

You create a text node in the smartform and mention Text name, Text object, Text id, Language.

System will display in the same order how the address maintained in SO10. Maintain the way you want in SO10.

Regards,

Athi

Read only

0 Likes
1,831

Hi Athimoolam ,

Thanks for ur reply.

Sorry the SO10 text is maintained by functional consultant an he would not be aware of the smartstyle and the format to maintain . So I cannot maintain the way required in SO10.

Thanks,

RG

Read only

0 Likes
1,831

Hi,

If the formatting needs of text are trivial (like give a paragraph format to each line) I'd be aligning the address block as Jelena suggested (or using a table node, if the height needs to vary) and, within a cell, outputting it using dynamic text node.

Or, one could maintain Sapscript Style containing Paragraph/Character formats corresponding to Smartform style used for output. If there is "elaborate" formatting and/or the user needs to control formatting, that would be actually preferable.

Cheers

Jānis

Message was edited by: Jānis B

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,831

I'm confused - why can't you use the include type text node if you know about it? If you just need to add "sold from" part (you might want to be clear what the question actually is) then why not create a template with this text in one cell and the rest in another?

Read only

Chintu6august
Contributor
0 Likes
1,831

Hi,

create an internal table, in global declaration of the form and using program lines call fm READ_TEXT and arrange the address as per your requirement into variable or internal table,

thanks!!

Read only

0 Likes
1,831

Chintu adi wrote:

create an internal table, in global declaration of the form and using program lines call fm READ_TEXT and arrange the address as per your requirement into variable or internal table,

The same exact suggestion has already been given above, is there any specific reason it needs to be repeated?

And it's not a good solution anyway. Smartforms are very well capable of printing the standard texts if we just give them the text ID and other options. There is no need whatsoever to add more global variables and write ABAP for such trivial things. There could be exceptions, of course, but I worked on very many Smartforms over the years and number of times I had to resort to READ_TEXT is exactly 0. There is nothing in the original post that would indicate any special requirements, it's rather straightforward (unless OP missed something).

@OP - there have been sufficient options given already, so kindly review and close the discussion. Also you might want to check your profile and close some old open questions as well. See this blog.

Thank you.