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

Error while sending FAX using FM

Former Member
0 Likes
685

Hi All,

I am trying to send fax using FM “SO_NEW_DOCUMENT_SEND_API1”. Fax number of format AANNNNNNNN(A-area code and N-Fax number) and passing country LAND field in receiver table ‘AU”. When program ran I can see the entry in SCOT under fax for waiting status, but when I send returns with error saying Country code not specified or incorrect fax number. Am I doing any thing wrong here? Thanks in advance and any suggestion much appreciated.

Regards,

Tim

Hi All,

I am trying to send fax using FM “SO_NEW_DOCUMENT_SEND_API1”. Fax number of format AANNNNNNNN(A-area code and N-Fax number) and passing country LAND field in receiver table ‘AU”. When program ran I can see the entry in SCOT under fax for waiting status, but when I send returns with error saying Country code not specified or incorrect fax number. Am I doing any thing wrong here? Thanks in advance and any suggestion much appreciated.

Regards,

Tim

4 REPLIES 4
Read only

Manohar2u
Active Contributor
0 Likes
649

Can you check whether it is working from SAP workplace with the same number?

If so then you need check the program. Would be helpfull if you paste the code.

Regds

Manohar

Read only

Former Member
0 Likes
649

Hi,

Use the following logic to check whether the Fax number is correct. If sy-subrc is 0, then call the FM for fax.

FORM check_number USING country

number.

DATA: service LIKE tskpa-service VALUE 'TELEFAX',

len LIKE sy-fdpos.

FIELD-SYMBOLS <p>.

  • windows GUI push the ? from mandatory input instead of overwriting it

len = STRLEN( to_nmber ).

IF len > 1.

SUBTRACT 1 FROM len.

ASSIGN to_nmber+len(1) TO <p>.

IF <p> = '?'.

<p> = space.

ENDIF.

ENDIF.

  • official check FM

CALL FUNCTION 'TELECOMMUNICATION_NUMBER_CHECK'

EXPORTING

country = country

number = number

service = service.

ENDFORM. " CHECK_NUMBER

Best regards,

Prashant

Read only

0 Likes
649

Hi Manohar/Prashant,

Thanks for your update. Well here is the code which i use in my interface. I haven’t using FM 'TELECOMMUNICATION_NUMBER_CHECK'before let me check before i post. But in mean time if you guy's see any thing in my code NOTOKAY please let me know. Thanks again for your help and let you know if it works.

Regards,

Tim

CODE BELOW

  • Fill the receiver list

clear gs_reclist.

gs_reclist-receiver = p_fax_number. (format 0212345678)

gs_reclist-rec_type = co_f. (F)

gs_reclist-country = co_au. (AU)

append gs_reclist to gt_reclist.

  • Send the document

call function 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_type = 'RAW'

document_data = gv_doc_chng

put_in_outbox = co_x

commit_work = co_x

TABLES

object_content = gt_objcont

receivers = gt_reclist

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

operation_no_authorization = 4

others = 99.

if sy-subrc eq 0.

move: co_y to c_fax.

else.

move co_n to c_fax.

endif.

Read only

Former Member
0 Likes
649

Country code