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

Message with text element

Former Member
0 Likes
18,289

Hi all.

I want to display one warning message in the code bolow with the text element created .

text enetered in the text element 002- "carrier partmer function not found for delivery &i_xvttp_tab-vbeln ."

(will it enter the delivery no)

code :

DATA: BEGIN OF l_t_vlkpa OCCURS 0,

kunde LIKE vlkpa-kunde,

vbeln LIKE i_xvttp_tab-vbeln,

parvw LIKE vlkpa-parvw,

END OF l_t_vlkpa.

CONSTANTS c_pfunc TYPE char2 VALUE 'SP'.

IF i_xvttp_tab[] IS NOT INITIAL.

SELECT kunde vbeln parvw INTO TABLE l_t_vlkpa

FROM vlkpa

FOR ALL ENTRIES IN i_xvttp_tab

WHERE vbeln = i_xvttp_tab-vbeln AND

parvw = c_pfunc.

LOOP AT i_xvttp_tab.

READ TABLE l_t_vlkpa WITH KEY vbeln = i_xvttp_tab-vbeln.

IF sy-subrc = 0.

READ TABLE i_xvttk_tab WITH KEY tknum = i_xvttp_tab-tknum.

IF sy-subrc = 0.

i_xvttk_tab-tdlnr = l_t_vlkpa-kunde.

MODIFY i_xvttk_tab INDEX sy-tabix.

ENDIF.

ELSE.

*<b> message Text-002 TYPE 'W'.

Message W002.

*message I002.

  • MESSAGE 'Carrier partner function not found.' TYPE 'W'.</b>

(want to remove all this and just enter a warning message with text element showing the delivery number,)

ENDIF.

ENDLOOP.

ENDIF.

Answer will be rewarded.

Thanks

6 REPLIES 6
Read only

Former Member
0 Likes
6,973

message w000 with text-001 'i_xvttp_tab-vbeln'.

Read only

Former Member
0 Likes
6,973

Hi,

In the text you need to write ''Carrier partner function not found &'

In the Program , write this ....

message w000 with text-001 'i_xvttp_tab-vbeln'.

Regards

Sudheer

Read only

Former Member
0 Likes
6,973

Cod e like this

message w000 with text-002 i_xvttp_tab-vbeln .

Hope this solves ur problem.

Read only

Former Member
0 Likes
6,973

Hi

It is not advisible to hard code the message.

While transporting it gives error

create a text element

call the same in your message with the itab field and the message type

Thanks

Shiva

Read only

Former Member
0 Likes
6,973

MESSAGE W002(XX) with TEXT-002. " Change XX to ur Message Class

Read only

Former Member
0 Likes
6,973

Create a message in a message class using transaction SE91

Say the message class is ZZ

Create a message no 000 in it. Maintain the text as ''Carrier partner function not found &'

In the Program , write this ....

message w000(ZZ) with i_xvttp_tab-vbeln.