DMS document output in SOP report
Hi all,
I want to OUTPUT a DMS document in SOP Report template. But it is not reflecting in my SOP report though I have fullfilled the prerequisites.Here are my steps that i carried out
1) I have linked the DMS doc. in a value assignment in user defined text.
2) The DMS document type is SBV.
3) The required document indicator tick is alos ensured in specify user defined text types in BASIC DATA & TOOLS in customizing.
3)It is also ensured that the EHS <> DMS doc types are linked in customizing.
4) I put the symbol in wwi report template under GESTDHEADE HEADER User-defined text .
But when I run the preview (cg42) the space where I have assigned the symbol is blank.
I even tried to put my required data in Long text in user defined text tab assigning REMARKS as user defined text type but there is no output in REPORT when i carry out preview.
Requesting your comment what shall be the cause of this .
Regards,
Ashish pradhan
Hello all
the document type SBV should not be used or used only carefully regarding this. I recommend to use a customer specific document type. SBV is related to WWI report templates. Furthermore make sure that generation variant fits usage of data record in which you have set up the document which is located in the user defined text (Active indicator of usage must be set). I know cases in the area of access problemes so that the WWI could not retrieve the user defined document. PLease make sure that you have "checked" WWI layout without error (WWI Check).
PLease check this:
if you have uploaded e.g. an rtf file and created a value assignment and you have uploaded the document to be stored in the user defined text than the document is "there". That means: in this process the SAP EH&S process generate a new unique id which should show up in the user defined text (there somthing like this should show up: SBV WWI 0000111223 numbers...)
Using this unique ID you can check if the document is really in DMS available. Furthermore depending on the EH&S release (support package etc.) you could check this. If you "click" with the mouse key on the unique id (refer above) the SAP EH&S system should upload directly to your client computer the document and start immediatly the corresponding application (e.g. word etc.) . In doing so you can check if the document is "really" there
May be you need to check further DMS customizing. E.g. depending on the document you have used in upload there is a missing link to the "type" of document. .E.g. the EXCEL macro regarding standard SAP output variant links to I believe a seperate document type
Hope that helps
With best regards
CB
Similar Messages
-
Embedding DMS Documents within CG42 Report Template
Hi All,
We are using EH&S and DMS and would like to combine these two into a CG42 report template. Through CG02, we have created specifications where we would like to have some value assignments instances take advantage of the user-defined text tab to pull in documents from DMS. We have configured the system to successfully link in the DMS document info record into the user-defined tab within the value assignment area of CG02 and can view the DMS documents by double clicking on that reference.
In taking this to the next step, we would like to embed this document into our report template definition. Mind you that some of these documents are .pdf containing text and graphics. Within CG42, we go to the specification symbol that we want and open the area called ADDITIONAL INFO, which then opens to other symbols, one of which is "ESTDF Additional Information - User-Defined Text". When we open that node, it provides us with many attributes as options that we can embed within the report template. The only one that relates to content is "GESTDHEADE HEADER Start of UD Text ". It appears that all this does is just repeat the link that was specified in CG0 when we use the command to include that in the report template and then do a preview on the report.
In reading some SAP Help Documentation in the section for user-defined text, I'm led to believe that you can embed these into the report template but I have not been able to do so thus far. The only thing I can do is embed information about the user-defined text into the report template.
Can someone shed some light if this is feasible?
By the way, we are already embedding graphic logos by relating it to a phrase and keeping these images in a folder on a file server. If we must, we can use that approach but I'd really lile to keep these documents in DMS as a controlled document.
Thanks!Hello
please consult online help. Take a look here:
http://help.sap.com/saphelp_erp60_sp/helpdata/en/a7/2872ac0a6c11d28a220000e829fbbd/content.htm
Chapter: Symbol Type: Specification
Subchapter: Output of Document Management Documents
The description is ok and in my opinion a good starting point.
Hope this helps.
C.B.
PS: http://help.sap.com/saphelp_erp60_sp/helpdata/en/a7/286d780a6c11d28a220000e829fbbd/content.htm is helpful too.
Chapter: User-Defined Texts and Documents
Edited by: Christoph Bergemann on Nov 26, 2011 5:12 PM -
Hello I created a PDF documentation for a report and
want to link it with a SAP report (called by transaction SA38)
I created a DMS document by transaction CV01N
created document links to report, transaction and
developement object R3TR/PROG/<report name>
and also transaction R3TR/TRAN/<transaction>
I released the document (status).
But I do not know how to make this documentation
available from selection screen of report.
Can anybody help me with this task?
Thank you
Matthias
[other Keywords: CV02N CV03N]Hi Matthias
Whenever you create a DIR for Example with parameters
Docuemnt Number - 100005
Document Type - DRW
Part - 000
Version - 00
You can Link this DIR with Standard SAP Object such as Material Master ( MARA ) , Vendor Master ( LFA1 ) , Customer ( KNA1) in DC10 ( Define Document Types > Define Object Links ).
In this Standard SAP Object are available that can be linked to Document Type. If the Object you desire to link to SAP DMS DIR is not available the you will have to do ABAP Developement to link your desired object to DIR in SAP DMS.
Check this Link
http://help.sap.com/saphelp_erp60_sp/helpdata/en/b2/c043a66fab11d1949500a0c92f024a/content.htm
Check your Object which you want to link to SAP DMS. if not the Follow the procedure given in link.
Hope this information is usefull to you.
With Regards
Mangesh Pande -
SOP report goes into word repaginating
hi
I am facing a word repaginating porblem while opening my SOP report.
I have assigned a DMS doc with doc type SBV to the specification work (it is a word .docx file) . I created the report SOP from the specification work bench and it is in realsed state also. But when I tried to view the released report either from CG54 or report management , the word document that is opening goes into the state of word repaginating . It remains in the same status till i cancel the action. But during this process the system outputs the report template perfectly to the extent of report body but the part where i have assigned the DMS doc show some wierd symbols.
If I try to view the report from 'report from template' functionality in CG02 or from cg42 I get the output of dms document as well along with the report template.
Regards,
AshishHi Ashish,
Here you would not only have to take care of the document type settings of SBV, but also of SBR and SBE.
Document type SBR (not SBV) is used for generating reports for specifications using released report templates and contain expanded specification data. While, SBV is for only defining the report template in which you use symbols of various symbol types to define the layout of your reports. The link between report templates and report generation variants enables you to generate reports (SBR) and final reports (SBE).
Hence, the problem may be of incorrect settings in document types SBR and SBV. Check the document status and workstation application settings of these doc types based on SAP note # 0000995736.
Hope, above solves your problem.
Regards,Pavan -
Fetching a transaction's output in the report
Hi,
I have to calculate stock on a particular date my report.
Transaction MB5B calculates stock on a particular date.
How can i pass the mandatory parameters to MB5B and fetch its output in the report itself?
Message was edited by: Nishant GuptaHi !
There's a little more help.
These:
SELECTION-SCREEN BEGIN OF BLOCK Database-selection
WITH FRAME TITLE TEXT-001.
Text-001: Datenbankabgrenzungen
SELECT-OPTIONS: MATNR FOR MARD-MATNR MEMORY ID MAT
MATCHCODE OBJECT MAT1,
*{ INSERT PA9K013121 1
MFRPN FOR MARA-MFRPN MEMORY ID MPN
MATCHCODE OBJECT HTN,
*} INSERT
BUKRS FOR T001-BUKRS MEMORY ID BUK,
WERKS FOR T001W-WERKS MEMORY ID WRK,
LGORT FOR T001L-LGORT,
CHARG FOR MCHB-CHARG,
BWTAR FOR MBEW-BWTAR,
BWART FOR MSEG-BWART.
PARAMETERS SOBKZ LIKE MSEG-SOBKZ.
SELECTION-SCREEN SKIP.
SELECT-OPTIONS: DATUM FOR MKPF-BUDAT NO-EXTENSION.
Datumsintervall für Selektion
SELECTION-SCREEN END OF BLOCK Database-selection.
is the selection screen of the RM07MLBD.
All these parameters (i.e .MATNR, CHARG, BWART) can be passed with the submit command.
For example (where the p_... Parameters are parametes of YOUR report !).
SUBMIT RM07MLBD
with matnr in p_matnr
with bwart in p_bwart
with charg in p_cahrg
and return
exporting list to memory.
The import if the list is a bit more dificult.
It's basically like this:
DATA LISTTAB LIKE LISTOBJECT
OCCURS 1.
CALL FUNCTION 'LIST_FROM_MEMORY' TABLES LISTOBJECT = LISTTAB.
Then the list will be in the table LISOBJECT.
For more info see the docu of 'LIST_FROM_MEMORY'
Regards
Rainer -
Hi,
DMS document is attached to PO .The requirement is that the attachment should be outputted with PO to the vendor.
Also ,I am able to see the attachment in ME 22/ME 23 but unable to see in ME22N/ ME23N.
Please advice.
Regards,
PratapHello,
In standard system, It is not possible to print attachment via the message output. Please refer Question 30 of attached
note 457497.
457497 FAQ: Message processing in purchasing
"Can documents that are linked to a purchase order also be output in the message output? " And the answer is: No."
There is no posibility to print attached documents from ME9F. Printing the PO from ME9F and print the document from ME22N by
selecting the document and pressing print button. You will only be able to see the screen linked documents when an item in the po (or position) has been selected.
Regards, -
Output of ALV report as attachment in email
Dear all ,
I would like to send output of ALV report as attachment in email.
i already written code for this using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
I can able to send list output as HTM format. But I want to send ALV report output
As a attachment. How can I do this .please explain
Thanks in advance
Regards
ManoharHello,
U can sent like this.
Check this report
REPORT ZV_SEND_MAIL .
TABLES: EKKO.
PARAMETERS: P_EMAIL TYPE SOMLRECI1-RECEIVER
DEFAULT '[email protected]'.
TYPES: BEGIN OF T_EKPO,
EBELN TYPE EKPO-EBELN,
EBELP TYPE EKPO-EBELP,
AEDAT TYPE EKPO-AEDAT,
MATNR TYPE EKPO-MATNR,
END OF T_EKPO.
DATA: IT_EKPO TYPE STANDARD TABLE OF T_EKPO INITIAL SIZE 0,
WA_EKPO TYPE T_EKPO.
TYPES: BEGIN OF T_CHAREKPO,
EBELN(10) TYPE C,
EBELP(5) TYPE C,
AEDAT(8) TYPE C,
MATNR(18) TYPE C,
END OF T_CHAREKPO.
DATA: WA_CHAREKPO TYPE T_CHAREKPO.
DATA: IT_MESSAGE TYPE STANDARD TABLE OF SOLISTI1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: IT_ATTACH TYPE STANDARD TABLE OF SOLISTI1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: T_PACKING_LIST LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
T_CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
T_RECEIVERS LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
T_ATTACHMENT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
T_OBJECT_HEADER LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
W_CNT TYPE I,
W_SENT_ALL(1) TYPE C,
W_DOC_DATA LIKE SODOCCHGI1,
GD_ERROR TYPE SY-SUBRC,
GD_RECIEVER TYPE SY-SUBRC.
*START_OF_SELECTION
START-OF-SELECTION.
* Retrieve sample data from table ekpo
PERFORM DATA_RETRIEVAL.
* Populate table with detaisl to be entered into .xls file
PERFORM BUILD_XLS_DATA_TABLE.
*END-OF-SELECTION
END-OF-SELECTION.
* Populate message body text
PERFORM POPULATE_EMAIL_MESSAGE_BODY.
* Send file by email as .xls speadsheet
PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
TABLES IT_MESSAGE
IT_ATTACH
USING P_EMAIL
'Example .xls documnet attachment'
'XLS'
'filename'
CHANGING GD_ERROR
GD_RECIEVER.
* Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM DATA_RETRIEVAL.
SELECT EBELN EBELP AEDAT MATNR
UP TO 10 ROWS
FROM EKPO
INTO TABLE IT_EKPO.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_XLS_DATA_TABLE
* Build data table for .xls document
FORM BUILD_XLS_DATA_TABLE.
CONSTANTS: CON_CRET TYPE X VALUE '0D', "OK for non Unicode
CON_TAB TYPE X VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
* con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
* con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO IT_ATTACH SEPARATED BY CON_TAB.
CONCATENATE CON_CRET IT_ATTACH INTO IT_ATTACH.
APPEND IT_ATTACH.
LOOP AT IT_EKPO INTO WA_CHAREKPO.
CONCATENATE WA_CHAREKPO-EBELN WA_CHAREKPO-EBELP
WA_CHAREKPO-AEDAT WA_CHAREKPO-MATNR
INTO IT_ATTACH SEPARATED BY CON_TAB.
CONCATENATE CON_CRET IT_ATTACH INTO IT_ATTACH.
APPEND IT_ATTACH.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
* Send email
FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES PIT_MESSAGE
PIT_ATTACH
USING P_EMAIL
P_MTITLE
P_FORMAT
P_FILENAME
P_ATTDESCRIPTION
P_SENDER_ADDRESS
P_SENDER_ADDRES_TYPE
CHANGING P_ERROR
P_RECIEVER.
DATA: LD_ERROR TYPE SY-SUBRC,
LD_RECIEVER TYPE SY-SUBRC,
LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
LD_EMAIL LIKE SOMLRECI1-RECEIVER,
LD_FORMAT TYPE SO_OBJ_TP ,
LD_ATTDESCRIPTION TYPE SO_OBJ_NAM ,
LD_ATTFILENAME TYPE SO_OBJ_DES ,
LD_SENDER_ADDRESS LIKE SOEXTRECI1-RECEIVER,
LD_SENDER_ADDRESS_TYPE LIKE SOEXTRECI1-ADR_TYP,
LD_RECEIVER LIKE SY-SUBRC.
LD_EMAIL = P_EMAIL.
LD_MTITLE = P_MTITLE.
LD_FORMAT = P_FORMAT.
LD_ATTDESCRIPTION = P_ATTDESCRIPTION.
LD_ATTFILENAME = P_FILENAME.
LD_SENDER_ADDRESS = P_SENDER_ADDRESS.
LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
* Fill the document data.
W_DOC_DATA-DOC_SIZE = 1.
* Populate the subject/generic message attributes
W_DOC_DATA-OBJ_LANGU = SY-LANGU.
W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
W_DOC_DATA-SENSITIVTY = 'F'.
* Fill the document data and get size of attachment
CLEAR W_DOC_DATA.
READ TABLE IT_ATTACH INDEX W_CNT.
W_DOC_DATA-DOC_SIZE =
( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
W_DOC_DATA-OBJ_LANGU = SY-LANGU.
W_DOC_DATA-OBJ_NAME = 'SAPRPT'.
W_DOC_DATA-OBJ_DESCR = LD_MTITLE.
W_DOC_DATA-SENSITIVTY = 'F'.
CLEAR T_ATTACHMENT.
REFRESH T_ATTACHMENT.
T_ATTACHMENT[] = PIT_ATTACH[].
* Describe the body of the message
CLEAR T_PACKING_LIST.
REFRESH T_PACKING_LIST.
T_PACKING_LIST-TRANSF_BIN = SPACE.
T_PACKING_LIST-HEAD_START = 1.
T_PACKING_LIST-HEAD_NUM = 0.
T_PACKING_LIST-BODY_START = 1.
DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
T_PACKING_LIST-DOC_TYPE = 'RAW'.
APPEND T_PACKING_LIST.
* Create attachment notification
T_PACKING_LIST-TRANSF_BIN = 'X'.
T_PACKING_LIST-HEAD_START = 1.
T_PACKING_LIST-HEAD_NUM = 1.
T_PACKING_LIST-BODY_START = 1.
DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
T_PACKING_LIST-DOC_TYPE = LD_FORMAT.
T_PACKING_LIST-OBJ_DESCR = LD_ATTDESCRIPTION.
T_PACKING_LIST-OBJ_NAME = LD_ATTFILENAME.
T_PACKING_LIST-DOC_SIZE = T_PACKING_LIST-BODY_NUM * 255.
APPEND T_PACKING_LIST.
* Add the recipients email address
CLEAR T_RECEIVERS.
REFRESH T_RECEIVERS.
T_RECEIVERS-RECEIVER = LD_EMAIL.
T_RECEIVERS-REC_TYPE = 'U'.
T_RECEIVERS-COM_TYPE = 'INT'.
T_RECEIVERS-NOTIF_DEL = 'X'.
T_RECEIVERS-NOTIF_NDEL = 'X'.
APPEND T_RECEIVERS.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = W_DOC_DATA
PUT_IN_OUTBOX = 'X'
SENDER_ADDRESS = LD_SENDER_ADDRESS
SENDER_ADDRESS_TYPE = LD_SENDER_ADDRESS_TYPE
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL = W_SENT_ALL
TABLES
PACKING_LIST = T_PACKING_LIST
CONTENTS_BIN = T_ATTACHMENT
CONTENTS_TXT = IT_MESSAGE
RECEIVERS = T_RECEIVERS
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.
* Populate zerror return code
LD_ERROR = SY-SUBRC.
* Populate zreceiver return code
LOOP AT T_RECEIVERS.
LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
* Instructs mail send program for SAPCONNECT to send email.
FORM INITIATE_MAIL_EXECUTE_PROGRAM.
WAIT UP TO 2 SECONDS.
SUBMIT RSCONN01 WITH MODE = 'INT'
WITH OUTPUT = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
* Populate message body text
FORM POPULATE_EMAIL_MESSAGE_BODY.
REFRESH IT_MESSAGE.
IT_MESSAGE = 'Please find attached a list test ekpo records'.
APPEND IT_MESSAGE.
ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY
If useful reward.
Vasanth -
Not able to upload file in DMS(Document Mang. system) using Web dynpro ABAP
Hi All,
I am facing a problem while uploading the file into the DMS ( Document Management System ) from Webdnrpo .
I am using the BAPI - BAPI_DOCUMENT_CREATE2 to create the document .
CASE - 1
when i am providing the storage category mention below and no data carrier1
ls_documentfiles-storagecategory = 'ZHMEL_CS'. it is not able to upload the document in the DMS system and when i check
in the debugg mode it giving error as ""Error while checking in and storing: C:\TEST.TXT "" .
CASE - 2
When i am not using the storage category and providing the the data carrier as default
ls_documentdata-DATACARRIER1 = 'DEFAULT'. It is able to create the document in the DMS but i am not able to read that document .
I checked with DMS Consultant that DMS is configured for ZOL ( documenttype) with a storage category as 'ZHMEL_CS'.
The code which i have used is below :
ls_documentdata-documenttype = 'ZOL'.
ls_documentdata-documentversion = '00'.
ls_documentdata-documentpart = '000'.
ls_documentdata-description = 'Test Document'.
ls_documentdata-laboratory = '001'.
ls_documentdata-WSAPPLICATION1 = 'TXT'.
ls_documentdata-DOCFILE1 = 'C:\TEST.TXT'.
ls_documentdata-SAVEDOCFILE1 = 'C:\TEST.TXT'.
*ls_documentdata-FILESIZE1 = 000000000000.
*ls_documentdata-FILESIZE2 = 000000000000.
ls_documentdata-WSAPPLICATION1 = 'TXT'.
ls_documentfiles-DOCUMENTTYPE = 'ZOL'.
ls_documentfiles-DOCUMENTPART = '000'.
ls_documentfiles-DOCUMENTVERSION = '00'.
ls_documentfiles-storagecategory = 'ZHMEL_CS'.
ls_documentfiles-WSAPPLICATION = 'TXT'.
ls_documentfiles-DOCPATH = 'C:\'.""lv_filename.
ls_documentfiles-DOCFILE = 'TEST.TXT'."lv_filename.
ls_documentfiles-description = 'Test Document'.
ls_documentfiles-language = 'EN'.
ls_documentfiles-CHECKEDIN = 'X'.
APPEND ls_documentfiles to lt_documentfiles .
*&----Fill Descriptions
w_descr-language = 'EN'.
w_descr-language_iso = 'EN'.
w_descr-description = 'Test'.
append w_descr to lt_descr.
clear w_descr.
**w_hostname = 'HMEL-DV1R3_DR3_00'.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_documentdata
*hostname = 'content-srv'
*pf_http_dest = 'SAPHTTPA'
*pf_ftp_dest = 'SAPFTPA'
IMPORTING
DOCUMENTNUMBER = lv_DOCUMENTNUMBER
return = gv_return
TABLES
documentdescriptions = lt_descr
documentfiles = lt_documentfiles.
Please let me know your valuable inputs on the same ..
Edited by: Omm Awasthi on Dec 30, 2010 12:22 AM
Edited by: Omm Awasthi on Dec 30, 2010 12:25 AMHi omm , from functional side your require a document type and content repository
I have used below code in a function module to create document , we have create object link as PO to the doc.
FUNCTION ZFM_SR_CREATE_FROM_EXTERNAL .
""Local Interface:
*" IMPORTING
*" VALUE(IV_DOCUMENTNUMBER) TYPE DOKNR OPTIONAL
*" VALUE(IV_DOCUMENTTYPE) TYPE DOKAR OPTIONAL
*" VALUE(IV_DOCUMENTVERSION) TYPE DOKVR OPTIONAL
*" VALUE(IV_DOCUMENTPART) TYPE DOKTL_D OPTIONAL
*" VALUE(IV_STORAGE_CAT) TYPE CV_STORAGE_CAT OPTIONAL
*" VALUE(IV_DOKST) TYPE DOKST OPTIONAL
*" VALUE(IT_DM_FILES) TYPE ZDM_TT_FILES OPTIONAL
*" VALUE(IV_EBELN) TYPE EBELN
*" EXPORTING
*" VALUE(EV_DOCUMENTNUMBER) TYPE DOKNR
*" VALUE(ES_RETURN) TYPE BAPIRET2
V00.00 DD.MM.YYYY *
*********************New Method of Uploading File*********************************
CONSTANTS path_name TYPE dms_path
VALUE '/tmp/'.
CONSTANTS log TYPE dms_path VALUE '/tmp/logFO.txt'.
DATA: ls_draw TYPE bapi_doc_draw2,
lt_documentfiles TYPE TABLE OF bapi_doc_files2,
ls_documentfiles TYPE bapi_doc_files2,
ls_dm_files TYPE zdm_files,
lv_filename TYPE string,
lv_ext TYPE string,
lv_file_type TYPE draw-dappl,
lv_file_name TYPE dms_path,
lv_msg(80) TYPE c,
lt_objectlinks TYPE TABLE OF bapi_doc_drad,
ls_objectlinks TYPE bapi_doc_drad,
lv_ebelp TYPE ebelp
Prepare Data
MOVE iv_documentnumber TO ls_draw-documentnumber.
MOVE iv_documenttype TO ls_draw-documenttype.
MOVE iv_documentversion TO ls_draw-documentversion.
MOVE iv_documentpart TO ls_draw-documentpart.
ls_draw-statusextern = iv_dokst.
ls_draw-statusintern = iv_dokst.
ls_draw-username = sy-uname.
LOOP AT it_dm_files INTO ls_dm_files.
SPLIT ls_dm_files-filepath AT '.' INTO lv_filename lv_ext.
CALL FUNCTION 'CV120_DOC_GET_APPL'
EXPORTING
pf_file = ls_dm_files-filepath
IMPORTING
pfx_dappl = lv_file_type.
TRANSLATE lv_file_type TO UPPER CASE.
OPEN DATASET log FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
TRANSFER lv_ext TO log.
ls_documentfiles-wsapplication = lv_file_type.
TRANSLATE ls_documentfiles-wsapplication TO UPPER CASE.
CONCATENATE path_name
lv_filename
lv_ext
INTO lv_file_name.
CONDENSE lv_file_name NO-GAPS.
TRANSFER lv_file_name TO log.
OPEN DATASET lv_file_name FOR OUTPUT IN BINARY MODE MESSAGE lv_msg.
*Transfer Attachment Content to Application Server
TRANSFER ls_dm_files-content TO lv_file_name.
CLOSE DATASET lv_file_name.
TRANSFER 'move data to lt_files' TO log.
ls_documentfiles-storagecategory = iv_storage_cat.
ls_documentfiles-docfile = lv_file_name.
ls_documentfiles-DOCUMENTVERSION = IV_DOCUMENTVERSION.
APPEND ls_documentfiles TO lt_documentfiles.
CLEAR lv_file_name.
CLOSE DATASET log.
ENDLOOP.
IF iv_ebeln IS NOT INITIAL.
ls_objectlinks-objecttype = 'EKPO'.
SELECT SINGLE ebelp INTO lv_ebelp FROM ekpo WHERE
ebeln = iv_ebeln
AND loekz eq space.
CONCATENATE iv_ebeln lv_ebelp INTO ls_objectlinks-objectkey.
APPEND ls_objectlinks TO lt_objectlinks.
ENDIF.
CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
EXPORTING
documentdata = ls_draw
pf_ftp_dest = 'SAPFTPA'
pf_http_dest = 'SAPHTTPA'
IMPORTING
documentnumber = ev_documentnumber
return = es_return
TABLES
objectlinks = lt_objectlinks
documentfiles = lt_documentfiles.
DATA: ls_doc_data type bapi_doc_draw2,
ls_doc_datax type bapi_doc_drawx2,
ls_return type bapiret2.
Set value for document data
ls_doc_data-statusextern = 'IW'.
ls_doc_data-statusintern = 'IW'.
Set value for document data check
ls_doc_datax-statusextern = 'X'.
ls_doc_datax-statusintern = 'X'.
CALL FUNCTION 'BAPI_DOCUMENT_CHANGE2'
EXPORTING
DOCUMENTTYPE = 'ROS'
DOCUMENTNUMBER = IV_DOCUMENTNUMBER
DOCUMENTPART = IV_DOCUMENTPART
DOCUMENTVERSION = IV_DOCUMENTVERSION
DOCUMENTDATA = ls_doc_data
DOCUMENTDATAX = ls_doc_datax
HOSTNAME =
DOCBOMCHANGENUMBER =
DOCBOMVALIDFROM =
DOCBOMREVISIONLEVEL =
SENDCOMPLETEBOM = ' '
pf_ftp_dest = 'SAPFTPA'
pf_http_dest = 'SAPHTTPA'
CAD_MODE = ' '
ACCEPT_EMPTY_BOM = ' '
IMPORTING
RETURN = ls_return
TABLES
CHARACTERISTICVALUES =
CLASSALLOCATIONS =
DOCUMENTDESCRIPTIONS =
OBJECTLINKS =
DOCUMENTSTRUCTURE =
DOCUMENTFILES = lt_documentfiles.
LONGTEXTS =
COMPONENTS =
move es_return to ES_RETURN.
IF es_return-type CA 'EA' ."NE 'E' AND es_return-type NE 'A'.
"do nothing
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
LOOP AT lt_documentfiles INTO ls_documentfiles.
DELETE DATASET ls_documentfiles-docfile.
ENDLOOP.
ENDFUNCTION. -
Output of a report in PDF Format
Hi all,
I need to get the Output of a report in PDF format.
Please suggest me hwo to do this requirement.
If having please give me the sample code
Thanks and Regards
Ajaysample code for PDF conversion...
tables : vbrk. "Billing Document: Header Data
Type pool declaration
type-pools slis.
Selection screen
selection-screen begin of block b1 with frame.
select-options : p_date for vbrk-aedat.
selection-screen end of block b1.
Types declaration
types : begin of t_vbrk,
vbeln type vbrk-vbeln, "Billing Document
aedat type vbrk-aedat, "Changed on(date)
fksto type vbrk-fksto, "Billing document is cancelled
end of t_vbrk.
Internal table declaration
data : i_vbrk type table of t_vbrk,
w_vbrk type t_vbrk.
Field catalog declaration
data : i_cat type slis_t_fieldcat_alv,
w_cat like line of i_cat,
t_print type slis_print_alv.
data :top type table of slis_listheader with header line.
data : event type table of slis_alv_event with header line.
start of selection
top-of-page.
start-of-selection.
perform get_dat.
if sy-subrc = 0.
perform build_cat.
perform alv_print_info.
perform sub_create_spool_id.
perform display_data.
perform sub_send_mail.
endif.
Subroutine GET_DAT
form get_dat .
*---To fetch canelled billing documents.
select vbeln
aedat
fksto
from vbrk
into table i_vbrk
where aedat in p_date and fksto = 'X'.
endform. " GET_DAT
Subroutine DISPLAY_DATA
form display_data .
call function 'REUSE_ALV_EVENTS_GET'
importing
et_events = event[]
top-typ = 'H'.
top-info = sy-title.
append top.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
i_callback_top_of_page = 'NAN'
i_grid_title = 'Alok Arun (Mr.A)'
it_fieldcat = i_cat
it_events = event[]
is_print = t_print
tables
t_outtab = i_vbrk
endform. " DISPLAY_DATA
*& Subroutine BUILD_CAT
form build_cat .
w_cat-seltext_l = 'Billing Document'.
w_cat-col_pos = '1'.
w_cat-tabname = 'I_VBRK'.
w_cat-fieldname = 'VBELN'.
w_cat-ref_fieldname = 'VBELN'.
w_cat-hotspot = 'X'.
append w_cat to i_cat.
clear w_cat.
w_cat-seltext_l = 'Cancelled on'.
w_cat-col_pos = '2'.
w_cat-tabname = 'I_VBRK'.
w_cat-fieldname = 'AEDAT'.
w_cat-ref_fieldname = 'AEDAT'.
w_cat-hotspot = 'X'.
append w_cat to i_cat.
clear w_cat.
endform. " BUILD_CAT
*& Form alv_print_info
form alv_print_info .
t_print-no_print_selinfos = 'X'.
t_print-no_coverpage = 'X'.
t_print-no_print_listinfos = 'X'.
endform. " alv_print_info
*& Form sub_create_spool_id
form sub_create_spool_id .
data: lv_text(50) type c.
lv_text = sy-title.
new-page line-size sy-linsz
print on destination 'LP01'
cover text lv_text
list name 'LIST NAME SOL MANAGER'(002)
list dataset 'LIST DATASET'(003)
immediately ' '
keep in spool 'X'
new list identification 'X'
no dialog.
endform. " sub_create_spool_id
*& Form sub_send_mail
form sub_send_mail .
data: v_spono like tsp01-rqident.
v_spono = sy-spono.
data:
v_type like soodk-objtp,
i_pdflist like tline occurs 0,
t_print TYPE slis_print_alv,
jobname like tbtcjob-jobname,
jobcount like tbtcjob-jobcount,
numbytes type i,
pdfspoolid like tsp01-rqident,
jobname2 like tbtcjob-jobname,
jobcount2 like tbtcjob-jobcount,
i_compresslist like soli occurs 0.
data: pdf like tline occurs 100 with header line,
objbin like solisti1 occurs 10 with header line.
*--convert into PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = v_spono
no_dialog = ' '
importing
pdf_bytecount = numbytes
pdf_spoolid = pdfspoolid
btc_jobname = jobname2
btc_jobcount = jobcount2
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.
if sy-subrc <> 0.
endif.
*-- change the width of the pdf table --
call function 'SX_TABLE_LINE_WIDTH_CHANGE'
exporting
line_width_src = 134
line_width_dst = 255
tables
content_in = pdf
content_out = objbin
exceptions
err_line_width_src_too_long = 1
err_line_width_dst_too_long = 2
err_conv_failed = 3
others = 4.
if sy-subrc <> 0.
endif.
endform. -
Delete link between a DMS document and a change number
Hi. I've associated several DMS documents to a change number, using CC02 transaction. Now I'm trying to delete these links. I can neither delete them nor delete change number. I've marked "Deletion indicator", but I don't know how I have to continue.
Best regards, Iván.Hi Iván,
please use report MCDOKDEL: This report is used to delete the Documents which are marked for deletion.
To delete the linkage between change number and object link, please go to CC02 and select button "Objects". Here you can see all linked objects to this change number. Select tab "Documents" and mark the document for which you want to delete the link. Afterwards please press the delete button. Then the linkage to this document should be deleted.
Regarding object link problems please see also the following SAP notes:
880077
885977 and
960202
Hope this information will help you.
Best regards,
Christoph -
How to define PO Output for Communication Report
Hi,
I want to edit and add some features in the PO Output for Communication Report with 'POXPOPDF' short name by the xml publisher is there a way i read some where i found a document id Note:387670.1 but i found nothing but i want a detailed description to what i do exactly.
Any Advice Will Be Approtiated.
ThanksHi,
Depends on what you want to "edit and add".
The document on note 387670.1 https://metalink.oracle.com/metalink/plsql/docs/Document_Printing_White_Paper.pdf has detailed instructions on what you need to do, plus examples.
Please advise what you are trying to achieve.
Regards,
Gareth
Blog: http://garethroberts.blogspot.com/ -
Excel Output For Standard Report In R12
Hi Experts,
My Client wants Excel Output for Standard Reports ( ex:-Open Purchase Order Report (by cost center)_xml)
I changed the default output to Excel in Template of xml publisher administrator Responsibility.
Now it is showing the Excel output, but The layout of report is not same as layout which in text output of standard report.
Please guide me is there any solution to develop the reports layout in ms-excel using xml file rather than rtf template.
Thanks
Durga.Hi Alex,
Thanks for your replay.
Generating the new rtf template which is same as standard layout is difficult task for us. Actually we have 120 reports which have same requirement.
Is there any other solution for this . please guide me
Thanks
Durga
Edited by: 805567 on Jan 23, 2012 12:33 PM -
Cancel_flag in PO Output for Communication report
I'm trying to build logic into an RTF template for the "PO Output for Communication" report to handle cancelled lines. The cancel_flag can be set to "Y" at any of 3 levels - PO Header, PO Line and PO shipment. The field is called the same thing (cancel_flag) at all 3 levels but it doesn't always exist at all 3 levels. What do I call the field in my "IF" statement, so that it is looking at the correct field? Right now, if I am at the line level and I want to check the cancel_flag, if it doesn't exist, it looks at the cancel_flag at the shipment level.
have to see your for-each statements.
and you can do it, by using .. to go up one level
example from current level to go up4 level up ../../../../CUSTOM_FLAG
../../../CUSTOM_FLAG three lvl up.
Need to know the cancel_flag element you said, i can see only one :) in the given xml. -
How to download the output of a report along with column header
Hi,
Could someone please tell me on how to download the output of a report along with column header to .txt format. A download option needs to be given to the user using physical and logical file names .The report basically contains header details and item details and requirement is to download the same format into an .txt format.Hello,
Try this FM:
Data: being of itab occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
end of itab.
data:begin of fld_tab occurs 0,
fld_name(20),
end of fld_tab.
fld_tab = 'Material'.
append fld_tab.
fld_tab = 'Material Desc'.
append fld_tab.
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = ' '
CODEPAGE = ' '
FILENAME = 'C:\1.txt '
FILETYPE = 'DAT'
MODE = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = itab
FIELDNAMES = fld_tab
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Naimesh -
EBS: Email XML publisher output, from After Report Trigger in Data Template
Here is what I'm trying to do:
-- In EBS (11.5.10 CU2), I'm using XML publisher (5.6.2) data template and layout template to generate Output files (PDF, EXCEL etc)
--In the Data Template's AfterReport Trigger, I'm using the Concurrent Request Id to locate the Output file name and trying to Email that output file.
Problem:
-- When the AfterReport trigger code is executed, the code is NOT seeing the output file and hence the file is NOT emailed.
Observations/Questions:
-- From what I observe, the Output Post Processor ( that generates the Excel / PDF files) is running AFTER the code in AfterReport trigger... and hence the AfterReport trigger is Not quite seeing / able to access the output file.
So, the sequence of execution seems to be:
-- Before Report Trigger
-- Data Query (SQL statement)
-- After Report Trigger
-- Output Post Processor
Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
If Yes, how else can the DataTemplate access the Output file?
If No, what could cause the AfterReport trigger to not see the output file?Because the AfterReport Trigger is running before the Output Post Processor, it is Not able to see the output file. Is that a True statement?
I believe so, as the OPP works on the output of the Report after the Report has completed execution.
You could use the same approach as we do for bursting the report to different users. Write a Java Concurrent program based on "oracle.apps.xdo.oa.cp. XMLPReportBurst" with delivery channel Email to send the email output. You would need to add code to launch the Concurrent child request in your AfterReport Trigger:
function AfterReport return boolean is
jreq_id number;
begin
srw.message (100, 'DEBUG: AfterReport_Trigger +');
jreq_id:= FND_REQUEST.SUBMIT_REQUEST ('XDO','XDOBURST','','',FALSE,:P_CONC_REQUEST_ID,'Y',chr(0),
If (jreq_id=0)
then
srw.message (100,'Request id is zero');
end if;
Maybe you are looking for
-
Problems with the "X" Key ...
Since quite a while I noted that I real often miss the "X" key when typing a text. I always treated it as my fault (a typo), especially as it works when typing it a second time. But meanhwile I have to say that it only happens with that "X" key and a
-
Uploading from Lightroom (PC) to Revel on Ipad/Iphone
Trying to use Lightroom Publishing Manager. I cannot get passed "log on to Revel" I know my Adobe, facebook and email password. Never know I had a "Revel" password. Any advice on finding "Revel" password. Or another way to upload photos to Revel fro
-
I have a WAVE 474 running v4.2.3. I see 20-30 connections per user, with several to the same host and sequential ports. Ex. x.x.x.y:56678, 56679, 56680.. to 56685 going to x.x.x.z:3456...3480. Is this correct? I am running out of TFO conne
-
Need help understanding mail import
I've just upgraded to OS 10.4.6 from OS 9.1. I was using Outlook Express 5.0.6 in OS 9.1. After trying every possible solution that I can dream up or have read about, I am desperate for an answer. I have two potential Email programs that I could use
-
Can I migrate from mavericks to mavericks server. Have tried using a hard drive but the but the sever does not find the migration backup when it's searches. Any help out there?