on 12-02-2011 2:10 PM
Hi everybody,
We have a customer requeriment to create SC with attachments in background.
The information to create the SC is not coming from backend, if not from another system.
Anybody have any idea to develop this?
Many thanks in advanced.
David
Hey David,
I have the same problem, I´m trying to use the FM BBP_PD_SC_CREATE to crate news SC. If I know something I´ll tell you.
Rgs,
Pedro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Please use below code to create a attachement.
MOVE-CORRESPONDING ls_header_po TO ls_header_u .
ls_header_u-object_type = /sapsrm/if_pdo_obj_types_c=>gc_pdo_sc.
Call standard function module to attach PDF to Purchase Order Document
CALL FUNCTION 'BBP_PROCDOC_UPDATE'
EXPORTING
i_park = iv_park
i_save = iv_save
i_header = ls_header_u
it_attach = lt_attach
IMPORTING
es_header = ls_header_c
TABLES
e_messages = lt_messages
CHANGING
e_changed = lv_changed.
Regards,
Neelima
I solved with custom development.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Does anybody know how fill the table IT_ATTACH in the function 'BAPI_SCEC_CREATE'?
Many thanks in advanced.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
In my case it was PDF attachment
Fill IT_ATTACH as below:-
DATA: ls_attach TYPE bbp_pds_att,
ls_attach_kw TYPE bbp_pds_att_kw,
ls_attach_all TYPE bbp_pds_att_t,
lt_attach TYPE bbpt_pds_att_t.
*Creating the GUID for attachment
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_16 = lv_guid.
ls_attach-guid = lv_guid.
ls_attach-p_guid = ls_item-p_guid.(header or item guid)
ls_attach-loio_class = 'BBP_L_DOC'.
ls_attach_kw-phio_class = 'BBP_P_DOC'.
ls_attach_kw-phio_version_no = '00000001'.
ls_attach_kw-phio_ext = 'PDF'
ls_attach_kw-phio_fsize = '240'. (size)
ls_attach_kw-phio_mime = 'application/pdf'.
ls_attach_kw-phio_fname = lv_ext. ('name.pdf')
ls_attach_kw-phio_ps_mime = 'application/postscript'.
MOVE-CORRESPONDING ls_attach TO ls_attach_all.
MOVE-CORRESPONDING ls_attach_kw TO ls_attach_all.
APPEND ls_attach_all TO lt_attach.
Now you can use this lt_attach to 'BAPI_SCEC_CREATE'.
Regards,
Neelima
Hello ,
Try using the below code after above one
Now it_attach is type bbpt_pds_att_t and et_attach is bapi_att_c
Attachments
LOOP AT it_attach INTO ls_attach WHERE del_ind IS initial.
MOVE-CORRESPONDING ls_attach TO et_attach.
extend internal url to have unique attachment access
IF NOT ( ls_attach-loio_class IS INITIAL
OR ls_attach-loio_objid IS INITIAL ).
CALL FUNCTION 'BBP_ATTACH_CONTENT_ACCESS_GET'
EXPORTING
is_attach = ls_attach
IMPORTING
ev_doc_url = lv_doc_url
ev_error = lv_error.
IF lv_error IS INITIAL.
MOVE lv_doc_url TO et_attach-url.
ENDIF.
it_attach-parent_guid = ls_attach-p_guid.
APPEND it_attach.
ENDIF.
ENDLOOP.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.