Creating Attachment using Function Module
Hi experts,
My problem here is, I need know the Function Module that is used to Create Attachement in Generic Object Services.
Currently, i only found this function module: SO_OBJECT_UPLOAD. But i do not really know how to use it.
Can anyone here advise?
Thanks
Lawrence
This blog: [/people/sergey.breslavets/blog/2007/06/29/create-and-handle-attachments-from-a-bsp-application ] describes how this works for a BSP app. If you scroll down to Method: handleupload and look at item (2) and (3), the describe the basic ABAP parts in this. The functions used here are the same ones used by the Generic Object Services.
Similar Messages
-
Problem creating TO using Function Module L_TO_CREATE_DN
Hi Gurus,
I am trying to create TO using the Function Module L_TO_CREATE_DN. Its creating TO for deliveries for materials which are not batch split, however when I am taking delivery consisting of Batch Split material, its not creating and throwing a error with sy-subrc = 15. The error which I am experiencing is Item not handled in batches and batch split item cannot be edited. How to overcome this issue and create the TO.
Regards,
Avik
Edited by: avik2005uitbu on Dec 15, 2011 8:10 PMHi,
Please check the WM config for the Warehouse / Movement type(Tx. OMLX) . There we have option to give as immediate confirmation. This may be the reason for TO getting confirmed when created.
U can this by creating a transfer order for the same movement type manually in TX. LT03. After you save if the To is confirmed then its a config setup @ Warehouse / Movement type.
Regards,
Bhargava -
Attachment using function module SO_DOCUMENT_SEND_API1
I am using the function module "SO_DOCUMENT_SEND_API1" to send a mail with a pdf attachment. My e-mail contains some text also.
The problem is along with the PDF I am also getting a TXT file as an attachment, which contains the same text data as the e-mail content. How can I delete the TXT attachment?
AnjuCALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
sender_address = w_sender
sender_address_type = w_sender_add_type
TABLES
packing_list = it_packing_list_mail
contents_bin = it_attachment
contents_txt = it_mess_body_mail
receivers = it_receivers_mail
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 SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DESCRIBE TABLE it_mess_body_mail LINES w_cnt.
w_doc_data-doc_size = ( w_cnt - 1 ) * 255 +
STRLEN( it_mess_body_mail ).
w_mtitle = text1222.
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = w_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR it_packing_list_mail.
it_packing_list_mail-transf_bin = space.
it_packing_list_mail-head_start = 1.
it_packing_list_mail-head_num = 0.
it_packing_list_mail-body_start = 1.
DESCRIBE TABLE it_mess_body_mail LINES it_packing_list_mail-body_num.
it_packing_list_mail-doc_type = 'RAW'.
APPEND it_packing_list_mail.
DESCRIBE TABLE it_attachment LINES it_packing_list_mail-body_num.
it_packing_list_mail-transf_bin = 'X'.
it_packing_list_mail-head_start = 1.
it_packing_list_mail-head_num = 1.
it_packing_list_mail-body_start = 1.
it_packing_list_mail-doc_type = 'XLS'.
it_packing_list_mail-obj_name = 'ATTACHMENT'.
it_packing_list_mail-obj_descr = 'Attached Document'.
it_packing_list_mail-doc_size = it_packing_list_mail-body_num * 255.
APPEND it_packing_list_mail.
Thanks,
Anju -
R/3 Master Data Extraction Using Function Module
Hi Experts,
Could you please let me know why & How (Detail procedure) to extract R/3 master data using function module.
My team manager asked me to extract master data from R/3 for 3 more attributes of info object '0material' which is already defined as data target.
I would like to know why they are extracting data using function module
ThanksThe steps for creating extractor using Function Module. I
1. Create new Function group (if you have already not done so) in Se80
2. Copy Function module "RSAX_BIW_GET_DATA_SIMPLE" with suitable name.
3. Change the code that populate data.
Following table may give you the guideline for parameters.
Parameter Description
I_REQUNR (import) BW provides this request identifier. It is a system-generated identifier in the form REQU_XXXXXX. BW uses this same identifier in all function module calls that relate to a single load.
I_DSOURCE (import) The name of the generic extractor
I_MAXSIZE (import) The maximum number of records that BW expects to be in each data packet
I_INITFLAG (import) A Boolean flag that indicates if this is the initialization (first) call to the function module
I_READ_ONLY (import) A test flag not needed in most extraction scenarios
I_T_SELECT (table) This table holds any selections from the BW InfoPackage. The function module should examine these selections and only return data that matches the selections.
I_T_FIELD (table) This table holds the fields that BW requests
E_T_DATA (table) The function module fills this table with data records. These records then return to BW as data packets. This table has the same structure as the extract structure defined in the generic DataSource.
NO_MORE_DATA (exception) The function module raises this exception when no more data is available
ERROR_PASSED_TO_MESS_HANDLER (exception) The function module raises this exception if an error occurred during the extraction. It alerts BW to check for error logs.
Change following code to put the selection fields
Select ranges
RANGES: L_R_CARRID FOR SFLIGHT-CARRID,
L_R_CONNID FOR SFLIGHT-CONNID.
Change following to populate data
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
WHERE CARRID IN L_R_CARRID AND
CONNID IN L_R_CONNID.
ENDIF. "First data package ?
Fetch records into interface table.
named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
below links
Re: functionmodule
Re: FM for G. extractor
***Assign points if it helps.**
Regards
CSM Reddy -
Hi,
We have a requirement to create a BI report based on plant maintenance report. The plant maintenance report is based on a ABAP program with complex logic. My question is i want create a Generic Datasource using Function module and can I include the logic(Abap Program) that is used for plant maintenance report in the function module? Please share your thoughts.
Thanks,
RaviHi,
Step1-Create a table structure which you need to create same as the fields you require in you data source.
Step 2-create a custom abap program and inside that call the Client abap program with the selections as required and save the result data in some table
Step 3-create infoset query.In the infoset query give your table structure name and program name which you developed.
Step4-create data source on top of that query -
How to create Billing Plan in sales order using Function module /BAPI
hi,
How to create Billing Plan in sales order using Function module /BAPI
i hv check few FM such
BILLING_SCHEDULE_READ
BILLING_SCHEDULE_GET_NUMBER
BILLING_SCHEDULE_SAVE
But unable to create billing plan for a sales order.....any other method to create???Hi,
Use this link.
Create sales order with billing plan via LSMW and BAPI BUS2032
BAPI or Function to update Billing Plan in Sales Order Items
Hope this will help you.
Regards,
Vijay -
How to create a Sales order with ref to Contract using Function Module
How to create a Sales order with ref to Contract using Function Module BAPI_SALESDOCU_CREATEFROMDATA ?
We have a unique situation where we like change the sold-to customer of the sales order
once order has been created. These orders have been created using either by function module
BAPI_SALESDOCUMENT_COPY or using BDC (VA01, Copy with reference).
These two processes work abosolutely fine except someone might have change the sold-to
customer of the ship-to customer of the original sales order. If this the case then the new
sales order will be created with the old sold-to and with not the new sold-to.
We tried using BAPI_SALESDOCUMENT_CHANGE and commit afterwards. We checked
the returned parameteres of the BAPIs and they are all successful but sold-to remains the
same old one.
Any help would be much more appreciated. -
How to create Contract or Move-in using Function module
Hello Gurus,
I'm looking for a way to create contract(Move-in) using Function module.
Please help me out...
Thanks in advance,
RajeshHi Rajesh,
Please try this: BAPI_ISUMOVEIN_CREATEFROMDATA
Regards,
S -
Hi,
When i use function module KKPI_BDC_ADD_ON_COSTS_CREATE to create additive costs it shows an error. The error is 'THE OBJECT IS LOCKED BY THE USER SARKARD' the transaction it uses is CK74 for creating.
I have also read about KKP4_ADD_ON_COSTS_CREATE. But i dont know the usage of it..
I think it will be helpful if u can clarify with first FM.
Kindly suggest.
Thank you.
HarshaHi Harsha,
I have a similar requirement, but the issue that I am facing is that I can not find any parameter in the FM - KKPI_BDC_ADD_ON_COSTS_CREATE for Valuation Date which is a mandatory field in CK74. How did you overcome that issue, can you please share ? -
Create a generic extractor using Function module, what steps must I follow
Hello gurus team
I need to Create a generic extractor using Function module, what steps must I follow?
Just I have a function module not estructures or something, only the program.... and I have intented to do it in rso2 using the fm option, but give an error... somebody can helpme???
BRHi,
Generic Extraction via Function Module
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
http://help.sap.com/saphelp_nw04/helpdata/en/86/1c8c3e94243446e10000000a114084/frameset.htm
Thanks,
JituK -
Need to create pdf using adobe live cycle designer using function module
Hi,
Needed some help regarding creating a pdf at the backend. I will have function module in the backend which contains all my data and also an image represented as a Base64 encoded string.
What i need to do is pass this data onto adobe live cycle designer fromthe function module and create a pdf at a particular location. Please let me know how can we achieve this. if there is any function module to do the same. how does the function module i have defined call the adobe live cycle designer transaction or module to create a pdf. i am not an abaper so dont have much idea about the details.
Thanks.
Regards
Srikumar VHi,
I will try to find the standard function module. If there is no such standard function module, then we need to create a custom function module.
Check this link:
[https://www.sdn.sap.com/irj/sdn/adobe]
Points that you can note:
1) Adobe Interactive forms can be created & connected to SAP database using ABAP Workbench, through WebDynpro.
2) Also adobe Interactive forms can be created & connected to SAP database using Transaction SFP.
3) And for both of the above 'Adobe Live cycle Designer' should be installed on the front end. -
Can anybody explain me creating Generic Datasource using Function module?
Hi,
can anybody explain me creating Generic Datasource using Function module?
Thax in advance,
Ravi.Generic Extraction via Function Module
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
1. Create s structure with the fields that you need from the 4 tables . Activate.
2. Goto SE 80 Select The Function Group , Copy , Select the Function module
" RSAX_BIW_GET_DATA_SIMPLE " and Give a New name starting With
Y or Z .
3. SE37 ->Your Function module name -> Change , In table tab give your structure
name by deleting the associated type given in " E_T_DATA " .
4. Now select source code and Do the coding . Give Data source name in Coding .
In your case you have to take data from more that 1 table .
5. Activate the Function Group .
6. In RSO2 Create the Data source , Give the Function Module Name , And Save.
7. RSA3 -> Give data source name and Check for the Records .
Creation of custom datasource. (Using function module)
<b>is an example</b>
1.Create a function group .
2. Structure ZTEST123
ZMATNR MATNR CHAR 18 0 Material Number
ZMTART MTART CHAR 4 0 Material type
ZMBRSH MBRSH CHAR 1 0 Industry sector
ZMATKL MATKL CHAR 9 0 Material group
ZBISMT BISMT CHAR 18 0 Old material number
ZMAKTX MAKTX CHAR 40 0 Material description
3. Create function module (i.e. ZTEST .) .
FM - YMARA_DATA_TRNS
FUNCTION YMARA_DATA_TRNS.
""Local Interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZTEST123 OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
data : ZTEST123 type ZTEST123 occurs 0 with header line.
Maximum number of lines for DB table
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
S_COUNTER_DATAPAKID LIKE SY-TABIX.
DATA: begin of t_mara occurs 0,
ZMATNR type MATNR,
ZMTART type MTART,
ZMBRSH type MBRSH,
ZMATKL type MATKL,
ZBISMT type BISMT,
end of t_mara.
DATA: begin of t_makt occurs 0,
ZMATNR type MATNR,
ZMAKTX type MAKTX,
end of t_makt.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
Check DataSource validity
CASE I_DSOURCE.
WHEN 'ZZMARA_DATA'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
this is a typical log call. Please write every error message like this
LOG_WRITE 'E' "message type
'R3' "message class
'009' "message number
I_DSOURCE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
ELSE. "Initialization mode or data extraction ?
Data transfer: First Call OPEN CURSOR + FETCH
Following Calls FETCH only
First data package -> OPEN CURSOR
IF S_COUNTER_DATAPAKID = 0.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE. If there is a one to one relation
between DataSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
select MATNR
MTART
MBRSH
MATKL
BISMT
from mara up to 10 rows
into table t_mara.
if not t_mara[] is initial.
select MATNR
maktx
from makt
into table t_makt
for all entries in t_mara
where matnr = t_mara-zmatnr.
endif.
loop at t_mara.
read table t_makt with key zmatnr = t_mara-zmatnr.
ZTEST123-zmatnr = t_mara-zmatnr.
ZTEST123-ZMTART = t_mara-ZMTART.
ZTEST123-ZBISMT = t_mara-ZBISMT.
ZTEST123-ZMBRSH = t_mara-ZMBRSH.
ZTEST123-ZMATKL = t_mara-ZMATKL.
ZTEST123-zmaktx = t_makt-zmaktx.
append ZTEST123.
clear ZTEST123.
endloop.
clear E_T_DATA.
refresh E_T_DATA.
E_T_DATA[] = ZTEST123[].
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF. "Initialization mode or data extractio
ENDFUNCTION.
3. Create the data source using transaction (RSO2).
4. If structure exists for the table parameter of your function module then ok else create a structure for the table parameter E_T_DATA.
5. Test the datasource in R/3 using transaction RSA3.
6. Transfer the data source to BW System and replicate it in the BW-System. -
Creating a Generic Datasource using Function Module
Hi Guru's
We are tryin to create a Generic datasource using function module, we have found few old how to guides for doing the same but it is not effective and need to be altered. Can anyone suggest me the latest step by step procedure to create the above, also if you have the how to guide kindly paste the link as it will be a great help at this point.
Thanks in advance
Regards
LiquidHi,
Please goto the Following links :-
PDF
1) http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008?quicklink=index&overridelayout=true
2) http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33?quicklink=index&overridelayout=true
SAP Forum
3) Re: DataSouce based on FM
4) http://forums.sdn.sap.com/post!reply.jspa?messageID=10050614
5) https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
6) Re: Generic datasource with functional module
7) Generic Extractor (FM based) - Delta Enabled
Regards
Obaid -
Creating generic datasource using function module in R/3 4.6c
Hi,
I am not able to see the option (in TC RSO2) to create generic datasource using function module in R/3 4.6c. Is there any special plug in or some SAP Note to be applied to get the option ?
Waiting for a quick response.
Thanks and Regards,
DeepakHi Sat,
Thanks for the reply.
I know that creating generic datasource from function module is available in R/3 4.7.
In 4.6c version there are only two options available. They are Extraction from DB View and Extraction from SAP Query.
The third option i.e. Extraction from Function Module is not available in 4.6c. I wanted to know if there is any plugin that needs to be installed to get this option.
Thanks and Regards,
Deepak -
Create virtual infocube using function module
HI all, Searched lot of document to create virtual infocube using function module, I am not getting good one, If any one give PDF document step by step process it will be useful for me. thank u
Hi
Please refer this document.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9066d1fa-efc1-2b10-7b96-9ddee3b11b40?quicklink=index&overridelayout=true
Thanks
Suganya
Maybe you are looking for
-
I am running Windows 7 Enterprise. I need to upgrade my version of Itunes from version 7 to version 10 or 11. I go to Help and click on Search for Upgrades. I then select Upgrade Itunes. The system starts to upgrade and download the new software. It
-
Unable to see layout design in page editor
I am using JDeveloper version 11.1.2.0.0. I downloaded the hands-on practices from the site Tuhra2 – Sample application for the Oracle JDeveloper 11g Handbook. When I open the jspx files under Web Content, the visual design does not show up in the De
-
Weblogic 10.3 SocketException at out.flush
I have a server/jsp where I am doing out.flush(). This throws following exception: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStr
-
Hi, I have a java application where I cannot use the numeric keypad on the keyboard while running it on linux. The NumLock is on and I still cannot use them (nothing happens when I type on them). I do not think its soemthing in my code since when I r
-
My tv episodes only play for 30 seconds after they take hours to download. What am I doing wrong? I am very new to iTunes and it's very confusing sometimes. I know I have purchased them, and I am not just previewing, but my iPad doesn't seem to reco