Using RFC Function Module to send data to NON SAP Application
Hi friends,
Please guide me how can I send data from SAP -> Dotnet Applcation using Dotnet Connector through RFC function module from SAP side. In my scenerio, I Run Z transaction to executte RFC function module which create some data to pass to dotnet connector.
Regards,
Rajesh Kumar
Hi,
You can make use of Dotnet connector to read the content of SAP RFC .. (eaiest of all)
The RFC can be executed using connector , and can read the data simultaneously.. u need to code in dotnet for this..
else create a webservice and read it from dot net ..
Regards
Renu Gusain
Edited by: Renu Gusain on Jan 25, 2010 12:55 PM
Similar Messages
-
Message text available in java using RFC function module
Hello,
I wrote a function module with the ABAP statement
MESSAGE .... RAISING PARAMETER_ERROR
The java developer gets the PARAMETER_ERROR but no
message text.
Is the any way (e.g. exception class) to get the message text also.
Thankshi Michael,
In the RFC function module use the table RETURN of type BAPIRET2 and instead of raising the error append the error in RETURN. later in your java code you can read this table RETURN and retrieve the error along with the error text.
Hope this helps.
Regards,
Richa. -
Get interface of RFC function modules in a remote system
Hi,
my goal is to write a report which checks if DDIC structures in two systems fit together when I use RFC`s.
I have the destination and the name of the RFC.
Can somebody tell me if I can get a list of the Importing/Exporting Parameters of this RFC? Maybe even with a typedescribtion?
Thanks for you help.
Best regards
Lars
Edited by: Lars-Eric Biewald on May 21, 2008 8:39 AMHello ,
Thank you for your quick help.
Here I have 3 ECC 6 system .
1 Central systen
2 Slave system
Data will be updated to 2 slave system using RFC function module .
We've already the SAP address, Client, User name , Password.. of the remote system
So here how we will create RFC in SM59 to be used in the RFC call ?
We will transfer the username, password , client in the RFC function module/..
Here I do not know how to create RFC connection in SM59 and how to use them in ABAP
Could you please help me ????
Thanks -
How to avoid use of function module in case of background jobs?
Hi ,
I am working a file tranfer interface .Functionality is to extract file either apllication or presentation server , and process the file through bapi , send the result in their respective server. This program should run through batch jobs in background mode.
I am using following function module :
SUBST_GET_FILE_LIS : Get the file list from application server
TMP_GUI_DIRECTORY_LIST_FILES : Get the file list from presentation server
GUI_UPLOad : to extract file data from presentation server
GUI_downLOAD : to download data to presentation server
in case of background job these function modules will not work.... so how to resolve this issue...
what are the methods we can apply?
Thanks & Regards
SandeepHi,
This FM is used to get list of files from Application server (will work in Background). This cannot be used to list files from presentation server. There is no way , by which you can process presentation server files in background mode.
Regards
Vinod -
Problem while calling an RFC Function Module in Background
Hello,
I have created a RFC function module for reading data from an external DB system. The FM calls an external RFC program (coded in C++ using RFC SDK), which delivers the required data. This external program is maintainged as an TCP RFC Connection in SM59.
Further I have created a report, that calls the RFC function module to get the data from the external RFC programm.
My problem is, when I call the report in foreground, everything works OK, the RFC connection works and data can be read from the external program.
However, when I schedule the report to run in background as a job, the report is stating in the protocoll that there was a problem calling the defined RFC connection (although the connection is working properly at that time).
More funny is, this particular problem with running in background occurs only in the productive system, in test and development system the report works correctly also while running as a job in background.
Can you suggest the solution to this problem? Could it be something with authorisations or server settings?
I will be on holiday for the next 6 weeks, so take your time to answer .
Regards,
Dusan.
Edited by: Julius Bussche on Jan 22, 2009 7:19 PM
Please read the forum rules about u r g e n t ...This is an external RFC server program, not a remote enabled ABAP RFC function module as the others seem to be assuming, right?
Is it possible that your DEV and QAS systems only have one application server, but the PROD has many and dedicated one(s) for processing low priority background jobs?
It might be that the target server of your TCP connection is not this BTC instance, and your RFC server is returning the data "locally" - so, into nirvana...
Just guessing, but might be worth checking.
Cheers,
Julius -
RFC Function Module Configuration
Hi Experts,
I have created an RFC function module which pushes data from R/3 system to XI. I need to configure this RFC in SM59. I am having XI server details and R/3 server details. Anyone can help me how to configure this and what kind of connection i have to use. so that data is pushed to XI system. we are having a bunch of RFC's in our project. we need to create configuration for all the RFCs.
and what is Program ID?
Please give me the sequence of steps for configuration.my mail id is [email protected]
Points will be awarded for all the answers.
Thanks & Regards,
Poorna.hi poorna,
step 1- first go to the transaction sm59 and here you can
create a destination for R/3 to R/3 server type 3.
step 2- Now give the IP address for the another R/3 system (XI) here
and the system no will be 00 (default).
step 3- press save. now go to the second tab logon/ security
here declared the clind no, language , user name and
password.
step 4- press save and then check the test connection.
Do reward if usefull.
regards,
vijay -
Regarding RFC Function module in Multimapping
Hi All
I am trying to use RFC function module in Multimapping at target side.I want to call RFC Function based on some condition, if condition fails i dont want to call the Function Module. So i need to change the occurance of target RFC Message to 0...1 When
i try to change occurance in messages tab, it is displaying message that RFC Function module not found. When i change
occurance to 1..1, then it is showing RFC structure in mapping properly. I am suspecting why it is behaving like this.
Can we use RFC Function Module in Multimapping??. Please share ur experience on this.
Thanks,
BaluHi,
Can any body cofirm how below sender message will behave in Interface Determination,
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_FILE1 xmlns:ns0="http://ctrlanddataconceptsinglereceiver">
<Structure>
<***>male</***>
<ID>12</ID>
<Desig>cons</Desig>
<Sal>1000</Sal>
</Structure>
<Structure>
<***>female</***>
<ID>12</ID>
<Desig>cons</Desig>
<Sal>1000</Sal>
</Structure>
</ns0:MT_FILE1>
In my interface determination, i will add 2 inbound interfaces and two mappings.
For first interface i will check condition like if Structure/***=male then it has to goto one receiver agreement
For second interface i will check condition like if Structure/***=female, then it has to goto another receiver agreement.
But in my sender payload *** is male and female also. Will it execute 2 receiver agreements???.
My openion is it will go through 2 interface mappings and it will execute 2 receiver agreements.
Thanks,
Balu. -
hi experts,
i have been using SO_DOCUMENT_SEND_API1 function module to send a mail, i have sucessfully used it to send a mail but the subject line of the mail is coming empty. i want to display some text in it, how can it possibleHello ,
Goto to the SE37 and open the FM and
Goto -> Documentation...
This is the way to check the properties of FM related to Subject in Email
And also look at this program....
FORM mail_body.
DATA: l_l1 TYPE i.
CONSTANTS: lc_0 VALUE '0',
lc_1 VALUE '1',
lc_raw(3) TYPE c VALUE 'RAW'.
REFRESH: i_objtxt[],
i_objpack[].
CLEAR: wa_objtxt.
SORT i_fail BY type.
* MAIL BODY
* Customer Number
CONCATENATE text-t18
w_kunnr
INTO wa_objtxt
SEPARATED BY space.
APPEND wa_objtxt TO i_objtxt.
CLEAR wa_objtxt. "blank line
APPEND wa_objtxt TO i_objtxt.
* Complete Payment Doc Nos
wa_objtxt = text-t16.
APPEND wa_objtxt TO i_objtxt.
CLEAR: wa_fail, wa_objtxt.
APPEND wa_objtxt TO i_objtxt.
MOVE: text-t23 TO wa_objtxt,
text-t24 TO wa_objtxt+17(5),
text-t25 TO wa_objtxt+22(6),
text-t26 TO wa_objtxt+40(18).
APPEND wa_objtxt TO i_objtxt.
CLEAR wa_objtxt.
LOOP AT i_fail INTO wa_fail WHERE type EQ c_comp.
DIVIDE wa_fail-disper BY 100.
MOVE: wa_fail-belnr TO wa_objtxt,
wa_fail-buzei TO wa_objtxt+17(5),
wa_fail-wrbtr TO wa_objtxt+22(16),
wa_fail-disper TO wa_objtxt+40(18).
APPEND wa_objtxt TO i_objtxt.
CLEAR: wa_fail, wa_objtxt.
ENDLOOP.
* MAIL BODY-LENGTH
DESCRIBE TABLE i_objtxt LINES l_l1.
CLEAR wa_objpack-transf_bin.
wa_objpack-head_start = lc_1.
wa_objpack-head_num = lc_0.
wa_objpack-body_start = lc_1.
wa_objpack-body_num = l_l1.
wa_objpack-doc_type = lc_raw.
APPEND wa_objpack TO i_objpack.
*SUBJECT
CLEAR wa_doc_chng.
wa_doc_chng-obj_name = text-t15.
wa_doc_chng-obj_descr = text-t15.
ENDFORM. " mail_body
*& Form send_mail
* text
FORM send_mail.
CONSTANTS: lc_c TYPE so_escape VALUE 'C',
lc_mode(3) TYPE c VALUE 'INT'.
CLEAR: wa_reclist, i_reclist[].
*Recipient list
wa_reclist-receiver = text-t14. "DL
wa_reclist-rec_type = lc_c.
APPEND wa_reclist TO i_reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_doc_chng
put_in_outbox = c_x
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
TABLES
packing_list = i_objpack
* OBJECT_HEADER =
* CONTENTS_BIN =
contents_txt = i_objtxt
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
receivers = i_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.
* ENDIF.
IF sy-subrc IS INITIAL.
*Send mail immediately
SUBMIT rsconn01 USING SELECTION-SET lc_mode AND RETURN.
CALL FUNCTION 'SO_DEQUEUE_UPDATE_LOCKS'.
ELSE.
RAISE mail_not_sent.
ENDIF.
ENDFORM. " send_mail -
PDF Attachement in RFC Function Module
Hi Experts,
We are going to send the PDF format of Purchase Orders to other Non-SAP System through RFC Function Module.
Please suggest, is there any RFC function module to send PDF file as the attachment.
Or is there any other way to send the PDF files on regular basis from SAP to Non-SAP system.
Regards,
NrusinghaHi ,
follwo the belwo steps..
* Work Area for Print Parameters
Data : wa_pri_params TYPE pri_params,
* Work Area for Converted PDF file
Data : wa_pdf TYPE tline,
if t_ouputdata[] is not initial.
* WAIT UP TO 1 SECONDS.
CONCATENATE 'E'
w_tabix
sy-datum+4(4)
sy-uzeit INTO
wa_pri_params-plist.
ENDIF.
NEW-PAGE PRINT ON NO DIALOG PARAMETERS wa_pri_params. "creating spool request
WRITE : / text-s32.
ULINE.
LOOP AT t_error INTO wa_error.
WRITE : / wa_error-text.
ENDLOOP.
WRITE : / text-s33.
NEW-PAGE PRINT OFF. "closing spool request
* To fetch the spool number from TSP01 table
SELECT rqident
FROM tsp01
INTO w_rqident
UP TO 1 ROWS
WHERE rq2name = wa_pri_params-plist.
ENDSELECT.
* Subroutine to convert ABAP spool to PDF file
PERFORM abapspoll_to_pdf.
* Now t_pdf table contains the PDF data...
" now call the function module in backgrond task destination and push the PDF format dat to external system...
FORM abapspoll_to_pdf.
* Function Module to Convert Spool to PDF file
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = w_rqident
no_dialog = 'X'
dst_device = 'LP01'
pdf_destination = 'X'
TABLES
pdf = t_pdf.
CLEAR wa_mail_receivers.
ENDFORM. " ABAPSPOLL_TO_PDF
Regards,
Prabhudas -
How to use the function module which i mentioned, to store the pdf files
hi,
SO_NEW_DOCUMENT_ATT_SEND_API1
I am using above function module to send employ details through mail in pdf format, if i want to store that pdf files in a local computer too, then how should i catch hold off those individual pdf files of all employees, plz help me out with a sample codehey iam from functional side can u be little bit clear of that feature
thanks
sikindar -
Function module to conver date to internal format
Can anybody say what is the function module used to convert the format of the date which is taken from excel sheet to the sap format. If so pls tell me how to use that function module.
Currently my date is getting printed in format 05262005.
I want the output as 26 May, 2005.
I have tried using Set date mask option but it is not picking up in the output.
Code:
This code yields as 12 march 2006.
DATA: ZTEMP(9).
CLEAR: ZTEMP, ZDD, ZMMM, ZYYYY.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
INPUT = IS_DLV_DELNOTE-HD_GEN-CREA_DATE
IMPORTING
OUTPUT = ZTEMP.
ZDD = ZTEMP+3(2).
ZMMM = ZTEMP+0(3).
ZYYYY = ZTEMP+5(4).
http://www.sap-img.com/abap/abap-program-output-of-date-format.htm -
Whether this function module K_DOCUMENT_UPDATE can send IDOC to Non SAP Sys
Hi,
I know function Module K_DOCUMENT_UPDATE can sent IDOC to R/3 systems.
1.Whether this function module can sent the IDOC to Non SAP System?.
2.How to make sure, that the function module can sent IDOC to Non SAP System?.
Please advise.Thanks.
Regards,
DineshHi Dinesh,
Inside this function module K_DOCUMENT_UPDATE there is a FM available
CALL FUNCTION 'K_DOCUMENT_SEND'
EXPORTING
I_LOGSYS = LOGSYSTEM
I_COBK = COBK
TABLES
T_COEP = LT_COEP
T_COEPL = LT_COEPL
EXCEPTIONS
This FM is responsible to send IDOCs to the defined logical system LOGSYSTEM. No matter this logica; system is SAP or non-SAP IDOC will be sent. Prerequisite are,
1) RFC connection exist between system
2) Partner profile is configured between the system.
Regards
Ram -
SAPGUI_PROGRESS_INDICATOR what is use of this fun module when sending data
dear ,
what is use of
SAPGUI_PROGRESS_INDICATOR fun module when sending data to FTP SERVER . POINTS MUST BE GIVENDear ,
when i am trying to send data in internal table of type charterter declared below(i.e iresult) to FTP SERVER program giving the DATA ERROR = 3 when 'FTP_R3_TO_SERVER' fuction module is exected and file it not creating in ftp server . plz help me pointS must be given .
the FTP_CONNECT ,FTP_COMMAND function modules are executing properly giving handle 1 and its sy-subrc = 0 .
when 'FTP_R3_TO_SERVER' is executed it is giving SY-SUBRC = 3 ( DATA ERROR ) i.e it is failing to out internal table data in FTP SERVER . PLZ HIDE ME ITS URGENT .
THIS IS CODE I USED .
DATA : BEGIN OF iresult OCCURS 5,
rec(450),
END OF iresult,
DATA :
dest LIKE rfcdes-rfcdest VALUE 'SAPFTP',
compress TYPE c VALUE 'N',
host(64) TYPE c.
DATA: hdl TYPE i.
DATA: BEGIN OF result OCCURS 0,
line(100) TYPE c,
END OF result.
DATA : key TYPE i VALUE 26101957,
dstlen TYPE i,
blob_length TYPE i.
host = p_host .
DESCRIBE FIELD p_password LENGTH dstlen IN CHARACTER MODE.
CALL 'AB_RFC_X_SCRAMBLE_STRING'
ID 'SOURCE' FIELD p_password ID 'KEY' FIELD key
ID 'SCR' FIELD 'X' ID 'DESTINATION' FIELD p_password
ID 'DSTLEN' FIELD dstlen.
CALL FUNCTION 'FTP_CONNECT'
EXPORTING
user = p_user
password = p_password
host = host
rfc_destination = dest
IMPORTING
handle = hdl
EXCEPTIONS
not_connected = 1
OTHERS = 2.
IF sy-subrc = 0.
CONCATENATE 'cd' ftppath INTO ftppath SEPARATED BY space .
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = ftppath
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc = 0 .
CLEAR result .
REFRESH result .
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = 'ascii'
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
IF sy-subrc = 0 .
DESCRIBE TABLE iresult LINES lines.
blob_length = lines * width .
clear : lines.
Delete the existing file
CONCATENATE 'del' ftpfile INTO delfile SEPARATED BY SPACE.
CALL FUNCTION 'FTP_COMMAND'
EXPORTING
handle = hdl
command = delfile
TABLES
data = result
EXCEPTIONS
command_error = 1
tcpip_error = 2.
*End of deleting the existing file
CALL FUNCTION 'FTP_R3_TO_SERVER'
EXPORTING
handle = hdl
fname = ftpfile
blob_length = blob_length
TABLES
blob = iresult
EXCEPTIONS
TCPIP_ERROR = 1
COMMAND_ERROR = 2
DATA_ERROR = 3
OTHERS = 4.
IF sy-subrc 0 .
WRITE 'Error in writing file to ftp' .
ELSE.
WRITE 'File downloaded on the ftp server successfully'.
ENDIF.
ENDIF.
ELSE.
WRITE : 'Path on ftp not found : ' , ftppath .
ENDIF.
CALL FUNCTION 'FTP_DISCONNECT'
EXPORTING
handle = hdl.
CALL FUNCTION 'RFC_CONNECTION_CLOSE'
EXPORTING
destination = 'SAPFTP'
EXCEPTIONS
OTHERS = 1.
ELSE.
WRITE 'Could not connect to ftp' .
ENDIF.
ENDFORM. " FTPFINANCEACCESS_DOWNLOAD
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'PASSWORD'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP. -
Hi all,
is it possible to view mails send using SO_NEW_DOCUMENT_ATT_SEND_API1 function module to UWL?
I am receving emails in my SAP Inbox.
Please guide.
thanks.Hi,
You can only get the SAP mails into UWL notification tab with the Sonic connector (well of course with some custom development everything is possible).
One trick to get the workflow for sending "mails" to UWL is to NOT use email sending step, but instead use a decision step in the workflow and send this work item to the user. The decision step can include the same message as the email, and have onl one option "Confirm" (or whatever). These you can easily display in UWL since they are normal work items.
Regards,
Karri -
Get purchase order doc date using BAPI function module
Hi,
I have a .net windows application that uses BAPI_PO_GETDETAIL function module to get particular details of a PO in SAP. But i am not able to get the "Doc Date" for a particular PO. I am able to get all the details of items from the table "PO_ITEMS ". I used only 1 input parameter "PURCHASEORDER".
Please help me to get this thing done
.netframework : 4.0
Language: C#
Visual Studio: vs 2010
Regards,
Manosh JacobAbsolutely hynek petrak..
Manosh Jacob You can go with the above technique.
Maybe you are looking for
-
Changing the Ship-to partner details in Sales order header through exit
Hi all, I have a requirement where in during the process of the sales order creation, based on certain criteria, the details in the ship-to partner would have to be modified. These details like the Name, Street, etc would be maintained in a loc
-
Coinsider i am doing a file to IDOC or IDOC to file scenario. When should i use TCODE: BD84.where should i use it..... incase of file to idoc...where should i use this this TCODE..is it in XI or ? In case of IDOC to file...where should i USE it... Ca
-
ATI Radeon HD 4870 vs ATI Radeon HD 5870
I have an early 2009 Mac Pro with 8 cores and the upgraded ATI Radeon HD 4870 graphics card. I see that the 2010 Mac Pros have an option for the ATI Radeon HD 5870. Apparently this card will eventually be available as a kit that will work in my compu
-
Prompted to sign in to trial version of CS6 after logic board replaced
Hello. I purchased CS6 10 months ago and just had the logic board replaced on my iMac. Now, when I open Photoshop on that computer, I get a dialogue box "Sign in Required to use your trial version of Creative Suite 6 Design Standard". I did that, but
-
Retina Pro 13" 10.8 Facebook click to post does nothing.
This is a brand new laptop, just got it like 3 days ago. The notifications center has the click to face book button, and I"m receiving notificaitons from facebook. But when i click on the "Click to post" for facebook, it does absolutely nothing. What