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

Getting dump after calling BAPI_ALM_ORDER_MAINTAIN

Former Member
0 Likes
1,888

Hi Experts,

I am facing a problem after calling FM 'BAPI_ALM_ORDER_MAINTAIN'.

The functionality,i have to achieve is

1.Create service order  through user-ext and place the newly created service order number in a custom field in CJ20N

2.when user double clicks on the newly created service order number in step1,it should take him to IW32

3.He can modify values in IW32 and should return to CJ20N

I am successful ,till point2, however when user tries to comeback to CJ20N,by that time ,the memory is filled with  "service order" details

and SAP tries to get a Project associated with the "service order "number

which obviously it cannot find .So a  dump "ORDER_NOT_FOUND"

Is there a work around to see the SAP buffer is not filled with the service order details and it gets the "right" project number when  it is back to CJ20N?

Regards,

Lakshmi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,615

Hi Vinson,

Thanks for your response.The dealy in response is , I was waiting for the functional team to test and confirm as well.

Now that it is working fine,I am back here to update the post

I resolved this issue by wrapping the BAPI_ALM_ORDER_MAINTAIN in a custom FM.which is RFC

and I called it in the user-exit. ZXCN1U20.

Call FUNCTION 'ZWRAPPER' DESTINATION 'NONE'.

This  resolved the dump issue.

Regards,

Lakshmi

Hi Vinson,

Thanks for your response.The dealy in response is , I was waiting for the functional team to test and confirm as well.

Now that it is working fine,I am back here to update the post

I resolved this issue by wrapping the BAPI_ALM_ORDER_MAINTAIN in a custom FM.which is RFC

and I called it in the user-exit. ZXCN1U20.

Call FUNCTION 'ZWRAPPER' DESTINATION 'NONE'.

This  resolved the dump issue.

Regards,

Lakshmi

6 REPLIES 6
Read only

0 Likes
1,615

Maybe you should set a watchpoint for service order no, to trace the value if change or not.

As far as I can judge is when you return to CJ20N , the parameter ID of order  have been lost .

SO, when skip to IW32 ,try to import order no. to memory and export order no. from memory in

return. 

Read only

0 Likes
1,615

Thanks Vinson,

For the response,

I tried to remove the set parameter id to 'ANR'  and just made a call to transaction IW32 .

I returned from IW32  to CJ20N

I see that  under Project structure, newly 3 elements are added with %000000001 , 40000118 and  %00000001 0010 .

the 4000118 is the service order ,i had created .

Actually the CAUFVD_BT table is getting filled with the service order that got created.This is happening in BAPI_ALM_ORDER_MAINTAIN.

so now if i try to save the project,it dumps. ORDER_NOT_FOUND

Any idea, what is going wrong here

I am completely lost

Regards,

Lakshmi

Read only

0 Likes
1,615

Hi Lakshmi,

were you use implict enhancement to create SO in CJ20N ,then perfrom a z_form which is use

for create SO , end of the form return to upper form?

if do just what I said,  there must be have some global variables recorded the SO No. is initial.

In order to find out  where the SO No. been saved,comment enhancement code and debug the

standard code  is very helpful.  That's exactly what I used to do.

Hope its helpful to you.

--------------------------------------------

I have read your question again,I think I misunderstand before.

when you create Service Order in CJ20N, should the order No.  only be a buffer ?  if the number range have changed?

So its impossible to change by IW32, right?

Read only

0 Likes
1,615

Hi

the service order is created properly and I am successfully able to edit it in IW32.

I see the problem is with BAPI,it is inserting the newly added SO number into CAUFVD_BT table.

which is not the expected behavior here

I tried to call the BAPI in a separate wrapper FM in update task.However,even after i return from the wrapper FM, the SO number is not getting created here

Regards,

Lakshmi

Read only

0 Likes
1,615

Hi Lakshmi,

Do you have solvd the problem?

It's better if you can post the code.

Read only

Former Member
0 Likes
1,616

Hi Vinson,

Thanks for your response.The dealy in response is , I was waiting for the functional team to test and confirm as well.

Now that it is working fine,I am back here to update the post

I resolved this issue by wrapping the BAPI_ALM_ORDER_MAINTAIN in a custom FM.which is RFC

and I called it in the user-exit. ZXCN1U20.

Call FUNCTION 'ZWRAPPER' DESTINATION 'NONE'.

This  resolved the dump issue.

Regards,

Lakshmi