cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi - Help

Former Member
0 Kudos

Hello,

Scenario:

In WD I have one order inputfield,4 batch inputfields and a create button. On clicking on Create, the Bapi "Bapi_Goodsmvt_Create" is called. The Bapi works absolutely fine with 1 batch (that is other 3 batch being empty). I receive a materialdocument number.

If there is more then one batch entered it gives a message "Order XXXX is already being processed". How do I solve this?

Any ideas.....

Best regards,

Dharmi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Can you give me the import, export and table parameters of the BAPI_GOODS_MVMT_CREATE .

Does the bapi allow creation of multiple batches.

I dont have access to a SAP system.If you can give me the structure and i will tell you how to pass the values.

regards

ravi

Former Member
Former Member
0 Kudos

Hello Ravi,

Sorry for the delayed reply. I appreciate your help very much. Here is the import, export and table parameters of the BAPI_GOODSMVT_CREATE:

<u>Import</u>:

Parameter name:

GOODSMVT_HEADER Like BAPI2017_GM_HEAD_01 -> Reference type

GOODSMVT_CODE Like BAPI2017_GM_CODE -> Reference type

TESTRUN

<u>Export:</u>

GOODSMVT_HEADRET Like BAPI2017_GM_HEAD_RET

MATERIALDOCUMENT Type BAPI2017_GM_HEAD_RET-MAT_DOC

MATDOCUMENTYEAR Type BAPI2017_GM_HEAD_RET-DOC_YEAR

<u>Table:</u>

GOODSMVT_ITEM Like BAPI2017_GM_ITEM_CREATE

GOODSMVT_SERIALNUMBER Like BAPI2017_GM_SERIALNUMBER

RETURN Like BAPIRET2

On Clicking on the reference types you see the fields:

it is difficult to copy and paste here, can you please send me your email id so I can send the screen shots of the same!

"Does the bapi allow creation of multiple batches." No the table has only one batch field.

Let me know if you need any further information.

Many thanks,

Dharmi

Former Member
0 Kudos

Hello Eric,

Thanks for the link, but Sorry I am lost as to what are you asking me to try on it. Can you please specify?

Many thanks,

Dharmi

Former Member
0 Kudos

This provides the import and export of all BAPIs

Former Member
0 Kudos

Hello Eric,

Thanks for clarifying.

Best regards,

Dharmi

Former Member
0 Kudos

Hi Dharmi,

Did u check on to the size fields,u r loading the data via flat file?

Regards,

Nagarajan.

Former Member
0 Kudos

Hello Nagarajan,

Nope, I am NOT loading via flat file. This scenario is for online data entry (barcode scanning to be precise).

Is there any other possibility to do this?

Best regards,

Dharmi

Message was edited by: Dharmi Tanna

Former Member
0 Kudos

Hi Dharmi,

Is ur Bapi creation is correct.

Did u do all these steps.

PASS VALUE iN TABLES GIVE BAPI RETURN (returns back frm the structure)

assign fun mod to bapi.

evrythig should start with the bapi.

for creating bapi -- > swo1

Inside bapi -- add method -- add func mod name

to implement -- this is on the remote system.

release it

second implement --

generate.

to c the released data goto the transaction code BAPI.

This should work fine.

There might be some mistake in ur flat file.

can u just give me two datas as example in ur flat file.

With size factors also.

Hope this helps u,

Regards,

Nagarajan.

Former Member
0 Kudos

Hello Nagarajan,

Sorry, I am <b>NOT</b> using flat file. I missed the "not" in previous posting. It is an online scenario, would you still suggest on using a flat file, and also it is a standard BAPI that I am using there is no wrapper created for it?

Many thanks,

Dharmi

Former Member
0 Kudos

Hi Dharmi,

I fear that this is the only way that u could achieve this.Also c to that if u r able to upload one data then why not the others?it may be since mass upload is not possible if u exit this flat file system.

Hope this helps u,

Regards,

Nagarajan.

Former Member
0 Kudos

Hello Nagarajan,

"Also c to that if u r able to upload one data then why not the others?" I tried to call the RFC in create button 4 times, and that of course doesn't work in the second call/time resulting in the error I mentioned earlier.

If flat file system is the only way to achieve this, would it work in the online scenario as well, w/o the user needing to upload that flat file (I mean an input field with the browse button next to it). If yes, please explain me step by step:

1. How do I create wrapper around the standard BAPI? (I am not an ABAP person), sorry the above explaination of the BAPI was little unclear for me

2. Other questions in the next post, once the above is clear to me.

Many thanks,

Dharmi

Former Member
0 Kudos

Hi Dharmi,

Flat file upload will be easy,but since u r saying it as a online scenario can't u get the data from the database and store it in a file and then upload it.

This might trigger some response Dharmi,

Hope this helps u,

Regards,

Nagarajan.

Former Member
0 Kudos

Hello Nagarajan,

I am only sending data to the database from Web Dynpro, I displaying / getting the MaterialDocument from the database for the user to know that the transaction was successful.

Hope the above is clear.

Best regards,

Dharmi

Message was edited by: Dharmi Tanna

Former Member
0 Kudos

Hi Dharmi,

First what is a BAPI?

BAPIs (Business Application Programming Interfaces) are the standard SAP interfaces. They play an important role in the technical integration and in the exchange of business data between SAP components, and between SAP and non-SAP components. BAPIs enable you to integrate these components and are therefore an important part of developing integration scenarios where multiple components are connected to each other, either on a local network or on the Internet.

Hope this helps u,

Regards,

Nagarajan.

Former Member
0 Kudos

Hello Nagarajan,

I do know "What BAPI is?" I was trying to explain, you the purpose for which I have used it. May be I did not get your "trigering response" statement right or you did not get my last post right.

Anyways thanks,

Dharmi

Former Member
0 Kudos

Hi Dharmi,

ok u r sending ur data to database from the user.But what is there in material doc that u r providing for the user.

Regards,

Nagarajan.

Former Member
0 Kudos

Hello Nagarajan,

Material Document is the return parameter of the Bapi, (10 digit number) If the transaction was sucessful you get the "MaterialDocument" as the return parameter, if it fails you get the "Message" (Standard R/3 message)as the return parameter.

Best regards,

Dharmi