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?
Anju
CALL 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
Similar Messages
-
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
LawrenceThis 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.
-
Changes in function module SO_DOCUMENT_SEND_API1
Hi all,
I've been using function module SO_DOCUMENT_SEND_API1 to send e-mail (containing some simple text) with an Excel file attached to it. As of 01.11.2009 SAP has changed a lot of the function module code - and now the Excel file contents has become faulty (rows missing).
Can anyone give me code examples on how to use the new version of the function module?
Regards,
MVHi all,
I've been using function module SO_DOCUMENT_SEND_API1 to send e-mail (containing some simple text) with an Excel file attached to it. As of 01.11.2009 SAP has changed a lot of the function module code - and now the Excel file contents has become faulty (rows missing).
Can anyone give me code examples on how to use the new version of the function module?
Regards,
MV -
Unable to read excel attachment received thru email using function module ?
Hi...
I am using the function module 'SO_DOCUMENT_SEND_API1' to send an email attachement in EXCEL format.
The email is getting received along with the attachment, but when i try to open the excel file, i am getting an error stating "Unable to Read File"......
What could be the reason behind this error.......
Plz Help......Hi,
Firstly, convert Excel Format with FM: SAP_CONVERT_TO_TXT_FORMAT ,
" Format convert(Excel content)
CALL FUNCTION 'SAP_CONVERT_TO_TXT_FORMAT'
EXPORTING
I_LINE_HEADER = 'X'
TABLES
I_TAB_SAP_DATA = GIT_DATA "Before convert
CHANGING
I_TAB_CONVERTED_DATA = GIT_EXCEL "After convert
LOOP AT GIT_EXCEL INTO LFC_STMP.
LI_ITMP = STRLEN( LFC_STMP ).
LFC_STMP+LI_ITMP = CL_ABAP_CHAR_UTILITIES=>CR_LF.
MODIFY GIT_EXCEL FROM LFC_STMP.
ENDLOOP.
Then, send Email with .xls attachment via FM: SO_DOCUMENT_SEND_API1.
Best Regards
Lily -
How to Send Internal table to SAP Spool using Function Modules or Methods?
Hi Experts,
How to Send Internal table to SAP Spool using Function Modules or Methods?
Thanks ,
KiranThis is my code.
I still get the no ABAP list data for the spool, even tho I can see it sp01?
REPORT Z_MAIL_PAYSLIP.
* Declaration Part *
tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
infotypes: 0000, 0001, 0105, 0655.
data: begin of ITAB occurs 0,
MTEXT(25) type C,
PERNR like PA0001-PERNR,
ABKRS like PA0001-ABKRS,
ENAME like PA0001-ENAME,
USRID_LONG like PA0105-USRID_LONG,
end of ITAB.
data: W_BEGDA like HRPY_RGDIR-FPBEG,
W_ENDDA like HRPY_RGDIR-FPEND.
data: RETURN like BAPIRETURN1 occurs 0 with header line.
data: P_INFO like PC407,
P_FORM like PC408 occurs 0 with header line.
data: P_IDX type I,
MY_MONTH type T549Q-PABRP,
STR_MY_MONTH(2) type C,
MY_YEAR type T549Q-PABRJ,
STR_MY_YEAR(4) type C,
CRLF(2) type x value '0D0A'.
data: W_CMONTH(10) type C.
data: TAB_LINES type I,
ATT_TYPE like SOODK-OBJTP.
data: begin of P_INDEX occurs 0,
INDEX type I,
end of P_INDEX.
constants: begin of F__LTYPE, "type of line
CMD like PC408-LTYPE value '/:', "command
TXT like PC408-LTYPE value 's', "textline
end of F__LTYPE.
constants: begin of F__CMD, "commands
NEWPAGE like PC408-LINDA value '',
end of F__CMD.
data: P_LIST like ABAPLIST occurs 1 with header line.
*data: OBJBIN like SOLISTI1 occurs 10 with header line,
data: OBJBIN like LVC_S_1022 occurs 10 with header line,
DOCDATA like SODOCCHGI1,
OBJTXT like SOLISTI1 occurs 10 with header line,
OBJPACK like SOPCKLSTI1 occurs 1 with header line,
RECLIST like SOMLRECI1 occurs 1 with header line,
OBJHEAD like SOLISTI1 occurs 1 with header line,
it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
gd_buffer type string,
l_no_of_bytes TYPE i,
l_pdf_spoolid LIKE tsp01-rqident,
l_jobname LIKE tbtcjob-jobname.
data: file_length type int4,
spool_id type rspoid,
line_cnt type i.
*-------------------------------------------------------------------* * INITIALIZATION *
OBJBIN = ' | '.
append OBJBIN.
OBJPACK-HEAD_START = 1.
data: S_ABKRS like PV000-ABKRS.
data: S_PABRP like T549Q-PABRP.
data: S_PABRJ like T549Q-PABRJ.
* SELECTION SCREEN *
selection-screen begin of block BL1.
parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
selection-screen end of block BL1.
START-OF-SELECTION.
s_ABKRS = PNPXABKR.
S_PABRP = PNPPABRP.
s_pabrj = PNPPABRJ.
w_begda = PN-BEGDA.
w_endda = PN-ENDDA.
get pernr.
* "Check active employees
rp-provide-from-last p0000 space pn-begda pn-endda.
CHECK P0000-STAT2 IN PNPSTAT2.
* "Check Payslip Mail flag
rp-provide-from-last p0655 space pn-begda pn-endda.
CHECK P0655-ESSONLY = 'X'.
rp-provide-from-last p0001 space pn-begda pn-endda.
* "Find email address
RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
if p0105-usrid_LONG ne ''.
ITAB-PERNR = P0001-PERNR.
ITAB-ABKRS = P0001-ABKRS.
ITAB-ENAME = P0001-ENAME.
ITAB-USRID_LONG = P0105-USRID_LONG.
append itab.
clear itab.
endif.
"SY-UCOMM ='ONLI'
END-OF-SELECTION.
*------------------------------------------------------------------* start-of-selection.
write : / 'Payroll Area : ', S_ABKRS.
write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
write : / 'System Time : ', SY-UZEIT.
write : / 'User Name : ', SY-UNAME.
write : / SY-ULINE.
sort ITAB by PERNR.
loop at ITAB.
clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
* Retrieve Payroll results sequence number for this run
select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
and FPBEG ge W_BEGDA
and FPEND le W_ENDDA
and SRTZA eq 'A'.
* Produce payslip for those payroll results
if SY-SUBRC = 0.
call function 'GET_PAYSLIP'
EXPORTING
EMPLOYEE_NUMBER = ITAB-PERNR
SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
PAYSLIP_VARIANT = PAY_VAR
IMPORTING
RETURN = RETURN
P_INFO = P_INFO
TABLES
P_FORM = P_FORM.
check RETURN is initial.
* remove linetype from generated payslip
loop at p_form.
objbin = p_form-linda.
append objbin.
line_cnt = line_cnt + 1.
endloop.
file_length = line_cnt * 1022.
* create spool file of paylsip
CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
EXPORTING
i_file_length = file_length
IMPORTING
e_spoolid = spool_id
TABLES
it_textdata = objbin.
IF sy-subrc EQ 0.
WRITE spool_id.
ENDIF.
DESCRIBE table objbin.
DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = spool_id
NO_DIALOG = ' '
DST_DEVICE = 'MAIL'
* PDF_DESTINATION =
* IMPORTING
* PDF_BYTECOUNT = l_no_of_bytes
* PDF_SPOOLID = l_pdf_spoolid
* LIST_PAGECOUNT =
* BTC_JOBNAME =
* BTC_JOBCOUNT =
TABLES
PDF = pdf
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*Download PDF file C Drive
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\itab_to_pdf.pdf'
filetype = 'BIN'
TABLES
data_tab = pdf.
* Transfer the 132-long strings to 255-long strings
* LOOP AT pdf.
* TRANSLATE pdf USING ' ~'.
* CONCATENATE gd_buffer pdf INTO gd_buffer.
* ENDLOOP.
* TRANSLATE gd_buffer USING '~ '.
* DO.
* it_mess_att = gd_buffer.
* APPEND it_mess_att.
* SHIFT gd_buffer LEFT BY 255 PLACES.
* IF gd_buffer IS INITIAL.
* EXIT.
* ENDIF.
* ENDDO.
OBJHEAD = 'Objhead'.
append OBJHEAD.
* preparing email subject
concatenate W_ENDDA(6)
' Payslip-'
ITAB-ENAME+0(28)
ITAB-PERNR+4(4) ')'
into DOCDATA-OBJ_DESCR.
DOCDATA-OBJ_NAME = 'Pay Slip'.
DOCDATA-OBJ_LANGU = SY-LANGU.
OBJTXT = 'Pay Slip.'.
append OBJTXT.
*prepare email lines
OBJTXT = DOCDATA-OBJ_DESCR.
append OBJTXT.
OBJTXT = 'Please find enclosed your current payslip.'.
append OBJTXT.
* Write Attachment(Main)
* 3 has been fixed because OBJTXT has fix three lines
read table OBJTXT index 3.
* DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
clear OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = 3.
OBJPACK-DOC_TYPE = 'RAW'.
append OBJPACK.
* Create Message Attachment
ATT_TYPE = 'PDF'.
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 = 'Payslip'.
append OBJPACK.
* Create receiver list refresh RECLIST.
clear RECLIST.
RECLIST-RECEIVER = itab-USRID_long.
translate RECLIST-RECEIVER to lower case.
RECLIST-REC_TYPE = 'U'.
append RECLIST.
* Send the document
*SO_NEW_DOCUMENT_ATT_SEND_API1
call function 'SO_DOCUMENT_SEND_API1'
exporting
DOCUMENT_DATA = DOCDATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
tables
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = pdf
CONTENTS_TXT = OBJTXT
* CONTENTS_HEX =
* 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 NE 0.
ITAB-MTEXT = 'Message Not Sent to : '.
else.
ITAB-MTEXT = 'Message Sent to : '.
endif.
* else.
* ITAB-MTEXT = 'Message Not Sent to : '.
* endif.
else.
"SY-SUBRC Not = 0
ITAB-MTEXT = 'Payroll data not found : '.
endif.
"end of SY-SUBRC = 0.
modify ITAB.
endloop. "end loop at ITAB
sort ITAB by MTEXT PERNR.
loop at ITAB.
at new MTEXT.
uline.
write : / ITAB-MTEXT color 4 intensified on.
write : / 'Emp. Code' color 2 intensified on,
12 'Emp. Name' color 2 intensified on,
54 'Email ID' color 2 intensified on.
endat.
write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
endloop. -
Problem with the function module SO_DOCUMENT_SEND_API1
Hi Friends,
I am facing the problem wiht the function module SO_DOCUMENT_SEND_API1,
My actull requirement is : - i need to send the sap data to my externa mail id (Like as XYZ@) with out the any attachment , So i have implemented the code with the function module SO_DOCUMENT_SEND_API1.
The mail has successfully sent the sap inbox (SOST) but the mail are not reached to the external mail ID'S( XYZ@GMAIL)
i Have maintained my code lines same as below.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = wa_doc_data
put_in_outbox = ca_x
commit_work = ca_x
TABLES
packing_list = tb_packing_list
contents_txt = tb_mailbody
receivers = tb_receiver.
Can you please tell me soultion ,
Thanks
charan.Hi charan,
If u r able to see the mail in sost, then i think ur code has worked fine. if the mail is not going to outside domains from sost u need to do some configurations for that, u can find lots of configuration docs regarding mail setup in sap.
once try to pass below parameter also.
t_receivers1-rec_type = 'U'.
For configuring mail setup u need to sit with ur basis guy.
Moderator message: please do not use SMS speak.
Edited by: Thomas Zloch on Nov 23, 2010 5:51 PM -
Sending email and alert notifcation using function module
Hi All,
I am trying to send email and alert notification messages using function modules in CRM. I am unable to send mail using 'SO_DOCUMENT_SEND_API1'. Getting a short dump message "dictionary mismatch". If anyone knows any FM which can be used for sending mails, please let me know. I also want to send alert messages using some FM. Please let me know any FM in this case as well.
All help appreciated. This is urgent and please get back to me soon.
Thanks
DenoHi Ranjit,
Thanks a lot for the reply. I already tried these FMs and getting the error message
Trigger Location of Runtime Error
Program SAPLBUPA_INTERFACE_TDTRANS
Include LBUPA_INTERFACE_TDTRANSTOP
Row 4
I dont know the reason behind the error. The SO_document_send FM is used inside all these FMs. So It wont work.
Thanks
Deno -
How to upload Excel file in BI using function module in abap program
How to upload Excel file in BI using function module in abap program?
Hi Anuj,
To upload the file , you can try a standard program "RSEPSFTP" .
while you execute the program , a selection screen appears in which the inputs should be give as
RFC destination - The target server name
FTP command- PUT
local file - your file name
local directory - path of your local file
remote file - your target file name
remote directory - where it has to be stored
Hope this is useful for you
Thanks & regards
Anju -
How to maintain Ztable using function module instead of SM30
Hi Friends,
please tell me , How to maintain Ztable or view using function module instead of SM30.
Thanks,
Veerendra.Hi,
You can design your report and use Function module VIEW_MAINTENANCE_CALL for that.
You need to use Action type as 'S' for displaying and 'U' for maintaining the table.
Ex:
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
ACTION = 'S'
VIEW_NAME = 'Table Name'
EXCEPTIONS
CLIENT_REFERENCE = 1
FOREIGN_LOCK = 2
INVALID_ACTION = 3
NO_CLIENTINDEPENDENT_AUTH = 4
NO_DATABASE_FUNCTION = 5
NO_EDITOR_FUNCTION = 6
NO_SHOW_AUTH = 7
NO_TVDIR_ENTRY = 8
NO_UPD_AUTH = 9
ONLY_SHOW_ALLOWED = 10
SYSTEM_FAILURE = 11
UNKNOWN_FIELD_IN_DBA_SELLIST = 12
VIEW_NOT_FOUND = 13
OTHERS = 14.
Hope this helps.
Message was edited by: Imtiaz Ahmed -
How to lock transaction using function module or something like that
Hi, all
I'd like to know the way to lock transacitons using function module or something like that.
I know this would be possible if calling transaciton SM01, but I want to know other ways like calling function module (BAPI ) or method.
Thank you for your cooperation In advance.
Regards,
Hideki KozaiHi,
Try the following FM
BRF_NETWORK_GRAPHICS BRF: Network Graphics for BRF Objects
BRF_INITIALIZE_GRAPHICS_NGR BRF: Initialize Network Graphics
BRF_NETWORK_GRAPHICS_NGR BRF: Network Graphics: Start
BUSG SAP Business Graphics
GRAPH_2D Calling up the 2D business graphics
GRAPH_2D_MENUE DO NOT USE (use 'GRAPH_2D' and 'GRAPH_BUSG_MENU_SET')
GRAPH_3D Calling up the 3D presentation graphics
GRAPH_BUSG_COLOR_SET Definition of color pallets for business graphics
GRAPH_BUSG_MENU_SET Pushbutton menu (tool bar) for all BUSG modules
GRAPH_MATRIX Calling up SAP Business Graphics (2D, 3D and 4D)
GRAPH_MATRIX_2D Calling up the 2D graphics (user-friendly version)
GRAPH_MATRIX_3D Structure of 3D graphics (user-friendly version)
GRAPH_MATRIX_4D Calling up a 3D graphic (4th dimension stacked representation)
Regards, -
ALV report ON WEB BROWSER USING FUNCTION MODULE
HI EXPERTS,
USING FUNCTION MODULE IN ALV ......HOW CAN WE DISPLAY ALV ON BROWSER(INTERNET).hi
good
go through these links, you ll find detail idea about displaying a ALV output in a browser.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5dc3e690-0201-0010-1ebf-b85b3bed962d
http://help.sap.com/saphelp_nw04/helpdata/en/3e/f496ef143a11d4b59f006094192fe3/content.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/77/3545415ea6f523e10000000a155106/frameset.htm
thanks
mrutyun^ -
Custom extractors using function modules
Hey all
Does anyone has a document regarding how to <b>Develop Custom extractors using function modules?Step by step method would be great</b>
Also document regarding <b>CTS in BW?</b>
Appreciate it
ThanksHi,
See here:
Generic Extractors
Generic data sources
Generic DS
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
Best regards,
Eugene -
Hi. i used Function module to change Characteristic values of a sales order
hi. i used Function module to change Characteristic values of a sales order..
but sales order's Characteristic values didn't change.
And the Function module doesn't occur any log message.
please tell me wrong code, and how to solve this problem.
if i have wrong method, what data can i pass to change the characteristic values
DATA: LT_E1CUVAL TYPE TABLE OF E1CUVAL.
DATA: WA_E1CUVAL TYPE E1CUVAL.
DATA: LS_CFG_HEAD LIKE CUXT_CUCFG_S,
LS_INSTANCES LIKE CUXT_CUINS_S,
LS_VALUES LIKE CUXT_CUVAL_S,
LS_E1CUCFG LIKE E1CUCFG,
LS_E1CUINS LIKE E1CUINS,
LS_E1CUVAL LIKE E1CUVAL,
LS_PROFILE LIKE E1CUCOM,
LS_VBAP LIKE VBAP,
L_CUOBJ LIKE INOB-CUOBJ,
L_ATINN LIKE CABN-ATINN.
DATA: LT_INSTANCES LIKE CUXT_CUINS_S OCCURS 0,
LT_PART_OF LIKE CUXT_CUPRT_S OCCURS 0,
LT_VALUES LIKE CUXT_CUVAL_S OCCURS 0,
LT_VAR_KEYS LIKE CUXT_CUVK_S OCCURS 0,
LT_KSML LIKE KSML OCCURS 0 WITH HEADER LINE,
BEGIN OF LT_CLINT OCCURS 0,
CLINT LIKE KSSK-CLINT,
END OF LT_CLINT.
DATA: LT_CUIB LIKE CUIB_CUOBJ_S OCCURS 0 WITH HEADER LINE.
DATA: E_ROOT_INSTANCE TYPE CUXT_INSTANCE_NO.
DATA: EV_ROOT_PERSIST_ID TYPE IBEXTINST_DATA-EXT_INST_ID.
DATA: EV_CFG_HAS_CHANGED TYPE XFELD.
DATA: EV_HANDLE_APPL_LOG TYPE BALLOGHNDL.
DATA: L_CUOBJ_NEW TYPE CUOBJ.
DATA: L_OWNER TYPE IBXX_BUSINESS_OBJECT.
REFRESH LT_E1CUVAL.
CLEAR LS_VBAP.
SELECT SINGLE CUOBJ INTO CORRESPONDING FIELDS OF LS_VBAP
FROM VBAP WHERE VBELN = I_VBELN
AND POSNR = I_POSNR.
IF SY-SUBRC <> 0.
RAISE INSTANCE_NOT_FOUND.
ENDIF.
REFRESH LT_CUIB. CLEAR LT_CUIB.
LT_CUIB-INSTANCE = LS_VBAP-CUOBJ.
APPEND LT_CUIB.
CALL FUNCTION 'CUCB_INITIALIZER'
EXPORTING
IT_INSTANCES = LT_CUIB[].
CALL FUNCTION 'CUXI_GET_SINGLE_CONFIGURATION'
EXPORTING
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
IMPORTING
E_CFG_HEAD = LS_CFG_HEAD
ES_PROFILE = LS_PROFILE
ET_RETURN = ET_RETURN
TABLES
E_TAB_INSTANCES = LT_INSTANCES
E_TAB_PART_OF = LT_PART_OF
E_TAB_VALUES = LT_VALUES
E_TAB_VAR_KEYS = LT_VAR_KEYS
EXCEPTIONS
INVALID_INSTANCE = 1
NO_ROOT_INSTANCE = 2
INSTANCE_IS_A_CLASSIFICATION = 3
INTERNAL_ERROR = 4
NO_PROFILE_FOUND = 5
INVALID_DATA = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE INSTANCE_NOT_FOUND.
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ELSE.
LOOP AT LT_VALUES INTO LS_VALUES.
IF LS_VALUES-CHARC = 'SAP_MILLCA_PACKAGING'
OR LS_VALUES-CHARC = 'PD_CA_PACKING_DM'.
LS_VALUES-VALUE = '7100010'. "This is test data
MODIFY LT_VALUES FROM LS_VALUES.
ELSE.
DELETE LT_VALUES WHERE CHARC = LS_VALUES-CHARC.
ENDIF.
CLEAR LS_VALUES.
ENDLOOP.
ENDIF.
영업정보 특성 변경
CALL FUNCTION 'CUXI_SET_SINGLE_CONFIGURATION'
EXPORTING
I_CFG_HEADER = LS_CFG_HEAD
I_ROOT_INSTANCE = LS_VBAP-CUOBJ
I_PLANT =
I_STRUCTURE_EXPLOSION_DATE =
I_STRUCTURE_EXPLOSION_APPL_ID =
I_LOGSYS =
IS_PROFILE = LS_PROFILE
IV_ONLY_SINGLE_LEVEL =
IV_HANDLE_APPL_LOG =
IV_OBJECT_APPL_LOG = 'CIF'
IV_SUBOBJECT_APPL_LOG = 'T_CNFG'
IMPORTING
E_ROOT_INSTANCE = E_ROOT_INSTANCE
EV_ROOT_PERSIST_ID = EV_ROOT_PERSIST_ID
EV_CFG_HAS_CHANGED = EV_CFG_HAS_CHANGED
EV_HANDLE_APPL_LOG = EV_HANDLE_APPL_LOG
ET_RETURN = ET_RETURN
TABLES
I_TAB_INSTANCES = LT_INSTANCES
I_TAB_PART_OF = LT_PART_OF
I_TAB_VALUES = LT_VALUES
I_TAB_VAR_KEYS = LT_VAR_KEYS
I_TAB_BLOB =
EXCEPTIONS
NO_CONFIGURATION_DATA = 1
NO_ROOT_INSTANCE = 2
INVALID_INSTANCE = 3
INSTANCE_IS_A_CLASSIFICATION = 4
INTERNAL_ERROR = 5
NO_PROFILE_FOUND = 6
INVALID_DATA = 7
OTHERS = 8
IF SY-SUBRC <> 0.
CASE SY-SUBRC.
WHEN 1.
RAISE NO_CONFIGURATION_DATA.
WHEN 3.
RAISE NO_ROOT_INSTANCE.
WHEN 3.
RAISE INVALID_INSTANCE .
WHEN 3.
RAISE INSTANCE_IS_A_CLASSIFICATION.
WHEN 3.
RAISE INTERNAL_ERROR.
WHEN OTHERS.
RAISE INVALID_DATA.
ENDCASE.
ENDIF.
COMMIT WORK.
save configuration with next commit
CLEAR: LS_INSTANCES.
READ TABLE LT_INSTANCES INTO LS_INSTANCES INDEX 1.
L_OWNER-OBJECT_TYPE = LS_INSTANCES-OBJ_TYPE.
L_OWNER-OBJECT_TYPE = 'PVS_POSVAR'.
L_OWNER-OBJECT_KEY = LS_INSTANCES-OBJ_KEY.
CALL FUNCTION 'CUCB_CONFIGURATION_TO_DB'
EXPORTING
ROOT_INSTANCE = LS_VBAP-CUOBJ
ROOT_OBJECT = L_OWNER
IMPORTING
NEW_INSTANCE = L_CUOBJ_NEW
EXCEPTIONS
INVALID_INSTANCE = 1
INVALID_ROOT_INSTANCE = 2
NO_CHANGES = 3
OTHERS = 4.
IF SY-SUBRC > 1 AND SY-SUBRC <> 3.
CLEAR LS_VBAP-CUOBJ.
RAISE INTERNAL_ERROR.
ELSEIF SY-SUBRC = 1.
LS_VBAP-CUOBJ = L_CUOBJ_NEW.
ENDIF.
What's wrong?
help me to solve this problem.
Thanks a lot.<b>SD_SALES_DOCUMENT_READ</b> Reads sales document header and business data: tables VBAK, VBKD and VBPA (Sold-to (AG), Payer (RG) and Ship-to (WE) parties)
<b>SD_SALES_DOCUMENT_READ_POS</b> Reads sales document header and item material: tables VBAK, VBAP-MATNR
<b>SD_DOCUMENT_PARTNER_READ</b> partner information including address. Calls SD_PARTNER_READ
<b>SD_PARTNER_READ</b> all the partners information and addresses
<b>SD_DETERMINE_CONTRACT_TYPE</b>
In: at least VBAK-VBELN
Exceptions: NO CONTRACT | SERVICE_CONTRACT | QUANTITY_CONTRACT
<b>SD_SALES_DOCUMENT_COPY</b>
<b>RV_ORDER_FLOW_INFORMATION</b> Reads sales document flow of sales document after delivery and billing
SD_SALES_DOCUMENT_SAVE create Sales Doc from the copied document
SD_SALES_DOCUMENT_ENQUEUE to dequeue use DEQUEUE_EVVBAKE
RV_DELIVERY_PRINT_VIEW Data provision for delivery note printing
SD_PACKING_PRINT_VIEW
SD_DELIVERY_VIEW Data collection for printing
called from RV_DELIVERY_PRINT_VIEW, SD_PACKING_PRINT_VIEW
RV_BILLING_PRINT_VIEW Data Provision for Billing Document Print
regards
vinod -
Error occurred while loading Generic extraction using Function module
Hi all
I'm trying to do INIT for Generic Extractor using Function module, but i'm getting error as "Error occurred in the source system"
Error message from the source system
Diagnosis
An error occurred in the source system.
System Response
Caller 09 contains an error message.
Further analysis:
The error occurred in Extractor .
Refer to the error message.
Procedure
How you remove the error depends on the error message.
Note
If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.
Job terminated in source system --> Request set to red
Message no. RSM078
Can u help plz....Hi Vishnu
This are the Job log details i found in source system...Can u tell what whould be the problem?
Message
Job started
Step 001 started (program SBIE0001, variant &0000000002861, user ID
Asynchronous transmission of info IDoc 2 in task 0001 (0 parallel tasks)
DATASOURCE = ZYFI102
RLOGSYS =
REQUNR = REQU_D9Y4CZDQULRIHRRVU33KOLQZO
UPDMODE = D
LANGUAGES = *
Current Values for Selected Profile Parameters *
abap/heap_area_nondia......... 0 *
abap/heap_area_total.......... 10737418240 *
abap/heaplimit................ 40000000 *
zcsa/installed_languages...... DE *
zcsa/system_language.......... E *
ztta/max_memreq_MB............ 2047 *
ztta/roll_area................ 3000000 *
ztta/roll_extension........... 2000000000 *
No authorization for Acct type D
Job cancelled after system exception ERROR_MESSAGE
Thanks in advance
Edited by: MohanDP on Feb 25, 2011 11:58 AM
Edited by: MohanDP on Feb 25, 2011 12:01 PM -
Error in Data selection in R/3 Generic Extraction Using function Modules
Hi Friends,
I have created a a generic data source using function module to load data from PA0000 and PA0001 Tables ,Function module is working fine when i execute it indipendently and the data source is also working fine when i extract data using RSA3. it is showing correct no of records 157.
When loading data into DSO from BW (using 3.x/7.0 flows) data is comming to PSA all 157 records but in the RSMO the load status is showing yellow when i look into the step by step analysis it is
data selection successfully started
Data selection successfully ended
All Data packets completed.
are showing in red.
after and hour time load getting failed and in the error message it is showing " job terminated in source system---> Request set to red"
it is giving this message wir no RSM 78.
Please let me know itHi Jerry,
Thanks for the immediate replay
But here in my source system job is getting terminated.
this is the status of job in Job logs.
the job is running till this step not going ahead.
Call customer enhancement BW_BTE_CALL_BW204010_E (BTE) with 157 records
Result of customer enhancement: 157 records
Call customer enhancement EXIT_SAPLRSAP_001 (CMOD) with 301 records
Result of customer enhancement: 157 records
Asynchronous send of data package 000001 in task 0002 (1 parallel tasks)
pl. update me if any idea.
Maybe you are looking for
-
Hi all, Ultra newbie here with probably an obvious question. I recently submitted two separate podcasts to iTunes, and they both seem to be up and running in the store. Right now, the art that goes with them is not there--just the generic podcast i
-
A Critical error encountered while loading webpage.
Was running 2.1.51 and when browsing to the status link while logged in to the web gui I got a blank web page with the following text: A Critical error encountered while loading webpage. Reboot router - log back in - can go anywhere except the statu
-
je viens d'acheter un mac air. Aprés la restauration apparait l'icone de mon vieux mac et on me demande un mot de passe. je mets mon mot de passe de mon ancien mac et ça ne marche pas! Que dois je faire?
-
Is it just me or is iTunes radio down?
Everytime try to click on a station it won't connect. My internet is working so I know I have an internet connection, and I did try to shut down & reboot. Still having that same problem. It was working fine last night.
-
I have some applications that haven't finished updating and I can't open nor delete them?
I have some applications that haven't finished updating and I can't open nor delete them?