‎2010 Jan 04 9:08 AM
Hi,
I have an issue in BDC recording. I have the recording for a Z tcode. This recording works only when Continue after commit has been checked. The recording works fine.
The problem is the program which is generated from this recording. How to incorporate Continue After Check in the program ?
The part of the recording is like this -
Program Screen Start ID Field Name Field Value
-------------------------------------------------------------------------------------------------------------------------------
1 T <TCODE> BS AS X F
2 ZMM_FREIGHTTRACKER 100X
3 BDC_CURSOR S_BUDAT-LOW
4 BDC_OKCODE =EXECUTE
5 S_LGORT-LOW 1002
6 S_MBLNR-LOW 4900004973
7 S_BUDAT-LOW 30.12.2009
8 ZMM_FREIGHTTRACKER 0100 X
9 BDC_OKCODE =CHANGE
After the Change OKCODE, the BDC stops as Commit is encountered. There is no error message. Background session is created but the next screens (after the CHANGE OKCODE) never come into picture, so 0 Transactions are posted.
I want to include the first line of the above snippet in the program viz.,
T <TCODE> BS AS X F
I tried the below code but it didn't work out. Still same problem persisted.
clear bdcdata.
bdcdata-program = ''.
bdcdata-dynpro = ''.
bdcdata-dynbegin = 'T'.
bdcdata-fnam = '<TCODE>'.
bdcdata-fval = 'BS AS X F'.
append bdcdata.
Waiting for inputs.
Thanks,
Ateet.
‎2010 Jan 04 3:27 PM
Hi Ateet,
What is continue after commit, do you want to post multiple records into this transaction, if so, just use LOOP --- ENDLOOP., if you are doing the recording, you need not to use the COMMIT
statement, just save the data(that acts as commit).
Thanks,
Srini.
‎2010 Jan 05 4:18 AM
Hi Srinivas,
Continue After Commit is a checkbox which is checked when the recording is done in SHDB.
There will occur instances in your program/tcode flow where a COMMIT statement occurs before
the whole process completes (eg., An UPDATE <table> statement is used and then COMMIT WORK
is written). In such cases the transaction recording will stop as soon as COMMIT is encountered.
To overcome this Cont. After commit is checked (just like the Default Size, Not a Batch session etc.,)
My problem is not with the recording. The recording works fine after that check is incorporated.
But i m unable to incorporate the code for that Cont after check in my program as mentioned in
my above question.
A similar question was raised here earlier, but with no response.
Hope that might help in making the problem clearer.
Still waiting for reply.
Regards,
Ateet
‎2010 Jan 05 4:25 AM
Hello,
You have to set the parameter RACOMMIT of the structure CTU_PARAMS to make the call transaction work after COMMIT. Check the last post of this thread when i raised a similar question as this
Vikranth
‎2010 Jan 05 6:46 AM
Hi Vikranth,
Thanks a lot. Ur solution solved it.
But it works only for CALL TRANSACTION method.
It doesn't fit in with BDC_INSERT batch session.
Sorry i marked thread as resolved as i expected it to work for BDC_INSERT
Can anyone guide with this ?
wa_ctuparams-racommit = 'X'.
wa_ctuparams-dismode = 'A'.
wa_ctuparams-updmode = 'S'.
CALL TRANSACTION 'ZMMFRT' USING bdcdata
OPTIONS FROM wa_ctuparams.
The above code works.
But check the following code doesnt.
perform bdc_insert tables bdcdata
using c_tcode
wa_ctuparams.
form bdc_insert tables bdcdata
structure bdcdata
using v_tcode wa_ctuparams .
call function 'BDC_INSERT'
EXPORTING
tcode = v_tcode
ctuparams = wa_ctuparams
TABLES
dynprotab = bdcdata
EXCEPTIONS
internal_error = 1
not_open = 2
queue_error = 3
tcode_invalid = 4
printing_invalid = 5
posting_invalid = 6
others = 7.
Waiting,
Thanks and Regards,
Ateet
Edited by: Ateet Bellary on Jan 5, 2010 10:44 AM
‎2010 Jan 06 4:24 AM
‎2012 Jun 25 10:40 AM
Hi Ateet,
You must have got your answer so far as in Batch Input Session (BDC insert ) Transaction execution always stops at COMMIT WORK. and close the thread.
Regards,
Tanaya