‎2015 Apr 07 11:15 PM
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
‎2015 Apr 08 7:12 AM
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
‎2015 Apr 13 6:01 PM
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
‎2015 Apr 08 7:46 AM