2006 Jun 24 9:50 AM
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
2006 Jun 24 10:25 AM
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
2006 Jun 24 11:48 AM
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
2006 Jun 26 12:34 AM
Hi Manohar/Prashant,
Thanks for your update. Well here is the code which i use in my interface. I havent 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.
2007 Jul 05 6:23 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |