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

smartform

Former Member
0 Likes
1,194

Hi,

My requirement is 'Change the invoice print program to print the u201CCustomeru2019s PO #u201D in the body of invoice. The Customeru2019s PO # is stored in header Invoice text with text ID u201CZ020u201D & text object VBBK'.

Can anyone tell me how to get the text from text id "Z020" and text object VBBK?

Regards,

Hema

1 ACCEPTED SOLUTION
Read only

valter_oliveira
Active Contributor
0 Likes
1,175

Hello.

In Smartforms, you don't need to use READ TEXT FM.

With cursor in your window, just do this:

right mouse click->Create->Text.

Then, change it's type do I (Include Text) -> Say yes to the popup.

Then the fields must be filled like:

Text name: a variable with document number

Text object: VBBK

Text ID:Z020

Language: Your language

Mark no error if no text exists.

Best regards.

Valter Oliveira.

10 REPLIES 10
Read only

Former Member
0 Likes
1,175

Hi,

Use FM READ_TEXT.

Read only

Former Member
0 Likes
1,175

use text object rather then text element in word editor and give those details...

Read only

valter_oliveira
Active Contributor
0 Likes
1,176

Hello.

In Smartforms, you don't need to use READ TEXT FM.

With cursor in your window, just do this:

right mouse click->Create->Text.

Then, change it's type do I (Include Text) -> Say yes to the popup.

Then the fields must be filled like:

Text name: a variable with document number

Text object: VBBK

Text ID:Z020

Language: Your language

Mark no error if no text exists.

Best regards.

Valter Oliveira.

Read only

0 Likes
1,175

Hi,

Can you tell me how to check the customer PO # from text ID "Z020" and text object VBBK.

Regards,

Hema

Read only

0 Likes
1,175

Hi,

If you wanted to display the entire text object you would create an include text in your smartform, as already suggested.

If you want to take only a part of the text object, you would need to call READ_TEXT and find the part of the text that held the PO number. As already suggested.

However, as text ID Z020 is not a standard delivered text object, only you will know where the PO number is in the text and which of the above options is best for your requirement.

Regards,

Nick

Read only

Former Member
0 Likes
1,175

HI

use following code.

LOOP AT it_id INTO wa_id.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = v_id

language = wa_ekko-spras

name = v_name

object = v_object_ekko

  • ARCHIVE_HANDLE = 0

local_cat = ' '

IMPORTING

header = header

TABLES

lines = it_lines

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

Endloop.

Regards.

jay

Read only

Former Member
0 Likes
1,175

HI

use following code.

LOOP AT it_id INTO wa_id.

CALL FUNCTION 'READ_TEXT'

EXPORTING

client = sy-mandt

id = v_id

language = wa_ekko-spras

name = v_name

object = v_object_ekko

  • ARCHIVE_HANDLE = 0

local_cat = ' '

IMPORTING

header = header

TABLES

lines = it_lines

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

Endloop.

Regards.

jay

Read only

Former Member
0 Likes
1,175

Hi,

In the text under general attributes you will have text type change it to include text in place of text element,Then give those specifications like text name text object from the header.

Regards,

Himanshu Verma

Read only

Former Member
0 Likes
1,175

Hi Hema,

This is not related for this query.But I coudnot find any way to contact you.

we need the coding for sending smartform through mail.(external send)

could you please guide us.

we struck here.

Thanks,

Krishna.

Read only

0 Likes
1,175

Hi Krishna,

I have send the code for sending smartform through email to your email id.Please check it.

Regards,

Hema