‎2007 May 09 12:25 PM
Hi Guru,
How do i Design and code a BDC program for Sales Orders that updated records in the sales order screen or will create new sales orders depending on the source data file from external systems using VA01 and VA02 transactions.
Thanks in advance
‎2007 May 09 1:02 PM
http://www.sap-img.com/bdc.htm
check this link dear,
If this is useful please award some points,
thank you
‎2007 May 09 12:35 PM
hi,
use BDC Session method.
check below example it will help you
if you want to record for two transations then you will use same method as one transation.For example if you want to execute two transations like VA01(sales order) and VL01N(delivery).Here first you can record for both transactions seperately and in the function module calling you will call BDC_INSERT two times
First function module contains Tcode as VA01 and Bdcdata table as data for the va01 transaction and second table contains tcode as VL01N and Bdcdata table conatins data which contains the record data of the delivery recorded data.
PERFORM open_batch_session USING p_sessa.
LOOP AT ltcap_int
WHERE NOT tot_inc IS initial.
ltcap_int-adj = ltcap_int-adj * -1.
CONCATENATE ltcap_int-fund '/' ltcap_int-cfc INTO zuonr.
PERFORM fill_bdc_header.
PERFORM fill_bdc_lines.
PERFORM post_entries.
PERFORM insert_batch_session USING 'FB01'.
ltcap_int-adj = ltcap_int-adj * -1.
ENDLOOP.
PERFORM close_batch_session.
perform start_batch_session using p_sessa.
Budgets
WRITE p_fy TO c_fy.
PERFORM open_batch_session USING p_sessb.
LOOP AT ltcap_int
WHERE NOT tot_inc IS initial.
PERFORM rollup_header.
PERFORM rollup_line.
PERFORM rollup_save.
PERFORM insert_batch_session USING 'FR21'.
IF NOT ltcap_int-gsef_amt IS INITIAL.
PERFORM rollup_header_gsef.
PERFORM rollup_line_gsef.
PERFORM rollup_save.
PERFORM insert_batch_session USING 'FR21'.
ENDIF.
ENDLOOP.
PERFORM close_batch_session.
perform start_batch_session using p_sessb.
We can process more than 1 transactions in session method.
For this we will create the internal tables equilant to transactions and
Between BDC_open_group and BDC_close_group we will call the BDC_Insert the no.of transactions times and populate the internal tables which contains the data pertaining to diffrent transactions.
‎2007 May 09 1:02 PM
http://www.sap-img.com/bdc.htm
check this link dear,
If this is useful please award some points,
thank you
‎2007 May 09 1:07 PM
u can call , but without any dependency of on each other calls ?
means --->
create SO -->so1
change So--->SO1.
u cannt do both create and change at a time.
Regards
Prabhu