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

Problem with batch input KP26 transaction

Former Member
0 Likes
1,486

Hi all,

I created a program that loads an excel file to an internal table and by each record run the batch input of kp26 transaction, to create the batch input I used the SM35 transaction, the problem is that even though the values change in debug by each cycle of the loop, the kp26 transaction will only get data from the first record processed and from the second register returns SY-SUBRC = 1001 (To make the first record again returns SY-SUBRC = 0, I must logout and login again session), tried putting "call method cl_gui_cfw => flush" after each run the batch input in the loop but did not work.

The transaction's run as follows:

         call transaction 'KP26' using it_bdcdata mode 'N' update 'S' messages into itab.

Best regards,

Robert

3 REPLIES 3
Read only

RaymondGiuseppi
Active Contributor
0 Likes
924

KP26 will execute multiple commit that will end/break a batch-input session, so is not suitable for BDC (*)

Better look at BAPI_ACT_PRICE_CHECK_AND_POST (also BAPI_ACT_PRICE_READ to prepare data) or BAPI_COSTACTPLN_POSTACTOUTPUT (also BAPI_COSTACTPLN_CHECKACTOUTPUT to check data).

Regards,

Raymond

Read only

0 Likes
924

Hi Raymond,

Please can you give me an example of using the BAPI_COSTACTPLN_POSTACTOUTPUT bapi, I found this link


http://scn.sap.com/thread/3442773


But do not know where to put the following data: unit, price (fixed) and price unit

Thanks.

Regards,

Robert

Read only

carmine
Explorer