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: 

why debugging updates data in ME23n but executing directly doesnt?

Former Member
0 Kudos

Hi.

While updating vendor material number through a customize report , ME23n doesnt get updated with vendor material number but text line does but when executed in debugging mode it does.

BAP_PO_CREATE , we placed a bapi commit then a wait upto 2 sec. and also after BAPI_PO_CHANGE same thing thought of giving some time but doesnt work out.

Any specific reason a program behaving differently.

Regards

Mohinder

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hai mohinder, it may be due to delay in data base update,

we too faced problem in other bapi call's, when in debug it will work fine bcos while debugging it get some extra time , so u have tu add wait statment for few seconds

it might hlep ur problem

afzal

5 REPLIES 5

Former Member
0 Kudos

hai mohinder, it may be due to delay in data base update,

we too faced problem in other bapi call's, when in debug it will work fine bcos while debugging it get some extra time , so u have tu add wait statment for few seconds

it might hlep ur problem

afzal

Former Member
0 Kudos

Hi Afjal.

Agree , but as ,mentioned in query I have already used the same thing after FM and wait.

As its been called in a subroutine will it make a impact, I am doubtful as it will be internal session(Abap Session).

Still some more replies will be of good assistance.

regards

Mohinder Singh Chauhan

Edited by: Mohinder Singh Chauhan on May 22, 2009 6:15 AM

Former Member
0 Kudos

Hi mohinder,

Try to increase a delay by few more seconds as in debugging it works fine ,it siggests dat system requires some more time to hit the database.

regards,

ajit.

Former Member
0 Kudos

Hi ,

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

poheader = wa_po_head

poheaderx = wa_po_headx

IMPORTING

exppurchaseorder = gv_po_number

TABLES

return = gt_return

poitem = gt_poitem

poitemx = gt_poitemx

poschedule = gt_poschedule

poschedulex = gt_poschedulex

poaccount = gt_poaccount

poaccountx = gt_poaccountx

potextitem = gt_potextitem.

.

COMMIT WORK AND WAIT.

Then for ensuring ,

IF gv_po_number IS NOT INITIAL.

CALL FUNCTION 'BAPI_PO_CHANGE'

EXPORTING

purchaseorder = gv_po_number

TABLES

return = gt_return

poitem = gt_poitem

poitemx = gt_poitemx.

ENDIF.

Former Member
0 Kudos

Thanks