‎2008 Mar 24 11:05 AM
hi experts,
I have one small doubt can u pls clarify it.
can we call 2 diff transactions in the in the call traasaction in BDC if yes can u give the example.
Poits Reworded
‎2008 Mar 24 11:59 AM
Hi,
Multiple transaction is possible using session method.
Have one BDC_OPEN_GROUP, multiple BDC_INSERT s and one BDC_CLOSE_GROUP.
You should have multiple BDC_INSERT s for multiple transactions.
call function BDC_OPENGROUP.
Build BDC data and cal lBDC_INSERT for transaction 1
Build BDC data and cal lBDC_INSERT for transaction 2
Build BDC data and cal lBDC_INSERT for transaction 3
paas the tcodes to bdc_insert.
call function BDC_CLOSE_GROUP.
Reward points if useful.
Thanks,
Madhura
‎2008 Mar 25 10:39 AM
with cal transaction method..
only one transaction can be called
in session method multiple transactions can be called
as you just need to fill an uinternal table
and pass that to bdc_insert
pleaese reward poiints
‎2008 Mar 25 11:14 AM
Hi,
You can call a two separate transactions from a single BDC program one after the other.
Create two separate recordings for ur txns and get the code required.
Then create a another program and copy the code you wanted from the generated programs into the new one.
For this you should fetch the data from a single file or you can mention two separate fields on the selection screen for the data fields and put the same data in the corresponding internal table and loop through these internal tables and prepare the BDCDATA table and pass that to call txn statement while calling the txn. And repeat the same for next txn in the same pgm.
Reward points if it is useful.
Regards,
Prasanna
‎2008 Mar 25 11:21 AM
Hi
You can use two T codes in one BDC
after the processing XD01 and you can modify the customer using XD02 based on the customer created by first T code
regards
Shiva
‎2008 Mar 25 1:04 PM
Hi,
A simple example for 2 tcodes: LPK1 and LPK2.
parameters: p_mappe like APQI-GROUPID
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = p_mappe
KEEP = 'X'
USER = SY-UNAME.
"For LPK1:
PERFORM call_dynpro USING: 'X' 'SAPMMPKR' '0091',
' ' 'RMPKR-MATNR' i_tab-field_01,
' ' 'RMPKR-WERKS' i_tab-field_02,
' ' 'RMPKR-PRVBE' i_tab-field_03,
' ' 'bdc_okcode' '/11'.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'LPK1'
TABLES
DYNPROTAB = BDC_TAB.
"For LPK2
PERFORM call_dynpro USING: 'X' 'SAPMMPKR' '0092',
' ' 'RMPKR-MATNR' i_tab-field_01,
' ' 'RMPKR-WERKS' i_tab-field_02,
' ' 'RMPKR-PRVBE' i_tab-field_03,
'X' 'SAPMMPKR' '0093',
' ' 'PKHD-BERKZ' i_tab-field_07,
' ' 'PKHD-LGNUM' i_tab-field_04,
' ' 'PKHD-LGTYP' i_tab-field_05,
' ' 'PKHD-LGPLA' i_tab-field_06,
' ' 'bdc_okcode' 'DELE',
'X' 'SAPLSPO1' '0300',
' ' 'bdc_okcode' '=YES'.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'LPK2'
TABLES
DYNPROTAB = BDC_TAB.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
If you will accordingly then easily you can acheive your requirement.
Please reward if useful.
Regards,
Ramesh