2007 Apr 11 6:27 AM
2007 Apr 11 6:29 AM
Hi,
Call transaction sets <b>SY-SUBRC</b>.
If <b>SY-SUBRC eq 0</b>.
Call transaction is successful.
<b>SY-SUBRC Value</b>
0 --> The batch input processing of the called transaction was successful.
< 1000 --> Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
1001 --> Error in batch input processing.
*********************************************************
Reward if helpful.
Regards,
Sandhya
how we can know the data is updated in call transaction?
2007 Apr 11 6:29 AM
Hi sumit,
Check SY-SUBRC value whether it is zero or not.
IF it is a Synchronous in mode, then updation will be done immediately.
IF it is a Asynchronous in mode, then updation will <b>NOT</b> be done immediately.
Syntax:
CALL TRANSACTION 'TCODE' USING BDCTAB MODE 'A' UPDATE S/A.
Ckeck for this......
One more important thing is when you use <b>Synchronous mode</b>
the execution will be done <b>slowely</b>. For <b>faster execution</b> use <b>Asynchronous mode</b>.
<b>Reward,if helpful.</b>
Regards,
V.Raghavender.
2007 Apr 11 6:29 AM
Hi Sumit,
check this info.
About CALL TRANSACTION
A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by
Call transaction <tcode> using <BDCTAB>
Mode <A/N/E>
Update <S/A>
Messages into <MSGTAB>.
Parameter 1 is transaction code.
Parameter 2 is name of BDCTAB table.
Parameter 3 here you are specifying mode in which you execute transaction
A is all screen mode. All the screen of transaction are displayed.
N is no screen mode. No screen is displayed when you execute the transaction.
E is error screen. Only those screens are displayed wherein you have error record.
Parameter 4 here you are specifying update type by which database table is updated.
S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.
A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place. So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).
Parameter 5 when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:
1. Tcode: Transaction code
2. Dyname: Batch point module name
3. Dynumb: Batch input Dyn number
4. Msgtyp: Batch input message type (A/E/W/I/S)
5. Msgspra: Batch input Lang, id of message
6. Msgid: Message id
7. MsgvN: Message variables (N = 1 - 4)
For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).
Steps for CALL TRANSACTION method
1. Internal table for the data (structure similar to your local file)
2. BDCTAB like BDCDATA
3. UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)
4. Loop at itab.
Populate BDCTAB table.
Call transaction <tcode> using <BDCTAB>
Mode <A/N/E>
Update <S/A>.
Refresh BDCTAB.
Endloop.
(To populate BDCTAB, You need to transfer each and every field)
Hope this resolves your query.
Reward all the helpful answers.
Regards
2007 Apr 11 6:29 AM
Hi,
Call transaction sets <b>SY-SUBRC</b>.
If <b>SY-SUBRC eq 0</b>.
Call transaction is successful.
<b>SY-SUBRC Value</b>
0 --> The batch input processing of the called transaction was successful.
< 1000 --> Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
1001 --> Error in batch input processing.
*********************************************************
Reward if helpful.
Regards,
Sandhya
2007 Apr 11 6:32 AM
<b>Hey Sumit, the same question was raised by you in another thread and you got the answeres there too. Why are u going on creating new threads for the same issue?? Please refrain from doing this else your account will be deleted/deactivated by the moderators on complaint raised by other users.</b>
2007 Apr 11 6:32 AM
hi,
In CALL TRANSACTION method, you can go for both Synchronous and Asynchronous Updating.
CALL TRANSACTION 'TCODE' USING BDCTAB MODE 'A' UPDATE S/A.
A - Asynchronous updating. In this mode, the called transaction does not wait for any updates it produces to be completed. It simply passes the updates to the SAP update service. Asynchronous processing therefore usually results in faster execution of your data transfer program.
Asynchronous processing is NOT recommended for processing any larger amount of data. This is because the called transaction receives no completion message from the update module in asynchronous updating. The calling data transfer program, in turn, cannot determine whether a called transaction ended with a successful update of the database or not.
If you use asynchronous updating, then you will need to use the update management facility (Transaction SM12) to check whether updates have been terminated abnormally during session processing. Error analysis and recovery is less convenient than with synchronous updating.
S - Synchronous updating. In this mode, the called transaction waits for any updates that it produces to be completed. Execution is slower than with asynchronous updating because called transactions wait for updating to be completed. However, the called transaction is able to return any update error message that occurs to your program. It is much easier for you to analyze and recover from errors.
L - Local updating. If you update data locally, the update of the database will not be processed in a separate process, but in the process of the calling program. (See the ABAP keyword documentation on SET UPDATE TASK LOCAL for more information.)
Hope this resolves your query.
Reward all the helpful answers.
2007 Apr 11 6:39 AM
Hi,
Call transaction 'TCODE' using 'BDCTAB' Mode 'A/N/E' Update 'S/A' Messages into 'MSGTAB'.
After that we can check sy-subrc whether data updated or not.
dont foget to give a reward points if it helpful.
Regards
Vana
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |