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: 

Regarding message table

Former Member
0 Kudos

Hi

My Function module returns below Message structure for Warning or error.

Export parameter

ZMESSAGE TYPE ZXXXMESSAGE

Under ZXXXMESSAGE Line data type ZYYYMESSAGE is declared

ZYYYMESSAGE has below fields

-


LINE_NO

MSG_TYPE

MSG_ID

MSG_NO

MSGTEXT

MSG_V1

MSG_V2

MSG_V3

MSG_V4

ERROR_CODE

-


I declared as below and used but not working

L_ITAB_MESSAGE TYPE STANDARD TABLE OF ZXXXMESSAGE,

L_FLD_MESSAGE TYPE ZXXXMESSAGE,

CALL FUNCTION 'ZXXXXXXXXXX'

EXPORTING

F_IP_BUKRS = L_V_BUKRS

IMPORTING

F_EP_MESSAGE = L_ITAB_MESSAGE

CASE sy-subrc.

WHEN 0.

IF L_ITAB_MESSAGE IS NOT INITIAL.

CALL FUNCTION 'MESSAGE_STORE'

EXPORTING

ARBGB = L_SY_MSGID

  • EXCEPTION_IF_NOT_ACTIVE = 'X'

MSGTY = L_ITAB_MESSAGE-MSG_TYPE

MSGV1 = L_ITAB_MESSAGE-MSG_V1

MSGV2 = L_ITAB_MESSAGE-MSG_V2

MSGV3 = L_ITAB_MESSAGE-MSG_V3

MSGV4 = L_ITAB_MESSAGE-MSG_V4

TXTNR = L_ITAB_MESSAGE-MSG_NO

ENDIF.

But it says L_ITAB is not data line type and no header for table.

Can you pls confirm should i have to give L_FLD_MESSAGE in MEssage_store FM?

Regards

chandra

1 ACCEPTED SOLUTION

former_member186055
Active Participant
0 Kudos

Hi

L_ITAB_MESSAGE TYPE STANDARD TABLE OF ZXXXMESSAGE,

This is internal table not work area.

IMPORTING

F_EP_MESSAGE = L_ITAB_MESSAGE

Instead of L_ITAB_MESSAGE use L_FLD_MESSAGE.

Regards,

Surya

14 REPLIES 14

former_member186055
Active Participant
0 Kudos

Hi

L_ITAB_MESSAGE TYPE STANDARD TABLE OF ZXXXMESSAGE,

This is internal table not work area.

IMPORTING

F_EP_MESSAGE = L_ITAB_MESSAGE

Instead of L_ITAB_MESSAGE use L_FLD_MESSAGE.

Regards,

Surya

0 Kudos

Hello surya

thanks for your reply.

I am trying this but says error

"L_FLD_MESSAGE is not header line table so does not have MSGID component.

CALL FUNCTION 'MESSAGE_STORE'

EXPORTING

ARBGB = L_FLD_MESSAGE-MSG_ID

Pls advice.

Regards

Chandra

0 Kudos

Hi chandra,

Declere Work area as

L_FLD_MESSAGE TYPE ZYYYMESSAGE

Regards,

Surya

0 Kudos

Hi,

Please make sure you are passing values to a variable or a field of a work area.

As the message says, the "L_FLD_MESSAGE doesn't have a header line.

You need to declare "L_FLD_MESSAGE as a structure/work area and then pass the value.Or pass it to a variable of type arbgb.

0 Kudos

Hi,

L_FLD_MESSAGE should be of type ZYYYMESSAGE as this is the line type.

Regards,

Archna

0 Kudos

Hi

Sorry guys, I am not able understand..

let me put the code here

DATA

L_ITAB_SIIRESEIKYU TYPE STANDARD TABLE OF ZSXXRESEIKYU,

L_FLD_SIIRESEIKYU TYPE ZSXXRESEIKYU.

L_FLD_SIIRESEIKYU-DUNSNR = 'X'.

L_FLD_SIIRESEIKYU-BUDAT = BKPF-BUDAT.

L_FLD_SIIRESEIKYU-LIFNR = BSEG-LIFNR.

L_FLD_SIIRESEIKYU-XREF1 = BSEG-XREF1.

CALL FUNCTION 'ZXXXXX'

EXPORTING

F_IP_BUKRS = L_V_BUKRS

F_IP_CHK_SIIRESEIKYU = L_ITAB_SIIRESEIKYU

IMPORTING

F_EP_CHK_SIIRESEIKYU = L_ITAB_TIIRESEIKYU

F_EP_MESSAGE = L_ITAB_FIT_MESSAGE

Export parameter

F_IP_CHK_SIIRESEIKYU TYPE ZSIIRESEIKYU(it has Line type ZSXXRESEIKYU with fields DUNSNR<BUDAT,LIFNR,XREF1)

Now my confirmation is below stmt is correct?

F_IP_CHK_SIIRESEIKYU = L_ITAB_SIIRESEIKYU

Its giving dump now in FM but no syntax error.

Pls advice.

0 Kudos

Hi

What is the message when getting DUMP.

Did you appended L_FLD_SIIRESEIKYU to L_ITAB_SIIRESEIKYU. Try

Append L_FLD_SIIRESEIKYU to L_ITAB_SIIRESEIKYU.

Regards,

Surya

0 Kudos

HI

Before appending itgives below error

It says L_FLD_SIIRESEIKYU is a table without header line and therefore has no component called DUNSNR.

Regards

0 Kudos

Hi

L_FLD_SIIRESEIKYU TYPE LINE OF ZSXXRESEIKYU.

Regards,

Surya

0 Kudos

Hi surya

it works with line type

But i cannot append it.

it says L_FLD_SIIRESEIKYU cannot be converted to line type of L_Itab_SHIIRESEIKYU.

Regards

Chandra

0 Kudos

Hi Chandra,

L_ITAB_SIIRESEIKYU TYPE ZSXXRESEIKYU,

Regards,

Surya

0 Kudos

Hi Surya

Thanks for support

It works now and one last question

L_FLD_FIT_MESSAGE has error message now. which is the bestway to display it?

Regards

Chandra

0 Kudos

Hi Chandra,

That is your wish or Download to the presentation server.

If it solved Change the status as Answered.

Regrds,

Surya.

0 Kudos

Hi surya

thanks for your reply.

I have rewarded points and let me close it.

Regards