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: 

activating function grp for BAPI gives an error

Former Member
0 Kudos

Dear Gurus,

Getting an error while activating RFC enabled function module/group. Please find attached screens & advise.

Thanks & Regards,

Sunny (novice)

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

    Just check activation of function group.Goto SE80 there you can activate function group, then activate import & export structures from SE11.

at last correct importing parameter that you have typed as ZBAPI_QAIMPORT instead of MATNR. it will solve your problem.

21 REPLIES 21

thanga_prakash
Active Contributor
0 Kudos

Hello,

1) The first error clearly says that there is error in your Z function module created. Try to correct it and activate it.

2) This is a basic syntax error which we get in all include programs, this is not the reason for problem in activation.

If you correct the first error and activate, the object will be activated.

0 Kudos

Hi Prakash,

Thank you so much for your time. I'm unable to figure out the exact error with the FM. Please find attached screens and the basis of the program created.

Best Regards,

Sunny (novice)

0 Kudos

Sorry in continuation to the reply. Please find attached basis of the program

http://www.newtosap.info/2012/06/create-custom-bapi-easily.html

Create a custom BAPI easily ~ New To SAP

0 Kudos

Can you please post the source code of your function module

0 Kudos

Check ur importing parameter.... u declared it as something else apart from matnr. Please check it.

0 Kudos

Remove ZBAPI_QAIMPORT and mention it as matnr in importing parameter

0 Kudos

It is clearly visible in your second screen shot with importing parameter that you have typed as ZBAPI_QAIMPORT instead of MATNR.... Correct it and activate... it will work. ...

0 Kudos

Thank you ALL. Still getting same error while activating includes, FM. Please advise. 

Fixed ZBAPI_QAIMPORT instead of MATNR. Structures - ZBAPI_QAIMPORT, ZBAPI_QAEXPORT are activated. Attached is source code -

FUNCTION ZBAPI_QA_GETWERKS.

*"----------------------------------------------------------------------

*"*"Local Interface:

*"  IMPORTING

*"     VALUE(MATNR) TYPE  ZBAPI_QAIMPORT-MATNR

*"  EXPORTING

*"     VALUE(RETURN) TYPE  BAPIRETURN

*"  TABLES

*"      ZTABLE STRUCTURE  ZBAPI_QAEXPORT

*"----------------------------------------------------------------------

select matnr werks from marc

      into TABLE ztable

        where matnr eq matnr.

    if sy-subrc eq 0.

      "Update BAPI return table accordingly to show success here

      else.

      "Update BAPI return table accordingly to show failure here

    ENDIF.

ENDFUNCTION.

0 Kudos

Please check if the structure ZBAPI_QAIMPORT is activated properly or not. And also check if it has field MATNR in it. This should solve this issue with syntax error

Former Member
0 Kudos

Hello,

    Just check activation of function group.Goto SE80 there you can activate function group, then activate import & export structures from SE11.

at last correct importing parameter that you have typed as ZBAPI_QAIMPORT instead of MATNR. it will solve your problem.

0 Kudos

Hello Praveen,

Still getting the same error. Please refer to attached screen print.

Thanks & Regards,

Sunny (novice)

0 Kudos

Hi,

First goto Display mode in SE80 for that function group.

Select ZABAP_QABAPI, Right mouse click, Select activate it.

You have to activate entire Function Group of Main Program in order to activate any BAPI or Function Module.

Thanks & Regards

Bala Krishna

0 Kudos

Hello,

   In your screenshot it showing clearly your function module is not activated.In your function module first you have to activate includes.while activating includes you will get option for 'ACTIVE ANYWAY'. using that you have to activate both includes.after that activate function module.

please follow below process.

goto SE80 activate function group in display mode

then activate both includes in the function module.

finally activate function module.

Thanks

Praveen

0 Kudos

Hey All,

GR8. THANK U ALL SO MUCH. Issue resolved.

With regards,

Sunny (novice)

0 Kudos

Hello Sunny

That's great 🙂

0 Kudos

This message was moderated.

0 Kudos

Hi All,

GR8. However still unable to proceed with next step of completing BAPI creation. Unable to change release status to Implemented - no menu option appears. Should be a minor fix instead of starting a new thread. Please refer to screen prints and advise.

Thanks & Regards,

Sunny (novice)

0 Kudos

Hello Sunny,

  Did you solve problem for releasing BAPI?

0 Kudos

sorry not yet. thanks & regards.

0 Kudos

Its GR8. Works fine now. Please close the thread. THANK YOU ALL SO MUCH.

thanga_prakash
Active Contributor
0 Kudos

Dear Sunny,

Don't open it from the communications. Open the discussion in a new tab and you will get two options in every discussion as Helpful and Correct answer.

Click on the discussions which helped you accordingly, once you do it, then go to the top you can find a option to be mark as answered.

Regards,

Thanga