Call method cl_crm_documents- create_with_file not creating attachment
Hi,
I am trying to create attachment in a transaction type using cl_crm_documents->create_with_file. But it is not creating the same, instead gives error "Error loading file &".
I am uploading a file with fields object_id, text, file name, description and category.
I have passed the parameters as follows:
data: gref_obj type ref to cl_crm_documents.
create object gref_obj.
gw_prop_attr-name = 'BDS_KEYWORD'.
gw_prop_attr-value = gw_attach-category.
append gw_prop_attr to gt_prop_attr.
gs_business_object-instid = gw_guid-guid.(object guid)
gs_business_object-typeid = gv_object_type.(object type)
gs_business_object-catid = 'BO'.
call method gref_obj->create_with_file
exporting
file_name = gw_attach-f_name (name as provided in my uploaded file, in my case it is test)
directory = p_floder (C:\Attachment\)
properties = gt_prop_attr
business_object = gs_business_object
importing
phio = gs_phio_id
loio = gs_loio_id
error = ls_error.
Please help me on this. I doubt the directory that I am giving is wrong.
Thanks.
Hi,
Please go through this...
Re: Problem attach document with the FileUpload UI.
Cheers,
Kris.
Similar Messages
-
CL_CRM_DOCUMENTS= CREATE_WITH_FILE
Hi all,
Could any one tell me where does SAP stores the documents and links it with the transaction.
Regards.DATA: ls_bor type sibflporb,
lv_bor TYPE SWO_OBJTYP,
lv_loio TYPE skwf_io,
lv_phio TYPE skwf_io,
lv_error TYPE skwf_error.
DATA: wa_result_tab TYPE string,
result_tab TYPE STANDARD TABLE OF string,
lin TYPE i,
long_nombre TYPE i,
long_total TYPE i,
desplazamiento TYPE i,
filename_aux TYPE skwf_descr.
CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
EXPORTING
iv_orderadm_h_guid = guid
IMPORTING
EV_OBJECT_TYPE = lv_bor
EXCEPTIONS
ADMIN_HEADER_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MOVE:lv_bor TO ls_bor-typeid,
'BO' TO ls_bor-catid,
guid TO ls_bor-instid.
CALL METHOD cl_crm_documents=>create_with_file
EXPORTING
file_name = filename
directory = path
business_object = ls_bor
IMPORTING
loio = lv_loio
phio = lv_phio
error = lv_error.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'. -
How to retrieve the calling method
Hi all,
Is there anyway I can get the calling method from the method I am currently in e.g.:
thisclass..setup().getText()
and in getText can I check to see which method has called it?
Thanks in advance.You can extend SecurityManager to get an array containing the class context (just the calling class, not the calling method), or you can create a Throwable and get an array containing a trace of the stack.
-
BDC not creating automatic delivery for consignment fill up in VA01
Hi,
I am doing BDC for consignment fill up in VA01. When munually run VA01, it automatically creating delivery. But when run BDC ( call transaction ) it's not creating automatic delivery. why ? I am giving below fields..
Sales org.
distribution channel
division
customer
item (material)
quantity
batch
pricing condition
price
serial number
please help me...
VenkeyVA01 is order creation, Creating an order does not automatically create a delivery, a delivery is created with VL01N in reference to an order.
Further you should get an error log if you process a BDC, what does it tell you? -
The attachment can not find using method CL_CRM_DOCUMENTS~GET_INFO
Hi Dear Experts,
I'm new guy in CRM, I used to develop in ECC. Here I encount an issue. We have attachment in the order. On web UI we can see the attachment is attached on the order. But when I use method CL_CRM_DOCUMENTS~GET_INFO to get the information of the attachment, I get nothing.
I get GUID via table CRMD_ORDERADM_H with OBJECT_ID = order ID, get GUID and OBJECT TYPE, past it into method GET_INFO's interface BUSINESS_OBJECT, But I can not get anything. I go to SU53, there are no authorization meesage about this method. Actually it informs me that I lost authorization object S_TABU_NAM, but it is related with SE16. So I don't think this cause the failure of get_info.
Can anyone kindly give me any hints? Thank you so much.
Regards
JayHi Experts,
I find that these attachments are Archived. So I think I can't get their information. So the next step is how to get the link information. Thanks.
Regards
Jay -
IDOCs not created for Payment method "P" and "B"
Dear Experts,
I have executed the Automatic Payment program for three payment methods (P,V and B - Foreign Currency) in one Run ID. Payment run was successful but it has created IDOCs for the documents / Vendors attached with payment method "V" but IDOCs were not created for the payment methods "P" and "B". I have checked the configuration relating to payment methods and those were assigned with Form details and the maximum amount is also defined in the payment methods.
Can any one suggest me where I had made the mistake / where I need to check the configuration settings.
Thanks a lot.
Regards,
Ramnath.Hi Surya,
Please find below error log created while executing the Payment run for the issue.
Step 002 started (program SAPFPAYM_SCHEDULE, variant &0000000116195, user ID V-PIZHA)
Step 003 started (program RFFOEDI1, variant &0000003957078, user ID V-PIZHA)
Maintain an output device in your user master record
Job cancelled
Thanks and Regards,
Ramnath,
SAP FIMM Team -
Calling method from SWF file wtih javascript, when swf file is not loaded in any browser
Hi There,
I have a question regarding flex and javascript integration:
1. We have created certain components and bundle them in swf. these swf file uses webservice to connect to backend code written in java.
2. We have deployed swf file and backend on the same tomcat server.
3. Backend server send some datapoint to UI and plot graph and displyaed to user.
4. Now if user generate graph from datapoint and want to export it, we are tranferring image of that graph from UI to backend. No issues in this process.
5. Now the question is. let say user has not open any swf file in browser and backend scheduling job want to generate the graph. How we will connect to swf file.
6. Is ther any way we can connect or call method of swf from java/jsp/html/javascript code in this scenario without loading swf file in browser??
Please help me!!!
Thanks
Sonu KumarBoth test sites work just fine for me.
The "Update plugin" message is exactly what would be displayed if no .swfobject file at all was found... so it may not be the "version11" thing but rather, perhaps something else is messed up with the .swfobject file.
File can be found in both folders:
http://www.pureimaginationcakes.com/test/Scripts/swfobject_modified.js
http://www.pureimaginationcakes.com/Scripts/swfobject_modified.js
and file does download when downloading the html page (just check the cache).... but for some reason it doesn't seem to be working.... Hummmmm????
Adninjastrator -
Call items are not created for Org BP's when created from Campaigns
Hello All,
We are creating Campaigns for Org BP's and pushing them to channel Phone, which is creating call list but call items are not created for Org BP's.
Org BP's are maintained with Contact Person's, callling hours and phone number are maintained against contact person BP, but still call items are not created with in call list.
Please let me know if I miss any further steps.
Thanks,
Raj.Hi Debasis,
You can delete the PDS by using /SAPAPO/CULL_RTO_DEL - Delete Production Data Structure . And recif the it to APO. You can use CURTO_CREATE for it.
For the error message /SAPAPO/OM_ERROR2 119 there are couple of OSS notes please check the same.
1648558 - CIF error: 'Mode linkage problem with primary resource'
1325227 - PDS-EXP: Mode linkage problem with primary resource
Regards,
RBrahmankar -
Dear experts,
I'm using CALL METHOD ob_grid1->set_table_for_first_display, during the first run the display is ok.
When I back to screen 0 and enter different values and re-run, the values of internal table has been changed.
But the second run still display the values I have during the first run. What could be the reason for this and how to solve this? Thanks.
IF ob_custom1 IS INITIAL.
CREATE OBJECT ob_custom1
EXPORTING
container_name = 'ALV_CONTAINER'.
ENDIF.
IF ob_split1 IS INITIAL.
CREATE OBJECT ob_split1
EXPORTING
parent = ob_custom1
orientation = cl_gui_easy_splitter_container=>orientation_vertical.
ENDIF.
IF ob_grid1 IS INITIAL.
CREATE OBJECT ob_grid1
EXPORTING
i_parent = ob_split1->top_left_container.
PERFORM build_fieldcatalog.
gs_layout1-info_fname = 'ROWCOLOR'.
gs_layout1-smalltitle = 'X'.
CALL METHOD ob_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'T_REPORT'
is_layout = gs_layout1
CHANGING
it_outtab = T_REPORT
it_fieldcatalog = alv_fcat_dock1.
ENDIF.
KathHi,
Please add the code after else statement.
IF ob_grid1 IS INITIAL.
CREATE OBJECT ob_grid1
EXPORTING
i_parent = ob_split1->top_left_container.
PERFORM build_fieldcatalog.
gs_layout1-info_fname = 'ROWCOLOR'.
gs_layout1-smalltitle = 'X'.
CALL METHOD ob_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'T_REPORT'
is_layout = gs_layout1
CHANGING
it_outtab = T_REPORT
it_fieldcatalog = alv_fcat_dock1.
ELSE. " Add
Call method refersh table for display. " Add
ENDIF. -
Method GUI_DOWNLOAD not creating CRLF at end-of-each-line of output
Hello SDN Community, has anyone experienced CL_GUI_FRONTEND_SERVICES=> GUI_DOWNLOAD not putting the CRLF at end of exported lines? This can be seen when you view the output file in notepad (the file contents wrap) or an editor with hex view enabled (0A0D).
I have tried running an ABAP that runs this method and on some people's laptop's the file wraps and on others the file is formatted (as would be expected) as per the CRLF's.
My understanding is that the GUI_DOWNLOAD method should provide the CRLF's. And on my laptop (running Vista and SAP ECC 6.0 back-end) it wraps the output because there are no CRLF's in the file.
Your experiences would be appreciated.
Thank you,
Dean Atteberry.Thank you, Alejandro, for your comments. I am using two systems - on one it works and on the other it does not.
The one that works is an SAP ECC 6.0 where the CL_GUI_FRONTEND_SERVICES class has a Last Change date of 03.07.2006.
The one do not work is SAP ECC 6.0 where the CL_GUI_FRONTEND_SERVICES class has a Last Change date of 07/08/2009.
If I look at the code in GET_PLATFORM, it is verry different between the two systems.
On the one that works, it executes following code and platformID has value of '5'. This later used to assign the correct value for CRLF variable which is used to concatenate to end of records (value is '0A0D').
ELSE.
* SAP GUI for Windows
IF ACTIVEX IS NOT INITIAL.
* returns Windows Platform
* VER_PLATFORM_WIN32s 0
* VER_PLATFORM_WIN32_WINDOWS 1 (Win95/98)
* VER_PLATFORM_WIN32_NT 2
CALL METHOD HANDLE->CALL_METHOD
EXPORTING
METHOD = 'GetWindowsPlatform'
P_COUNT = 0
QUEUE_ONLY = ' '
IMPORTING
RESULT = platformID
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
RAISE CNTL_ERROR.
ENDIF.
On the one that does not work, it executes following code. In the debugger, when control comes back from CL_GUI_CFW=>FLUSH call, I can see the PLATFORMID variable change to '15'. This is moved to M_PLATFORM and ultimately is used later in a case statement to assign the appropriate value to CRLF variable.
HOWEVER, THERE IS NO "WHEN 15" statement in the CASE statement - IT ONLY GOES UP TO '14'. Because of this, no value is assigned to the CRLF variable and when subsequently this variable is concatenated to the output line, there is no CRLF (0A0D) at the end of the line. Because the CRLF variable is blank. [see coding snippets at end-of-note]
Is there an better place than General ABAP forum to discuss this? Possibly this item might benefit from the attention of SAP developers?
Following are code snippets illustrating findings from debugging...
This shows the FLUSH statement that causes '15' to appear in the PLATFORMID variable.
IF bPLATFORMEX = ABAP_TRUE.
CALL METHOD HANDLE->CALL_METHOD
EXPORTING
METHOD = 'GetPlatformEx'
P_COUNT = 0
QUEUE_ONLY = ' '
IMPORTING
RESULT = PLATFORMID
EXCEPTIONS
OTHERS = 1.
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
others = 3.
IF SY-SUBRC <> 0.
RAISE CNTL_ERROR.
ENDIF.
MOVE PLATFORMID TO M_PLATFORM.
This shows the method GET_LF_FOR_DESTINATION_GUI, where you can see that values only go up to 14. [look in attributes for CL_GUI_FRONTEND_SERVICES to see attribute values]
CASE PLATFORM_ID.
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_WINDOWSXP. <---- this is '14'
MOVE CL_ABAP_CHAR_UTILITIES=>CR_LF TO GUI_CRLF.
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_NT50.
MOVE CL_ABAP_CHAR_UTILITIES=>CR_LF TO GUI_CRLF.
<...lines snipped...>
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_TRU64.
MOVE CL_ABAP_CHAR_UTILITIES=>NEWLINE TO GUI_CRLF.
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_OS2.
MOVE CL_ABAP_CHAR_UTILITIES=>NEWLINE TO GUI_CRLF.
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_UNKNOWN.
RAISE CNTL_ERROR.
ENDCASE.
ENDIF.
MOVE GUI_CRLF TO LINEFEED.
This shows the FORM put_char_linebuffer you can see CRLF being concatenated to output line...
prc_column_idx = prc_column_idx + 1.
ENDWHILE.
CONCATENATE prc_encoded_string prc_encoded_crlf
INTO prc_encoded_string IN BYTE MODE.
ENDIF.
* Add data lines
LOOP AT par_data_tab ASSIGNING <f_data_tab>.
PERFORM put_char_linebuffer USING <f_data_tab>
par_write_field_separator
par_trunc_trailing_blanks
par_col_select
par_col_select_mask
par_write_lf
strDecimal
strDatFormat
par_dat_mode
par_trunc_trailing_blanks_eol
CHANGING converter
prc_encoded_string.
IF par_write_lf IS NOT INITIAL.
* Add CR to line.
CONCATENATE prc_encoded_string prc_encoded_crlf
INTO prc_encoded_string IN BYTE MODE.
ENDIF.
ENDLOOP.
* Write BOM if requested and Unicode encoding
CLEAR prc_bom_string. -
Call of a method or kernel Method that has not been implemented
hi,
Iam Working on CRM Sandbox system and R/3 system my reqeuirement is to transfer data from R/3 to CRM system through Idoc. so I have IDOC (3 in number now) just sitting in XXCLNT200.The IDOC type is HRMD_A01.it's refused to be processed into application and there is no error on the IDOC.
In this Scenario R/3 system idoc status is 53 - application document posted so in R/3 system idoc woking is fine . Coming to CRM System IDOC status is - 64 Ready to posted in application . SO iam reprocess the IDOC using WE19 . While reprocess the idoc it's is going to be in dump .
Runtime Errors CALL_METHOD_NOT_IMPLEMENTED
Exception CX_SY_DYN_CALL_ILLEGAL_METHOD
Date and Time 22.08.2007 12:12:45
Short text
Call of a method or kernel Method that has not been implemented
What happened?
Error in the ABAP Application Program
The current ABAP program "CL_EX_HRSYNC_P================CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
pls help meHi Chandra,
I got the same error.
I have developed the webdynpro screen to upload the xlsx file format using the below thread
http://scn.sap.com/community/web-dynpro-abap/blog/2012/04/05/upload-xlsx-file-in-webdynpro-abap-and-view-its-content#comment-338018
I have successfully activated the component but when i run the component i found the following error.
Runtime Errors CALL_METHOD_NOT_IMPLEMENTED
Exception CX_SY_DYN_CALL_ILLEGAL_METHOD
Short text
Call of a method or kernel Method that has not been implemented
Error in the ABAP Application Program
The current ABAP program "/1BCWDY/EIMGDDDP2WS8KQ67GU1D==CP" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
can please guide me .
Thanks,
Harish Singh. -
When I create a reminder the date/time will not stay attached to the reminder. It initially sets then drops off. Any ideas?
Sounds like we have a similar problem. Four days ago I was playing music through a wireless Bose speaker via bluetooth and everything was fine. Then I was texting while listening and got 2 texts about the same time as I was typing one and my phone went black. I pushed the home button and it worked, went into my texts and all were there. However ever since then the time isn't right, so it can't keep time no matter what I do. The bluetooth works only at times, the wifi keeps jumping on and off, sometimes my data won't work and the other day I couldn't even turn it off, so had to wait until it died. The battery life display at that moment wasn't correct either. Took to Verizon, they couldn't help. Suggested a factory reset, which I did last night and still the same issues! One day I couldn't even text my husband on his iPhone. Just wouldn't work at all. Did everything suggest and still not good. Seems like after stalking these pages today a lot of people are having this problem in Dec/Jan and of course also I'm 3 weeks out of my 1 year warranty and so were many others, by days. Very strange, and all on the 5C. What did you do? Is it working now?
-
Hi gurus i have a problem i have created a dinamic internal table but the lenght of the internal table fields is 10 i need longer fields
here is my code thanks
data: begin of it_campos OCCURS 0,
campo1(12) type c,
END OF it_campos.
do n times.
clear nocamptmp.
add 1 to incont.
CONDENSE incont NO-GAPS.
cont = incont.
CONCATENATE nocamp cont into nocamptmp.
wa_campos-campo1 = nocamptmp.
append wa_campos to it_campos.
enddo .
loop at it_campos into wa_campos.
t_fieldcat_wa-col_pos = SY-TABIX.
t_fieldcat_wa-fieldname = wa_campos-campo1.
APPEND t_fieldcat_wa TO t_fieldcat.
endloop .
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = t_fieldcat
IMPORTING
ep_table = tabla
EXCEPTIONS
GENERATE_SUBPOOL_DIR_FULL = 1
others = 2.
ASSIGN tabla->* TO <l_table>.
CREATE DATA ep_line LIKE LINE OF <l_table>.
all is fine but the fields of <l_table> are char(10) and my data is longer than 10 how can i increase the lenght of the table fields
any idea thanksModify the fieldcatalog accordingly for e.g.,
LOOP AT it_campos INTO wa_campos.
t_fieldcat_wa-col_pos = sy-tabix.
t_fieldcat_wa-fieldname = wa_campos-campo1.
t_fieldcat_wa-inttype = 'C'. " Character Type
t_fieldcat_wa-intlen = '50'. "50 character length
APPEND t_fieldcat_wa TO t_fieldcat.
ENDLOOP .
BR,
Suhas -
Why am I getting these errors Error: Permission denied for (document.domain has not been set) to call method Location.toString on (document.domain=).
== URL of affected sites ==
http://HOW DO YOU SET THIS??? I'M FRUSTRATED OVER THIS. ITS BEEN 2 MONTHS SINCE I HAVE BEEN ABLE TO PLAY ANY GAMES IN FACEBOOK DUE TO THIS PROBLEM! IT DOES NOT MATTER WHAT BROWSER I USE I STILL GET THIS SAME MESSAGE.
-
Call the CALL METHOD and CREATE OBJECT
Hi Friends,
How to call the CALL METHOD and CALL OBJECT in the se38 edit program.For example for calling the FUNCTION MODULE we can use the pattern in that using the call function we can get the function module in the se38 edit.but in METHOD hoe to call if you explain me in detail it would be very much usefulfor me.
Thanks,
Regards,
Rajendra KumarHi rajendra,
its the same way we do. call pattern ..there will be another radiobutton whcich says 'ABAP objects' , give the method name and the class name there.. this will call the method similar to function module..
we can also write our own classes and methods...
say..you created your own class c1 and method m1
then first create the instance of the object..
data:obj1 type ref to c1.
create object obj1.
call method obj1->m1.
Regards,
Vidya.
Maybe you are looking for
-
Opening a video in Windows Media Player
How do you open a video in Windows Media Player? The video I'm trying to open in Windows Media Player is an avi file. I noticed that in the Authorware 7 book, it says to simply add a wmp after "avi". For ex: myvideo.avi.wmp It then says to place or i
-
Not receiving email in Apple Mail, only on iPhone
OK, I've been searching forever trying to find this answer, but I can't... I have two accounts setup in Apple Mail through Comcast... These two accounts are synced with my iPhone using POP... Now, I have never experienced this problem with my first a
-
Re: Screen is clipped on LG L246WP via HDMI on H97M-G43.
It looks like the EDID information from the monitor causes some trouble with some video card and driver combinations. I'm wondering if Intel would mitigate it in the future driver releases. http://forums.anandtech.com/showthread.php?t=172961
-
Payment on Account for A/R invoice
Hello Experts, I want to create payment on Account for A/R Invoice through DI API . The Status of A/R Invoice should get closed. Please Suggest Regards Manish
-
16:9 HD 1080p to 16:9 FHA SD for Clearcast
Hello, I am trying to get a roughcut uploaded to Clearcast for clearance. I can't seem to get it past their ingest servers. All the need is the above settings - 16:9 FHA SD (mp4/ 5mbps etc) I can't find anywhere in the AME where i can make this work?