‎2006 Dec 05 9:13 AM
i hav created BDC program........its is working gud in call transaction mode 'A',But it is giving ERROR in mode 'E',....i want to run the tracaction in background.......i had used mode 'N',BUT ONLY those rows r getting uploaded which r not having errors.......i want to upload whole data.....how can i do this..??
‎2006 Dec 05 9:16 AM
Check what errors are you getting using "messages into it_bdcmsgcoll " addition to call transaction statement.
call transaction 'tocde' using it_bdcdata messages into it_bdcmsgcoll ....
loop at it_bdcmsgcoll.
call function 'FORMAT_MESSAGE'
exporting....
importing message = v_msg...
write:/ v_msg.
endloop.
Regards,
Ravi
‎2006 Dec 05 9:17 AM
JUST GIVE ONE LINE...
<b>COMMIT WORK AND WAIT</b>
This form specifies synchronous processing. The COMMITstatement waits for the end of processing. Control returns to your program after all high priority (V1) function modules have run successfully.
The AND WAIT form is convenient for switching old programs to synchronous processing without having to re-write the code. Functionally, using AND WAIT for update-task updates is just the same as dialog-task updates with PERFORM ON COMMIT.
after each updation
kishan negi
‎2006 Dec 05 9:19 AM
Hi,
Use Message_text_build to capture the error.
Hi,
In call transaction you can see the error by using message_text_build function module.
DATA: W_TEXTOUT LIKE T100-TEXT.
DATA : T_BDCDATA TYPE BDCDATA OCCURS 0 WITH HEADER LINE. DATA: T_MESSTAB TYPE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
CALL TRANSACTION "VA01' USING T_BDCDATA MODE 'N'
UPDATE 'S'
MESSAGES INTO T_MESSTAB.
if sy-subrc ne 0.
LOOP AT T_MESSTAB.
CLEAR T_ERROR.
IF T_MESSTAB-MSGTYP = 'E'.
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
MSGID = T_MESSTAB-MSGID
MSGNR = T_MESSTAB-MSGNR
MSGV1 = T_MESSTAB-MSGV1
MSGV2 = T_MESSTAB-MSGV2
MSGV3 = T_MESSTAB-MSGV3
MSGV4 = T_MESSTAB-MSGV4
IMPORTING
MESSAGE_TEXT_OUTPUT = W_TEXTOUT.
IF SY-SUBRC = 0.
MOVE : T_MAIN-PERNR TO T_ERROR-PERNR,
T_MAIN-AMOUNT TO T_ERROR-AMOUNT,
T_MAIN-W_TYPE TO T_ERROR-W_TYPE,
W_TEXTOUT TO T_ERROR-ERROR.
APPEND T_ERROR.
CLEAR T_ERROR.
DELETE T_MAIN.
DELETE T_MESSTAB.
G_ERRCOUNT = G_ERRCOUNT + 1.
EXIT.
ENDIF.
ENDIF.
ENDLOOP.
endif.
‎2006 Dec 05 9:27 AM
Hi,
In call transaction method u can correct the errors in the following ways
1>correcting error records interactively.(mode 'A' or 'E')
2>outputting the error records by capturing errors using BDCMSGCOLL
and again process
Regards
‎2006 Dec 05 9:54 AM
Hi,
U have to correct the erroneous records manually then reporcess those records again , it will work.
Cheers.