Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Radio Frequency - Error handling

Former Member
0 Likes
1,660

Hello ,

I have a problem with the error handling in a radio frequency program, because here is not allowed to

show the error messages as a popup or in the status line.

I make a function call of 'L_TO_CREATE_TR'. The raised errors i get back in the exceptions are not a problem to handle. But in this function call, they put normal

success or error messages in,

for example

Programm: SAPLL03A

Include: LL03AF8C

Line : 65 - 76

These messages I can t catch.

Is there any way to cut off the output of the messages??

I would appreciate a feedback very much!!!

Jasmin Söllner

Hello ,

I have a problem with the error handling in a radio frequency program, because here is not allowed to

show the error messages as a popup or in the status line.

I make a function call of 'L_TO_CREATE_TR'. The raised errors i get back in the exceptions are not a problem to handle. But in this function call, they put normal

success or error messages in,

for example

Programm: SAPLL03A

Include: LL03AF8C

Line : 65 - 76

These messages I can t catch.

Is there any way to cut off the output of the messages??

I would appreciate a feedback very much!!!

Jasmin Söllner

9 REPLIES 9
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,329

We had the same kind of a problem back when we wrote our custom RF transactions. In the transaction, we are doing a BDC over CO11(Production Order Confirmation). The CO11 sends a success message when completed which could not be handled by nicely by the RF device. So what we ended up doing was just "calling the transaction"

again with BDC. The BDC code just called the transaction and backed out, which cleared the message.

Even though you are using a function module, this could still work for you. Do a short BDC over a transaction(maybe one which is related) which calls the transaction and backs out immediately. I know this doesn't sound like a great solution, but its been working for us the past 4 years.

Good Luck,

Rich Heilman

Read only

0 Likes
1,329

Here is a sample program to explain what I mean. Hope this helps.



report zrich_0006 .


data: bdcdata like bdcdata occurs 20 with header line.


parameters: p_check type c.


start-of-selection.


* Throw the message
  message s208(00) with 'Here is a message'.

* Now call another transaction via BDC.
  clear bdcdata.
  bdcdata-program  = 'SAPMSSY0'.
  bdcdata-dynpro   = '0120'.
  bdcdata-dynbegin = 'X'.
  append bdcdata.

  clear bdcdata.
  bdcdata-fnam = 'BDC_CURSOR'.
  bdcdata-fval = '04/03'.
  append bdcdata.

  clear bdcdata.
  bdcdata-fnam = 'BDC_OKCODE'.
  bdcdata-fval = '=&F03'.
  append bdcdata.

  call transaction 'SM50' using bdcdata mode 'N' update 'S'.

Read only

EddyGuo
Product and Topic Expert
Product and Topic Expert
0 Likes
1,329

What kind of programing tool you are using with your RF?

We use the Psion-Teklogix's TekConsole which is using VB.

Eddy

Read only

Former Member
0 Likes
1,329

Hello Eddy,

This tekconsole is a server or is a graphic interface like in the SAP GUI, only that this is for de mobile device?

Thanks

Alejandro

Read only

Former Member
0 Likes
1,329

Hi all,

I am programming an interface for an RF-scanner with a 32x18 screen.

In one of my RF-programs I use function module L_TO_CREATE_TR. Unfortunately sometimes L_TO_CREATE_TR exits with an error-message instead of a neat exception error.

The error-message is not shown in the scanner-screen.

Anybody knows a way to avoid the error-message or how to make it appear in the scannerscreen?

(One option is to check the given parameters if they will result in an error in L_TO_CREATE_TR, but I can't predict all errors).

Read only

Former Member
0 Likes
1,329

Hi,

We are using the function module in one of our RF developments and here is how it is called:

CALL FUNCTION 'L_TO_CREATE_TR'

EXPORTING

i_lgnum = p_lgnum

i_tbnum = p_tbnum

i_squit = p_l_squit

i_tbeli = p_l_squit

i_commit_work = c_x

i_bname = sy-uname

it_trite = it_trite

IMPORTING

e_tanum = p_v_tanum

EXCEPTIONS

foreign_lock = 1

qm_relevant = 2

tr_completed = 3

xfeld_wrong = 4

ldest_wrong = 5

drukz_wrong = 6

tr_wrong = 7

squit_forbidden = 8

no_to_created = 9

update_without_commit = 10

no_authority = 11

preallocated_stock = 12

partial_transfer_req_forbidden = 13

input_error = 14

OTHERS = 15

We have not faced any issues with the development yet.

regards

Aveek

Read only

Former Member
0 Likes
1,329

Hello to everybody,

i just wanted to say thank you for the replies.

I solved this problem with adding the no_exceptions

at the exceptions import at a call function.

kind regards,

Jasmin

Read only

0 Likes
1,329

In the Exceptions list - replace all the exceptions with:

ERROR_MESSAGE = 99.

This will ensure that you will always get an error message - instead of the halt of program that happens inside of normal SAP operation. Then you can interrogate the SY-MSGNO, SY-MSGTY, SY-MSGID parameters and figure out with your code what error happend and what the code level resolution should be.

A little late, but hey there is the answer.

Alex Flynn

Read only

Former Member
0 Likes
1,329

This message was moderated.