Rfc sender - text file
I have a interface using rfc sender. When it's executed, a file is created.
When the format is a XML, the file is created, but, when I use "File Content Conversion" in "File Adatper" to convert the data in text format, the file is not created.
The structure of my RFC is:
Y_SD_XI_EDI_NOTFIS - RFC
DATA - Table
TEXT - Field
The configuration in "File Content Conversion" is:
Recordset Structure: DATA,* (I already write this using "DATA")
DATA.fileNames: TEXT
DATA.processConfiguration: fromConfiguration
DATA.endSeparator: 'nl'
What is the problem?
Hi,
I changed the RFC. Now, there is only DATA table and a Import Parameter.
I'm still with same problem.
I see that when I run the process don't using the Content Conversion, all the logs in RWB is "Successful", but, when I run using "Content Conversion", one log was "Waiting" (aways were generated three logs).
The log detail for process using "Content Conversion" is equal to process that dont use "Content Conversion".
The detail is:
code]2006-01-19 19:31:08 Success The message was successfully received by the messaging system. Profile: XI URL: http://sapccnwd:51300/MessagingSystem/receive/AFW/XI
2006-01-19 19:31:08 Success Using connection AFW. Trying to put the message into the receive queue.
2006-01-19 19:31:08 Success Message successfully put into the queue.
2006-01-19 19:31:08 Success The message was successfully retrieved from the receive queue.
2006-01-19 19:31:08 Success The message status set to DLNG.
2006-01-19 19:31:08 Success Delivering to channel: FileReceiverNotfis
2006-01-19 19:31:08 Success File adapter receiver: processing started; QoS required: ExactlyOnce
2006-01-19 19:31:08 Success File adapter receiver channel FileReceiverNotfis: start processing: party " ", service "SPASA_EDI"
2006-01-19 19:31:08 Success Connect to FTP server "ftp.discovirtual.terra.com.br", directory "/"
2006-01-19 19:31:08 Success Write to FTP server "ftp.discovirtual.terra.com.br", directory "/", -> file "notfis20060119-193108-773.txt"[/code]
See all my configuration, design, XML's and others:
+++ Design +++
Message Interfaces
[NotaFiscalAbstractAsync]
[NotaFiscalAbstractSync]
Integration Process
[NotaFiscalIP]
- Receiver1 -> Sender1 -> Sender2
- Container
Name Type
AbstractMessage NotaFiscalAbstractAsync
- Receiver1
Mode: Open S/A bridge
Synchronous Interface: NotaFiscalAbstractSync
Message: AbstractMessage
- Sender1
Mode: Asynchronous
Message: NotaFiscalAbstractAsync
- Sender2
Mode: Close S/A bridge
Message: NotaFiscalAbstractSync
+++ Configuration +++
Business Service: SPASA_EDI
Receiver Determination
- SPASA_EDI | Y_SD_XI_EDI_NOTFIS
Service: NotaFiscalIP - Receiver: NotaFiscalAbstractAsync
- NotaFiscalIP | NotaFiscalAbstractAsync
Service: SPASA_EDI - Receiver: NotaFiscalAbstractAsync
Sender Agreement
-SPASA_EDI | Y_SD_XI_EDI_NOTFIS
+++ RFC +++
Import
Sender
Tables
DATA ( TEXT CHAR(300) )
+++ XML Sender +++
<?xml version="1.0" encoding="UTF-8" ?>
- <rfc:Y_SD_XI_EDI_NOTFIS xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<SENDER></SENDER>
- <DATA>
- <item>
<TEXT>000ALPARGATAS-MOGI 0 1101061442NOT110106785</TEXT>
</item>
- <item>
<TEXT>310NOTFI110114420</TEXT>
</item>
- <item>
<TEXT>31161079117010402456010307119 AV.JOAO PINTO,100 MOGI MIRIM 13803360 SP 11012006SÃO PAUL</TEXT>
</item>
- <item>
<TEXT>312N G VESTUARIO LTDA ME 037901650001009020973096 AV. SAO PAULO,458 - LJ ** AVENIDA CENTERCENTRO MARINGA</TEXT>
</item>
- <item>
<TEXT>313063023223154546PR-INT 120C. 0025755011012006CONFECÇOES CAIXA 0000100000000000008576000009200455NN000000000000000000000000000</TEXT>
</item>
- <item>
<TEXT>313063023223154546PR-INT 120C. 0025755111012006CONFECÇOES CAIXA 0000100000000000012304000011200455NN000000000000000000000000001</TEXT>
</item>
- <item>
<TEXT>312ULYSSES FERREIRA BARBOSA E CIA LTDA 755136140001768220257143 R MIN OLIVEIRA SALAZAR, 4858 ** ** CENTRO UMUARAMA</TEXT>
</item>
- <item>
<TEXT>313063023223154547PR-INT 120C. 0025755211012006CONFECÇOES CAIXA 0000100000000000018192000014500300NN000000000000000000000000000</TEXT>
</item>
- <item>
<TEXT>313063023223154547PR-INT 120C. 0025755311012006CONFECÇOES CAIXA 0000100000000000024487000016500300NN000000000000000000000000001</TEXT>
</item>
- <item>
<TEXT>312MOURIZE ZANANDRA SCHIMDT DE S.FREIRE ELL055724850001019027647046 RUA HAROLDO HAMILTON, 478 - SALA 6 ** **CENTRO TOLEDO</TEXT>
</item>
- <item>
<TEXT>313063023223154548PR-INT 120C. 0025755411012006CONFECÇOES CAIXA 0000100000000000028314000019800242NN000000000000000000000000001</TEXT>
</item>
- <item>
<TEXT>312L GASPAR PROENCA E MG PROENCA LTDA 01109275000120251311376 AV. PARANA, 224 ** ** CENTRO IVAIPORA</TEXT>
</item>
- <item>
<TEXT>313063023223154549PR-INT 120C. 0025755511012006CONFECÇOES CAIXA 0000100000000000009780000009200437NN000000000000000000000000000</TEXT>
</item>
- <item>
<TEXT>313063023223154549PR-INT 120C. 0025755611012006CONFECÇOES CAIXA 0000100000000000016673000012000437NN000000000000000000000000001</TEXT>
</item>
- <item>
<TEXT>312LZK MATERIAIS ESPORTIVOS LTDA - ME 07639256000192255067003 RUA 23 DE JULHO, 291 - SALA 2 ** ** CENTRO POUSO RED</TEXT>
</item>
- <item>
<TEXT>313063023223154550SC-INT 120C. 0025755711012006CONFECÇOES CAIXA 0000100000000000013140000011800306NN000000000000000000000000000</TEXT>
</item>
- <item>
<TEXT>313063023223154550SC-INT 120C. 0025755811012006CONFECÇOES CAIXA 0000100000000000026964000018500306NN000000000000000000000000001</TEXT>
</item>
- <item>
<TEXT>312FUTEBOL MANIA COM LTDA 00845448000106253191831 RUA TENENTE SILVEIRA 141 ** ** CENTRO FLORIANOP</TEXT>
</item>
- <item>
<TEXT>313063023223154575SC-CAP 120C. 0025754811012006CONFECÇOES CAIXA 0000700000000000106188000180600312NN000000000000000000000000002</TEXT>
</item>
- <item>
<TEXT>312ULISSES ALCANTARA 814284010001493010273110 R CARLOS CAVALCANTI 99 ** CENTRO UNIAO DA</TEXT>
</item>
- <item>
<TEXT>313063023223154576PR-INT 120C. 0025754911012006CONFECÇOES CAIXA 0000300000000000030854000097800248NN000000000000000000000000001</TEXT>
</item>
- <item>
<TEXT>318000000000295472000000000004013000000000003798000000000001900000000000014037000000000000000</TEXT>
</item>
</DATA>
</rfc:Y_SD_XI_EDI_NOTFIS>
+++ XML File/Response (didn't using "Content Conversion") +++
<?xml version="1.0" encoding="UTF-8"?><rfc:Y_SD_XI_EDI_NOTFIS xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><SENDER></SENDER><DATA><item><TEXT>000ALPARGATAS-MOGI 0 1101061442NOT110106785</TEXT></item><item><TEXT>310NOTFI110114420</TEXT></item><item><TEXT>31161079117010402456010307119 AV.JOAO PINTO,100 MOGI MIRIM 13803360 SP 11012006SÃO PAUL</TEXT></item><item><TEXT>312N G VESTUARIO LTDA ME 037901650001009020973096 AV. SAO PAULO,458 - LJ ** AVENIDA CENTERCENTRO MARINGA</TEXT></item><item><TEXT>313063023223154546PR-INT 120C. 0025755011012006CONFECÇOES CAIXA 0000100000000000008576000009200455NN000000000000000000000000000</TEXT></item><item><TEXT>313063023223154546PR-INT 120C. 0025755111012006CONFECÇOES CAIXA 0000100000000000012304000011200455NN000000000000000000000000001</TEXT></item><item><TEXT>312ULYSSES FERREIRA BARBOSA E CIA LTDA 755136140001768220257143 R MIN OLIVEIRA SALAZAR, 4858 ** ** CENTRO UMUARAMA</TEXT></item><item><TEXT>313063023223154547PR-INT 120C. 0025755211012006CONFECÇOES CAIXA 0000100000000000018192000014500300NN000000000000000000000000000</TEXT></item><item><TEXT>313063023223154547PR-INT 120C. 0025755311012006CONFECÇOES CAIXA 0000100000000000024487000016500300NN000000000000000000000000001</TEXT></item><item><TEXT>312MOURIZE ZANANDRA SCHIMDT DE S.FREIRE ELL055724850001019027647046 RUA HAROLDO HAMILTON, 478 - SALA 6 ** **CENTRO TOLEDO</TEXT></item><item><TEXT>313063023223154548PR-INT 120C. 0025755411012006CONFECÇOES CAIXA 0000100000000000028314000019800242NN000000000000000000000000001</TEXT></item><item><TEXT>312L GASPAR PROENCA E MG PROENCA LTDA 01109275000120251311376 AV. PARANA, 224 ** ** CENTRO IVAIPORA</TEXT></item><item><TEXT>313063023223154549PR-INT 120C. 0025755511012006CONFECÇOES CAIXA 0000100000000000009780000009200437NN000000000000000000000000000</TEXT></item><item><TEXT>313063023223154549PR-INT 120C. 0025755611012006CONFECÇOES CAIXA 0000100000000000016673000012000437NN000000000000000000000000001</TEXT></item><item><TEXT>312LZK MATERIAIS ESPORTIVOS LTDA - ME 07639256000192255067003 RUA 23 DE JULHO, 291 - SALA 2 ** ** CENTRO POUSO RED</TEXT></item><item><TEXT>313063023223154550SC-INT 120C. 0025755711012006CONFECÇOES CAIXA 0000100000000000013140000011800306NN000000000000000000000000000</TEXT></item><item><TEXT>313063023223154550SC-INT 120C. 0025755811012006CONFECÇOES CAIXA 0000100000000000026964000018500306NN000000000000000000000000001</TEXT></item><item><TEXT>312FUTEBOL MANIA COM LTDA 00845448000106253191831 RUA TENENTE SILVEIRA 141 ** ** CENTRO FLORIANOP</TEXT></item><item><TEXT>313063023223154575SC-CAP 120C. 0025754811012006CONFECÇOES CAIXA 0000700000000000106188000180600312NN000000000000000000000000002</TEXT></item><item><TEXT>312ULISSES ALCANTARA 814284010001493010273110 R CARLOS CAVALCANTI 99 ** CENTRO UNIAO DA</TEXT></item><item><TEXT>313063023223154576PR-INT 120C. 0025754911012006CONFECÇOES CAIXA 0000300000000000030854000097800248NN000000000000000000000000001</TEXT></item><item><TEXT>318000000000295472000000000004013000000000003798000000000001900000000000014037000000000000000</TEXT></item></DATA></rfc:Y_SD_XI_EDI_NOTFIS>
+++ Log Using Content Conversion
Successful 19.01.2006 19:33:36 19.01.2006 19:33:36 EnviarNotaFiscal SPASA_EDI urn:sap-com:document:sap:rfc:functions
Y_SD_XI_EDI_NOTFIS
Successful 19.01.2006 19:33:27 19.01.2006 19:33:27 EnviarNotaFiscal SPASA_EDI urn:spasa_edi.notfis
NotaFiscalAbstractAsync
Successful 19.01.2006 19:33:18 19.01.2006 19:33:36 SPASA_EDI urn:sap-com:document:sap:rfc:functions
Y_SD_XI_EDI_NOTFIS
+++ Log when I didn't Use "Content Conversion"
Successful 19.01.2006 19:31:16 19.01.2006 19:31:16 EnviarNotaFiscal SPASA_EDI urn:sap-com:document:sap:rfc:functions
Y_SD_XI_EDI_NOTFIS
<b>Waiting</b> 19.01.2006 19:31:08 19.01.2006 19:31:08 EnviarNotaFiscal SPASA_EDI urn:spasa_edi.notfis
NotaFiscalAbstractAsync
Successful 19.01.2006 19:31:06 19.01.2006 19:31:16 SPASA_EDI urn:sap-com:document:sap:rfc:functions
Y_SD_XI_EDI_NOTFIS
Similar Messages
-
Problem to send text file to mail from ALV report
Hi Friends,
I have a problem in my ALV report with text file. As per the requirment, when we execute the program then text attachment should go to the particual email.
When i am using file type as XLS i am getting attachment with all 4 recoreds( input for 4 records) in mail. But all 4 records are coming in SAME ROW. It should come 4 records in 4 rows. when I use file type as TXT and separated by pipe symble in code, it is showing only one recored for same above input.
When i use file type as XLS and click the attachment in email, it will triggire one popul with three options like SAVE, OPEN, CANCEL.
But when i click on text file attachment, it is directly showing ony one recored.
Please correct me on this.
my code is
PERFORM send_file_as_email_attachment
tables i_message
i_attach
using v_email
'User last log on details'
'XLS'
'User log on list'
changing v_error
v_reciever.
FORM send_file_as_email_attachment tables pi_message
pi_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: l_error TYPE sy-subrc,
l_reciever TYPE sy-subrc,
l_mtitle LIKE sodocchgi1-obj_descr,
l_email LIKE somlreci1-receiver,
l_format TYPE so_obj_tp ,
l_attdescription TYPE so_obj_nam ,
l_attfilename TYPE so_obj_des ,
l_sender_address LIKE soextreci1-receiver,
l_sender_address_type LIKE soextreci1-adr_typ,
l_receiver LIKE sy-subrc.
l_email = p_email.
l_mtitle = p_mtitle.
l_format = p_format.
l_attdescription = p_attdescription.
l_attfilename = p_filename.
l_sender_address = p_sender_address.
l_sender_address_type = p_sender_addres_type.
Fill the document data.
v_doc_data-doc_size = 1.
Populate the subject/generic message attributes
v_doc_data-obj_langu = sy-langu.
v_doc_data-obj_name = 'SAPRPT'.
v_doc_data-obj_descr = l_mtitle .
v_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR v_doc_data.
READ TABLE i_attach INDEX v_cnt.
v_doc_data-doc_size =
( v_cnt - 1 ) * 255 + STRLEN( i_attach ).
v_doc_data-obj_langu = sy-langu.
v_doc_data-obj_name = 'SAPRPT'.
v_doc_data-obj_descr = l_mtitle.
v_doc_data-sensitivty = 'F'.
CLEAR i_attachment.
REFRESH i_attachment.
i_attachment[] = pi_attach[].
Describe the body of the message
CLEAR i_packing_list.
REFRESH i_packing_list.
i_packing_list-transf_bin = space.
i_packing_list-head_start = 1.
i_packing_list-head_num = 0.
i_packing_list-body_start = 1.
DESCRIBE TABLE i_message LINES i_packing_list-body_num.
i_packing_list-doc_type = 'RAW'.
APPEND i_packing_list.
Create attachment notification
i_packing_list-transf_bin = 'X'.
i_packing_list-head_start = 1.
i_packing_list-head_num = 1.
i_packing_list-body_start = 1.
DESCRIBE TABLE i_attachment LINES i_packing_list-body_num.
i_packing_list-doc_type = l_format.
i_packing_list-obj_descr = l_attdescription.
i_packing_list-obj_name = l_attfilename.
i_packing_list-doc_size = i_packing_list-body_num * 255.
APPEND i_packing_list.
Add the recipients email address
CLEAR i_receivers.
REFRESH i_receivers.
i_receivers-receiver = l_email.
i_receivers-rec_type = 'U'.
i_receivers-com_type = 'INT'.
i_receivers-notif_del = 'X'.
i_receivers-notif_ndel = 'X'.
APPEND i_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = v_doc_data
put_in_outbox = 'X'
sender_address = l_sender_address
sender_address_type = l_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = v_sent_all
TABLES
packing_list = i_packing_list
contents_bin = i_attachment[]
contents_txt = i_message
receivers = i_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
l_error = sy-subrc.Hi,
declare the following constant in u r program and concatenate at the end of each and every record in your internal table.
CONSTANTS : LV_CRLF TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF.
for eg.
if u internal table has values like
row1
row2
row3
concatenate the 1st record lv_crlf into first record.
conactenate second record lv_crlf into second record.
concatenate third record lv_crlf into third record.
now attach the internal table to the FM which u use for sending email. Each and every row will come in new line. The LV_CRLF will hold nothing but a line feed character (#).
Hope it will solve u r problem
Regards,
Rose. -
Hello Gurus,
I like to send a text file from the aplication server to spool or send this file to a specific printer.
What instructions do you know?
Thanks.
Joseph.Hi,
I think the best way to send a text file from application server to the spool printer.
1. Download the file into a internal table
2. Use standard function modules to send the table to the spool printer
Regards -
How to send text file as an email attachment havin more than 255 characters
My requirement is to generate a text file and to send this text file as E-mail attachment. I am using FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' to send the E-mail. but here the limitation is the number of characters per line must not be more than 255 characters whereas in my case it is exceeding 1000 characters per line. could anyone please suggest me what should i do now ? Each field in the text file has to be tab delimited.
Simplest might well be to use javamail API instead of the two tags that Sites provides, e.g. see email - Sending mail attachment using Java - Stack Overflow for a full example.
Phil -
Use FTP Transport Protocol (XI) to send text file created from R3
I've configured a Port in IDoc Processing (WE21) to create an output file from a Bank Partner Profile (WE20) where my Message Type is PAYEXT and IDoc Type PEXR2002.
I need to take this Text File and send it to the Bank;s FTP site using the Integration Server (XI).
How can I take this text file and simply send it to the Bank without going through File Content Conversion in order to convert it to XML as the Sender and then uncovert it during the Receiver to FTP the file to the Bank?
If that is not possible, would anyone know how to configure the RecordSet Structure and parameters for both the Sender and Receiver?Hi,
Let me re-phrase your scenario:
ECC is required to send PAYEXT IDOC to XI which needs to be send to the bank in IDOC text file format to the bank. If this is the case we can achieve this by doing the following:
1.Rather than using TRFC port used by the IDOC as the method of communication, you can leverage using file port. The configurations to the file port are simple. You need to select a place where you can drop the IDOC file created by the ECC system and XI would pick up the file.
2. Poll for the file using NFS from that particular location where ECC drops the file. (If it is being staged on the ECC system, then XI service user SAPservice<SID> must have access permission on that folder like \usr\sap\put\interfaces.
3. Configure receiver FTP adapter to send the file to the bank.
Hope this helps.
Indranil
Award points if helpful -
How to copy/send text file from FTPS to SAP ECC File Port
Hi Frdns,
I am working on one design, actually my requirement as follows
I am receiving financial information document from Banks, which is in the form of BIA2 message format, it looks like text file. This information needs to be sending to SAP ECC system.
I identified some approaches to full fill the requirement
1)Using Conversion agent/or third party tools to convert BIA2 message in to XML, then using PI I will pick up the XML message, convert it in to IDoc.
2)Without any conversion I will copy the same file (original BIA2 message) in to SAP ECC file port, in this case no conversion required, calling some program I will schedule it.
I am looking forward t implement the second approach because it saves lot of money to my client.
Now I am wondering using File adapter can i copy to SAP ECC File Port or I required ABAP proxy?
What is the best approach to copy the BIA message text file from FTPS to SAP ECC File Port.??
Regards,
RajHi Raja,
>>Now I am wondering using File adapter can i copy to SAP ECC File Port or I required ABAP proxy?
Yes you can do this copy, the only restriction that can happen is the file size.. If you are sure that the fiel will be of few MB at the max then you can use the Configuration part alone and copy it to ECC folder. For doing this you need the following:
1. Sender agreement (mention the sender interface as anything XYZ)
2. Sender communication channel. Pick the file in binary mode
3. Receiver determination (keep both the sender and receiver service as same)
4. Interface Detemiantion (dont specify any mapping and keep the receiver interface name as XYZ)
5. Create receiver agreement (with same service and interface)
6. Use file adapter here
Regards
Suraj -
Sending text files as attachments in mails
Hi Experts,
I want to send some content in a text file as an attachment in the mail. Can anybody provide me the sample code for this.
points guaranteed.
thanks
sanakrHI
Check this one
first create a Include report with the following coding
*& Include ZPA1_INCLFOR_MAIL *
* Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
* FORM
FORM ml_customize USING objname objdesc.
*----------- Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
*--------- Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
* FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
* FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
* FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
*--------- Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
* IMPORTING
* COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
* Header Data
* Already Done Thru FM
* Main Text
* Already Done Thru FM
* Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
* Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
* Receiver List
* Already done thru fm
ENDFORM. "ml_prepare
* FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
* CONTENTS_HEX = objhex
* OBJECT_PARA =
* object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
* FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
*-------------- Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
*------------- Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
* FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
*-------- Data
DATA : pos TYPE i.
DATA : len TYPE i.
*------------ Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
Then include that report in the following report and copy the same code and paste it there
*& Report ZPA_TEMP147 *
REPORT ZPA_TEMP147 .
INCLUDE zpa1_inclfor_mail.
* DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
* SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
* AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
* START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
* FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
* CHECK_DOS_FORMAT =
IMPORTING
* DRIVE =
EXTENSION = extension
NAME = name
* NAME_WITH_EXT =
* PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
Regards
Pavan -
Hi All
I have this requirement
I have to read vendor data in sap , create a text file of this data in the daily basis and send the text file to a third party system.
I know how to read data and create the file , but how can I send this file to other third party system , actually it is an SQL server, which uses this file to update the vendor table.
Thank you.hi Malu,
If you want o put the File in Unix server..
us the commands FTP_COMMAND , FTP_CONNECT and place the file in the unix server.
of you want to place file in the Application server use open data set and close data set..
if you want to place file manually..
use t-code CZ3Y.
regards,
Prabhudas -
SENDING TEXT FILE AS AN ATTACHMENT
Hi,
I want to send an email as a TEXT file attachment.
Thanks
Vikranth Khimavathhi,
Use the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send mail with an attachment. Here is the sample code.
FUNCTION Z_SEND_MAIL.
""Local interface:
*" IMPORTING
*" VALUE(MESSAGE) TYPE STRING OPTIONAL
*" VALUE(RECEIVER_MAIL) TYPE STRING OPTIONAL
*" VALUE(TO) TYPE STRING OPTIONAL
data for send function
DATA doc_data TYPE sodocchgi1.
DATA object_id TYPE soodk.
DATA objcont TYPE TABLE OF soli INITIAL SIZE 10.
DATA wa_objcont LIKE LINE OF objcont.
DATA receiver TYPE TABLE OF somlreci1 INITIAL SIZE 1.
DATA wa_receiver LIKE LINE OF receiver.
move message
TO doc_data-obj_descr .
This is the subject for your mail.
WRITE 'Sub:test Mail' TO doc_data-obj_descr.
This is the body of your mail.
concatenate ' Hi ' to into wa_objcont-line separated by space.
append wa_objcont to objcont.
wa_objcont-line = message.
append wa_objcont to objcont.
Specify receipent id.
MOVE: RECEIVER_MAIL TO wa_receiver-receiver,
'X' TO wa_receiver-express,
'U' TO wa_receiver-rec_type.
APPEND wa_receiver TO receiver.
Finally call the function module.
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = doc_data
put_in_outbox = 'X' "Save Document in Outbox
COMMIT_WORK = 'X'
IMPORTING
new_object_id = object_id
TABLES
object_content = objcont
receivers = receiver
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7.
SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
ENDFUNCTION.
REPORT RSCONN01 MESSAGE-ID XS NO STANDARD PAGE HEADING.
INCLUDE <SYMBOL>. " 11.11.96
TYPE-POOLS: SX.
TYPE-POOLS: KKBLO.
PARAMETERS: MODE(3) TYPE C DEFAULT '*',
OUTPUT TYPE C DEFAULT ' '. "B20K072036 new parameter
selection-screen skip.
parameters maxjobs type sx_maxjobs default 1.
parameters rfcgroup type bdfields-rfcgr.
selection-screen skip.
parameters maxpsize type sx_maxpsize default 1000.
parameters minpsize type sx_minpsize default 20.
parameters maxsel type sx_maxqrows default 20000.
parameters timepo type sx_timepo default 2.
parameters timeout type sx_arfctimeout default 100.
parameters commit type sx_commit default 1.
data address_types type sx_addrtab.
data job_params type sxjobs.
data jobdata type sxjobdata.
--- initialization -
initialization.
get default parameters
call function 'SX_JOBDATA_GET'
changing
jobdata = jobdata.
give defaults to parameters
maxjobs = jobdata-maxjobs.
maxpsize = jobdata-maxpsize.
minpsize = jobdata-minpsize.
maxsel = jobdata-maxsel.
timepo = jobdata-timepo.
timeout = jobdata-arfc_timeout.
commit = jobdata-commit_after.
--- start-of-selection -
start-of-selection.
perform addr_type_to_table using mode
changing address_types.
job_params-maxjobs = maxjobs.
job_params-rfcgroup = rfcgroup.
job_params-maxpsize = maxpsize.
job_params-minpsize = minpsize.
job_params-maxsel = maxsel.
job_params-timepo = timepo.
job_params-arfc_timeout = timeout.
job_params-commit_after = commit.
call function 'SX_OBJECTS_SEND'
exporting
address_types = address_types
output = output
job_params = job_params
exceptions
others = 1.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
exit.
TABLES: SXADDRTYPE.
DATA: selection type SX_ADDRTAB,
NR_SO_OBJECTS TYPE I,
OBJ_CAT TYPE SX_OBJ_CAT OCCURS 20 WITH HEADER LINE.
if sy-batch = 'X'.
message I078 with 'RSCONN01' SY-HOST SY-MANDT.
endif.
*fill selection table
refresh selection.
if mode = '*'.
clear mode.
endif.
IF NOT ( MODE IS INITIAL ).
SELECT SINGLE * FROM SXADDRTYPE WHERE ADDR_TYPE EQ MODE.
IF SY-SUBRC NE 0.
IF OUTPUT EQ 'X'.
WRITE: MODE, TEXT-001, TEXT-002.
ENDIF.
EXIT.
ENDIF.
IF SXADDRTYPE-METHOD NE 'SAPCONNECT'.
IF OUTPUT EQ 'X'.
WRITE: MODE, TEXT-003, TEXT-004, TEXT-005.
ENDIF.
EXIT.
ENDIF.
append sxaddrtype-addr_type to selection.
ELSE.
select * from sxaddrtype
where method = 'SAPCONNECT'
and extern = sx_true.
case sxaddrtype-addr_type.
when 'INT' or 'FAX' or 'PAG' or
'PRT' or 'RML' or 'X40'.
append sxaddrtype-addr_type to selection.
endcase.
endselect.
ENDIF.
CALL FUNCTION 'SX_OBJECTS_SEND'
EXPORTING
ADDRESS_TYPES = SELECTION
IMPORTING
NR_SO_OBJECTS = NR_SO_OBJECTS
TABLES
OBJ_CAT = OBJ_CAT
EXCEPTIONS
INTERNAL_ERROR = 1
OTHERS = 2.
IF SY-SUBRC NE 0.
IF OUTPUT EQ 'X'.
Always write out this error message:
WRITE: TEXT-006, SY-SUBRC.
ENDIF.
EXIT.
ENDIF.
IF NR_SO_OBJECTS = 0.
IF OUTPUT EQ 'X'.
WRITE: TEXT-007.
ENDIF.
EXIT.
ENDIF.
IF OUTPUT EQ 'X'.
PERFORM DISPLAY_OBJECT_CATALOGUE.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR MODE.
PERFORM F_SHOW_ADDR_TYPES CHANGING MODE.
AT SELECTION-SCREEN ON HELP-REQUEST FOR OUTPUT.
PERFORM F_HELP_OUTPUT.
*& Form addr_type_to_table
text
form addr_type_to_table using address_type type sx_addrtyp
changing address_types type sx_addrtab.
data adrtp_wa type sxaddrtype.
data adrtp type sx_addrtyp.
if address_type <> '*'.
adrtp = address_type.
endif.
if not adrtp is initial.
select single * from sxaddrtype into adrtp_wa
where addr_type = adrtp.
if sy-subrc <> 0.
message i009 with adrtp.
exit.
endif.
if adrtp_wa-method ne 'SAPCONNECT'.
message i027 with adrtp.
exit.
endif.
append adrtp_wa-addr_type to address_types.
else.
select * from sxaddrtype into adrtp_wa
where method = 'SAPCONNECT'
and extern = sx_true.
case adrtp_wa-addr_type.
when 'INT' or 'FAX' or 'PAG' or
'PRT' or 'RML' or 'X40'.
append adrtp_wa-addr_type to address_types.
endcase.
endselect.
endif.
endform. " addr_type_to_table
*& Form DISPLAY_OBJECT_CATALOGUE
Anzeige der Liste der zum Versenden selektierten Objekte
--> p1 text
<-- p2 text
FORM DISPLAY_OBJECT_CATALOGUE.
DATA: FIELD_LST TYPE KKBLO_T_FIELDCAT.
DATA: FIELD_CAT TYPE KKBLO_FIELDCAT.
DATA: IS_LAYOUT TYPE KKBLO_LAYOUT.
IS_LAYOUT-NO_ZEBRA = 'X'.
FIELD_CAT-REF_TABNAME = 'SXOBJCAT'.
FIELD_CAT-NO_SUM = 'X'.
FIELD_CAT-JUST = 'L'.
FIELD_CAT-OUTPUTLEN = 3.
FIELD_CAT-REPTEXT = 'Trc'.
FIELD_CAT-FIELDNAME = 'DISPL_TRC'.
FIELD_CAT-HOTSPOT = 'X'.
FIELD_CAT-SYMBOL = 'X'.
APPEND FIELD_CAT TO FIELD_LST.
FIELD_CAT-SYMBOL = ' '.
FIELD_CAT-OUTPUTLEN = 0.
FIELD_CAT-HOTSPOT = ' '.
FIELD_CAT-REPTEXT = ' '.
CLEAR: FIELD_CAT-NO_ZERO, FIELD_CAT-KEY .
FIELD_CAT-FIELDNAME = 'ID'. APPEND FIELD_CAT TO FIELD_LST.
FIELD_CAT-FIELDNAME = 'TITLE'. APPEND FIELD_CAT TO FIELD_LST.
FIELD_CAT-FIELDNAME = 'TYPE'. APPEND FIELD_CAT TO FIELD_LST.
FIELD_CAT-FIELDNAME = 'NR_RECIP'. APPEND FIELD_CAT TO FIELD_LST.
LOOP AT FIELD_LST INTO FIELD_CAT.
FIELD_CAT-COL_POS = SY-TABIX.
MODIFY FIELD_LST FROM FIELD_CAT.
ENDLOOP.
LOOP AT OBJ_CAT.
OBJ_CAT-DISPL_TRC = SYM_PENCIL.
MODIFY OBJ_CAT.
ENDLOOP.
CALL FUNCTION 'K_KKB_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = 'RSCONN01'
I_CALLBACK_USER_COMMAND = 'CB_OL_UCOMM'
I_CALLBACK_TOP_OF_PAGE = 'CB_OL_TOP'
I_CALLBACK_PF_STATUS_SET = 'CB_OL_PFSTATUS'
I_TABNAME = 'OBJ_CAT'
IS_LAYOUT = IS_LAYOUT
IT_FIELDCAT = FIELD_LST
TABLES
T_OUTTAB = OBJ_CAT
EXCEPTIONS
OTHERS = 1.
ENDFORM. " DISPLAY_OBJECT_CATALOGUE
*& Form CB_OL_PFSTATUS
Callback Funktion (wird aus Listtool heraus gerufen) *
--> p1 text
<-- p2 text
FORM CB_OL_PFSTATUS
USING EXTAB TYPE KKBLO_T_EXTAB.
SET PF-STATUS 'CATALOG' EXCLUDING EXTAB.
SET TITLEBAR 'CAT'.
ENDFORM. " CB_OL_PFSTATUS
*& Form CB_OL_TOP
Callback Funktion (wird aus Listtool heraus gerufen) *
--> p1 text
<-- p2 text
FORM CB_OL_TOP.
ENDFORM. " CB_OL_TOP
*& Form CB_OL_UCOMM
text *
--> p1 text
<-- p2 text
FORM CB_OL_UCOMM
USING UCOMM LIKE SY-UCOMM
SELFIELD TYPE KKBLO_SELFIELD.
DATA: NUMC5(5) TYPE N.
NUMC5 = SELFIELD-TABINDEX.
CASE UCOMM.
WHEN 'PIC1'.
CASE SELFIELD-SEL_TAB_FIELD.
WHEN 'OBJ_CAT-DISPL_TRC' OR 'OBJ_CAT-TITLE' OR 'OBJ_CAT-ID'.
READ TABLE OBJ_CAT INDEX SELFIELD-TABINDEX.
IF SY-SUBRC NE 0.
MESSAGE E042.
ENDIF.
SUBMIT RSWTTR01
WITH P_TYPE = 'D'
WITH P_UNAME = SPACE
WITH P_OBJ = OBJ_CAT-ID AND RETURN.
WHEN OTHERS.
MESSAGE I041 WITH NUMC5 SELFIELD-SEL_TAB_FIELD UCOMM.
ENDCASE.
WHEN OTHERS.
MESSAGE I041 WITH NUMC5 SELFIELD-SEL_TAB_FIELD UCOMM.
ENDCASE.
ENDFORM. " CB_OL_UCOMM
*& Form F_SHOW_ADDR_TYPES
text
<--P_MODE text *
FORM F_SHOW_ADDR_TYPES CHANGING A_TYPE.
DATA: HELP_INFO LIKE HELP_INFO
, sel_value like help_info-fldvalue
, CUCOL LIKE SY-CUCOL
, CUROW LIKE SY-CUROW
, value like help_info-fldvalue value 'SE38'
, IND LIKE SY-INDEX
, C_SY_SUBRC(3) TYPE C
DATA: BEGIN OF FIELDS OCCURS 5.
INCLUDE STRUCTURE HELP_VALUE.
DATA: END OF FIELDS.
DATA: BEGIN OF LIST_OF_FIELDS OCCURS 5,
NAME(21) TYPE C.
DATA: END OF LIST_OF_FIELDS.
DATA: BEGIN OF FULL_LIST OCCURS 5,
ADDRESS_TYPE LIKE SXADDRTYPE-ADDR_TYPE,
END OF FULL_LIST.
REFRESH FIELDS.
REFRESH LIST_OF_FIELDS.
REFRESH FULL_LIST.
HELP_INFO-TABNAME = 'SXADDRTYPE'.
HELP_INFO-FIELDNAME = 'ADDR_TYPE'.
SELECT * FROM SXADDRTYPE.
IF SXADDRTYPE-METHOD NE 'SAPCONNECT'
OR SXADDRTYPE-EXTERN NE SX_TRUE.
CONTINUE.
ENDIF.
MOVE SXADDRTYPE-ADDR_TYPE TO FULL_LIST-ADDRESS_TYPE.
APPEND FULL_LIST.
ENDSELECT.
MOVE '*' TO FULL_LIST-ADDRESS_TYPE.
APPEND FULL_LIST.
LIST_OF_FIELDS-NAME = 'SXADDRTYPE-ADDR_TYPE'.
APPEND LIST_OF_FIELDS.
CALL FUNCTION 'TRANSFER_NAMES_TO_FIELDS'
EXPORTING
SELECTFIELD = HELP_INFO-FIELDNAME
TABLES
FIELDS = FIELDS
NAMELIST = LIST_OF_FIELDS
EXCEPTIONS
WRONG_FORMAT_GIVEN = 1
OTHERS = 2.
CALL FUNCTION 'HELP_VALUES_GET_WITH_VALUE'
EXPORTING
DISPLAY = ' '
FIELDNAME = HELP_INFO-FIELDNAME
TABNAME = HELP_INFO-TABNAME
GIVEN_VALUE = HELP_INFO-FLDVALUE
TITEL = TEXT-002
IMPORTING
SELECT_VALUE = HELP_INFO-FLDVALUE
SELECT_INDEX = IND
TABLES
FIELDS = FIELDS
VALUETAB = FULL_LIST
EXCEPTIONS
FIELD_NOT_IN_DDIC = 1
MORE_THEN_ONE_SELECTFIELD = 2
NO_SELECTFIELD = 3
OTHERS = 4.
C_SY_SUBRC = SY-SUBRC.
CASE SY-SUBRC.
WHEN '0'.
READ TABLE FULL_LIST INTO A_TYPE INDEX IND.
WHEN OTHERS.
MESSAGE E022 WITH C_SY_SUBRC.
ENDCASE.
ENDFORM. " F_SHOW_ADDR_TYPES
*& Form F_HELP_OUTPUT
text
--> p1 text
<-- p2 text
FORM F_HELP_OUTPUT.
DATA: CANCELLED TYPE C,
C_SY_SUBRC(8) TYPE C.
CALL FUNCTION 'POPUP_DISPLAY_TEXT'
EXPORTING
LANGUAGE = SY-LANGU
POPUP_TITLE = 'SAPconnect'
TEXT_OBJECT = 'RSCONN01_F1_OUTPUT_40B'
IMPORTING
CANCELLED = CANCELLED
EXCEPTIONS
TEXT_NOT_FOUND = 1
OTHERS = 2.
C_SY_SUBRC = SY-SUBRC.
IF SY-SUBRC NE 0.
MESSAGE E035 WITH C_SY_SUBRC. leads to dump !
ENDIF.
ENDFORM. " F_HELP_OUTPUT
Regards,
Richa -
Sending Text File through Mail Adapter
Hi Group,
I need to send my Target as Mail attachment in the Text File?Can any body SuggestHi swabap,
You need to use PayloadSwapBean module in the Mail receiver adapter. This module will send the payload as an attchment to the mail server.
Check the following link
<a href="/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure:///people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
Regards,
Akshay -
hi
i've trying to send a text file via rs-232 but no success
The file contains a code for a device im dealing with, when i send the text file with labview to the device, it went ok with no errors, but when i connect the device on hyperterminal and check if the code was loaded it was not.
can you please give some clues to deal with this?
thanks a lot
attached example text file and LV code
Attachments:
Serial.JPG 45 KB
DefineHome.txt 1 KBSome devices are very picky with the End Of Line. You might want to right-click on your FIle Read and deselect the "Convert EOL".
Or if you need to write 1 line at a time, right click on the Read Text File and select "Read Lines". Set the number of line to read to -1 (read all) and then wire the resulting array into a FOR loop where you do the VISA Write.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
RFC Sender Asynchronous -- File Problem
Hi all,
I want to sent an asynchronous RFC to a file but when I execute my scenario in R3 it always returns a dump. In the XI monitoring I get the response error from the file: "Unable to read the payload from the message object".
I think its strange because I even don't want the file adapter to send a response but he does. I suspect that the problem is on R3 side because it sends a synchronous RFC call, but I don't have any idea how to send an Asynchronous RFC call to XI (via the RFC adapter).
Steps I made:
- Created on R3 a TCP/IP entry as registered server program
- Created in XI an RFC adapter with registered server program name
- rest of the configuration...
I think my main problem is that R3 expects an answer back because it throws a synchronous call to XI, but I don't have any clue how to set up an asynchronouss RFC call in R3 to XI (so my ABAP program doesn't dump).
TIAHi Peter,
first, if you didn't already have done that, load up a RFC function module to XI Repository, where you have only the XSD, no abap source code.
In a ABAP program code:
CALL FUNCTION 'MyFunction'
DESTIONATION 'mySM59Destination'
IN BACKGROUND TASK
... "the normal call
COMMIT WORK.
Regards,
Udo -
Hi experts,
I developed a custom program to send a text file using BCS. When I open text file using text pad, some special characters are displaying at the beginning of the sentence.
ÿþ are displayed at the beginning of the sentence. How can I remove this?
Thanks,
MarcHi,
Related BCS class, Check these example programs how attachments are being generated.
BCS_EXAMPLE_1
BCS_EXAMPLE_2
BCS_EXAMPLE_3
BCS_EXAMPLE_4
BCS_EXAMPLE_5 - BCS Use, Example 5 (Winword Attachment)
BCS_EXAMPLE_6 - Send PDF Form by E-Mail
BCS_EXAMPLE_7 - BCS: Send E-Mail with Self-Created Excel Attachment (Example)
Thanks
Venkat.O -
Is it possible to send text file with class cl_bcs
Hi,
i want to send a text file with class
cl_bcs but i dont know it is possible or not?
Thanks.no, it isn´
-
Asynch RFC Sender to File Receiver Szenario (table content)
Hi,
I have the following szenario: RFC(R/3) => XI => File
At the moment I implemented the following:
1. Z-Report in R/3 calls a function module:
CALL FUNCTION 'Z_RFC_TO_XML'
IN BACKGROUND TASK
DESTINATION xi_dest
EXPORTING
it_table = it_table.
COMMIT WORK.
2. The RFC Sender Adapter on XI takes the RFC data and convert it to RFC-XML
3. There is a message mapping from RFC-XML to XML-Structure
4. The File Receiver Adapter write the XML document to the file system
The scenario is working without error and the file is created. But on R/3 side the it_table is filled with 20 rows before the function module Z_RFC_TO_XML is called. But on xi side I only receive one row (the header line).
Is it possible to transmit the whole table content to xi and not only one row? And if yes, how can I do this?
Thanks,
manukuHi Tobias,
Currently am doing this scenarioa RFC to file
CALL FUNCTION 'Z_RFC_TO_XML'
> IN BACKGROUND TASK
> DESTINATION xi_dest
> EXPORTING
p_werks = 'Plant no'
TABLES
> it_table = it_table.
> COMMIT WORK.
But here am using Exporting and Tables parameter.. When i debug this FM, the debugger is not going to the FM.
Can you help me in solving this issue....
Thanks and Regards,
Vijay vikram
Maybe you are looking for
-
Hi all, I have a customer who is trying to save a couple credit memo and when she clicks on execute it highlights the quantity field and doesn't save. The credit memo is working for other invoices in the same area. The customer is using SAP B
-
Delete xml information / reference without losing structure
Hello, I'm currently working on a project that builds catalogs. The catalogs consist of several different, linked INDD-files. Now, those INDD-files are filled up with XML data and saved. When we import them, we always get errors that there is a link
-
Hi all, I would like to seek your help on how to lock wbs element in a report program. Is there any bapi or function module for that? The requirement is to lock the wbs element when the user process/run that particular WBS. If the user exit to the re
-
Questions about Windows services on a OS X 10.3 server
Hi! I'm wanting to configure an OS X 10.3 server to participate in a Windows workgroup so I can share a directory on the server that the Windows machine can use as a backup drive, of sorts. I've got only ONE Windows box in an all-Mac network. The ult
-
Xml and ![CDATA]
Hi I have an xml file with the following element : <paragraphSummary> <![CDATA[<p>Today is Tuesday.</p>]]> </paragraphSummary> If I am using DOM how is it possible to obtain the data within <![CDATA... (that is <p>Today is Tuesday.</p>). As I underst