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: 

BAPI_GOODSMVT_CANCEL Error when called from JAVA RFC

Former Member
0 Kudos

Dear Experts,

I'm Facing exception error while calling the FM BAPI_GOODSMVT_CANCEL from Java through RFC..

i have tried debugging with the same material document number and year as imports manually through SAP its working fine and resulting the cancellation document number

while debugging this FM it is calling the following FM's sequentially..

1) MAP2I_B2017_GM_ITEM_04_TO_CANC

2) SERIALPROFILE_CHECK------------------------------Here in this FM exception is coming

3) mb_cancel_goods_movement

but when i pass the same through the java it's throwing exception...

can anyone suggest are they having any prerequisites while this FM calling from JAVA...

Thanks in Advance ..Help me out..

1 ACCEPTED SOLUTION

naresh_bammidi
Contributor
0 Kudos

Hi,

Are you passing Material document number with leading zeros?Please paste part of java code here.

Thanks

Naresh

4 REPLIES 4

naresh_bammidi
Contributor
0 Kudos

Hi,

Are you passing Material document number with leading zeros?Please paste part of java code here.

Thanks

Naresh

0 Kudos

Dear Naresh,,

Material document number is coming with 10 chars..

my issue got solved... DATE format which is passed, is in invalid format.. i have corrected it and its wrking fine...

Thanq very much for ur Support...

venkateswaran_k
Active Contributor
0 Kudos

Do you maintain, Serial number for the Items.

In BAPI do you pass the serial numbers for those item..

What do you pass in :  GOODSMVT_MATDOCITEM

Do not pass anything here.. (if you want to cancel all the items of the material document)

Regards,

Venkat

0 Kudos

Dear Venkateswaran,

We are not maintaining serial number for the items ..

i've passed only row item count as in GR like 1,2,..

for GOODSMVT_MATDOCITEM i passed the same as above

i need to cancel only one item so i'm giving the item number..

Thanq very much for ur Support...

my issue got solved... DATE format which is passed is in invalid format.. i have corrected it and its wrking fine...

Regards,

Prakash