2006 Jun 09 3:24 PM
Hello All,
I have a problem in a BDC for CRM transaction COMM_HIERARCHY.
When am working with this transaction, based on the inputs on the screen, system throws a error message as a dailog box.
I want to avoid this record during the processing of the internal table and proceed with next record.
For this, one solution is, at application level in customizing we can change the message from E to a S status message. But i want to handle it programatically.
Is there any way i can do?
Your help is highly appreciated.
Thanks & Regards,
Jilan
Hello All,
I have a problem in a BDC for CRM transaction COMM_HIERARCHY.
When am working with this transaction, based on the inputs on the screen, system throws a error message as a dailog box.
I want to avoid this record during the processing of the internal table and proceed with next record.
For this, one solution is, at application level in customizing we can change the message from E to a S status message. But i want to handle it programatically.
Is there any way i can do?
Your help is highly appreciated.
Thanks & Regards,
Jilan
2006 Jun 09 3:30 PM
hi
hav u used FORMAT_MESSAGE fm
it_msg like bdcmsgcoll occurs 0 with header line.
call transaction 'PA30' using it_bdcdata mode 'A'
update 'S'
messages into it_msg.
call function 'FORMAT_MESSAGE'
exporting
id = it_msg-msgid
lang = sy-langu
no = it_msg-msgnr
v1 = it_msg-msgv1
v2 = it_msg-msgv2
v3 = it_msg-msgv3
v4 = it_msg-msgv4
importing
msg = v_msg
exceptions
not_found = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
the above gives u the error message
u wish u can transfer these error records into session
call function 'open_session'.
loop at it_msg where msgtyp = 'E'.
call function 'insert_session'.
endloop.
call function 'close_session'.
2006 Jun 09 4:12 PM
Jilan,
I am not familiar with transaction but are you trying to process multiple records in your internal table with the one transaction call?
If this is the case, you will probably need to determine what conditions are causing the error within the COMM_HIERARCHY transaction, then programatically check the internal table record for that condition before inserting into your BDC internal table.
Chris
2006 Jun 12 5:16 AM
> Jilan,
>
> I am not familiar with transaction but are you trying
> to process multiple records in your internal table
> with the one transaction call?
>
> If this is the case, you will probably need to
> determine what conditions are causing the error
> within the COMM_HIERARCHY transaction, then
> programatically check the internal table record for
> that condition before inserting into your BDC
> internal table.
>
> Chris
Chris,
Thanks for your reply. I have also followed the same approach, fileterd the internal table to possible extent with error conditions.
I have a plan to conv. the customer about application settings can temporarly and use the upload BDC.
Once agian thanks for your inputs.
Best regards,
Jilan
2006 Jun 09 4:17 PM
It is not possible to avoid the error message programatically and continue with the next unless you are doing a call transaction to get the error conditions or success messages in the messages internal table and then move only the error ones into batch input sessions. Basically the logic goes like this.
Loop at itab.
prepare bdc data for one transaction call.
do a call transaction with the option messages bdc_messages.
look in the messages for error messages.
If there are errors, create a session using the same bdc data.
endloop.
2006 Jun 09 5:23 PM
Hii Bhasha ,
If you run in A (Display All Screens) Mode you will get all these OK code instead run in N(Background) No Screen Mode
After the call transaction you will get the error msg in messtab. You can get the error messages there.
<b>
CALL TRANSACTION '<Tcode>' USING bdc_tab OPTIONS FROM bdc_opt.
where bdc_opt is defined as
DATA: bdc_opt TYPE ctu_params.
and the following settings:
bdc_opt-racommit = ' '. "No end on COMMIT
bdc_opt-dismode = 'N'.
bdc_opt-updmode = 'S'.</b>
Regards
Naresh
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |