Application Development and Automation 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: 
Read only

Doubt on Good movements using BAPI'S for Uploading

Former Member
0 Likes
1,702

Hi Experts,

i am doing a bdc program to upload for mb1a transaction using BAPI..I am new to BAPI area..But with some reference i have finished the program..But i dont know why in clear statement and in gui upload showing error..IN gui upload when i activate the exception its throwing error..Hereby i am pasting the code...Any idea pls share with me..

<removed by moderator>

I dont know how to make the code show correctly...any help???????

Regards

Karthick

Moderator message: please post only relevant code parts, observe the maximum of 5000 characters per post to preserve formatting, leave out commented lines, etc.

Edited by: Thomas Zloch on Feb 10, 2011 6:05 PM

sorry moderator...it will not happen again..

my scenario is like this i ahve to upload the serial number with respect to the quantity in unit of measure..i am not getting any idea on this..for example if the quantity for the material is 5 then it has to upload five serial numbers...

please help me on this!!!!!!!!

regards

Karthick

Edited by: karthicksap on Feb 12, 2011 5:25 AM

11 REPLIES 11
Read only

Former Member
0 Likes
1,364

Hi,

Get the quantity from user.

parameters: quantity type i.

itab will have all values.

loop at itab into wa_tab where wa_tab-serial <= quantity.

Upload procedure.

endloop.

Hope it will help you.

Read only

0 Likes
1,364

Hi

actually user dnt give any input

my doubt is that i have declared internal table with the specified fields..

but the serial number may be 5 sometimes and 1000 sometimes like that it wil go..

but the structure has only one serial number..then how to do that?

Read only

Former Member
0 Likes
1,364

>

> i am doing a bdc program to upload for mb1a transaction using BAPI..I am new to BAPI area..But with some reference i have finished the program..But i dont know why in clear statement and in gui upload showing error..IN gui upload when i activate >

Could you be more clear about the requirement? Are you writing BDC for MB1A transaction or you using GOODSMVT* BAPI to Post goods movement?

If you are using the BAPI_GOODSMVT_CREATE, there is a tables parameter "GOODSMVT_SERIALNUMBER" that you can fill for serial numbers...As per the BAPI's documentation

If the XSAUT indicator is set in the table parameter GoodsmvtItem, the system automatically determines the serial numbers for an item.

Read only

0 Likes
1,364

Hi kris,

thanks for the hint..

for mb1a transaction

i have fields like document date,posting date and document header text in header data.

and in item data i have like plant storage location,movement type 241 which is constant,material,quantity in unit of measure,asset and subasset numberfinally serial number.

my scenario is for a single material its having n number of serial numbers...i am not getting the logic..

but if i go for dynamic internal table is it possible if i know that max serial number per material is 50,000.

Regards

Karthick

Read only

0 Likes
1,364

You have not answered my question? Are you using CALL Transaction MB1A (BDC) or BAPI to post your goods movement?

If you are using BAPI, there is a field called "SERIALNO_AUTO_NUMBERASSIGNMENT" IN GOODSMVT_ITEM table that automatically assigns the serial number... Please check the documentation for the BAPI_GOODSMVT_CREATE for more information. It is one of the easiest BAPI's...

Read only

0 Likes
1,364

Hi kris,

I am using bapi only..and i read the document and i passed the field XSAUT but if i pass that field its not accepting...

another think is serial number depends on quantity..for example if a material has 5 quantity 5 serial numbers will be there...

so in this point only i struck up...

Read only

0 Likes
1,364

>

> I am using bapi only..and i read the document and i passed the field XSAUT but if i pass that field its not accepting...

> another think is serial number depends on quantity..for example if a material has 5 quantity 5 serial numbers will be there...

> so in this point only i struck up...

Karthick, You have two options.. u can either set XSAUT indicator and let the serial number be filled automatically or fill the GOODSMVT_SERIALNUMBER table... Play around, passing different parameters to the BAPI.

Check out this thread, it has got useful information

Read only

0 Likes
1,364

Hi kris,

Finally i finished the coding..its working fine...but now its throwing material is not maintained in plant..checked with that..but material is maintained there..i dont know why its throwing the error..i checked with debugging and i found that its taking the last serial number only..for every material..my flatfile is like this..

11.01.2011 11.01.2011 abc 9051 5101 stbdx300 3 600001 0 1000000000000001

11.01.2011 11.01.2011 abc 9051 5101 stbdx300 3 600001 0 1000000000000002

11.01.2011 11.01.2011 abc 9051 5101 stbdx300 3 600001 0 1000000000000003

any idea kris.>?????

regards

Karthick

Read only

0 Likes
1,364

Try only with one serial number and see if it is working? Are you able to post goods moving using MIGO without error?

Read only

0 Likes
1,364

Hi Kris,

I have tried with one material also,at that time also its giving "MAINTAIN SERIAL NUMBER FOR TOTAL QUANTITY"

Checked with MIGO ,its working correctly ..

i am not able to fix what kind of error is that.checked with debugger also when its coming to final stage its returning error.datas r correctly moved with corresponding tables also...

pls help me out..

Regards

Karthick.

PROBLEM RESOLVED....THANKS ALL FOR THE VALUABLE INFORMATION...

Edited by: karthicksap on May 5, 2011 11:17 AM

Read only

Former Member
0 Likes
1,364

Any doubts post on this thread regarding bapi for mb1a