Skip to Content
avatar image
Former Member

BAPI Exception !

Hello Friends,

I am trying to call a bapi 'BAPI_DEBTOR_EXISTENCECHECK'.

When I try to execute the program, it gives me following parameter missing exception,

CALL_FUNCTION_PRAM_MISSING

though I am sending the appropriate parameters, but still I am getting this exception. Here is the ABAP code,

DATA : Company_ID LIKE BAPI1007-COMP_CODE.

DATA : MY_RETURN TYPE BAPIRETURN.

DATA : debtor_ID like BAPI1007-CUSTOMER.

MOVE '0001' TO Company_ID.

MOVE '1' TO debtor_ID.

CALL FUNCTION 'BAPI_DEBTOR_EXISTENCECHECK'

EXPORTING

RETURN = MY_RETURN

IMPORTING

Company_ID = Company_ID

DEBTORID = debtor_ID

.

Thanks in advance,

Haider Syed.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 26, 2004 at 02:03 PM

    Hi Syed,

    If the coding sample that you wrote is what you have in your program, then I can say that you call BAPI incorrectly. Try this one:

    CALL FUNCTION 'BAPI_DEBTOR_EXISTENCECHECK'

    EXPORTING

    debtorid = debitor_id

    COMPANYCODE = company_id

    IMPORTING

    RETURN = my_return.

    Just for information. This EXPRORT and IMPORT parameters are a bit misleading. For example the DEBITORID is an

    IMPORT parameter for your function modules. But when you call this function module from your program you should write

    EXPORTING for this IMPORT parameters.

    Also I can recommend you one feature. When you write ABAP coding and want to call a Function Module you can use

    button "Pattern" on SAP toolbar. Just press this button then choose first radio button CALL FUNCTION, enter the name of FM you want to call and press Enter.

    The correct function module call appears on the place where the cursor is set in your coding. For example in your case:

    CALL FUNCTION 'BAPI_DEBTOR_EXISTENCECHECK'

    EXPORTING

    debtorid =

    • COMPANYCODE =

    • IMPORTING

    • RETURN =

    .

    All you need to do - just uncomment optional parameters if you need them and supply your variables after '=' sigh for corresponded parameters.

    Good luck,

    Mikhail

    Add comment
    10|10000 characters needed characters exceeded