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

smartforms-item text

Former Member
0 Likes
1,053

Hi exports,

I want to add item text for my form.

The condition is Read_text or internal text structure where id = vbbp language= nast-langu.Name = a concatenated vbak-vbeln and vbap-posnr abd object = zcri.

I am call function module Read_text in editor.I am getting error that language and id are not available.

Please give me suggestions.

thanks

11 REPLIES 11
Read only

Former Member
0 Likes
1,007

Hi ,

You can create a Text node of type <b>Include Text</b>, passing Text Name, Text Object and TextID and language. If required check the checkbox 'No error if no text exists'.

You will not have any problem in displaying data...

Regards,

Raj

Read only

Former Member
0 Likes
1,007

declare v_text type char16 globally.

create a program name node to concatenate

vbak-vbeln and vbap-posnr.

concatenate vbak-vbeln vbap-posnr into v_text.

You can use the include type in the text node.

Text name = &v_text&

Text Object = 'ZCRI'

Text id = 'VBBP'

Language = &nast-langu&

<b>Make sure you check the check box No errors if no text exists.</b>

Read only

0 Likes
1,007

I wrote program like below.

REPORT ZTEST_RAG.

DATA: G_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE,

G_ID LIKE THEAD-TDID,

G_LANG LIKE THEAD-TDSPRAS,

G_NAME LIKE THEAD-TDNAME,

G_OBJECT LIKE THEAD-TDOBJECT.

DATA: GT_VBAP LIKE VBAP.

DATA: G_VBELN(10) TYPE N,

G_POSNR(6) TYPE N.

PARAMETER: P_VBELN TYPE VBAK-VBELN.

SELECT SINGLE * FROM VBAP INTO GT_VBAP

WHERE VBELN = P_VBELN.

G_VBELN = GT_VBAP-VBELN.

G_POSNR = GT_VBAP-POSNR.

G_ID = 'VBBP'.

*G_LANG = 'E'.

G_OBJECT = 'ZCRI'.

CONCATENATE G_VBELN G_POSNR INTO G_NAME.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = G_ID

language = G_LANG

name = G_NAME

object = G_OBJECT

tables

lines = G_LINES.

But I am not getting any text.

Please help me

Read only

0 Likes
1,007

If I call this report name in my text name.I am getting error ztest_rag is unknown.

plz give me some suggestion.

Read only

0 Likes
1,007

do not remove the exceptions, place the same and uncomment it,as it woud be helpful in identifying the error.

DATA: G_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE,

G_ID LIKE THEAD-TDID,

G_LANG LIKE THEAD-TDSPRAS,

G_NAME LIKE THEAD-TDNAME,

G_OBJECT LIKE THEAD-TDOBJECT.

DATA: GT_VBAP LIKE VBAP.

DATA: G_VBELN(10) TYPE N,

G_POSNR(6) TYPE N.

PARAMETER: P_VBELN TYPE VBAK-VBELN.

SELECT SINGLE * FROM VBAP INTO GT_VBAP

WHERE VBELN = P_VBELN.

G_VBELN = GT_VBAP-VBELN.

G_POSNR = GT_VBAP-POSNR.

G_ID = 'VBBP'.

*G_LANG = 'E'.

G_OBJECT = 'ZCRI'.

CONCATENATE G_VBELN G_POSNR INTO G_NAME.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = G_ID

language = G_LANG

name = G_NAME

object = G_OBJECT

tables

lines = G_LINES

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8.

Message was edited by: Sid

Read only

0 Likes
1,007

If I execute that I am not getting any results I mean p_vbeln I am doing debug but values are not possing to g_name.

Thanks

Read only

0 Likes
1,007

check sy-subrc after the select statment. I think the select statement is failing.

Read only

0 Likes
1,007

REPORT ZTEST_RAG.

DATA: G_LINES LIKE TLINE OCCURS 0 WITH HEADER LINE,

G_ID LIKE THEAD-TDID,

G_LANG LIKE THEAD-TDSPRAS,

G_NAME LIKE THEAD-TDNAME,

G_OBJECT LIKE THEAD-TDOBJECT.

DATA: GT_VBAP LIKE VBAP.

DATA: G_VBELN(10) TYPE N,

G_POSNR(6) TYPE N.

PARAMETER: P_VBELN TYPE VBAK-VBELN.

SELECT SINGLE * FROM VBAP INTO GT_VBAP

WHERE VBELN = P_VBELN.

<b>IF SY-SUBRC = 0.</b>
G_VBELN = GT_VBAP-VBELN.
G_POSNR = GT_VBAP-POSNR.
G_ID = 'VBBP'.
*G_LANG = 'E'.
G_OBJECT = 'ZCRI'.
CONCATENATE G_VBELN G_POSNR INTO G_NAME.

CALL FUNCTION 'READ_TEXT'
EXPORTING
* CLIENT = SY-MANDT
id = G_ID
language = G_LANG
name = G_NAME
object = G_OBJECT
tables
lines = G_LINES.
<b>
ENDIF.</b>

Check SY-SUBRC value after that SELECT...

Regards

Srikanth

Message was edited by: Srikanth Kidambi

Read only

0 Likes
1,007

Hi srikanth,

I tried with sy-subrc.when i am doing debug values r passing except for g_name but in output its saying text id zcri is invalid.

how can i define I mean, shall i define in include text or in text module?

Read only

0 Likes
1,007

g_name is not being populated because select statement is failing. Do not remove the exeptions and uncomment the same. This would give you the correct message if there is any error in Read_text funciton module.

Have you checked the invoice doument in VF03 transaction for the corresponding text id at item level.

Is text id ZCRI created in customization?

Read only

Former Member
0 Likes
1,007

Hi

Try declaring all as character fields of sufficient length...

VBELN VBELN_VA CHAR 10 Sales Document

POSNR POSNR_VA NUMC 6 Sales Document Item

Regards,

Raj