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: 

Hi Experts..i have a problem regarding BAPI at the time of creating the structure.

0 Kudos

When i create the structure for particular field it will display the message "Field name VBELN does not agree with proposed name SD_DOC for BAPI table".

Kindly help me.

Regards,

Abhishek K.

1 ACCEPTED SOLUTION

former_member203305
Active Contributor
0 Kudos

Hi

You that is a warning message, you can just press ENTER and continue...

Regards

Miguel

16 REPLIES 16

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi,

The message is because, for VBELN data element, default component is specified as SD_DOC. So the system expects, whenever you use data element VBELN, field name should be SD_DOC.

Similarly, if you use data element 'VBELN_VA', system expects fieldname to be DOC_NUMBER

Warning messages can be overridden by pressing enter. We may or may not accept system proposal.

Regards,

DPM

0 Kudos

Hello Sir,

Yes i agree.If i create the structure with other naming conventions like "ZSTRUCTURE" the structure will be created without message.

My problem is that when i create the structure for BAPI TABLE so, it should start with "ZBAPI".Suppose i use naming convention like "ZBAPI_TABLE" whenever this naming convention used then this message pop up "Field name VBELN_VA does not agree with proposed name DOC_NUMBER for BAPI table".

Regards,

Abhishek K.

0 Kudos

Hi,

Press F1 on Default component name (Data Element ) you will get the answer. Only for BAPI structures, system proposes the default component name. I believe, system internally scans for the word "BAPI" in the structure name, if found, proposes default component name.

Regards,

DPM

0 Kudos

Hi,

Still i didn't get?Is there any other way to create the structure for BAPI?

Regards,

Abhishek K.

0 Kudos

THANK YOU

 

former_member203305
Active Contributor
0 Kudos

Hi

You that is a warning message, you can just press ENTER and continue...

Regards

Miguel

0 Kudos

Hi,

Yes.its a warning message but when i press Enter there is No action on the screen(As i shared the screenshot), Even back and exit is also not work.I have to close that window and try to recreate again but can't work.I want solution for BAPI.If i create the structure with other naming convention like(ZIMPORT) it will get created but when we add API method for BAPI on that time system tells that Sturcture should create with ZBAPI.


As DEBOPRIYO MALLICK told System internally scans the word "BAPI" in the structure name So I think it may be System Problem.

Regards,

Abhishek K.

0 Kudos

Hi Abhishek

If you clearly read documentation of how to create BAPI it clearly states that

All data structure names must begin with <namespace>BAPI

I would suggest you to go through standard SAP link where it provides all the conventions

http://help.sap.com/saphelp_erp2004/helpdata/en/43/b46c3953c111d395fa00a0c94260a5/content.htm

Nabheet

0 Kudos

Hi Miguel Alvear,

As you said "just press ENTER and continue".


Finally it's worked ,The message will not popup.Just we have to give the field name after first enter it will popup the message but after 2nd enter and continue.It's worked then we can add more fields too.

Thank you so much Miguel Alvear

Regards,

Abhishek K.

0 Kudos

You were able to bypass the warning but you did not respect the general conventions for BAPI (Also Actions in the ABAP Dictionary)


If standardized parameters are used, you have to use the names specified for standardized parameters.

Sorry, you created a RFC enabled FM and in no case a BAPI. (However, did you start creation of the Business Object with SWO1 ?)

Regards,

Raymond

0 Kudos

Hello Raymond,

I had problem of creating structure for BAPI Now it is Solved .

And Yes i have created RFC Function Module.

But i get some problem during Activation.

Could you help me on this?

Code:->

FUNCTION ZBAPI_DEMO_SD.

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

*"*"Local Interface:

*"  IMPORTING

*"     VALUE(FM_VBELN) TYPE  VBAP-VBELN

*"  EXPORTING

*"     VALUE(RETURN) TYPE  BAPIRETURN

*"  TABLES

*"      ZITEMDATA STRUCTURE ZBAPI_TABLE OPTIONAL

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

  SELECT POSNR

         MATNR

         MATKL

         PSTYV

         MEINS FROM VBAP INTO TABLE ZITEMDATA

    WHERE VBELN = FM_VBELN.

ENDFUNCTION.

Error: ->"Report/Program statement Missing or Program type is I (Include)".

Regards,

Abhishek K.

0 Kudos

Activate the function group in SE80 ( Right click and activate )

or

Press back and try to activate the FM from SE37 initial screen.

0 Kudos

Hi DEBOPRIYO MALLICK,

Yes yes.It's Worked.Thank you so much.

Your first option was correct that is in SE80 (Right Click and activate).

Finally its worked .

Kind Regards,

Abhishek K.

former_member198402
Participant
0 Kudos

Hi Abhishek,


Try this :Z_BAPI


Hope it will work for you & let me know.


Regards,Santosh

0 Kudos

Hi Santosh,

"Z_BAPI".

No.It is not working. System tells "Underscore is not permitted at 2nd or 3rd Position".

it should be "All data structure names must begin with <namespace>BAPI" but Underscore is not permitted as i given in the screenshot.

"Z_BAPI" Screenshot.

As Nabheet Madan has shared wonderful Document for us.

http://help.sap.com/saphelp_erp2004/helpdata/en/43/b46c3953c111d395fa00a0c94260a5/content.htm

Regards,

Abhishek K.