Skip to Content
author's profile photo Former Member
Former Member

Hw to correct this error in BDC ?

Hi experts,

I am getting the error while excuting the BDC form statement

LOOP AT int_record.

PERFORM format_message using int_record-msgid

int_record-MSGNR

int_record-msgv1

int_record-msgv2

int_record-msgv3

int_record-msgv4.

ENDLOOP.

ENDFORM. " f_bdc_output

**********************************************************************

  • FORM : format_message

  • Created : 03.12.2007 17:13:28

**********************************************************************

FORM format_message USING P_MSGID LIKE SY-MSGID

P_msgnr LIKE SY-MSGNO

P_MSGV1 LIKE SY-MSGV1

P_MSGV2 LIKE SY-MSGV2

P_MSGV3 LIKE SY-MSGV3

P_MSGV4 LIKE SY-MSGV4.

Th error is given below :

"In PERFORM or CALL FUNCTION "FORMAT_MESSAGE", the actual parameter

"INT_RECORD-MSGNR" is incompatible with the formal parameter "P_MSGNR"."

Can anyone help me to solve this problem

Thanks

Sakthi C

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 01:54 PM

    Try like this...

    
    LOOP AT int_record.
    
    PERFORM format_message using int_record-msgid
    int_record-MSGNR
    int_record-msgv1
    int_record-msgv2
    int_record-msgv3
    int_record-msgv4.
    
    ENDLOOP.
    ENDFORM. " f_bdc_output
    **********************************************************************
    * FORM : format_message
    * Created : 03.12.2007 17:13:28
    **********************************************************************
    FORM format_message USING 
    P_MSGID  "Automaticlly refers to calling parameters
    P_msgnr 
    P_MSGV1 
    P_MSGV2 
    P_MSGV3 
    P_MSGV4 .
    
    

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 03, 2007 at 01:44 PM

    hi Sakthi,

    this is beacuse int_record-msgid is different type than SY-MSGID (dirrenet legth and/or type). A fast solution is to change like:

    FORM format_message USING P_MSGID TYPE ANY, and so on...

    Slower (but nicer) solution is to search for the data element of int_record-msgid and TYPE-ing with that data elemnt in the FORM.

    hope this helps

    ec

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 01:42 PM

    Sakthi,

    I didn't find any error in calling subroutine.

    Try using TYPE instead of LIKE or pass MSGNO to a variable and use that variable in function module.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.