‎2009 Jul 28 7:03 PM
Hi Forums!
I have a BDC transaction for this tcode and the program goes through a loop and posts transactions.
I receive messages when the program completes that
Line items added (document "1737 ")
however, all of my documents except for my last document do not exists when I check them in KE23N?
I have tried putting a COMMIT WORK in after each BDC but, no luck.
any help appreciated.
‎2009 Jul 28 7:13 PM
Hi ,
Are you using call transaction.
Usually call transaction do not require a commit work as the it will be taken care by the transaction itself.
Try with
commit work and wait.
Regards,
Satish
‎2009 Jul 28 7:13 PM
Hi ,
Are you using call transaction.
Usually call transaction do not require a commit work as the it will be taken care by the transaction itself.
Try with
commit work and wait.
Regards,
Satish
‎2009 Jul 28 7:24 PM
I am using perform bdc_transaction using 'KE21N'.
and performs for all my calls.
I put in the commit work and wait. but no luck.
any thing else?
‎2009 Jul 28 7:32 PM
Are you refreshing bdcdata table.
if not,
for every loop.
Use this REFRESH BDCDATA.
Regards,
Satish
‎2009 Jul 28 7:35 PM
OK, i IN A REFRESH BDCDATA. AFTER MY COMMIT WORK AND WAIT but, no luck the document still does not exist?
anything else I can try?
‎2009 Jul 28 7:37 PM
‎2009 Jul 28 7:44 PM
FORM FILL_DATA .
DATA LV_CNT TYPE I VALUE 0.
perform open_group.
LOOP AT ZSALHIST_ITAB.
IF lv_cnt < 2.
* perform open_group.
perform bdc_dynpro using 'SAPMKEI2' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RADIOCURR3'.
perform bdc_field using 'BDC_OKCODE'
'=NEXT'.
perform bdc_field using 'CEST1-VRGAR'
'Z'.
perform bdc_field using 'CEST1-BUDAT'
ZSALHIST_ITAB-ZPSTDATE.
perform bdc_field using 'CEST1-PERDE'
GV_PERIOD.
perform bdc_field using 'RADIOVAL1'
'X'.
perform bdc_field using 'GT_LINES_VAL-VALUE(13)'
ZSALHIST_ITAB-ZNATOPERUOM. "NATIONAL OPERATOR
perform bdc_field using 'GT_LINES_VAL-VALUE(14)'
ZSALHIST_ITAB-ZBILLBACKUOM. "BILL BACK
perform bdc_field using 'GT_LINES_VAL-VALUE(16)'
ZSALHIST_ITAB-ZORDQTY. "ORDER QTY
perform bdc_field using 'GT_LINES_VAL-VALUE(17)'
ZSALHIST_ITAB-ZORDWGHT. "ORDER WEIGHT
perform bdc_field using 'GT_LINES_VAL-UNIT(16)'
ZSALHIST_ITAB-ZORDQTYUOM. "ORDER QTY UOM
perform bdc_field using 'GT_LINES_VAL-UNIT(17)'
ZSALHIST_ITAB-ZORDWGHTUOM. "ORDER WEIGHT UOM
perform bdc_dynpro using 'SAPMKEI2' '0200'.
perform bdc_field using 'BDC_OKCODE'
'=BUCH'.
perform bdc_field using 'BDC_CURSOR'
'CEST1-FADAT'.
perform bdc_field using 'CEST1-WADAT'
ZSALHIST_ITAB-ZGOODATE. "GOODS ISSUE DATE
perform bdc_field using 'CEST1-FADAT'
ZSALHIST_ITAB-ZINVDATE. "INVOICE DATE
ENDIF.
lv_cnt = lv_cnt + 1. " for testing
ENDLOOP.
perform close_group.
ENDFORM. " FILL_DATA
Edited by: keith warnock on Jul 28, 2009 8:44 PM cut out middle of code for readability
Edited by: keith warnock on Jul 28, 2009 8:49 PM
‎2009 Jul 28 8:00 PM
Hi Try this,
at the begining of the loop statement i.e.
FORM FILL_DATA .
DATA LV_CNT TYPE I VALUE 0.
perform open_group.
LOOP AT ZSALHIST_ITAB.
REFERESH BDCDATA. " ADD this
At the end of the loop i.e.
lv_cnt = lv_cnt + 1. " for testing
CLEAR ZSALHIST_ITAB." add this statement
ENDLOOP.
perform close_group.
ENDFORM. " FILL_DATA
No need of commit work.
Regards,
Satish
‎2009 Jul 28 8:15 PM
‎2009 Jul 28 8:15 PM
‎2010 Feb 04 10:58 AM
I am facing the same problem, please send the code of yoyr BDC program
Regards
Deepak
‎2009 Jul 28 8:14 PM
Thanks all for your help.
My documents were being posted to different periods and were working... it was my mistake when going to the display screen not changing the periods...
Thanks everyone!