10-30-2008 7:50 PM
Hi All,
I have created a BDC for FB70. And here is my code
IF WA_HEADER-XMWST = SPACE.
perform bdc_dynpro using 'SAPMF05A' '1200'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'INVFO-SGTXT'
WA_HEADER-SGTXT_HEADER.
perform bdc_field using 'BDC_CURSOR'
'ACGL_ITEM-KOSTL(01)'.
MOVE 001 TO IDX.
MOVE 002 TO INDEX.
LV_WRBTR = 0.
LOOP AT INT_ITEM INTO WA_ITEM WHERE KUNNR = WA_HEADER-KUNNR AND
XBLNR = WA_HEADER-XBLNR.
MOVE INDEX TO WA_ITEM-ITEM_INDEX.
MODIFY INT_ITEM FROM WA_ITEM TRANSPORTING ITEM_INDEX.
CONCATENATE 'ACGL_ITEM-HKONT(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
WA_ITEM-HKONT.
CONCATENATE 'ACGL_ITEM-WRBTR(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
WA_ITEM-WRBTR.
CONCATENATE 'ACGL_ITEM-SGTXT(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
WA_ITEM-SGTXT_ITEM.
CONCATENATE 'ACGL_ITEM-KOSTL(' IDX ')' INTO FNAM.
perform bdc_field using FNAM
WA_ITEM-KOSTL.
IF IDX > 7.
perform bdc_dynpro using 'SAPMF05A' '1200'.
perform bdc_field using 'BDC_OKCODE'
'=P++'.
IDX = 1.
ENDIF.
IDX = IDX + 1.
INDEX = INDEX + 1.
LV_WRBTR = LV_WRBTR + WA_ITEM-WRBTR.
ENDLOOP.
ENDIF.
.
I am able to update upto 7 records and when i try to update the eight record i am unable to do it and i have checked for P++ As well as P+ option also. its not working.
When i tried with OK CODE 0005 AS WELL AS 0006 FOR insert row as well as add items i am unable to add the 8 item since index is a problem here..
Can any one share some views towards this how to get it done?
10-30-2008 8:02 PM
Try executing the transaction from SHDB and making sure the "Not a BI session" flag is UNTICKED (so SY-BINPT has 'X'), then reach the tablecontrol dynpro and investigate the available commands, because executing this way the FB70 trx may behave differently, allowing for example to use a direct cursor positioning okcode in the tablecontrol screen which is not there when you use it normally.
That is the case at least with some transactions, for example FD02.
Regards
Edited by: Alejandro Bindi on Oct 30, 2008 5:10 PM
Well i've checked this myself and it's not the case, it's an Enjoy transaction, and in fact according to Note 304745 - Transaction Recorder and FB50, FB60, FB70 you should use FB01 instead for BDC.
10-30-2008 8:14 PM
10-30-2008 9:26 PM
Closed the similar post.. Can any one throw their views towards this??
10-30-2008 9:32 PM
Well, my answer is the same as it was in the other post. FB70 is an EnjoySAP transaction and doesn't work well in batch input. There are notes to that effect.
Rob
10-30-2008 9:42 PM
Can you suggest me some of the numbers for reference regarding this issue??
Thanks in advance
10-30-2008 10:11 PM
I've already pointed you the relevant note in my reply above.
Maybe you could use some of the BAPI_ACC_*_POST Bapi's for this requirement but I'm not sure which one of them.
10-30-2008 10:11 PM