SAP 상용 시스템 함수 요약
SAP
CONVERSION_EXIT_ALPHA_INPUT 0
CONVERSION_EXIT_ALPHA_OUTPUT 0
CONVERSION_EXIT_MATN1_INPUT 0
CONVERSION_EXIT_MATN1_OUTPUT 0
LAST_DAY_OF_MONTHS
CO_SF_CAUFVD_GET
SO_NEW_DOCUMENT_ATT_SEND_API1
VIEW_MAINTENANCE_CALL
SO_OBJECT_SEND
CONVERSION_EXIT_ALPHA_INPUT
: 0,
:
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' " 0”
EXPORTING
input = matnr_in
IMPORTING
output = matnr_out.
:1) Table 0, , 0.
2) ’ ’
CONVERSION_EXIT_MATN1_INPUT
: 0
:
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT' " 0”
EXPORTING
input = matnr_in
IMPORTING
output = matnr_out
EXCEPTIONS
length_error = 1
OTHERS = 2.
: 1) Table 0, , 0.
2)
CONVERSION_EXIT_ALPHA_OUTPUT
: 0
:
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' " 0.
EXPORTING
input = wa_ysy1-matnr
IMPORTING
output = wa_ysy1-matnr.
:
CONVERSION_EXIT_MATN1_OUTPUT
: 0
:
CALL FUNCTION 'CONVERSION_EXIT_MATN1_OUTPUT'
EXPORTING
input = t_afpo-matnr
IMPORTING
output = t_afpo-matnr
EXCEPTIONS
OTHERS = 1.
:
LAST_DAY_OF_MONTHS
:
CALL FUNCTION 'LAST_DAY_OF_MONTHS'
EXPORTING
day_in = f_date " D( ##
IMPORTING
last_day_of_month = p_date " D( )
EXCEPTIONS
day_in_no_date = 1
OTHERS = 2.
:
CO_SF_CAUFVD_GET
:
:
DATA: wa_caufvd TYPE caufvd.
CALL FUNCTION 'CO_SF_CAUFVD_GET'"
EXPORTING
aufnr_imp = aufnr
IMPORTING
caufvd_exp = wa_caufvd “
EXCEPTIONS
not_found = 1
OTHERS = 2.
:
SO_NEW_DOCUMENT_ATT_SEND_API1
: SAPoffice: Send new document with attachments using RFC
:
FORM email_itab. “ “
WRITE: ' ' TO email_itab-line+0(3), "255 : "
' ' TO email_itab-line+3(10),
ENDFORM. "email_itab
FORM reset_objpack .
it_packing_list-transf_bin = space. " "
it_packing_list-head_start = 0." "
it_packing_list-head_num = 1. " "
it_packing_list-body_start = 1." "
it_packing_list-body_num = it_message_lines. " "
it_packing_list-doc_type = 'RAW'. " "
APPEND it_packing_list.
ENDFORM. "reset_objpack
FORM reset_doc_chng .
DESCRIBE TABLE email_itab LINES it_message_lines.
gd_doc_data-doc_size = it_message_lines * 255 + STRLEN( email_itab ). "SAPoffice "
gd_doc_data-obj_langu = sy-langu. " "
gd_doc_data-obj_name = 'SAPRPT'. " , "
gd_doc_data-obj_descr = ' '. "Email "
gd_doc_data-sensitivty = 'F'. " : ( , ,...) F: "
ENDFORM. "reset_doc_chng
FORM reset_reclist .
SELECT zmaaddr
INTO it_receivers-receiver
FROM ziebtemail.
it_receivers-rec_type = 'U'. "
APPEND it_receivers.
CLEAR it_receivers.
ENDSELECT.
ENDFORM. "reset_reclist
DATA: gd_doc_data LIKE sodocchgi1,
gd_sent_all(1) TYPE c,
it_message_lines TYPE sy-tabix,
it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
it_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF email_itab OCCURS 10.
INCLUDE STRUCTURE soli.
DATA: END OF email_itab.
PERFORM email_itab. "TABLES OUTPUT_TAB.
PERFORM reset_doc_chng.
PERFORM reset_reclist.
PERFORM reset_objpack.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = gd_doc_data “ ”
PUT_IN_OUTBOX = 'X' “ : outbox
* COMMIT_WORK = ' '
* IMPORTING
SENT_TO_ALL = gd_sent_all “Flag: Document sent to all”
* NEW_OBJECT_ID = ID of created object (not document!)
tables
packing_list = it_packing_list “SAPoffice: ”
* OBJECT_HEADER =
* CONTENTS_BIN =
* CONTENTS_TXT =
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
receivers = email_itab”SAPoffice:API ”
* 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.
:
VIEW_MAINTENANCE_CALL
:
:
CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
EXPORTING
action = 'U' “ ( / / )”
* CORR_NUMBER = ' '
* GENERATE_MAINT_TOOL_IF_MISSING = ' '
* SHOW_SELECTION_POPUP = ' '
view_name = 'ZIEBTEMAIL' “ / ”
* NO_WARNING_FOR_CLIENTINDEP = ' '
* RFC_DESTINATION_FOR_UPGRADE = ' '
* CLIENT_FOR_UPGRADE = ' '
* VARIANT_FOR_SELECTION = ' '
* COMPLEX_SELCONDS_USED = ' '
* CHECK_DDIC_MAINFLAG = ' '
* SUPPRESS_WA_POPUP = ' '
* TABLES
* DBA_SELLIST =
* EXCL_CUA_FUNCT =
* 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
* MAINTENANCE_PROHIBITED = 14
* OTHERS = 15
.
IF sy-subrc <>0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
:
SO_OBJECT_SEND
:
:
REPORT ztmail02 .
DATA: BEGIN OF itab OCCURS 0,
pernr LIKE pa0001-pernr,
ename LIKE pa0001-ename,
END OF itab.
DATA: message_content LIKE soli OCCURS 10 WITH HEADER LINE,
receiver_list LIKE soos1 OCCURS 5 WITH HEADER LINE,
packing_list LIKE soxpl OCCURS 2 WITH HEADER LINE,
listobject LIKE abaplist OCCURS 10,
compressed_attachment LIKE soli occurs 100 WITH HEADER LINE,
w_object_hd_change LIKE sood1 occurs 100 WITH HEADER LINE,
compressed_size LIKE sy-index.
START-OF-SELECTION.
SELECT pernr ename
INTO CORRESPONDING FIELDS OF TABLE itab
FROM pa0001
WHERE pernr <50.
LOOP AT itab.
WRITE: /02 sy-vline, itab-pernr, 15 sy-vline, itab-ename, 50
sy-vline.
ENDLOOP.
*receivers
receiver_list-recextnam = '[email protected]'. “ ”
receiver_list-recesc = ‘U’. “ ; U ”
receiver_list-sndart = ‘MAIL'. “ ; MAIL ”
receiver_list-sndpri = '1'. “ : ; 1 ”
APPEND receiver_list.
*general data
w_object_hd_change-objla = sy-langu. “ ”
w_object_hd_change-objnam = 'Object name'. “ , ”
w_object_hd_change-objsns = 'F'. “ : ( , ,...)” F:
w_object_hd_change -OBJDES = ‘Message subject’. “Mail ”
APPEND w_object_hd_change.
*content
message_content-line = 'Message content'. “ ”
APPEND message_content.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = w_object_hd_change “ ”
object_type = 'RAW' “ ”
OUTBOX_FLAG = 'X' “ : outbox
owner = sy-uname “ ”
TABLES
objcont = message_content “ ”
receivers = receiver_list “ ”
att_cont = compressed_attachment.
:
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1625967
http://blog.csdn.net/ft1612796/archive/2007/05/25/1625967.aspx
CSDN , :http://blog.csdn.net/long2006sky/archive/2007/07/31/1719759.aspx
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
정수 반전Udemy 에서 공부 한 것을 중얼거린다 Chapter3【Integer Reversal】 (예) 문자열로 숫자를 반전 (toString, split, reverse, join) 인수의 수치 (n)가 0보다 위 또는 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.