2009 Sep 09 10:37 AM
Hi,
I want to append data for t-code FK02 through BDC.
Like if for particular lifnr and bukrs, there is existing 2 line items
then my BDC should starting appending data from 3rd line item.
Thanks
Hi,
I want to append data for t-code FK02 through BDC.
Like if for particular lifnr and bukrs, there is existing 2 line items
then my BDC should starting appending data from 3rd line item.
Thanks
2009 Sep 09 11:05 AM
HI,
In FK02 there is nothing such as header and line item data.
What is you exact requirement?
Could you specifyi n more details?
Regards,
Ankur Parab
2009 Sep 09 11:06 AM
Hello,
While recording ... position must be getting according to the number of line items....
if there are 4 line items ... it will be appending on 5 line......
logic for this can be........
These line items must be there in some table ... do a select statement on that table calculating the number of line items and then appending 1 to the total and supplying to the new line item to be added.....
I faced the same problem for maintaining the output types for billing documents..... in that case the line items were stored in NAST table ... so i calculated the number of line items and appended on the next line....
for more clarification you can ask ...
Thanks
manish
2009 Sep 09 11:26 AM
Thanks manish.
I have done the same , i fetched data from the actual table.
then took the count of no of lines.
but m unable to insert the new data.
can u help with sum sample code if poss.
Thanks in advance
2009 Sep 24 1:19 PM
first u count line item
select count(*) into cnt
from LFBW as a
where a~lifnr = itab-lifnr
and a~bukrs = itab-bukrs.
then put logic for
if cnt > '06'.
tme = cnt / 6.
cnt = cnt mod 6.
do tme times.
perform bdc_dynpro using 'SAPMF02K' '0610'.
perform bdc_field using 'BDC_CURSOR' 'LFBW-QSREC(01)'.
perform bdc_field using 'BDC_OKCODE' 'P+'.
enddo.
endif.